$(document).ready(function(){setupSlideShow();});var currentIndex=0;function goToSlide(e){var b=$("#slideshow .slide");var c=b.length;var a=950;if(c==0){return;}if(e<0){e=c-1;}if(e>c-1){e=0;}var d=e-currentIndex;var f=d*a;$("#slideshowcontainer").animate({marginLeft:"-="+f},"slow","swing");currentIndex=e;$("#position a").removeClass("active");$($("#position a")[currentIndex]).addClass("active");}function setupSlideShow(){if($("#slideshow").length==0){return;}for(var a=0;a<$("#slideshow .slide").length;a++){if(a==0){$("#position").append("<a href='#"+a+"' class='active'></a>");}else{$("#position").append("<a href='#"+a+"'></a>");}}$("#position a").live("click",function(){var b=parseInt(this.href.substring(this.href.length-1,this.href.length));goToSlide(b);});$("#slideshow #next").click(function(b){goToSlide(currentIndex+1);b.preventDefault();});$("#slideshow #previous").click(function(b){goToSlide(currentIndex-1);b.preventDefault();});}
