Mooquee = new Class({	Implements: [Options],	options: {		element: 'marquee',		cssitem: 'marquee_item',		firstitem:0,		direction:'left',		pause: 3, 		duration: 4, 		overflow:'hidden',		startOnLoad:true 	},	initialize: function(options){		this.setOptions(options);		this.itemFXs = [];		this.started = false;		this.currentitem = this.options.firstitem;		this.loop = true;				window.addEvent('domready', function() {			this.items = $$('#' + this.options.element + ' .' + this.options.cssitem);			this.totalitems = this.items.length;			if($(this.options.element).style.overflow != 'hidden')				$(this.options.element).style.overflow = 'hidden';			if($(this.options.element).style.position != 'relative')				$(this.options.element).style.position = 'relative';			this.setMooqueeFXs();			this.setDirection(this.options.direction);// has setMooqueeItems in it			if(this.options.startOnLoad)				this.mooveAll.delay(this.options.pause*1000 ,this);		}.bind(this));					},	setMooqueeItems: function(){		this.resetting =true;		var i=0;				this.items.each(function (element){			if($(element).style.position != 'absolute')				$(element).style.position = 'absolute';			$(element).style.width = $(this.options.element).clientWidth + 'px';			$(element).style.overflow = this.options.overflow;						if(i == this.currentitem)				startingposition =0;			else				startingposition = this.pixels;						this.itemFXs[i].set(this.style,startingposition);			this.itemFXs[i].set(this.antistyle,0);			i++;		}.bind(this));		this.resetting =false;	},	setMooqueeFXs: function(){		var i=0;		this.items.each(function (element){			this.itemFXs[i] = new Fx.Tween(element,{duration:(this.options.duration*1000)});			i++;		}.bind(this));	},	mooveAll: function(){		this.previousitem = this.currentitem;				if((this.currentitem + 1) == this.totalitems)			this.currentitem = 0;		else			this.currentitem = this.currentitem + 1;					this.moove(this.previousitem)		this.moove(this.currentitem);	},	moove: function(itemnumber){		if(itemnumber == this.previousitem)			this.itemFXs[itemnumber].start(this.style,this.antipixels).chain(function(){				if(!this.resetting)this.itemFXs[itemnumber].set(this.style,this.pixels);			}.bind(this));		else			this.itemFXs[itemnumber].start(this.style,0).chain(function(){				if(this.loop == true)					this.loopTimer = this.mooveAll.delay(this.options.pause*1000 ,this);			}.bind(this));			},	setDirection: function(newDirection){		this.style = 'left';		this.antistyle = 'top';		this.pixels = $(this.options.element).clientWidth;		this.antipixels = this.pixels * -1;		this.setMooqueeItems();	}});marquee = new Mooquee({});