(function(a){a.fn.JQscroller=function(b){var c=jQuery.extend({animate:true,displayNum:5,interval:1000,paging:false,ajaxCall:false,animateDirection:{xy:"horizontal",direction:"left"},slideSpeed:500,controller:true,prev:".prev",next:".next",mask:".scrollMask",unit:".scrollMask li",currentNav:".currentNav",currentLocation:false},b);a(this).each(function(){var i=this;var k="#"+this.id;var j=k+" "+c.mask;var o=k+" "+c.unit;var m=k+" "+c.currentNav;var l=false;var v=c.animateDirection;var u=a(o).css("marginLeft");var s=a(o).css("marginRight");var q=a(o).css("marginTop");var d=a(o).css("marginBottom");var e=a(o+":first").width()+parseInt(u)+parseInt(s);var h=a(o+":first").height()+parseInt(q)+parseInt(d);var r=c.currentLocation;var f=0;a(k).css("position","relative");a(j).parent().css("overflow","hidden");a(j).css({position:"relative",left:"0px",overflow:"hidden",_zoom:1});if(v.xy=="horizontal"){a(o,j).css("float","left")}if(c.displayNum>a(o).size()){c.displayNum=a(o).size()}if(c.displayNum")})}t(f);a(i).hover(function(){l=true},function(){l=false});if((c.displayNum0){setInterval(g,c.interval)}function g(){if(!l){switch(v.xy){case"horizontal":v.direction=="left"?p():n();break;case"vertical":v.direction=="top"?p():n();break}}}function p(){if(a(j).is(":animated")){return false}if(v.xy=="horizontal"){a(j).css("left",0);if(c.animate){a(j).animate({left:-e+"px"},c.slideSpeed,c.easing)}else{a(j).css({left:-e+"px"})}}else{if(v.xy=="vertical"){a(j).css("top",0);if(c.animate){a(j).animate({top:-h+"px"},c.slideSpeed,c.easing)}else{a(j).css({top:-h+"px"})}}}var w=a(o+":first").clone(true);w.appendTo(j);a(o+":first").remove();if(f==a(o).size()-1){f=0}else{f=f+1}t(f)}function n(){if(a(j).is(":animated")){return false}var w=(c.animate)?a(o+":last").clone(true):a(o+":last");w.prependTo(j);if(f==0){f=a(o).size()-2}else{f=f-1}t(f);if(v.xy=="horizontal"){a(j).css("left",-e*2+"px");if(c.animate){a(j).animate({left:-e+"px"},c.slideSpeed,c.easing,function(){a(o+":last").remove()})}else{a(j).css({left:-e+"px"},function(){a(o+":last").remove()})}}else{if(v.xy=="vertical"){a(j).css("top",-h*2+"px");if(c.animate){a(j).animate({top:-h+"px"},c.slideSpeed,c.easing,function(){a(o+":last").remove()})}else{a(j).css({top:-h+"px"},function(){a(o+":last").remove()})}}}}function t(w){a(m+" span").each(function(x){if(x==w){a(this).addClass("on")}else{a(this).removeClass("on")}})}})}})(jQuery);