{"version":3,"sources":["../assets/scripts/main.js"],"names":["$","mobileButtonShow","$mobileButton","nav","on","this","toggleClass","window","resize","hasClass","removeClass","menuMobile","checkWindowWidth","matchMedia","matches","button","children","removeAttr","showMobileSub","each","parent","siblings","showMegaMenu","evt","preventDefault","$this","find","$thisarrow","not","hide","toggle","e","stopPropagation","mySubMenu","sublinks","sublinkchildren","Sage","common","init","finalize","home","about_us","UTIL","fire","func","funcname","args","namespace","undefined","loadEvents","document","body","className","replace","split","i","classnm","ready","mouseup","$menu","is","target","has","length","jQuery"],"mappings":"CAYA,SAAAA,GA4EA,QAAAC,KACA,GAAAC,GAAAF,EAAA,cACAG,EAAAH,EAAA,8BAGAE,GAAAE,GAAA,QAAA,WACAJ,EAAAK,MAAAC,YAAA,YAEAN,EAAAO,QAAAC,OAAA,WACAL,EAAAM,SAAA,UACAP,EAAAQ,YAAA,YAQA,QAAAC,KAYA,QAAAC,KACAL,OAAAM,WAAA,sBAAAC,UACAC,EAAAL,YAAA,QACAP,EAAAO,YAAA,UAdA,GAAAP,GAAAH,EAAA,+BACAe,EAAAf,EAAA,aAEAe,GAAAX,GAAA,QAAA,WAEAD,EAAAG,YAAA,WAIAN,EAAAO,QAAAC,OAAAI,GAeAZ,EAAA,0DACAgB,SAAA,KAAAC,WAAA,QAMA,QAAAC,KACAlB,EAAA,kEAEAmB,KAAA,WACAnB,EAAAK,MAAAD,GAAA,QAAA,WACAJ,EAAAK,MAAAe,SAAAd,YAAA,aACAN,EAAAK,MAAAgB,SAAA,0BAAAf,YAAA,YACAN,EAAAK,MAAAgB,SAAA,aAAAf,YAAA,gBAQA,QAAAgB,KACAtB,EAAA,uEACAmB,KAAA,WACAnB,EAAAK,MAAAD,GAAA,QAAA,SAAAmB,GAGAA,EAAAC,gBACA,IAAAC,GAAAzB,EAAAK,MAAAqB,KAAA,iBACAC,EAAAF,EAAAJ,UACArB,GAAA,iBAAA4B,IAAAH,GAAAI,OACAJ,EAAAK,SAEA9B,EAAA,6BAAA4B,IAAAD,GAAAjB,YAAA,cACAiB,EAAArB,YAAA,gBAGAN,EAAA,sBAAAI,GAAA,QAAA,SAAA2B,GACAA,EAAAC,sBAqBA,QAAAC,KACA,GAAAC,GAAAlC,EAAA,iEACAmC,EAAAnC,EAAA,yEAGAkC,GAAA9B,GAAA,QAAA,SAAA2B,GACAA,EAAAP,iBACAxB,EAAAK,MAAAW,SAAA,aAAAV,YAAA,cAGA6B,EAAA/B,GAAA,QAAA,SAAA2B,GACAA,EAAAC,oBA1LA,GAAAI,IAEAC,QACAC,KAAA,WAEArC,IACAU,IACAO,IACAe,IACAX,KAEAiB,SAAA,cAMAC,MACAF,KAAA,aAIAC,SAAA,cAMAE,UACAH,KAAA,eAQAI,GACAC,KAAA,SAAAC,EAAAC,EAAAC,GACA,GAAAH,GACAI,EAAAX,CACAS,OAAAG,KAAAH,EAAA,OAAAA,EACAF,EAAA,KAAAC,EACAD,EAAAA,GAAAI,EAAAH,IACAD,EAAAA,GAAA,kBAAAI,GAAAH,GAAAC,KAGAE,EAAAH,GAAAC,GAAAC,IAGAG,WAAA,WAEAP,EAAAC,KAAA,UAGA3C,EAAAmB,KAAA+B,SAAAC,KAAAC,UAAAC,QAAA,KAAA,KAAAC,MAAA,OAAA,SAAAC,EAAAC,GACAd,EAAAC,KAAAa,GACAd,EAAAC,KAAAa,EAAA,cAIAd,EAAAC,KAAA,SAAA,aAKA3C,GAAAkD,UAAAO,MAAAf,EAAAO,YA8FAjD,EAAAkD,UAAAQ,QAAA,SAAA3B,GACA4B,MAAA3D,EAAA,iBACA2D,MAAAC,GAAA7B,EAAA8B,SACA,IAAAF,MAAAG,IAAA/B,EAAA8B,QAAAE,QAEAJ,MAAAxC,KAAA,WACAnB,EAAAK,MAAAwB,OACA7B,EAAAK,MAAAgB,WAAAX,YAAA,mBA0BAsD","file":"main.js","sourcesContent":["/* ========================================================================\n * DOM-based Routing\n * Based on http://goo.gl/EUTi53 by Paul Irish\n *\n * Only fires on body classes that match. If a body class contains a dash,\n * replace the dash with an underscore when adding it to the object below.\n *\n * .noConflict()\n * The routing is enclosed within an anonymous function so that you can\n * always reference jQuery with $, even when in .noConflict() mode.\n * ======================================================================== */\n\n(function($) {\n\n // Use this variable to set up the common and page specific functions. If you\n // rename this variable, you will also need to rename the namespace below.\n var Sage = {\n // All pages\n 'common': {\n init: function() {\n // JavaScript to be fired on all pages\n mobileButtonShow();\n menuMobile();\n showMobileSub();\n mySubMenu();\n showMegaMenu();\n },\n finalize: function() {\n // JavaScript to be fired on all pages, after page specific JS is fired\n\n }\n },\n // Home page\n 'home': {\n init: function() {\n // JavaScript to be fired on the home page\n\n },\n finalize: function() {\n // JavaScript to be fired on the home page, after the init JS\n\n }\n },\n // About us page, note the change from about-us to about_us.\n 'about_us': {\n init: function() {\n // JavaScript to be fired on the about us page\n }\n }\n };\n\n // The routing fires all common scripts, followed by the page specific scripts.\n // Add additional events for more control over timing e.g. a finalize event\n var UTIL = {\n fire: function(func, funcname, args) {\n var fire;\n var namespace = Sage;\n funcname = (funcname === undefined) ? 'init' : funcname;\n fire = func !== '';\n fire = fire && namespace[func];\n fire = fire && typeof namespace[func][funcname] === 'function';\n\n if (fire) {\n namespace[func][funcname](args);\n }\n },\n loadEvents: function() {\n // Fire common init JS\n UTIL.fire('common');\n\n // Fire page-specific init JS, and then finalize JS\n $.each(document.body.className.replace(/-/g, '_').split(/\\s+/), function(i, classnm) {\n UTIL.fire(classnm);\n UTIL.fire(classnm, 'finalize');\n });\n\n // Fire common finalize JS\n UTIL.fire('common', 'finalize');\n }\n };\n\n // Load Events\n $(document).ready(UTIL.loadEvents);\n\n /****************************************\n Mobile Button\n ****************************************/\n\n function mobileButtonShow() {\n var $mobileButton = $('.hamburger'),\n nav = $('.menu-mobile-menu-container');\n\n\n $mobileButton.on('click', function() {\n $(this).toggleClass('active');\n })\n $( window ).resize(function() {\n if ( nav.hasClass('itsin') ) {\n $mobileButton.removeClass('active');\n }\n });\n }\n\n /****************************************\n Nav\n ****************************************/\n function menuMobile() {\n var nav = $('.menu-mobile-menu-container'),\n button = $('.hamburger');\n\n button.on('click', function () {\n //nav.toggle();\n nav.toggleClass('itsin');\n });\n\n //register the resize function\n $(window).resize(checkWindowWidth);\n\n function checkWindowWidth() {\n if (window.matchMedia(\"(max-width: 800px)\").matches) {\n button.removeClass('open');\n nav.removeClass('itsin');\n //nav.css('display', 'none');\n } else {\n //nav.css('display', 'flex');\n }\n }\n\n /****************************************\n Removing link from parent accs\n ****************************************/\n var linkswithsubemu = $('.menu-mobile-menu-container li.menu-item-has-children ');\n linkswithsubemu.children('a').removeAttr(\"href\");\n }\n\n /****************************************\n Mobile Submenu Function\n ****************************************/\n function showMobileSub() {\n var sublinks = $('.menu-mobile-menu-container > ul > li.menu-item-has-children a');\n\n sublinks.each(function() {\n $(this).on('click', function() {\n $(this).parent().toggleClass('arrowdown');\n $(this).siblings('.menu-item-description').toggleClass('isactive');\n $(this).siblings('.sub-menu').toggleClass('isactive');\n })\n })\n }\n\n /****************************************\n Show Megamenu\n ****************************************/\n function showMegaMenu() {\n var sublinks = $('.menu-primary-menu-left-container > ul > li.menu-item-has-children ');\n sublinks.each(function() {\n $(this).on('click', function(evt) {\n //if (evt.preventDefault) { evt.preventDefault(); } else { evt.returnValue = false; }\n //evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false);\n evt.preventDefault();\n var $this = $(this).find('.subcontainer');\n var $thisarrow = $this.siblings();\n $(\".subcontainer\").not($this).hide();\n $this.toggle();\n\n $('.menu-item-has-children a').not($thisarrow).removeClass('activemega');\n $thisarrow.toggleClass('activemega');\n\n })\n $('.sub-sub-menu li a').on('click', function(e){\n e.stopPropagation();\n })\n\n })\n }\n\n $(document).mouseup(function (e) {\n $menu = $('.subcontainer');\n if (!$menu.is(e.target) // if the target of the click isn't the container...\n && $menu.has(e.target).length === 0) // ... nor a descendant of the container\n {\n $menu.each(function(){\n $(this).hide();\n $(this).siblings().removeClass('activemega');\n })\n }\n });\n\n /****************************************\n Submenu Header for language\n ****************************************/\n function mySubMenu() {\n var sublinks = $('.menu-primary-menu-right-container li.menu-item-has-children ');\n var sublinkchildren = $('.menu-primary-menu-right-container li.menu-item-has-children .sub-menu')\n\n\n sublinks.on('click', function(e) {\n e.preventDefault();\n $(this).children('.sub-menu').toggleClass('isactive');\n })\n\n sublinkchildren.on('click', function(e) {\n e.stopPropagation();\n })\n\n }\n\n\n\n})(jQuery); // Fully reference jQuery after this point.\n"],"sourceRoot":"assets/scripts/"}