var Ticker=new Class({setOptions:function(a){this.options=new Hash({speed:5000,delay:5000,link:"chain",direction:"vertical",onComplete:Class.empty,onStart:Class.empty,transition:"sine:in:out"});this.options.extend(a)},initialize:function(d,b){this.setOptions(b);this.el=$(d);this.items=this.el.getElements("li");if(this.items.length===0){this.el.setStyle("display","none");return}var a=0;var c=0;if(this.options.direction.toLowerCase()=="horizontal"){c=this.el.getSize().y;this.items.each(function(e,f){a+=e.getSize().x});a=a*10}else{a=this.el.getSize().x;this.items.each(function(e,f){c+=e.getSize().y})}this.el.setStyles({position:"relative",top:0,left:0,width:(a),height:c});this.current=0;this.next()},morphComplete:function(){this.items[this.current].inject(this.el,"bottom");this.el.setStyles({left:0,top:0});this.current++;this.next.delay(this.options.delay,this)},next:function(){if(this.current>=this.items.length){this.current=0}var a=this.items[this.current];if(this.options.direction.toLowerCase()=="horizontal"){w=a.getCoordinates().width;speed=(w/100)*this.options.speed;this.el.set("morph",{duration:speed,transition:this.options.transition,onComplete:this.morphComplete.bind(this)});this.el.morph({left:-w})}else{h=a.getCoordinates().height;speed=(h/100)*this.options.speed;this.el.set("morph",{duration:speed,transition:this.options.transition,onComplete:this.morphComplete.bind(this)});this.el.morph({top:-h})}}});
