var has_links_in_slideshow=false;$(document).ready(function(){slideShow(9000)});function slideShow(a){$("ul.slideshow").append('<li id="slideshow-caption" class="nomargin"><div class="slideshow-caption-container"><h3></h3><p></p></div></li>');$("ul.slideshow").append('<img class="ticker" src="/images/ticker.gif" alt="Ticker"/>');$("ul.slideshow li").css({opacity:0});$("ul.slideshow li:first").css({opacity:1});if($("ul.slideshow li a").length>0){has_links_in_slideshow=true;$("#slideshow-caption").css("cursor","pointer");setClickEvent()}$("#slideshow-caption h3").html($("ul.slideshow"+(has_links_in_slideshow?" a:first":"")).find("img").attr("title"));$("#slideshow-caption p").html($("ul.slideshow"+(has_links_in_slideshow?" a:first":"")).find("img").attr("alt"));$("#slideshow-caption").css({opacity:0.7,bottom:0});var b=setInterval("gallery()",a);$("ul.slideshow").hover(function(){clearInterval(b);$("ul.slideshow img.ticker").css({"z-index":"0"})},function(){b=setInterval("gallery()",a);$("ul.slideshow img.ticker").css({"z-index":"1500"})})}function setClickEvent(){var a=$("ul.slideshow li.show a:first");a.click(function(b){window.location=b.target.href});$("li#slideshow-caption div.slideshow-caption-container").click(function(){a.click()})}function gallery(){var b=($("ul.slideshow li.show")?$("ul.slideshow li.show"):$("#ul.slideshow li:first"));var a=((b.next().length)?((b.next().attr("id")=="slideshow-caption")?$("ul.slideshow li:first"):b.next()):$("ul.slideshow li:first"));var d=a.find("img").attr("title");var c=a.find("img").attr("alt");a.css({opacity:0}).addClass("show").animate({opacity:1},1000);b.removeClass("show");if(has_links_in_slideshow){setClickEvent()}$("#slideshow-caption").animate({bottom:-120},500,function(){$("#slideshow-caption h3").html(d);$("#slideshow-caption p").html(c);$("#slideshow-caption").animate({bottom:0},600)});b.animate({opacity:0},1000)};

