(function(A){A.fn.easySlider=function(B){var C={prevId:"prevBtn",prevText:"Previous",nextId:"nextBtn",nextText:"Next",orientation:"",speed:800};var B=A.extend(C,B);return this.each(function(){obj=A(this);var I=A("li",obj).length;var D=obj.width();var H=obj.height();var J=I-1;var G=0;var F=(B.orientation=="vertical");A("ul",obj).css("width",I*D);if(!F){A("li",obj).css("float","left")}A(obj).after('<span id="'+B.nextId+'"><a href="javascript:void(0);">'+B.nextText+"</a></span>");A(obj).before('<span id="'+B.prevId+'"><a href="javascript:void(0);">'+B.prevText+"</a></span>");A("a","#"+B.prevId).hide();A("a","#"+B.nextId).hide();A("a","#"+B.nextId).click(function(){E("next");if(G>=J){A(this).fadeOut()}A("a","#"+B.prevId).fadeIn()});A("a","#"+B.prevId).click(function(){E("prev");if(G<=0){A(this).fadeOut()}A("a","#"+B.nextId).fadeIn()});function E(K){if(K=="next"){G=(G>=J)?J:G+1}else{G=(G<=0)?0:G-1}if(!F){p=(G*D*-1);A("ul",obj).animate({marginLeft:p},B.speed)}else{p=(G*H*-1);A("ul",obj).animate({marginTop:p},B.speed)}}if(I>1){A("a","#"+B.nextId).fadeIn()}})}})(jQuery);