Scroller={scrolling:false,container:"",duration:1000,items:2,itemWidth:0,init:function(a,b){Scroller.container=$(a);if(b){Scroller.items=b}Scroller.itemWidth=Scroller.container.width();Scroller.container.width(Scroller.container.width()*b);Scroller.bindEvents();Scroller.scrollEnd()},startScroll:function(b){var a=true;switch(b){case"+":if($(".left").children().attr("src").indexOf("disabled")>-1){a=false}break;case"-":if($(".right").children().attr("src").indexOf("disabled")>-1){a=false}break}if(a&&!Scroller.scrolling){Scroller.scrolling=true;Scroller.container.animate({left:b+"="+Scroller.itemWidth},Scroller.duration,function(){Scroller.scrollEnd()})}},scrollEnd:function(){Scroller.scrolling=false;if((parseInt(Scroller.container.css("left"))-Scroller.itemWidth)+parseInt(Scroller.container.width())<=0){$(".right").children().attr("src",$(".right").children().attr("src").replace(".gif","-disabled.gif"))}else{$(".right").children().attr("src",$(".right").children().attr("src").replace("-disabled",""))}if(parseInt(Scroller.container.css("left"))==0){$(".left").children().attr("src",$(".left").children().attr("src").replace(".gif","-disabled.gif"))}else{$(".left").children().attr("src",$(".left").children().attr("src").replace("-disabled",""))}},bindEvents:function(){$(document).ready(function(){$(".right").click(function(a){a.preventDefault();Scroller.startScroll("-")});$(".left").click(function(a){a.preventDefault();Scroller.startScroll("+")})})}};
