function Slides(a){this.slideCount=typeof a["slides"]=="number"?a["slides"]:0;this.time=typeof a["timeout"]=="number"?a["timeout"]:0;this.elementType=typeof a["elementType"]=="string"?a["elementType"]:"#";this.slides=typeof a["slideElement"]=="string"?a["slideElement"]:"";this.image=typeof a["imageElement"]=="string"?a["imageElement"]:"";this.button=typeof a["buttonElement"]=="string"?a["buttonElement"]:"";this.buttonOnState=typeof a["on"]=="object"?a["on"]:{};this.buttonOffState=typeof a["off"]=="object"?a["off"]:{};this.timer;this.dir=1;this.current=0;this.paused=false;this.init=function(){var a=this;for(x=1;x<=this.slideCount;x++){$(this.elementType+this.button+x).mouseover(function(b){return function(){a.updateImage(b)}}(x));$(this.elementType+this.button+x).mouseout(function(){a.paused=false})}$(this.elementType+this.slides).mouseover(function(){a.paused=true});$(this.elementType+this.slides).mouseout(function(){a.paused=false});this.updateImage(null);if(this.time>0)timer=setInterval(function(){a.updateImage(null)},this.time)};this.updateImage=function(a){if(this.time>0&&this.paused)return;for(x=1;x<=this.slideCount;x++){$(this.elementType+this.button+x).attr(this.buttonOffState);$(this.elementType+this.image+x).stop();if($(this.elementType+this.image+x).css("opacity")>0){$(this.elementType+this.image+x).animate({opacity:0},250*$(this.elementType+this.image+x).css("opacity"))}}if(a==null){this.current+=this.dir;this.current=this.current<1?this.slideCount:this.current;this.current=this.current>this.slideCount?1:this.current;a=this.current}else{this.paused=true;this.current=a}$(this.elementType+this.button+a).attr(this.buttonOnState);$(this.elementType+this.image+a).css("z-index",parseInt($(this.elementType+this.image+a).css("z-index"))+1);$(this.elementType+this.image+a).animate({opacity:1},250);for(x=1;x<=this.slideCount;x++){if(x!=a)$(this.elementType+this.image+x).css("z-index",parseInt($(this.elementType+this.image+a).css("z-index"))-1)}}}
