var delayLength=6000;function doMove(d,a){var c=$("#mover").css("left");if(c=="auto"){c=0}var b=parseFloat(c,10)-d;if(b==a){$(".slide img").animate({top:-200},function(){$("#mover").animate({left:0},function(){$(".slide img").animate({top:20})})})}else{$(".slide img").animate({top:-200},function(){$("#mover").animate({left:b},function(){$(".slide img").animate({top:20})})})}}$(function(){var e=$("#slide-1");var f=e.css("width");var d=e.css("paddingLeft");var g=e.css("paddingRight");f=parseFloat(f,10);d=parseFloat(d,10);g=parseFloat(g,10);f=f+d+g;var b=$(".slide").length;var a=-(f*b);var c=b*f;$("#mover").css("width",c);$("#slider").append('<a href="#" id="slider-stopper">Stop</a>');sliderIntervalID=setInterval(function(){doMove(f,a)},delayLength);$("#slider-stopper").click(function(){if($(this).text()=="Stop"){clearInterval(sliderIntervalID);$(this).text("Start")}else{sliderIntervalID=setInterval(function(){doMove(f,a)},delayLength);$(this).text("Stop")}})});
