        jQuery.fn.centerScreen = function(loaded) {
              var me = this;
              var w = $(window);
              me.css({
                  top: 50 + w.scrollTop() + w.height() / 2 - me.height() / 2,
                  left: w.scrollLeft() + w.width() / 2 - me.width() /2
              });
          }

        function BannerSwitcher(paths){
            this.paths = paths;
            this.el = $(document.createElement('div'));
            this.el.css({
              position: 'absolute',
              display: 'none',
              width: '1000',
              height: '800',
              top: 0,
              left: 0,
              'z-index': 90000            
            });
            this.el.attr('id', 'wrapper' + Math.round((Math.random() * 100)));
            var me = this;
            var body = $('body');
            
            body.append(this.el);
            body.mousemove(function(event){
                me.mouseX = event.pageX;
                me.mouseY = event.pageY;
            });
            
        };
        BannerSwitcher.prototype.show = function(index){
            if(this.paths[index]){
                var w = $(window);
                var flash = $(document.createElement('div')).attr('id', 'container' + Math.round((Math.random() * 100)));
                this.el.empty();
                this.el.append(flash);
                swfobject.embedSWF(this.paths[index], flash.attr('id'), '1000', '800', "10.0.0", '',
                {mouseX: this.mouseX, mouseY: this.mouseY}, {wmode: 'transparent'}, {wmode: 'transparent'});
                this.el.show().centerScreen();
            }else{
                throw 'index "' + index + '" not found';
            }
        };
        BannerSwitcher.prototype.hide = function(){
            this.el.hide();
        };
