(function($){$.fn.xnCarousel=function(settings){var defaults={jumpTo:null,margins:10,step:2,duration:500,easing:"easeInExpo",indent:"-200px",target:"#carousel_ul",leftButton:"#left_scroll img",rightButton:"#right_scroll img"};var o=$.extend(defaults,settings||{});var current_page=0;function slide(direction){var item_width=$(o.target+' li').outerWidth()+o.margins;if(direction=="right"){var left_indent=parseInt($(o.target).css('left'))-(item_width*o.step);current_page++;}
else if(direction=="left"){var left_indent=parseInt($(o.target).css('left'))+(item_width*o.step);current_page--;}
$(o.target+':not(:animated)').animate({'left':left_indent},o.duration,o.easing,function(){for(n=0;n<o.step;n++){if(direction=="right")
$(o.target+' li:last').after($(o.target+' li:first'));else if(direction=="left")
$(o.target+' li:first').before($(o.target+' li:last'));}
$(o.target).css({'left':'-32px'});});}
function jumpTo(item){return;}
return($(o.target).each(function(e){$(o.target+' li:first').before($(o.target+' li:last'));if(o.jumpTo!=null){jumpTo(o.jumpTo);}
$(o.rightButton).click(function(){slide("right");});$(o.leftButton).click(function(){slide("left");});}))}})(jQuery);
