(function($){$.fn.exslider=function(k){var l={fx:'backout',prevId:'larrow',prevText:'',nextId:'rarrow',nextText:'',controlsShow:true,controlsBefore:'',controlsAfter:'',controlsFade:false,firstId:'firstBtn',firstText:'First',firstShow:false,lastId:'lastBtn',lastText:'Last',lastShow:false,vertical:false,speed:1200,auto:true,pause:2500,continuous:true};var k=$.extend(l,k);this.each(function(){var f=$(this);var s=$("li",f).length;var w=$("li",f).width();var h=$("li",f).height();f.width(w);f.height(h);f.css("overflow","hidden");var g=s-1;var t=0;$("ul",f).css('width',s*w);if(!k.vertical)$("li",f).css('float','left');if(k.controlsShow){var i=k.controlsBefore;if(k.firstShow)i+='<span id="'+k.firstId+'"><a href=\"javascript:void(0);\">'+k.firstText+'</a></span>';i+=' <span id="'+k.prevId+'"><a href=\"javascript:void(0);\">'+k.prevText+'</a></span>';i+=' <span id="'+k.nextId+'"><a href=\"javascript:void(0);\">'+k.nextText+'</a></span>';if(k.lastShow)i+=' <span id="'+k.lastId+'"><a href=\"javascript:void(0);\">'+k.lastText+'</a></span>';i+=k.controlsAfter;$(f).after(i)};$("a","#"+k.nextId).click(function(){animate("next",true)});$("a","#"+k.prevId).click(function(){animate("prev",true)});$("a","#"+k.firstId).click(function(){animate("first",true)});$("a","#"+k.lastId).click(function(){animate("last",true)});function animate(a,b){var c=t;switch(a){case"next":t=(c>=g)?(k.continuous?0:g):t+1;break;case"prev":t=(t<=0)?(k.continuous?g:0):t-1;break;case"first":t=0;break;case"last":t=g;break;default:break};var d=Math.abs(c-t);var e=d*k.speed;if(!k.vertical){p=(t*w*-1);$("ul",f).animate({marginLeft:p},e,k.fx)}else{p=(t*h*-1);$("ul",f).animate({marginTop:p},e,k.fx)};if(!k.continuous&&k.controlsFade){if(t==g){$("a","#"+k.nextId).hide();$("a","#"+k.lastId).hide()}else{$("a","#"+k.nextId).show();$("a","#"+k.lastId).show()};if(t==0){$("a","#"+k.prevId).hide();$("a","#"+k.firstId).hide()}else{$("a","#"+k.prevId).show();$("a","#"+k.firstId).show()}};if(b)clearTimeout(j);if(k.auto&&a=="next"&&!b){;j=setTimeout(function(){animate("next",false)},d*k.speed+k.pause)}};var j;if(k.auto){;j=setTimeout(function(){animate("next",false)},k.pause)};if(!k.continuous&&k.controlsFade){$("a","#"+k.prevId).hide();$("a","#"+k.firstId).hide()}})}})(jQuery);
