(function($){
		var list;
		var slides;
		var delay=3000;
		var bigDelay=10000;
		var currentPosition=0;
		var timer;
		var animationTime=1000;
		var interval;
		var positionDepart;
		var positionArrivee;
		var currentFrame;
		var frameRate=25;
		var vectorAnimation=0;
		
	$.fn.slider = function(options) {
	
		list=$(options.container);
		if (options.delay) delay=$(options.delay);
		slideWidth=parseInt(options.width);
	    var numSlides=$(list).children().length;
		
		init();
		
		
		
		function init() {
			
			var totalWidth=numSlides*slideWidth;
			$(list).children().css('width',slideWidth+'px')
		$(list).children().children("img").css("width",slideWidth+'px')
			
			$(list).css('width',totalWidth+'px')
			
		
		
		}
		
		this.start  = function() {
			
			timer=setTimeout(move, delay); 
			
		}
			this.stop  = function() {
clearTimeout(timer);
				timer= setTimeout(move, bigDelay); 

			}
		function move() {
			
			var actual=currentPosition;
			currentPosition++;
			if (currentPosition>=numSlides) currentPosition=0;
			
		
		$(list).tween({param:"left",
		from:slideWidth*(-actual),
		to:slideWidth*(-currentPosition),
			duration:500
			
		})
		
			 //$(list).animate({  
			 //       'left' : slideWidth*(-currentPosition)  
		     //  },animationTime);
		
		clearTimeout(timer);
			timer=setTimeout(move, delay); 
		}
		
		
	
	
		
		return this;
		
	}
	
	})(jQuery);
