Slider.implement({
	draggedKnob: function(){
		var dir = this.range < 0 ? -1 : 1;
		var position = this.drag.value.now[this.axis];
		position = position.limit(-this.options.offset, this.full -this.options.offset);
		this.step = Math.round(this.min + dir * this.toStep(position));
		this.checkStep();
		this.fireEvent('tick',position);
	}
});
        	var FilmStrip=new Class({
        		Implements:[Events],
        		elw:250,
        		d:20,
        		initialize:function(el)
        		{
        			this.bound=el.getElement('ul');
        			this.bw=this.bound.getParent().getSize().x;
        			this.els=el.getElements('li');
					//el.addEvent('mousewheel',this.WheelFun.bind(this));
					var i=0;
					var w=0;
					
					for(i=0;i<this.els.length;i++)
					{
						w=this.elw*i+i*this.d+2;
						this.els[i].setStyles({'left':(w),'opacity':0.5});
					}
					w+=this.elw+2;
					this.bound.setStyles({'width':w});
					this.w=w;
					var area=el.getElement('div.slidearea');
        			var knob=el.getElement('div.slider');
        			var next=el.getElement('div.next');
        			var prev=el.getElement('div.prev');
        			
        			next.addEvent('click',this.GoToNext.bind(this));
        			prev.addEvent('click',this.GoToPrev.bind(this));
        			
        			this.slider=new Slider(area, knob, 
        			{
        				wheel:true,
        				steps:this.els.length-1,
        				onComplete:this.GoTo.bind(this),
        				onChange:this.GoTo.bind(this)
        			});
        			this.MovFX=new Fx.Tween(this.bound,{
        				duration:1000,
        				onComplete:this.setPos.bind(this),
        				onStart:this.setPos.bind(this),
        				transition:Fx.Transitions.Elastic.easeOut
        			});
					this.mid=Math.round(this.bw/2);
					this.center=Math.round(this.els.length/2);
					this.Go();
        		},
        		SlidePos:function(sp)
        		{
        		},
        		GoTo:function(s)
        		{
        			this.center=s;
        			this.Go();
        		},
        		Go:function()
        		{
        			var elw=this.elw;
        			var i=this.center;
        			var pos=300-(elw*i+i*this.d+2)-Math.round(elw/2)-1;
        			this.MovFX.cancel();
        			this.MovFX.start('left',pos);
        		},
        		GoToNext:function()
        		{
        			this.center++;
        			if(this.center>=this.els.length) this.center=this.els.length-1;
        			this.Go();
        		},
        		GoToPrev:function()
        		{
        			this.center--;
        			if(this.center<0) this.center=0;
        			this.Go();
        		},
        		WheelFun:function(e)
        		{
        		},
        		setPos:function()
        		{
        			this.slider.set(this.center);
					for(i=0;i<this.els.length;i++)
					{
						var o=0.5;
						if(i==this.center) o=1;
						this.els[i].setStyles({'opacity':o});
					}
        		}
        	});
