var Slide=Class.create();Slide.prototype={initialize:function(A,B){this.name=A;this.imgs=B;this.actual=0},loadImgs:function(){for(var B=1;B<this.imgs.length;B++){var A="<li id='"+this.name+B+"' style='background-image:url(pictures/"+this.imgs[B]+")'>&nbsp;";A+="<div class='nextBtn' onclick='"+this.name+".animate(\"forward\")' onmouseover='swapBg(this)' onmouseout='swapBg(this)'><span class='next'>&nbsp;</span></div>";A+="<div class='previousBtn' onclick='"+this.name+".animate(\"backward\")' onmouseover='swapBg(this)' onmouseout='swapBg(this)'><span class='previous'>&nbsp;</span></div></li>";new Insertion.After(this.name+"0",A)}var C=$(this.name).getElementsByTagName("li");for(var B=0;B<C.length;B++){if(B!=0){C[B].style.display="none"}}},animate:function(A){Effect.Fade($(this.name+this.actual),{duration:0.5});switch(A){case"forward":if(this.actual==this.imgs.length-1){this.actual=0}else{this.actual++}break;case"backward":if(this.actual==0){this.actual=this.imgs.length}else{this.actual--}break}setTimeout("Effect.Appear('"+this.name+this.actual+"');",300)}};function swapBg(B){var A=$(B).getElementsByTagName("span");if(A[0].style.backgroundPosition=="0px -30px"){A[0].style.backgroundPosition="0px 0px"}else{A[0].style.backgroundPosition="0px -30px"}}function rates(B,A){if(B.style.color!="#000"){switch(A){case 1:B.style.backgroundColor="#6d508f";B.style.color="#fff";break;case 2:B.style.backgroundColor="#6d508f";B.style.color="#fff";break;case 3:B.style.backgroundColor="#a275d7";B.style.color="#fff";break;case 4:B.style.backgroundColor="#b3c332";B.style.color="#fff";break}}};