{"version":3,"file":"script-a7eb3f113.js","sources":["../../src/js/skip-link-focus-fix.js","../../src/js/smoothscroll.js","../../src/js/navigation.js","../../src/js/scrollyclasses.js","../../src/js/viewport-height.js","../../src/js/fw-video.js","../../src/js/vendor/flickity.min.js","../../src/js/sliders.js","../../src/js/accordions.js","../../src/js/vendor/jquery.fancybox.js","../../src/js/fancybox.js","../../src/js/base.js"],"sourcesContent":["/**\n * File skip-link-focus-fix.js.\n *\n * Helps with accessibility for keyboard only users.\n *\n * Learn more: https://git.io/vWdr2\n */\n( function() {\n\tvar isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,\n\t isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,\n\t isIe = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;\n\n\tif ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {\n\t\twindow.addEventListener( 'hashchange', function() {\n\t\t\tvar id = location.hash.substring( 1 ),\n\t\t\t\telement;\n\n\t\t\tif ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\telement = document.getElementById( id );\n\n\t\t\tif ( element ) {\n\t\t\t\tif ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {\n\t\t\t\t\telement.tabIndex = -1;\n\t\t\t\t}\n\n\t\t\t\telement.focus();\n\t\t\t}\n\t\t}, false );\n\t}\n})();\n","\t/*\n\t-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n\t━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\n\tSmooth scroll\n\t━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\n\t-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n\t*/\n(function($) {\n\t$('a[href*=\"#\"]')\n\t // Remove links that don't actually link to anything\n\t .not('[href=\"#\"]')\n\t .not('[href=\"#0\"]')\n\t .not('.modal-trigger')\n\t .click(function (event) {\n\t // On-page links\n\t if (\n\t location.pathname.replace(/^\\//, '') == this.pathname.replace(/^\\//, '') &&\n\t location.hostname == this.hostname\n\t ) {\n\t // Figure out element to scroll to\n\t var target = $(this.hash);\n\t target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');\n\t // Does a scroll target exist?\n\t if (target.length) {\n\t // Only prevent default if animation is actually gonna happen\n\t event.preventDefault();\n\t $('html, body').animate({\n\t scrollTop: target.offset().top\n\t }, 1000, function () {\n\t // Callback after animation\n\t // Must change focus!\n\t var $target = $(target);\n\t $target.focus();\n\t if ($target.is(\":focus\")) { // Checking if the target was focused\n\t return false;\n\t } else {\n\t $target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable\n\t $target.focus(); // Set focus again\n\t };\n\t });\n\t }\n\t }\n\t });\n})( jQuery );","/**\n * File navigation.js.\n *\n * Handles toggling the navigation menu for small screens and enables TAB key\n * navigation support for dropdown menus.\n */\n( function() {\n\tvar container, button, menu, links, i, len;\n\n\tcontainer = document.getElementById( 'site-navigation' );\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tbutton = container.getElementsByTagName( 'button' )[0];\n\tif ( 'undefined' === typeof button ) {\n\t\treturn;\n\t}\n\n\tmenu = container.getElementsByTagName( 'ul' )[0];\n\n\t// Hide menu toggle button if menu is empty and return early.\n\tif ( 'undefined' === typeof menu ) {\n\t\tbutton.style.display = 'none';\n\t\treturn;\n\t}\n\n\tmenu.setAttribute( 'aria-expanded', 'false' );\n\tif ( -1 === menu.className.indexOf( 'nav-menu' ) ) {\n\t\tmenu.className += ' nav-menu';\n\t}\n\n\tbutton.onclick = function() {\n\t\tif ( -1 !== container.className.indexOf( 'toggled' ) ) {\n\t\t\tcontainer.className = container.className.replace( ' toggled', '' );\n\t\t\tbutton.setAttribute( 'aria-expanded', 'false' );\n\t\t\tmenu.setAttribute( 'aria-expanded', 'false' );\n\t\t} else {\n\t\t\tcontainer.className += ' toggled';\n\t\t\tbutton.setAttribute( 'aria-expanded', 'true' );\n\t\t\tmenu.setAttribute( 'aria-expanded', 'true' );\n\t\t}\n\t};\n\n\t// Get all the link elements within the menu.\n\tlinks = menu.getElementsByTagName( 'a' );\n\n\t// Each time a menu link is focused or blurred, toggle focus.\n\tfor ( i = 0, len = links.length; i < len; i++ ) {\n\t\tlinks[i].addEventListener( 'focus', toggleFocus, true );\n\t\tlinks[i].addEventListener( 'blur', toggleFocus, true );\n\t}\n\n\t/**\n\t * Sets or removes .focus class on an element.\n\t */\n\tfunction toggleFocus() {\n\t\tvar self = this;\n\n\t\t// Move up through the ancestors of the current link until we hit .nav-menu.\n\t\twhile ( -1 === self.className.indexOf( 'nav-menu' ) ) {\n\n\t\t\t// On li elements toggle the class .focus.\n\t\t\tif ( 'li' === self.tagName.toLowerCase() ) {\n\t\t\t\t// console.log(self.className.indexOf( 'focus' ))\n\t\t\t\tif ( -1 !== self.className.indexOf( 'focus' ) ) {\n\t\t\t\t\tself.className = self.className.replace( ' focus', '' );\n\t\t\t\t} else {\n\t\t\t\t\tself.className += ' focus';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself = self.parentElement;\n\t\t}\n\t}\n\n\t/**\n\t * Toggles `focus` class to allow submenu access on tablets.\n\t */\n\t( function( container ) {\n\t\tvar touchStartFn, i,\n\t\t\tparentLink = container.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );\n\n\t\tif ( 'ontouchstart' in window ) {\n\t\t\ttouchStartFn = function( e ) {\n\t\t\t\tvar menuItem = this.parentNode, i;\n\n\t\t\t\tif ( ! menuItem.classList.contains( 'focus' ) ) {\n\t\t\t\t\t// e.preventDefault();\n\t\t\t\t\tfor ( i = 0; i < menuItem.parentNode.children.length; ++i ) {\n\t\t\t\t\t\tif ( menuItem === menuItem.parentNode.children[i] ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmenuItem.parentNode.children[i].classList.remove( 'focus' );\n\t\t\t\t\t}\n\t\t\t\t\tmenuItem.classList.add( 'focus' );\n\t\t\t\t} else {\n\t\t\t\t\tmenuItem.classList.remove( 'focus' );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfor ( i = 0; i < parentLink.length; ++i ) {\n\t\t\t\tparentLink[i].addEventListener( 'touchstart', touchStartFn, false );\n\t\t\t}\n\t\t}\n\t}( container ) );\n} )();\n\n( function( $ ) {\n\tvar masthead, menuToggle, siteNavigation;\n\n\tfunction initMainNavigation( container ) {\n\n\t\t//check if $navcontent in functions.php is false\n\t// \tif ( navcontent.has_navigation == 'true') {\n\t// \t\t// Add dropdown toggle that displays child menu items.\n\t// \t\tvar dropdownToggle = '
'+navcontent.iconOpen+'Expand
'\n\t// }\n\n\t// \t// container.find( '.menu-item-has-children > .sub-menu, .page_item_has_children > .sub-menu' ).before( dropdownToggle );\n\n\t// \tcontainer.find( '.menu-item-has-children > a, .page_item_has_children > a' ).after( dropdownToggle );\n\n\t\t// Toggle buttons and submenu items with active children menu items.\n\t\t// container.find( '.current-menu-ancestor > button' ).addClass( 'toggled-on' );\n\t\t// container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );\n\n\t\t// Add menu items with submenus to aria-haspopup=\"true\".\n\t\tcontainer.find( '.menu-item-has-children, .page_item_has_children' ).attr( 'aria-haspopup', 'true' );\n\n\t\tcontainer.find( '.dropdown-toggle' ).click( function( e ) {\n\t\t\t// if ( \t$('body').hasClass('menu-open')) {\n\t\t\t// \t$('body').removeClass('menu-open');\n\t\t\t// } else {\n\t\t\t// \t$('body').addClass('menu-open');\n\t\t\t// }\n\t\t\tvar _this = $( this ),\n\t\t\t\tscreenReaderSpan = _this.find( '.screen-reader-text' );\n\n // if ( document.body.clientWidth < 1024 || 'ontouchstart' in window ) {\n // e.preventDefault();\n // // $(this).unbind(e);\n // }\n\n\n\t\t\t_this.parent().parent().toggleClass( 'toggled-on' );\n\t\t\t_this.prev( '.children, .sub-menu' ).toggleClass( 'toggled-on' );\n\n\t\t\t// jscs:disable\n\t\t\t_this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' );\n\t\t\t// jscs:enable\n\t\t\tscreenReaderSpan.text( screenReaderSpan.text() === navcontent.expand ? navcontent.collapse : navcontent.expand );\n\n\n\t\t\t// if (_this.parent().hasClass('toggled-on') ) {\n\t\t\t// \t_this.find('.svg-wrapper').html(navcontent.iconClose);\n\t\t\t// } else {\n\t\t\t// \t_this.find('.svg-wrapper').html(navcontent.iconOpen);\n\t\t\t// }\n\t\t} );\n\t}\n\tinitMainNavigation( $( '.main-navigation' ) );\n\n} )( jQuery );\n","/*\n-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\nScrolly classes\n━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\n-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n*/\nvar scrollDistance = function (callback, refresh) {\n\n // Make sure a valid callback was provided\n if (!callback || typeof callback !== 'function') return;\n\n // Variables\n var isScrolling, start, end, distance, docHeight, height;\n\n // Listen for scroll events\n window.addEventListener('scroll', function (event) {\n\n // Set starting position\n if (!start) {\n start = window.pageYOffset;\n }\n\n // Clear our timeout throughout the scroll\n window.clearTimeout(isScrolling);\n\n // Set a timeout to run after scrolling ends\n isScrolling = setTimeout(function () {\n\n // Calculate distance\n end = window.pageYOffset;\n distance = end - start;\n docHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);\n height = docHeight - window.innerHeight;\n\n // Run the callback\n callback(distance, start, end, height);\n\n // Reset calculations\n start = null;\n end = null;\n distance = null;\n\n }, refresh || 20);\n\n }, false);\n};\n\nscrollDistance(function (distance, start, end, height) {\n // detect top and bottom scroll positions\n if (end >= height) {\n document.body.classList.add('scroll-bottom')\n document.body.classList.remove('scroll-top', 'scrolling-up', 'scrolling-down')\n } else if (end <= 1) {\n document.body.classList.add('scroll-top')\n document.body.classList.remove('scroll-bottom', 'scrolling-up', 'scrolling-down')\n } else if (distance > 0 && start !== 0 && end !== height) {\n document.body.classList.add('scrolling-down')\n document.body.classList.remove('scrolling-up', 'scroll-top', 'scroll-bottom')\n } else if (distance < 0 && start !== 0 && end !== height) {\n document.body.classList.add('scrolling-up')\n document.body.classList.remove('scrolling-down', 'scroll-top', 'scroll-bottom')\n }\n\n // console.log(distance, start,end,height)\n});\nwindow.scrollTo(window.scrollX, window.scrollY - 1);\nwindow.scrollTo(window.scrollX, window.scrollY + 1);","/*\n-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\nStore VH\n━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\n-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n*/\n\nvar currentWidth = window.outerWidth,\n currentHeight = window.outerHeight;\n\nfunction viewportHeight() {\n var headerHeight = document.querySelector('#masthead').clientHeight;\n if (window.innerWidth !== currentWidth) {\n let viewportHeight = window.innerHeight;\n document.documentElement.style.setProperty('--vh', viewportHeight + 'px');\n document.documentElement.style.setProperty('--header', headerHeight + 'px');\n } else {\n document.documentElement.style.setProperty('--vh', currentHeight + 'px');\n document.documentElement.style.setProperty('--header', headerHeight + 'px');\n }\n}\nviewportHeight();\n\nwindow.addEventListener('resize', viewportHeight);","/*\n-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\nMake feature videos act as background: cover\n━━━ ⋅𖥔⋅ ━━✶━━ ⋅𖥔⋅ ━━━\n-ˋˏ *.·:·.⟐.·:·.* ˎˊ-\n*/\nfunction video() {\n var video = document.querySelector('.video-wrapper');\n\n if (video !== null) {\n var wrapperWidth = window.outerWidth,\n videoWidth = video.offsetWidth,\n videoHeight = video.offsetHeight; //this is to get around the elastic url bar on mobiles like ios...\n\n if (wrapperWidth < 768) {\n var wrapperHeight = window.innerHeight + 100;\n } else {\n var wrapperHeight = window.innerHeight;\n }\n\n var scale = Math.max(wrapperWidth / videoWidth, wrapperHeight / videoHeight);\n document.querySelector('.video-wrapper').style.transform = \"translate(-50%, -50%) \" + \"scale(\" + scale + \")\";\n }\n}\nvideo();\n\n//update the video's scale as the browser resizes\nwindow.addEventListener('resize', video);","/*!\n * Flickity PACKAGED v2.2.1\n * Touch, responsive, flickable carousels\n *\n * Licensed GPLv3 for open source use\n * or Flickity Commercial License for commercial use\n *\n * https://flickity.metafizzy.co\n * Copyright 2015-2019 Metafizzy\n */\n\n!function(e,i){\"function\"==typeof define&&define.amd?define(\"jquery-bridget/jquery-bridget\",[\"jquery\"],function(t){return i(e,t)}):\"object\"==typeof module&&module.exports?module.exports=i(e,require(\"jquery\")):e.jQueryBridget=i(e,e.jQuery)}(window,function(t,e){\"use strict\";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function s(h,s,c){(c=c||e||t.jQuery)&&(s.prototype.option||(s.prototype.option=function(t){c.isPlainObject(t)&&(this.options=c.extend(!0,this.options,t))}),c.fn[h]=function(t){return\"string\"==typeof t?function(t,o,r){var a,l=\"$().\"+h+'(\"'+o+'\")';return t.each(function(t,e){var i=c.data(e,h);if(i){var n=i[o];if(n&&\"_\"!=o.charAt(0)){var s=n.apply(i,r);a=void 0===a?s:a}else d(l+\" is not a valid method\")}else d(h+\" not initialized. Cannot call methods, i.e. \"+l)}),void 0!==a?a:t}(this,t,i.call(arguments,1)):(function(t,n){t.each(function(t,e){var i=c.data(e,h);i?(i.option(n),i._init()):(i=new s(e,n),c.data(e,h,i))})}(this,t),this)},o(c))}function o(t){!t||t&&t.bridget||(t.bridget=s)}return o(e||t.jQuery),s}),function(t,e){\"function\"==typeof define&&define.amd?define(\"ev-emitter/ev-emitter\",e):\"object\"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(\"undefined\"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s