var totalSlides=0;var currentSlide=1;var contentSlides="";$(document).ready(function(){if(st_gal=='')
{$("#slideshow-area").remove();}
else
{$("#slideshow-area").html(st_gal);}
$("#slideshow-previous").click(showPreviousSlide);$("#slideshow-next").click(showNextSlide);var totalWidth=0;contentSlides=$(".slideshow-content");contentSlides.each(function(i){totalWidth+=this.clientWidth;totalSlides++;});$("#slideshow-holder").width(totalWidth);$("#slideshow-scroller").attr({scrollLeft:0});updateButtons();jQuery("a[rel^='gallery']").prettyPhoto
({animationSpeed:'normal',padding:40,opacity:0.35,showTitle:false,allowresize:false,counter_separator_label:' of ',theme:'light_rounded'});});function showPreviousSlide()
{currentSlide--;updateContentHolder();updateButtons();}
function showNextSlide()
{currentSlide++;updateContentHolder();updateButtons();}
function updateContentHolder()
{var scrollAmount=0;contentSlides.each(function(i){if(currentSlide-1>i){scrollAmount+=this.clientWidth;}});$("#slideshow-scroller").animate({scrollLeft:scrollAmount},1000);}
function updateButtons()
{if(currentSlide<totalSlides){$("#slideshow-next").show();}else{$("#slideshow-next").hide();}
if(currentSlide>1){$("#slideshow-previous").show();}else{$("#slideshow-previous").hide();}}
