window.SunlightNavigation=window.SunlightNavigation||function(){function u(n){r=n.wwwBaseUrl;$(f)}function f(){i=$("#siteHeader");$(".siteHeaderMenu").click(e);$(document).on("click touchstart",function(n){o(n)});t=$(window).width();$(window).resize(s);h();c()}function e(n){n.preventDefault();var t=$("#siteHeader");t.hasClass("mobileMenuOpen")?t.removeClass("mobileMenuOpen"):(t.addClass("mobileMenuOpen"),$(window).height()<500?t.addClass("mobileMenuWide"):t.removeClass("mobileMenuWide"))}function o(n){if(!n.target.className.includes("siteHeaderMenu")&&!n.target.className.includes("navItem")&&$(n.target).closest("#mobileMenu").length==0){var t=$("#siteHeader");t.hasClass("mobileMenuOpen")&&(t.removeClass("mobileMenuOpen"),n.preventDefault())}}function s(){n==null&&(n=window.setTimeout(function(){var i,r;n=null;i=$(window).width();i!=t&&($("#siteHeader").removeClass("mobileMenuOpen"),r=$("#desktopMyAccount"),r.hide(),t=i)},500))}function h(){$(".signinGreyedArea, #signInCloseButton").click(function(){$(this).parent().closest("#signinContainer").hide()});$(".signInButton, #signInLink").click(function(n){n.preventDefault();$("#siteHeader").removeClass("mobileMenuOpen");$("#signinContainer").show()})}function c(){$("#feedbackContainer .closeFeedbackForm").click(function(n){n.preventDefault();$(this).parent().closest("#feedbackContainer").hide();$(".feedbackStep1").show();$(".feedbackStep2").hide()});$("#giveFeedback").click(function(n){n.preventDefault();$("#feedbackContainer").show()});$("#linkSendFeedback, .sendFeedback").click(function(n){n.preventDefault();var t=$("#formFeedback"),i=t.find("#Email").valid()&&t.find("#Message").valid()&&t.find("#FeedbackType").valid();i?$.ajax({type:"post",url:"/sendfeedback",data:JSON.stringify({email:t.find("#Email").val(),message:t.find("#Message").val(),feedbackType:t.find("#FeedbackType option:selected").val()}),contentType:"application/json",success:function(){console.log("all good buddy!");$(".feedbackStep2").show();$(".feedbackStep1").hide();t[0].reset()},error:function(n){console.log("baaaad boy!: "+n.responseText);$(".feedbackStep1").show();$(".feedbackStep2").hide()}}):t.submit()})}var n,i,r,t;return{init:u}}();window.SunlightCookieCompliance=window.SunlightCookieCompliance||function(){function o(){s();h()}function i(){return Cookies.get("acceptNonEssentialCookies")}function s(){window.onbeforeunload=function(){window.localStorage.setItem("currentUrl",window.location.href)};v()&&u();i()||$("#cookieCompliance").css("display","block")}function h(){$("#acceptCookies").click(function(){l()});$("#implicitAccept").click(function(){u()});$("#declineCookies").click(function(){a()})}function r(n,t,i,r){var u=new Date,f;u.setDate(u.getDate()+365);f=n+"="+t+"; expires="+u.toUTCString()+";path=/; SameSite=None; domain="+i+(r?";secure":"");document.cookie=f}function c(){var n=location.hostname||"www.spotlight.com";return n.substring(n.indexOf("."))}function n(n){r("acceptNonEssentialCookies",n,c(),!0);location.hostname.indexOf(".spotlight.com")==-1&&r("acceptNonEssentialCookies",n,location.hostname,!0)}function l(){n("accept");t()}function u(){n("implicit-accept");t()}function a(){n("refuse");t()}function t(){$("#cookieCompliance").fadeOut(300)}function f(n){var t=document.createElement("a");return t.href=n,t.hostname}function e(n){var t;return(n&&n.split)?(t=n.split("."),t.length>2)?(t.reverse(),t.pop(),t.reverse(),t.join(".")):n:n}function v(){if(/\/the-small-print\/privacy-policy/i.test(document.location.pathname))return!1;if(document.referrer&&window.localStorage.getItem("currentUrl")!=document.location.href){var n=f(window.location),t=f(document.referrer),r=e(n),u=e(t),o=r==u;if(o&&!i())return!0}return!1}return{init:o}}()