function setupCarousel(){$(".section--about-gallery .row").each(function(e){$(this).attr("id","carousel-wrapper-"+(e+1));let t=0;const a="#carousel-wrapper-"+(e+1)+" .col",n=$(a).length;$(a).css("opacity",0),$(a).eq(t).css("opacity",1),setInterval(function(){let e=(t+1)%n;$(a).eq(e).animate({opacity:1},500),setTimeout(function(){$(a).eq(t).animate({opacity:0},500),t=e},500)},4e3)})}function calculateOrdinalSuffix(e){if(11<=e&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}$(document).ready(function(){$(window).width()<=699.98&&setupCarousel(),$(window).resize(function(){$(window).width()<=699.98?setupCarousel():$(".section--about-gallery .col").css("opacity",1)})}),$(document).ready(function(){$(".ranking").each(function(){var e=$(this).html();e&&(e=e+calculateOrdinalSuffix(e),$(this).html(e))}),$(".event-bar").each(function(){1===$(this).find("a").length&&$(this).addClass("clickable").click(function(){window.location.href=$(this).find("a").attr("href")})})}),$(document).ready(function(){var t=0;$(window).scroll(function(){var e=$(this).scrollTop();100<e&&(t<e?$("header.navbar").addClass("unstuck"):$("header.navbar").removeClass("unstuck")),t=e<=0?0:e})});const mobileNav=document.getElementById("mobileNav");document.getElementById("mobileNavIcon").addEventListener("click",()=>{mobileNav.classList.toggle("open"),document.querySelector("body").classList.toggle("has-overlay")}),document.querySelector("button.mobile-close").addEventListener("click",()=>{mobileNav.classList.toggle("open"),document.querySelector("body").classList.toggle("has-overlay")}),document.querySelectorAll(".dropdown > a").forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var e="true"===this.getAttribute("aria-expanded");document.querySelectorAll(".dropdown > a").forEach(e=>{e!==this&&(e.setAttribute("aria-expanded","false"),e.nextElementSibling)&&(e.nextElementSibling.style.display="none")}),e?(this.setAttribute("aria-expanded","false"),(e=this.nextElementSibling)&&(e.style.display="none")):(this.setAttribute("aria-expanded","true"),(e=this.nextElementSibling)&&(e.style.display="block"))})}),$(document).ready(function(){function e(){$("h1").each(function(e){var t,a,n,i,o,s=$(this),r=s.closest(".hero");o=(i=(a=(t=(s=(a=(n=(r.hasClass("hero--home")?s=s.closest(".hero-boxed-text"):s).position(),s.outerWidth()),s.outerHeight()),r.outerHeight()),(o=n.left)+a),(n=n.top)+s),c(r,"top-line-"+e,n,!0),c(r,"bottom-line-"+e,i,!0),c(r,"left-line-"+e,o,!1,i,0),c(r,"right-line-"+e,a,!1,t-n,n),$("body").width()),document.documentElement.style.setProperty("--body-width",o+"px"),document.documentElement.style.setProperty("--h1-height",s+"px")})}function c(e,t,a,n,i,o){var s=$("#"+t);0===s.length&&(s=$("<div>",{id:t,class:"line"+(n?" line--hor":" line--vert")}),e.append(s)),n?s.css({top:a+"px",left:0,width:"100%"}):(o=void 0!==o?o:e.position().top,s.css({top:o+"px",left:a+"px",height:i+"px"}))}e(),$(window).resize(function(){e()})}),$(document).ready(function(){var a,e=$("img.lazy");"IntersectionObserver"in window&&(a=new IntersectionObserver(function(e,t){e.forEach(function(e){var t;e.isIntersecting&&((t=$(e.target)).attr("src",t.data("src")),t.removeClass("lazy"),t.addClass("loaded"),a.unobserve(e.target))})}),e.each(function(){a.observe(this)}))}),$(document).ready(function(){function e(){$(".season").addClass("hidden").attr("aria-hidden","true").removeClass("visible");var e=$("#season-selector").val();$("#"+e).removeClass("hidden").attr("aria-hidden","false").addClass("visible"),$("#heading-year").html(e),e=$("#season-selector").val(),e=$("#"+e).outerHeight(),$(".scores-container").height(e)}$(".season").addClass("hidden").attr("aria-hidden","true"),e(),$("#season-selector").change(function(){e()})}),$(document).ready(function(){$(".section-background-carousel-wrapper").each(function(e){$(this).attr("id","carousel-wrapper-"+(e+1));let t=0;const a="#carousel-wrapper-"+(e+1)+" .section-background",n=$(a).length;$(a).eq(t).css("opacity",1),setInterval(function(){let e=(t+1)%n;$(a).eq(e).css("opacity",1),setTimeout(function(){$(a).eq(t).css("opacity",0),t=e},500)},4e3)})}),$(document).ready(function(){$('.tab-link:contains("Winter Guard")').html("Guard"),$(".tab-link:first").addClass("active"),$(".tab-content:first").addClass("active"),$(".tab-image:first").addClass("active"),$(".tab-link").click(function(){var e=$(this).data("target"),t="#"+e,t=($(".tab-link").removeClass("active"),$(this).addClass("active"),$(".tab-content").removeClass("active"),$(t).addClass("active"),$(`[data-correlating-tab=${e}]`));$(".tab-image").removeClass("active"),t.addClass("active")})});