function slideSwitch(){var a=$("#slideshow LI.active");if(a.length==0)a=$("#slideshow LI:last");var e=a.next().length?a.next():$("#slideshow LI:first");a.addClass("last-active");e.css({opacity:0}).addClass("active").animate({opacity:1},1E3,function(){a.removeClass("active last-active");detectZindex()})}
function detectZindex(){function a(d){if($("#rotatorIMG-"+d).css("z-index")=="10"){$("#rotateButtons input").attr("class","normalButton");$("#rotateButton"+d).attr("class","overButton")}}var e=$("#slideshow ul li").length,g=[];for(i=1;i<=e;i++)g[i]=a(i)}
$(document).ready(function(){function a(b){for(j=1;j<=f;j++){$("#rotatorIMG-"+j).css("opacity","0.0");$("#rotatorIMG-"+j).css("z-index","0")}$("#rotatorIMG-"+b).css("opacity","1.0");$("#rotatorIMG-"+b).css("z-index","10");$("#rotateButtons input").attr("class","normalButton");$("#rotateButton"+b).attr("class","overButton");d=clearInterval(d)}function e(b){$("#rotateButton"+b).click(function(){a(b)})}function g(b){$("#rotateButton"+b).mouseenter(function(){var h=$("#rotatorIMG-"+b+" a").attr("rel");
$(".para").text(h);$("#rotateButton"+b).css({cursor:"pointer",border:"1px solid #3291CF"})})}var d;d=setInterval("slideSwitch()",5E3);var f=$("#slideshow ul li").length,c=[];for(i=1;i<=f;i++){var k=$("#rotatorIMG-"+i+" a").attr("rel");c[i]='<input type="button" id="rotateButton'+i+'" value="'+k+'" onfocus="blur()" />'}c=c.join(" ");$("#rotateButtons").html(c.toString());c=[];for(i=1;i<=f;i++)c[i]=e(i);$("#rotateButton1").attr("class","overButton");c=[];for(i=1;i<=f;i++)c[i]=g(i);$("#rotateButtons input").mouseleave(function(){$(".para").text("");
$(this).css("border","1px solid #dcdcde")})});