mkSlider=new Class({
	initialize:function(obj,delay, height){
		this.main=obj;
		this.slider=this.main.getElement("div");
		this.list=this.slider.getElement("ul");
		this.items=this.list.getElements("li");
		this.height=height || 150;
		this.delay=delay || 3000;
		this.pause=false;
		this.playng=false;
		this._init();
	},_init:function(){
		var sub=this;
		this.main.setStyle("height",this.height);
		this.slider.setStyle("margin-top","-"+this.height+"px");
		this.items.each(function(i){
			var s=document.createElement("div");
			s.style.overflow="hidden";
			s.style.height=sub.height+"px";
			s.innerHTML=i.innerHTML;			
			i.empty().appendChild(s);
			i.setStyle("display","inline");
			var li=i.clone();
			sub.list.appendChild(li);
			sub.items.push(li);
		})
		this.items.each(function(i,n){i.setProperty("id",n);})		
		this.slider.addEvent("mouseenter",function(){
			sub.stop();
		}).addEvent("mouseleave",function(){
			sub.restart();
		})
		this.timer=this.play.delay(this.delay, this);
	},play:function(){
		if(this.pause || this.playng) return;
		this.playng=true;
		var sub=this.items[0].getElement("div"), c=this;
		var fx = new Fx.Styles(sub, {duration:1500,onComplete:function(){			
			var li=sub.parentNode;
			li.parentNode.appendChild(li);
			sub.style.height=c.height+"px";
			c.playng=false;
			c.timer=c.play.delay(c.delay, c);
		}});		
		this.items.push(this.items.shift());
		fx.start({height:0});
	},stop:function(){
		this.pause=true;
		$clear(this.timer);
	},restart:function(){
		if(!this.pause || this.playng) return;
		this.pause=false;
		this.timer=this.play.delay(this.delay, this);
	}
});