{"version":3,"file":"all.min.js","sources":["all.min.js"],"sourcesContent":["$(document).ready(function () {\r\n    // CLOSE NOTIFY BANNER\r\n    $('.banner__close').click(function(){\r\n        \r\n        $('.banner__notify').animate(\r\n            { height: 0 },\r\n            250, function() {\r\n                // console.log(\"animation complete\");\r\n                $('.banner__notify').hide();\r\n        });\r\n    });\r\n    \r\n    $('.owl-carousel').owlCarousel({\r\n        animateOut: 'fadeOut',\r\n        autoplay: true,\r\n        autoplayHoverPause: true,\r\n        autoplayTimeout: 5000,\r\n        dots: false, \r\n        items: 1,\r\n        loop: true\r\n    });\r\n});\n$(document).ready(function() {\r\n    // GLOBAL VARS\r\n    let windowWidth = window.innerWidth;\r\n    let isDesktop;\r\n    let menuStage = 0;\r\n    const setBreakpoint = 992;\r\n\r\n    // STICKY HEADER VARS\r\n    const headerDiv = $('.header');\r\n    const navBar = $('.navigation-container');\r\n\r\n    // MOBILE NAV ELEMENTS\r\n    const navBtn = $('.nav-btn');\r\n    const menuOpen = $('.nav-btn--burger');\r\n    const menuClose = $('.nav-btn--close');\r\n    const navMenu = $('#navMenu');\r\n\r\n    // MEGAMENU ELEMENTS\r\n    let activeMenu;\r\n    let activeTertiaryMenu;\r\n    let controllerMenu;\r\n\r\n    const desktopPrimaryLink = '.nav-links > li[aria-haspopup=\"true\"]';\r\n    const desktopSecondaryLink = '.mega-menu__link--secondary[aria-haspopup=\"true\"]';\r\n    const mobilePrimaryLink = '.nav-links > li[aria-haspopup=\"true\"] > a';\r\n    const mobileSecondaryLink = '.mega-menu__link--secondary > a';\r\n    \r\n    const backButton = '.mega-menu__link--back';\r\n\r\n    function resetMenu() {\r\n        $('.mega-menu').removeClass('mega-menu--flex').removeClass('mega-menu--block').removeAttr(\"style\").attr('aria-hidden', 'true');\r\n        $('.mega-menu__tertiary').removeClass('mega-menu--block').removeClass('mega-menu--flex').removeAttr(\"style\").attr('aria-hidden', 'true');\r\n        $(navMenu).removeClass('expanded');\r\n        $(navBtn).attr('aria-expanded', 'false');\r\n        $(desktopPrimaryLink).attr('aria-expanded', 'false');\r\n        $(desktopSecondaryLink).attr('aria-expanded', 'false');\r\n\r\n        menuStage = 0;\r\n    }\r\n\r\n    // STICKY HEADER BEHAVIOUR\r\n    function stickyHeader() {\r\n        if (!isDesktop) {\r\n            headerDiv.removeClass('stick-top');\r\n\r\n            $(window).on('scroll', function() {\r\n                let scrollTop = $(window).scrollTop(); // Current scroll position of the window\r\n                let navOffsetTop = navBar.offset().top; // The offset of the div from the top of the document\r\n\r\n                if (scrollTop > navOffsetTop) {\r\n                    navBar.addClass('stick-top navigation-container--border-bottom');\r\n                } else if (scrollTop <= 50) {\r\n                    navBar.removeClass('stick-top navigation-container--border-bottom');\r\n                }\r\n            });\r\n        } else {\r\n            headerDiv.addClass('stick-top');\r\n            navBar.removeClass('stick-top navigation-container--border-bottom');\r\n        }\r\n    }\r\n\r\n    // DISABLE PRIMARY AND SECONDARY NAV LINKS FOR MOBILE\r\n    function disableNavLinks() {\r\n        $(mobilePrimaryLink + ', ' + mobileSecondaryLink).click(function(event) {\r\n            if (!isDesktop) {\r\n                event.preventDefault();\r\n            }\r\n        });\r\n    }\r\n\r\n    function checkWindowSize() {\r\n        windowWidth = window.innerWidth;\r\n\r\n        if (windowWidth >= setBreakpoint) {\r\n            isDesktop = true;\r\n        } else if (windowWidth < setBreakpoint) {\r\n            isDesktop = false;\r\n        }\r\n \r\n        resetMenu();\r\n        stickyHeader();\r\n        disableNavLinks();\r\n    }\r\n\r\n    // MOBILE NAV BUTTONS\r\n    $(menuOpen).click(function() {\r\n        $(navMenu).addClass('expanded');\r\n        $(navBtn).attr('aria-expanded', 'true');\r\n    });\r\n    $(menuClose).click(function() {\r\n        $(navMenu).removeClass('expanded');\r\n        resetMenu();    \r\n    });\r\n\r\n    let closePrimaryMenuTimeout;\r\n\r\n    function megaMenuReveal() {\r\n        // DESKTOP HOVER FUNCTIONALITY    \r\n        $(desktopPrimaryLink).hover(\r\n            function() {\r\n                if (isDesktop) {\r\n                    clearTimeout(closePrimaryMenuTimeout);\r\n\r\n                    // Close any previously open menu immediately\r\n                    $(desktopPrimaryLink).attr('aria-expanded', 'false')\r\n                        .find('.mega-menu')\r\n                        .removeClass('mega-menu--flex')\r\n                        .attr('aria-hidden', 'true')\r\n                        .stop()\r\n                        .css('opacity', 0);\r\n\r\n                    activeMenu = $(this).find('.mega-menu');\r\n\r\n                    // On hover, fade in the dropdown and update ARIA attributes\r\n                    $(this).attr('aria-expanded', 'true');\r\n\r\n                    $(activeMenu).attr('aria-hidden', 'false');\r\n                    $(activeMenu).addClass('mega-menu--flex')\r\n                        .outerWidth(); \r\n\r\n                    $(activeMenu).animate(\r\n                        { opacity: 1 },\r\n                            150, function() {\r\n                        }\r\n                    );\r\n                }\r\n            },\r\n            function() {\r\n                if (isDesktop) {\r\n                    activeMenu = $(this).find('.mega-menu');\r\n                    let self = this;\r\n\r\n                    // Set a timeout to close the menu after 200ms\r\n                    closePrimaryMenuTimeout = setTimeout(function () {\r\n                        $(self).attr('aria-expanded', 'false');\r\n                        $(activeMenu).attr('aria-hidden', 'true');\r\n                        $(activeMenu).stop().animate({ opacity: 0 }, 150, function () {\r\n                            $(activeMenu).removeClass('mega-menu--flex');\r\n                        });\r\n                    }, 350);\r\n                }\r\n            }\r\n        );\r\n\r\n        // DESKTOP SECONDARY HOVER\r\n        $(desktopSecondaryLink).hover(\r\n            function() {\r\n                if (isDesktop) {\r\n                    activeTertiaryMenu = $(this).find('.mega-menu__tertiary');\r\n\r\n                    $(this).attr('aria-expanded', 'true');\r\n                    $(activeTertiaryMenu).attr('aria-hidden', 'false');\r\n                }\r\n            },\r\n            function() {\r\n                if (isDesktop) {\r\n                    let activeTertiaryMenu = $(this).find('.mega-menu__tertiary');\r\n\r\n                    $(this).attr('aria-expanded', 'false');\r\n                    $(activeTertiaryMenu).attr('aria-hidden', 'true');\r\n                }\r\n            }\r\n        );\r\n\r\n        // MOBILE PRIMARY NAV FUNCTIONALITY\r\n        $(mobilePrimaryLink).click(function() {\r\n            if (!isDesktop) {\r\n                if (menuStage < 1) {menuStage++};\r\n\r\n                controllerMenu = $(this).closest('li[aria-haspopup=\"true\"]');\r\n                activeMenu = $(this).siblings('.mega-menu');\r\n                \r\n                $(controllerMenu).attr('aria-expanded', 'true');\r\n                $(activeMenu).attr('aria-hidden', 'false');\r\n\r\n                $(activeMenu).addClass('mega-menu--block')\r\n                .outerWidth(); // Reflow\r\n\r\n                $(activeMenu).animate(\r\n                    { left: 0 },\r\n                    150, function() {\r\n                });\r\n            }\r\n        });\r\n\r\n        // MOBILE SECONDARY NAV FUNCTIONALITY\r\n        $(mobileSecondaryLink).click(function() {\r\n            if (!isDesktop) {\r\n                if (menuStage < 2) {menuStage++};\r\n\r\n                controllerMenu = $(this).closest('.mega-menu__link--secondary');\r\n                activeMenu = $(this).siblings('.mega-menu__tertiary');\r\n                \r\n                $(controllerMenu).attr('aria-expanded', 'true');\r\n                $(activeMenu).attr('aria-hidden', 'false');\r\n                \r\n                $(activeMenu).addClass('mega-menu--block')\r\n                .outerWidth(); // Reflow\r\n\r\n                $(activeMenu).animate(\r\n                    { left: 0 },\r\n                    150, function() {\r\n\r\n                });\r\n            }\r\n        });\r\n\r\n        // BACK BUTTON FUNCTIONALITY\r\n        $(backButton).click(function() {\r\n            if (!isDesktop) {\r\n                if (menuStage === 1) {\r\n                    activeMenu = $(this).closest('.mega-menu');\r\n                    controllerMenu = $(this).closest('li[aria-haspopup=\"true\"]');\r\n\r\n                    menuStage--\r\n                    // console.log(\"Menu stage = \"+menuStage);\r\n\r\n                    $(activeMenu).animate(\r\n                        { left: 305 },\r\n                        150, function() {\r\n                                \r\n                            function removeSecondaryMenu() {\r\n                                $(activeMenu).removeClass('mega-menu--block').attr('aria-hidden', 'true');\r\n                                $(controllerMenu).attr('aria-expanded', 'false');\r\n                            }\r\n\r\n                            setTimeout(removeSecondaryMenu, 150);\r\n\r\n                            // TODO - WHY DO I NEED TO PUT THE BLOCK BELOW BEHIND A TIMEOUT???\r\n                            /*$(activeMenu).removeClass('mega-menu--block').attr('aria-hidden', 'true');\r\n                            $(controllerMenu).attr('aria-expanded', 'false');*/\r\n                    });\r\n                } else if (menuStage === 2) {\r\n                    activeMenu = $(this).closest('.mega-menu__tertiary');\r\n                    controllerMenu = $(this).closest('.mega-menu__link--secondary');\r\n                    \r\n                    $(activeMenu).animate(\r\n                        { left: 305 },\r\n                        150, function() {\r\n                            $(activeMenu).removeClass('mega-menu--block').attr('aria-hidden', 'true');\r\n                            $(controllerMenu).attr('aria-expanded', 'false');\r\n                    });\r\n\r\n                    menuStage--\r\n                };\r\n            }\r\n        });\r\n    }\r\n\r\n    checkWindowSize();\r\n    megaMenuReveal();\r\n    $(window).resize(checkWindowSize);\r\n});"],"names":["$","document","ready","click","animate","height","hide","owlCarousel","animateOut","autoplay","autoplayHoverPause","autoplayTimeout","dots","items","loop","window","innerWidth","let","windowWidth","isDesktop","menuStage","headerDiv","navBar","navBtn","menuOpen","menuClose","navMenu","activeMenu","activeTertiaryMenu","controllerMenu","desktopPrimaryLink","desktopSecondaryLink","mobilePrimaryLink","mobileSecondaryLink","resetMenu","removeClass","removeAttr","attr","checkWindowSize","addClass","on","scrollTop","offset","top","event","preventDefault","closePrimaryMenuTimeout","hover","clearTimeout","find","stop","css","this","outerWidth","opacity","self","setTimeout","closest","siblings","left","resize"],"mappings":"AAAAA,EAAEC,QAAQ,EAAEC,MAAM,WAEdF,EAAE,gBAAgB,EAAEG,MAAM,WAEtBH,EAAE,iBAAiB,EAAEI,QACjB,CAAEC,OAAQ,CAAE,EACZ,IAAK,WAEDL,EAAE,iBAAiB,EAAEM,KAAK,CAClC,CAAC,CACL,CAAC,EAEDN,EAAE,eAAe,EAAEO,YAAY,CAC3BC,WAAY,UACZC,SAAU,CAAA,EACVC,mBAAoB,CAAA,EACpBC,gBAAiB,IACjBC,KAAM,CAAA,EACNC,MAAO,EACPC,KAAM,CAAA,CACV,CAAC,CACL,CAAC,EACDd,EAAEC,QAAQ,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