(function(a){jQuery.fn.simpleslideshow=function(s){var A,i,d,q,B,p,z,H,x,n,C,E,u,G,g,D,c,m,e,I,h,o,J,f,b,k,v,t,l,K,w,F,y,j,r;f=-1;h=[];y=[];i=function(M){var L=jQuery(M,this);L.css("border",u.borderWidth+" solid "+u.borderColor)};g=function(M){var L=jQuery(M,this);L.css("height",u.thumbHeight+u.units);L.css("width",u.thumbWidth*(J+1)+u.units);L.css("left",0);L.css("margin","0 0 0 0");L.css("padding","0 0 0 0");L.css("position","absolute")};d=function(M){var L=jQuery(M,this);L.css("background","url("+u.backgroundUrl+") no-repeat 0 0")};D=function(M){var L=jQuery(M,this);L.css("height",u.stageHeight+u.thumbHeight+2*u.thumbSpace+4*u.borderWidth+u.units);L.css("width",u.stageWidth+2*u.borderWidth+u.units);L.css("margin-left","70px");L.css("overflow","hidden")};q=function(M){var L=jQuery(M,this);L.css("border",u.borderWidth+u.units+" solid "+u.borderColor);L.css("text-align","left")};c=function(L){k.css("overflow","hidden");k.css("height",u.stageHeight+u.units);k.css("width",u.stageWidth+u.units)};B=function(L){var M=jQuery(L,this);M.css("height",u.thumbHeight+2*u.thumbSpace+u.units);M.css("border",u.borderWidth+u.units+" solid "+u.borderColor)};m=function(L){var M=jQuery(L,this);M.css("width",u.stageWidth+u.units);M.css("overflow","hidden");M.css("position","relative")};p=function(M){var L=jQuery(M,this);L.css("border",u.borderWidth+u.units+" solid "+u.borderColor);L.css("background-image","none")};e=function(M){var L=jQuery(M,this);L.css("height",u.thumbHeight+u.units);L.css("width",u.thumbWidth+u.units);L.css("float","left");L.css("margin",u.thumbSpace+u.units+" 0 0 "+u.thumbSpace+u.units);L.css("overflow","hidden");L.css("padding","0 0 0 0");L.css("text-align","center")};I=function(L){jQuery(L,this).bind("load",function(){if(L.height()>L.width()){L.css("width",u.thumbWidth+u.units)}else{L.css("height",u.thumbHeight+u.units)}})};H=function(){j=(u.thumbWidth+u.thumbSpace)*(J+1)};A=function(){n.fadeOut(1250,function(){if(E){y[f].fadeTo("fast",0.5);f=E;E=false}else{if(f<J){if(f>=0){y[f].fadeTo("fast",0.5)}f=parseInt(f,10)+1}else{if(f>=J){y[f].fadeTo("fast",0.5);f=0}}}n.html(h[f].html());l.animate({left:positionSlideShowAfterAdvance()},"slow");y[f].fadeTo("fast",1);n.fadeIn("fast")})};positionSlideShowAfterAdvance=function(){var L=0-f*(u.thumbWidth+u.thumbSpace);if(((u.buttonWidth+1)>=L)&&(u.stageWidth<(j+L+u.thumbSpace))){x=0;return L}else{if(0===x){x=0-(f-1)*(u.thumbWidth+u.thumbSpace)}return x}};G=function(){b=setInterval(A,u.sliderSpeed);C=true};v=function(){clearInterval(b);C=false};r=function(){l.wrap("<div></div>");o=l.parent();n=jQuery("<div></div>");l.before(n).hide();n.wrap(function(){return jQuery("<div></div>")});k=n.parent();l.wrap(function(){return jQuery("<div></div>")});t=l.parent();w=l.children(u.thumbContainerEl);F=jQuery(u.eL+" "+u.thumbContainerEl+" img");J=w.size()-1;H();k.click(function(){if(C){v()}else{A();G()}});w.each(function(L){jQuery(this).attr("slide_index",L);jQuery(this).children(":not(img)",this).hide();y[L]=jQuery(this);h[L]=jQuery(this).clone();I(jQuery(y[L]).children("img",this));jQuery(y[L]).click(function(){v();E=jQuery(this).attr("slide_index");A()})})};z={autoStyle:true,borderColor:"#000",borderWidth:2,backgroundUrl:"images/background.jpg",buttonWidth:0,imageFloat:"left",sliderSpeed:2500,stageHeight:370,stageWidth:666,thumbContainerEl:"li",thumbHeight:100,thumbSpace:2,thumbWidth:108,units:"px"};u=jQuery.extend(z,s);l=jQuery(this);l.hide();r();g(l);D(o);c(k);m(t);e(w);if(u.autoStyle){d(o);i(l);B(t);q(k);p(w)}A();G();l.show();k.show()}})(jQuery);

