jQuery(document).ready(function(){jQuery(".rotator_main_image .desc").show();jQuery(".rotator_main_image .block").animate({opacity:0.85},1);jQuery(".rotator_image_thumb ul li:first").addClass("active");jQuery(".rotator_image_thumb ul li").click(function(){clearTimeout(auto_rotate_to);doRotate(jQuery(this));auto_rot_continue=jQuery(".rotator_image_thumb ul li").index(jQuery(this))+1;autoRotate();return false}).hover(function(){jQuery(this).addClass("hover")},function(){jQuery(this).removeClass("hover")});jQuery("a.collapse").click(function(){jQuery(".rotator_main_image .block").slideToggle();jQuery("a.collapse").toggleClass("show")});rot_elements=jQuery(".rotator_image_thumb ul li").length;autoRotate()});function doRotate(d){var c=d.find("img").attr("alt");var e=d.find("a").attr("href");var f=d.find(".block").html();var b=jQuery(".rotator_main_image").find(".block").height();var a=d.find(".rot_read_more").attr("href");if(d.is(".active")){return false}else{jQuery(".rotator_main_image .block").animate({opacity:0,marginBottom:-b},250,function(){jQuery(".rotator_main_image .block").html(f).animate({opacity:0.85,marginBottom:"0"},250);jQuery(".rotator_main_image img").attr({src:e,alt:c});jQuery("#rotator_main_image_url").attr("href",a)})}jQuery(".rotator_image_thumb ul li").removeClass("active");d.addClass("active");return false}auto_rot_val=-1;auto_rot_continue=-1;function autoRotate(){if(auto_rot_val!=-1&&auto_rot_continue==-1){doRotate(jQuery(".rotator_image_thumb ul li:eq("+auto_rot_val+")"))}if(auto_rot_continue>-1){auto_rot_val=auto_rot_continue;auto_rot_continue=-1}else{auto_rot_val++}if(rot_elements==auto_rot_val){auto_rot_val=0}auto_rotate_to=window.setTimeout(autoRotate,5000)};
