        	var FlipPage=({
        		init:function()
        		{
        			this.f=$('flipb');
        			this.pages=$$('#flipb .flipme');
        			if(this.pages.length>0)
        			{
        				this.switches=[];
        				this.current=0;
        				this.timer=null;
        			
	        			this.FX=new Fx.Elements(this.pages,
	        			{
	        				onComplete:this.doNext.bind(this)
	        			});
        				var b=new Element('div',{'class':'slider slideflip'}).inject(this.f);
        				for(var i=0;i<this.pages.length;i++)
        				{
        					this.switches[i]=new Element('a',{'html':'&nbsp;','events':{'click':this.manualFlip.pass(i,this)}}).inject(b);
        				}
        				this.f.addEvent('mouseenter',this.pause.bind(this));
        				this.f.addEvent('mouseover',this.pause.bind(this));
        				this.f.addEvent('mouseleave',this.resume.bind(this));
        				this.manualFlip(this.current);
        			}
        		},
        		pause:function()
        		{
        			$clear(this.timer);
        		},
        		resume:function()
        		{
        			this.timer=this.manualFlip.delay(4000,this,this.current);
        		},
        		doNext:function()
        		{
        			this.current++;
        			if(this.current>=this.switches.length) this.current=0;
        			
        			this.timer=this.manualFlip.delay(4000,this,this.current);
        		},
        		manualFlip:function(i)
        		{
					$clear(this.timer);
					this.FX.cancel();
					this.current=i;
					var aobj={};
					for(var j=0;j<this.switches.length;j++)
					{
						this.switches[j].removeClass('selected');
						aobj[j]={'opacity':0};
						
					}
					aobj[i]={'opacity':1};
					this.switches[i].addClass('selected');
					this.FX.start(aobj);
        		}
        	});
        	window.addEvent('domready',FlipPage.init.bind(FlipPage));
