function findMethod(n){var t=n.split("."),u=null,r=window;for(i=0;i<t.length;i++)r[t[i]]&&(r=r[t[i]],i+1==t.length&&(u=r));return u}function LoadUrls(n,t){n.find(".load-page[page-url]").each(function(){var n=$(this);LoadUrl(n,n,t)});n.on("click",".load-click[page-url]",function(n){n.preventDefault();n.stopPropagation();var i=$(this),r=$(i.attr("href"));LoadUrl(r,items,t)})}function LoadUrl(n,t,i){AddLoader(n);$.ajax({url:t.attr("page-url"),success:function(r){n.html(r);i&&typeof i=="function"&&i.apply(t[0],[r])},error:function(){n.html("")}})}function InitSearch(n,t){function r(t,i){if(!window.Searching){window.Searching=!0;window.ShowLoading();var u="",r="";isNaN(i)?(r="q="+encodeURIComponent(t),u="/utility/globalsearch?"+r):(r="q="+encodeURIComponent(t)+"&p="+i,u="/utility/search?"+r);$.ajax({url:u,success:function(t){f.html(t);f.find(".no-results.results").html($("#noResultsMessage").html());f.find(".no-results.results-event").html($("#noResultsMessageEvents").html());n.hasClass("fullSearch")||insertUrlParam("s",encodeURIComponent(window.btoa(r)));window.Searching=!1;window.HideLoading()},error:function(){window.Searching=!1;window.HideLoading()}})}}var u=n.find(".search-container"),f=n.find(".results-container"),i;u.find("input").on("keyup",function(n){n.keyCode==13&&(n.preventDefault(),n.stopPropagation(),r($(this).val(),t))});u.find("button").on("click",function(n){n.preventDefault();n.stopPropagation();r(u.find("input").val(),t)});n.on("click",".pager .pager-link",function(n){n.preventDefault();n.stopPropagation();var t=new QueryString($(this).attr("href").split("?")[1]);r(t.GetParam("q"),t.GetParam("p"))});i=new QueryString;n.hasClass("fullSearch")?i.ContainsKey("q")&&(u.find("input").val(i.GetParam("q")),r(i.GetParam("q"),0)):i.ContainsKey("s")&&(i=new QueryString(window.atob(decodeURIComponent(i.GetParam("s")))),r(i.GetParam("q")))}function insertUrlParam(n,t){if(history.pushState){let i=new URLSearchParams(window.location.search);i.set(n,t);let r=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+i.toString();window.history.pushState({path:r},"",r)}}function removeUrlParameter(n){const r=window.location.href;var t=new URL(r);t.searchParams.delete(n);const i=t.href;window.history.pushState({path:i},"",i)}function setAriaForMenu(n){var t=n.find(".dropdown.menu");t.removeAttr("role");t.find(">li").removeAttr("role");t.find(">li>a").attr("role","button");t.find(">li>ul>li").attr("role","menuitem")}function calendarClick(){$(".addeventatc").on("click",function(n){n.preventDefault();n.stopPropagation();var i=$(this),t=i.find(".addeventatc_dropdown"),r=t.length>0&&!t.hasClass("hide");$(".addeventatc_dropdown").addClass("hide");r&&t.removeClass("hide");$(".addeventatc_dropdown.hide").remove()});$(document).on("click",function(){$(".addeventatc_dropdown").remove()})}function displayTextAreaMaxLength(n){if(n&&n.length>0&&!isNaN(n.attr("maxlength"))){let i=n.attr("maxlength");var t=n.next(".charCount");t.length==0?n.after("<div class='charCount' count='"+i+"'>"+n.val().length+"/"+i+"<\/div>"):(t.attr("maxlength",i),t.html(n.val().length+"/"+i));n.on("keyup",function(){let n=$(this),t=n.attr("maxlength");n.next(".charCount").html(n.val().length+"/"+t)});n.on("keypress",function(){let n=$(this),t=n.attr("maxlength");n.next(".charCount").html(n.val().length+"/"+t)})}}function OnVidYardLoad(){window.vidyardEmbed&&window.ScrollTrigger&&vidyardEmbed.api.addReadyListener(()=>{setTimeout(function(){ScrollTrigger.refresh()},200)})}var loadingCount=0,loadingTimeout=null,magnificConfigs;window.ShowLoading=function(){loadingCount==0&&(loadingTimeout=setTimeout(function(){$("#Loader-Modal").addClass("show");$("#Loader-Overlay").addClass("show")},200));loadingCount+=1};window.HideLoading=function(){loadingCount>0&&(loadingCount-=1);loadingCount==0&&(loadingTimeout&&clearTimeout(loadingTimeout),$("#Loader-Modal").removeClass("show"),$("#Loader-Overlay").removeClass("show"))};window.SetNonExpiryCookie=function(n,t){document.cookie=n+"="+t+";expires=Fri, 31 Dec 9999 23:59:59 GMTdomain="+window.location.hostname+"; path = /"};window.SetCookie=function(n,t){document.cookie=n+"="+t+";domain="+window.location.hostname+";path=/"};window.GetCookie=function(n){let t=n+"=",r=decodeURIComponent(document.cookie),i=r.split(";");for(let n=0;n<i.length;n++){let r=i[n];while(r.charAt(0)==" ")r=r.substring(1);if(r.indexOf(t)==0)return r.substring(t.length,r.length)}return""};window.AddLoader=function(n){n.html(`<div class='lds-container'><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></div>`)};window.QueryString=function(n){var u,t,i;n||(n=document.location.search);n.indexOf("?")!=0&&(n="?"+n);u=/(?:\?|&)+([^=]+)=([^&#]*)/g;t={};let r=null;for(i=0;r=u.exec(n);)t[decodeURIComponent(r[1])]==null?t[decodeURIComponent(r[1])]=decodeURIComponent(r[2]):t[decodeURIComponent(r[1])]+="|"+decodeURIComponent(r[2]),i++;return this.GetInternalObj=function(){return t},this.GetKeys=function(){return Object.keys(t)},this.ContainsKey=function(n){return t.hasOwnProperty(n)},this.GetParam=function(n){return t[n]},this.SetParam=function(n,r,u){if(!u&&encodeURIComponent(n)!=n)throw Error("invalid key, please be sure to remove all special characters from the key. (the key must be the same after url encoding)");r&&typeof r!="string"&&(r=r.toString());i=-1;t[n]=r},this.RemoveParam=function(n){t[n]!=null&&delete t[n];i=-1},this.Count=function(){return i==-1&&(i=Object.keys(t).length),i},this.ToString=function(){var r="",i,n,u,f;if(t!=null&&(i=Object.keys(t),i!=null&&i.length))for(let e=0;e<i.length;e++)if(n=i[e],e!=0&&(r+="&"),t.hasOwnProperty(n)&&t[n]&&t[n].indexOf("|")>-1){u=t[n].split("|");f="";n.indexOf("[]")==-1&&(n+="[]");for(let t=0;t<u.length;t++)r+=f+n+"="+encodeURIComponent(u[t]),f="&"}else r+=n+"="+encodeURIComponent(t[n]);return r},this};window.Wait=function(n,t,i,r,u){var f=!1,e;f=t==null?n.call(this):Array.isArray()?n.apply(this,t):n.call(this,t);f?r==null?i.call(this):Array.isArray()?i.apply(this,r):i.call(this,r):((!u||isNaN(u))&&(u=150),e=setInterval(function(){f=!1;f=t==null?n.call(this):Array.isArray()?n.apply(this,t):n.call(this,t);f&&(clearInterval(e),r==null?i.call(this):Array.isArray()?i.apply(this,r):i.call(this,r))},u))};Number.prototype.toCurrencyString=function(n,t){typeof n=="undefined"&&(n="$");typeof t=="undefined"&&(t="");var i=new RegExp(1..toLocaleString().replace(/^1/,"").replace(/\./,"\\.")+"$");return n+(~~this).toLocaleString().replace(i,"")+(this%1).toFixed(2).toLocaleString().replace(/^[+-]?0+/,"")+t};window._MS_PER_DAY=window._MS_PER_DAY||864e5;window.SegerstromLocaleStr="America/Los_Angeles";window.SegerstronTimeZoneOffset=288e5;Date.prototype.applyOffset=function(){return new Date(this.getTime()+SegerstronTimeZoneOffset)};Date.prototype.undoOffset=function(){return new Date(this.getTime()+SegerstronTimeZoneOffset*-1)};Date.prototype.addDays=function(n){var t=new Date(this.valueOf());return t.setDate(t.getDate()+n),t};Date.prototype.addMinutes=function(n){return new Date(this.getTime()+n*6e4)};Date.prototype.subtractDays=function(n){const t=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()),i=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate());return Math.floor((i-t)/_MS_PER_DAY)};Date.prototype.daysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()};Date.prototype.lastDateInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0)};Date.prototype.firstDateInMonth=function(){return new Date(this.getFullYear(),this.getMonth(),1)};Date.prototype.dateNoTime=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate())};Date.prototype.subtractMinutes=function(n){var t=n-this;return Math.floor(t/6e4)};Date.prototype.toSegerstromTimeStr=function(n){return n||(n={weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"}),n.timeZone=SegerstromLocaleStr,this.toLocaleString("en-US",n)};Date.prototype.isValid=function(){return this!=null&&!isNaN(this.getTime())};Date.prototype.toTimeString=function(){var n=this.getHours(),t=this.getMinutes(),i=" AM";return n>=12&&(i=" PM",n>12&&(n=n-12)),n==0&&(n=12),n+":"+(t<10?"0":"")+t+i};Date.prototype.toDateString=function(){return this.getMonth()+1+"/"+this.getDate()+"/"+this.getFullYear()};Date.prototype.toDateTimeString=function(){return this.toDateString()+" "+this.toTimeString()};window.GetSessionStatus=function(){$.ajax({url:"/account/SessionStatus",success:function(n){n&&n.data&&!n.data.IsAnonymous?($("#sign-in").addClass("hide"),$("#my-account").removeClass("hide"),$("#sign-in-mobile").addClass("hide"),$("#my-account-mobile").removeClass("hide"),$("#signout-mobile").removeClass("hide"),n.data.CartCount&&n.data.CartCount>0&&($("#mainNavCartCount").html(n.data.CartCount),$("#mainNavCartCountMobile").html(n.data.CartCount))):($("#sign-in").removeClass("hide"),$("#my-account").addClass("hide"),$("#my-account-mobile").removeClass("hide"),$("#signout-mobile").addClass("hide"));n&&n.data?(n.data.IsAppLoadFirst&&$.ajax({url:"/utility/globalsearch?q=scfta",success:function(){},error:function(){}}),window.localStorage.setItem("SessionStatus",JSON.stringify(n.data)),$(document).trigger("SessionStatusSet",[n.data])):$(document).trigger("SessionStatusSet",[null]);window.SessionSet=!0},error:function(){window.SessionSet=!0}})};window.CurrentSessionStatus=function(){var n=window.localStorage.getItem("SessionStatus");return n?JSON.parse(n):null};magnificConfigs={def:{type:"iframe"},ajax:{type:"ajax"},inline:{type:"inline"},iBrochure:{type:"ajax",mainClass:"iBrochure"}};window.InitMagnificPop=function(n){var t=null;t=n==null?$("a.magnific:not(.magLoaded)"):$(n).find("a.magnific:not(.magLoaded)");t.each(function(){var n=$(this);n.magnificPopup(GetMagnificConfigForLink(n));n.addClass("magLoaded")})};window.GetMagnificConfigForLink=function(n){var t=null,i;return n.attr("config")&&(t=magnificConfigs[n.attr("config")]),t==null&&(t=magnificConfigs.def),n.attr("type")&&(t.type=n.attr("type")),n.attr("configProcessor")&&(i=findMethod(n.attr("configProcessor")),i!=null&&(t=i.apply(n,[t]))),t};window.confirmDialog=function(n,t,i,r){var u='<div class="dialog confirm mfp-with-anim">';t&&(u+="<h2>"+t+"<\/h2>");u+=`<div class="content"><p>${n}</p></div>
                <div class="actions grid-x">                    
                    <button type="button" class="button secondary btn-submit">OK</button>
                    <button type="button" class="button btn-cancel">Cancel</button>
                </div>
            </div>`;$.magnificPopup.open({modal:!0,items:{src:u,type:"inline"},callbacks:{open:function(){var n=$(this.content),t;n.on("click",".btn-submit",function(){i&&typeof i=="function"&&i();$.magnificPopup.close();$(document).off("keydown",t)});n.on("click",".btn-cancel",function(){r&&typeof r=="function"&&r();$.magnificPopup.close();$(document).off("keydown",t)});t=function(t){return t.keyCode==13?(n.find(".btn-submit").click(),!1):t.keyCode==27?(n.find(".btn-cancel").click(),!1):void 0};$(document).on("keydown",t)}}})};GetSessionStatus();$(document).ready(function(){OnVidYardLoad();InitSearch($("#search"));InitSearch($("#searchFull"),0)});$(document).ready(function(){$(".sharereveal").on("click",function(){$(".sharehide").toggle()})}),function(){if(window.TimerManager==null){function n(){function u(){var r=t-Date.now();isNaN(r)||(r>0?(f(r),i=setTimeout(u,1e3),r==15&&$("body").trigger("cart:timerlow")):($("body").trigger("cart:expired"),n.html(n.attr("data-expiremessage"))))}function f(t){var i=moment(t).minutes(),f=moment(t).seconds(),r="",u,e;i>0&&(r+="<span>"+i+"<\/span> minute"+(i>1?"s":""));f!=0&&(i>0&&(r+=" and "),r+="<span>"+f+"<\/span> second"+(f>1?"s":""));u=n.find(".time-text");u.length&&(e=u.attr("data-text"),e&&u.html(e.replace("##TIME##",r)))}var n=null,t=null,i=null,r=this;this.ExpireCart=function(){document.location="/Cart/ExpireCart"};this.Init=function(t){(t||(t="#CartTimer"),n=$(t),n.length!=0)&&(i&&clearTimeout(i),n.hasClass("reload")?$.ajax({url:"/Cart/CartTimer",success:function(t){n.replaceWith(t);r.Init()}}):r.StartTimer())};this.StartTimer=function(){var i=n.attr("data-expiretime");i&&(t=new Date(Date.parse(i)),u())};this.ExpireDate=function(){return t};this.Refresh=function(){$.ajax({url:"/Cart/carttimer",success:function(t){n.replaceWith(t);r.Init()}})};this.Init()}window.TimerManager=new n}}(),function(){if(window.BuyButtonService==null){function n(){function n(n,r){var u=n.ItemType+"|"+n.ItemId;n.OnlyFirstAvail||(u+="|AllPerfs");t[u]?r.call(this,t[u],"success"):(n.ShouldUseOgMos=window.ShouldUseOgMos,n.OgMosId=window.OgMosId,n.KeepPromos=window.KeepPromos,$.ajax({url:"/BuyButton/ButtonById",method:"POST",data:n,success:function(n){t[u]=n;r.call(this,n,i.Statuses.Success);r.call(this,null,i.Statuses.Complete)}}))}this.Statuses={Success:"success",Complete:"complete"};var i=this,t={};window.ShouldUseOgMos=window.ShouldUseOgMos||!1;window.KeepPromos=window.KeepPromos||!1;setInterval(function(){t={}},15e3);$.cookie("LastCMSUrl",document.location.href,{domain:cookieDomain,path:"/"});$(window).on("hashchange",function(){$.cookie("LastCMSUrl",document.location.href,{domain:cookieDomain,path:"/"})});this.ProdSeasonBuyButton=function(t,i){n({ItemId:t,ItemType:"ProductionSeason"},i)};this.ProdSeasonBuyButtonAllPerfs=function(t,i){n({ItemId:t,ItemType:"ProductionSeason",OnlyFirstAvail:!1},i)};this.NonTessBuyButton=function(t,i){n({ItemId:t,ItemType:"NonTessEvent"},i)};this.PackageBuyButton=function(t,i){n({ItemId:t,ItemType:"Package"},i)};this.PackageSeasonBuyButton=function(t,i){n({ItemId:t,ItemType:"PackageSeason"},i)};this.ProductionPerfsBuyButton=function(t,i){n({ItemId:t,ItemType:"ProductionPerfs"},i)};this.ButtonsById=function(n,r){n.ShouldUseOgMos=window.ShouldUseOgMos;n.OgMosId=window.OgMosId;n.KeepPromos=window.KeepPromos;$.ajax({url:"/BuyButton/ButtonsById",data:n,method:"POST",success:function(n,u){var e,f;if(u=="success"&&n&&n.length>0)for(e in n){f=n[e];t[f.BuyButtonRequestType+"|"+f.ItemId]=f;try{r.call(this,f,i.Statuses.Success)}catch(o){}}r.call(this,null,i.Statuses.Complete)}})}}window.BuyButtonService=new n}}()