function ManageSpotlights(){var n;typeof isSR!="undefined"&&(n=isSR==0?protocol+"//"+hostName+"/Home/GetSpotlightRotatorContent":protocol+"//"+hostName+"/Home/GetSpotlightRotatorContent?area=SR",jQuery.ajax({type:"GET",dataType:"html",url:n,async:!1,success:function(n){$(".spotlightDisplay").html(n)},complete:function(){slRotate==!1?($(".spotlightPlay").show(),$(".spotlightPause").hide(),$("#"+defaultSLIndex).addClass("active"),isSR==0?RotateSpotlight(parseInt(defaultSLIndex)):RotateSpotlightSR(parseInt(defaultSLIndex))):isSR==0?RotateSpotlight():RotateSpotlightSR()},error:function(){alert("error happened!")},cache:!0})),$(".slNav-control").click(function(){return $(".slNav-control").removeClass("active"),$(this).addClass("active"),RotateSpotlight(this.id),!1}),$("#linkPause").click(function(){return clearTimeout(spotLightTime),slRotate=!1,$("#linkPlay").show(),$("#linkPause").hide(),!1}),$("#linkPlay").click(function(){return slRotate=!0,$("#linkPause").show(),$("#linkPlay").hide(),RotateSpotlight(),!1}),$(".rotatorSearchNextNav").click(function(){var n=$("#rotateIndex").val();return n++,n>=slCount&&(n=0),RotateSpotlightSR(n),!1}),$(".rotatorSearchPrevNav").click(function(){var n=$("#rotateIndex").val();return n==1?n=0:n--,n<=-1&&(n=slCount-1),RotateSpotlightSR(n),!1}),$("#rotatorSearchPauseNav").click(function(){return clearTimeout(spotLightTime),slRotate=!1,$("#rotatorSearchPlayNav").show(),$("#rotatorSearchPauseNav").hide(),!1}),$("#rotatorSearchPlayNav").click(function(){return slRotate=!0,$("#rotatorSearchPauseNav").show(),$("#rotatorSearchPlayNav").hide(),RotateSpotlightSR(),!1})}function buildNavigators(){for(var i=$("#contentIdList").val().split(","),t,n=0;n<i.length;n++)t=n+1,$("#slUL").append("<li><a href='#' class='slNav-control' id='"+n+"'>"+t+"</a></li>");$("#rotateIndex").val("first")}function RotateSpotlight(n){var i,t,r=$("#rotateIndex").val(),u=$("#contentIdList").val().split(","),f;r=="first"?i=u.length-1:(r++,i=r-1),n?t=n:(t=i+1,t>=u.length&&(t=0),$(".slNav-control").removeClass("active"),f=document.getElementById(t),$(f).addClass("active")),$("#rotateIndex").val(t),contentId=u[t],slRotate==!0&&(clearTimeout(spotLightTime),spotLightTime=window.setTimeout("RotateSpotlight()",rotationTime)),isNaN(contentId)==!1&&($("#spotlightContent").fadeOut(function(){$(".indSL").css("display","none"),$("#slID"+contentId).css("display","")}),$("#spotlightContent").fadeIn())}function RotateSpotlightSR(n){var i,t,f,u=$("#rotateIndex").val(),r=$("#contentIdList").val().split(",");u=="first"?i=r.length-1:(u++,i=u-1),n?t=n:n==0?t=n:(t=i+1,t>=r.length&&(t=0)),f=t+1,$("#rotatorSearchSLCount").html(f+" of "+slCount),$("#rotateIndex").val(t),contentId=r[t],slRotate==!0&&(clearTimeout(spotLightTime),spotLightTime=window.setTimeout("RotateSpotlight()",15e3)),isNaN(contentId)==!1&&$("#slID"+r[i]).fadeOut(function(){$("#rotImage"+contentId).css("display",""),$("#rotText"+contentId).css("display",""),$("#slID"+contentId).fadeIn(function(){$("#rotImage"+r[i]).css("display","none"),$("#rotText"+r[i]).css("display","none")})})}var spotLightTime=null,slRotate=!0;$(document).ready(function(){ManageSpotlights()})