{"version":3,"sources":["global.js","cookies/cookies.js","debounce/debounce.js","slate-nav/slate-nav.jquery.js","scripts.js"],"names":["setCookie","expires","value","days","document","cookie","name","date","setTime","getTime","readCookie","toGMTString","nameEQ","split","ca","c","substring","length","i","indexOf","charAt","eraseCookie","debounce","func","wait","immediate","timeout","console","args","arguments","context","this","callNow","clearTimeout","setTimeout","later","apply","debounceScroll","delay_start","window","addEventListener","scroll","scrollDown","dispatchEvent","event","delay_time","last_scroll_pos","documentElement","set_is_mobile","is_mobile","getComputedStyle","menuToggle","getElementById","display","classList","contains","setAttribute","toggle","querySelector","toggle_button","subToggles","parentNode","distance","elem","getBoundingClientRect","top","bottom","innerHeight","clientHeight","accept","popUp","style","add","dbs","lazyload","anchorElements","link_element","host","location","href","searchOpen","parentElement","focus","remove","searchClose","e","preventDefault","linkclickers","querySelectorAll","linkclicker","open","linkPath","link","getAttribute","getElementsByTagName","_iteratorNormalCompletion","_didIteratorError","_iteratorError","undefined","link_is_external","_step","Symbol","iterator","_iterator","next","done","anchorElement","assistiveText","assistiveTextContainer","createElement","innerHTML","appendChild","firstChild","err","els","_loop","isInViewport","_i","_this","form","formCompleted","thank","dataLayer","push","popUpMain"],"mappings":"AAIA,YCKU,SAAAA,WAAIC,EAAUC,EAAAC,GAClB,GAJDA,EAKK,CACLC,GAASC,GAAT,GAAkBC,KACtBC,GAAAC,QAAAD,EAAAE,UAAA,GAAAN,EAAA,GAAA,GAAA,IACQO,IAAAA,GAAT,aAA4BH,EAAAI,kBACnBC,IAAAA,GAAgB,EACpBR,UAASA,OAASC,EAAOQ,IAAMX,EAA/BD,EAAA,WAEK,QAAAS,YAAQI,GACR,IAAA,GAAAF,GAAOG,EAAA,IAAkBA,EAAAA,SAAMC,OAAFH,MAAgBI,KAC7CC,EAAMC,EAAAA,EAAQP,EAAAA,OAAWM,IAAG,CAEjC,IADC,GAAAH,GAAAD,EAAAI,GACD,KAAAH,EAAAK,OAAA,IACJL,EAAAA,EAAAC,UAAA,EAAAD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/MLrH,IAAAA,GAAAA,SAAW0D,cAAmB,sBAD/B6D,IAIAA,EAAA/E,iBAAA,SAAA,WJgOCxC,UAAU,kBAAmB,wBAAyB,GI9NxDA,UAAIwH,UAAgB9G,EAAAA,aAAY,MAAZ,IAIpB,IAAK8G,GAAAA,WAAiB,mBACrB7F,EAAYjB,WAAY,WACxBiB,EAAAY,OAAY7B,SAAYqE,KAAZ5D,QAAZ,UAAA,CAEA,0BAAAqG,GAAAC,IACAlF,QAAOmF,IAAAA,WAAYnF,oBACnBA,QAAOmF,IAAAA,WAAe,YAAAnF,OAAtBmF,UAAAnF,OAAAmF,cJmOAnF,OAAOmF,UAAUC,MI9NjB/E,MAAA,iBACAvB,OAAAA,IJmOAA,YAAY,mBACZA,YAAY,cAMdkB,OAAOC,iBAAiB,mBAAoB,aIvN5C,IAAA8B,GAASD,SAASjB,eAAA,gBACjBkB,EAAYjB,SAAUD,eAAtB,aASDhD,UAAIC,eAAqB,iBAAzBmC,iBAAA,QAAA,WACA6B,KAGC,IAFDhE,GAEOK,WAAA,iBAEI8C,uBAAVoE,EACAtD,EAAAC,MAAAlB,QAAA,OJ+NAuE,EAAUpE,aAAa,YAAa","file":"global-1657656009553.min.js","sourcesContent":[" // !! DO NOT EDIT THIS FILE DIRECTLY !!\n // !! It will be overrideen by gulp !!\n // Please use global/scripts.js\n\n\"use strict\";\n\n/**\n* @file cookie.js\n* Generic cookie handling functions.\n* @author Hal Burgiss 2009-03-22\n*/\nfunction setCookie(name, value, days) {\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n var expires = \"; expires=\" + date.toGMTString();\n } else var expires = \"\";\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\n}\nfunction readCookie(name) {\n var nameEQ = name + \"=\";\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1, c.length);\n }if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n}\nfunction eraseCookie(name) {\n setCookie(name, \"\", -1);\n}\n // !! DO NOT EDIT THIS FILE DIRECTLY !!\n // !! It will be overrideen by gulp !!\n // Please use global/scripts.js\n\n'use strict';\n\n/**\n * Debounce function for rate limiting a function.\n *\n * It prevents a function from being fired too frequently. This is useful\n * for resource intensive processes like resize event handlers and tap/click\n * handlers.\n *\n *\n * @see: https://davidwalsh.name/javascript-debounce-function\n *\n * @param function func - the callback function\n * @param int wait - the time to wait in milliseconds\n * @param bool immediate - call the function immediately\n *\n * @return function - the modified function that will only run once within a wait period.\n */\nfunction debounce(func, wait, immediate) {\n var timeout;\n if (!wait) {\n console.warn(\"Debounce was called without a 'wait' argument. This renders debounce almost completely ineffective.\");\n }\n return function () {\n var context = this,\n args = arguments;\n var later = function later() {\n timeout = null;\n };\n\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n};\n\n/**\n * Debounce scroll event for rate limiting scroll events.\n *\n * Putting events on the scroll handler should usually be discouraged\n * as they can be fired very frequently and this can cause the browser\n * to lag.\n *\n * Instead, use this event: debounceScroll\n *\n * This allows us to have only one scoll event handler that triggers\n * the debounceScoll event (on the window) 50ms (or whatever the\n * delay_time is set) after a scroll event starts and then stops.\n *\n *\n * @see: http://ejohn.org/blog/learning-from-twitter/#postcomment\n * (particularly read the comments for this variant)\n *\n * @usage:\n *\n * \twindow.addEventListener( 'debounceScroll', function() {\n * \t\tconsole.log( 'scrolled....');\n * \t}, false );\n */\nvar debounceScroll = create_event('debounceScroll');\n\nwindow.addEventListener('load', function () {\n var delay_time = 50;\n var delay_start = 0;\n var last_scroll_pos = 0;\n\n function scroll() {\n // If we are already scrolling, reset the delay\n if (delay_start) {\n clearTimeout(delay_start);\n }\n\n // Are we scrolling down?\n var scrollDown = window.pageYOffset > last_scroll_pos;\n last_scroll_pos = window.pageYOffset; // Save for next time\n\n delay_start = setTimeout(function (event) {\n debounceScroll.scrollDown = scrollDown;\n window.dispatchEvent(debounceScroll);\n }, delay_time);\n }\n\n // For momentum-scrolling touch devices that only trigger a scroll event on scroll-end\n if ('touchmove' in document.documentElement) {\n window.addEventListener('touchmove', function () {\n scroll();\n });\n } else {\n // Non-touch devices\n window.addEventListener('scroll', function () {\n scroll();\n });\n }\n});\n // !! DO NOT EDIT THIS FILE DIRECTLY !!\n // !! It will be overrideen by gulp !!\n // Please use global/scripts.js\n\n'use strict';\n\n/**\n * Slate Mobile Navigation Menu\n *\n */\n(function () {\n\n\t'use strict';\n\n\t/**\n * 'is_mobile' variable to determine if this is a mobile size.\n */\n\n\tvar set_is_mobile,\n\t is_mobile = false;\n\n\twindow.addEventListener('load', function () {\n\t\tvar menuToggle = document.getElementById('menu-toggle');\n\n\t\t(set_is_mobile = function set_is_mobile() {\n\t\t\tif (window.getComputedStyle(menuToggle).display === \"none\") {\n\t\t\t\tis_mobile = false;\n\t\t\t} else {\n\t\t\t\tis_mobile = true;\n\t\t\t}\n\t\t})();\n\n\t\t/**\n * Toggle menu open/closed when clicking menu toggle\n */\n\t\tmenuToggle.addEventListener('click', function () {\n\t\t\tthis.classList.toggle('open');\n\t\t\tdocument.getElementById('menu').classList.toggle('open');\n\t\t\tdocument.querySelector('body').classList.toggle('opened-menu');\n\n\t\t\tif (this.classList.contains('open')) {\n\t\t\t\tthis.setAttribute('aria-expanded', true);\n\t\t\t} else {\n\t\t\t\tthis.setAttribute('aria-expanded', false);\n\t\t\t}\n\t\t});\n\t});\n\n\tvar subToggles = document.querySelectorAll('.submenu-toggle');\n\n\tfor (var i = 0; subToggles.length > i; i++) {\n\t\tvar focus_out_timer = null;\n\t\tvar toggle_button = subToggles[i];\n\n\t\ttoggle_button.addEventListener('click', function () {\n\t\t\tthis.classList.toggle('open');\n\t\t\tthis.parentNode.classList.toggle('open');\n\n\t\t\tif (this.classList.contains('open')) {\n\t\t\t\tthis.setAttribute('aria-expanded', true);\n\t\t\t} else {\n\t\t\t\tthis.setAttribute('aria-expanded', false);\n\t\t\t}\n\t\t});\n\t}\n})();\n // !! DO NOT EDIT THIS FILE DIRECTLY !!\n // !! It will be overrideen by gulp !!\n // Please use global/scripts.js\n\n'use strict';\n\n/**\n* This file is loaded asyncronously in the footer.\n* All custom global scripts should be included here.\n*/\n\n/*\nA little info for this js file:\n\tAs much as possible, this file should be kept organized. Currently, two major divisions are seen below, delinitated by their respective functions of \"on load\" and \"ready\".\n\tAs mentioned below, most code added to this file should be included within the \"on load\" function.\n\tFor ease of future use, include any new code at the bottom of the relevant section of the page, adding clear comments to explain the purpose of the code being written,\n\tincluding any relavant details regarding what the code overrides, etc.\n*/\n\n(function () {\n\t'use strict';\n\n\t// rerun lazyload on screen size updates\n\n\twindow.addEventListener('resize', function () {\n\t\tdbs.lazyload();\n\t});\n\n\t/**\n * Detects if element is in viewport\n * \n * @usage\n * var el = document.querySelector('.home-panes__line');\n *\n * window.addEventListener('scroll', function(event) {\n * \t\tif (isInViewport(el)) {\n *\t\t\tel.classList.add(\"in-view\");\n *\t\t}\n * }, false);\n */\n\tfunction isInViewport(elem) {\n\t\tvar distance = elem.getBoundingClientRect();\n\t\treturn distance.top >= 0 &&\n\t\t// distance.left >= 0 &&\n\t\tdistance.bottom <= (window.innerHeight || document.documentElement.clientHeight)\n\t\t// distance.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t\t;\n\t};\n\n\t// Load event function ... most custom stuff goes here. Safer for async.\n\twindow.addEventListener('load', function () {\n\t\t/* Search Form functionality\n * The click functionality involves three different actions,\n * depending on conditions the various clicks provide.\n */\n\t\tvar searchOpen = document.querySelectorAll('.search-form__button--open');\n\t\tvar searchClose = document.querySelectorAll('.search-form__button--close');\n\n\t\tif (searchOpen) {\n\t\t\tfor (var i = 0; searchOpen.length > i; i++) {\n\t\t\t\tsearchOpen[i].addEventListener('click', function () {\n\t\t\t\t\tthis.parentElement.classList.add('search-form--active');\n\t\t\t\t\tthis.parentElement.querySelector('.site_search__field').focus();\n\n\t\t\t\t\t// Hide the search bar after click out of it\n\t\t\t\t\tdocument.getElementById('content').addEventListener('click', function () {\n\t\t\t\t\t\tif (this.parentElement.classList.contains('search-form--active')) {\n\t\t\t\t\t\t\tthis.parentElement.classList.remove('search-form--active');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor (var i = 0; searchClose.length > i; i++) {\n\t\t\t\tsearchClose[i].addEventListener('click', function () {\n\t\t\t\t\tthis.parentElement.classList.remove('search-form--active');\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Linkclicker\n * \n * A class placed on a wrapping element with a link inside to make the wrapper clickable.\n * Note: the container should have only one link.\n */\n\t\tvar linkclickers = document.querySelectorAll('.linkclicker');\n\n\t\tfor (var i = 0; linkclickers.length > i; i++) {\n\t\t\tvar linkclicker = linkclickers[i];\n\n\t\t\tlinkclicker.addEventListener('click', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar link = this.querySelector('a');\n\t\t\t\tvar linkPath = link.getAttribute('href');\n\n\t\t\t\tif (link.getAttribute('target', \"_blank\")) {\n\t\t\t\t\twindow.open(linkPath);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = linkPath;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Force external links/PDFs to open in a new tab.\n * From https://stackoverflow.com/questions/2910946/test-if-links-are-external-with-jquery-javascript\n * 2019-07-11 - TA\n */\n\t\tfunction link_is_external(link_element) {\n\t\t\treturn link_element.host !== window.location.host || link_element.href.indexOf(\"pdf\") > -1;\n\t\t}\n\n\t\tvar anchorElements = document.getElementsByTagName('a');\n\t\tvar _iteratorNormalCompletion = true;\n\t\tvar _didIteratorError = false;\n\t\tvar _iteratorError = undefined;\n\n\t\ttry {\n\t\t\tfor (var _iterator = anchorElements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar anchorElement = _step.value;\n\n\n\t\t\t\tif (link_is_external(anchorElement)) {\n\t\t\t\t\tanchorElement.setAttribute('target', '_blank');\n\t\t\t\t\tanchorElement.setAttribute('rel', 'noopener');\n\n\t\t\t\t\t// Add assistive text to alert of external links\n\t\t\t\t\tvar assistiveText = '. External Link. Opens in new window.';\n\t\t\t\t\tvar assistiveTextContainer = document.createElement('span');\n\t\t\t\t\tassistiveTextContainer.innerHTML = assistiveText;\n\t\t\t\t\tanchorElement.appendChild(assistiveTextContainer.firstChild);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Find all animated elements and check if they're in view on load, and on scroll\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t_iterator.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar els = document.querySelectorAll('.animated');\n\n\t\tvar _loop = function _loop(_i) {\n\t\t\tvar _this = els[_i];\n\n\t\t\t// Check on load\n\t\t\tif (isInViewport(_this)) {\n\t\t\t\t_this.classList.add(\"in-view\");\n\t\t\t}\n\n\t\t\t// Check on scroll\n\t\t\twindow.addEventListener('scroll', function (event) {\n\t\t\t\tif (isInViewport(_this)) {\n\t\t\t\t\t_this.classList.add(\"in-view\");\n\t\t\t\t}\n\t\t\t}, false);\n\t\t};\n\n\t\tfor (var _i = 0; els.length > _i; _i++) {\n\t\t\t_loop(_i);\n\t\t}\n\n\t\t/**\n * Form completion event for custom event trigger/goal completion\n * \n * The point of this method is to eliminate false conversions in Analytics\n * due to users refreshing the /thank-you/ page. This will now set a cookie after a form \n * submit event and get the form's id to pass into analytics. The analytics event for a goal\n * conversion is then generated if there a form completion cookie set, and the url is that\n * of a thank-you page. Each form will have a unique conversion event in Analytics based on\n * the formID that gets passed as the event label.\n * \n * There is the assumption that all forms on the site are a Gravity Form, and that\n * they re-direct to a /thank-you/ page of some kind on completion.\n */\n\t\tvar form = document.querySelector('.gform_wrapper form');\n\n\t\tif (form) {\n\t\t\tform.addEventListener('submit', function () {\n\t\t\t\tsetCookie('form-completion', 'form-completion-value', 1);\n\t\t\t\tsetCookie('form-id', form.getAttribute('id'), 1);\n\t\t\t});\n\t\t}\n\n\t\tvar formCompleted = readCookie('form-completion');\n\t\tvar formId = readCookie('form-id');\n\t\tvar thank = window.location.href.indexOf('thank') >= 0; // Not exactly thank-you because the page titles/urls vary, but all contain 'thank'\n\n\t\tif (formCompleted == 'form-completion-value' && thank) {\n\t\t\tconsole.log(readCookie('form-completion'));\n\t\t\tconsole.log(readCookie('form-id'));\n\n\t\t\t// Create analytics event\n\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\twindow.dataLayer.push({\n\t\t\t\tevent: \"formSubmission\",\n\t\t\t\tformID: formId\n\t\t\t});\n\n\t\t\t// Remove cookies so event cannot be fired again on /thank-you page refresh\n\t\t\teraseCookie('form-completion');\n\t\t\teraseCookie('form-id');\n\t\t}\n\t}); // End of load function\n\n\n\t// Include ready events here\n\twindow.addEventListener('DOMContentLoaded', function () {});\n\n\t/**\n * Cookie Popup scripts\n */\n\tvar popUp = document.getElementById('cookie-popup');\n\tvar popUpMain = document.getElementById('popup-main');\n\n\t// Hide popup and background filter and set cookie\n\tfunction accept() {\n\t\tpopUp.style.display = \"none\";\n\t\tdocument.body.classList.add('cookies');\n\t\tsetCookie(\"accepts-cookie\", \"accepts-cookie-set\", 365);\n\t}\n\n\tdocument.getElementById('accept-button').addEventListener('click', function () {\n\t\taccept();\n\t});\n\n\tvar cookie = readCookie('accepts-cookie');\n\t// If user already has accepted cookies, don't show popup\n\tif (cookie == 'accepts-cookie-set') {\n\t\tpopUp.style.display = \"none\";\n\t} else {\n\t\t// Force screen reader to read popup\n\t\tpopUpMain.setAttribute(\"aria-live\", \"assertive\");\n\t}\n})();","/**\n* @file cookie.js\n* Generic cookie handling functions.\n* @author Hal Burgiss 2009-03-22\n*/\nfunction setCookie( name,value,days ) {\n if ( days ) {\n var date = new Date();\n date.setTime(date.getTime()+(days*24*60*60*1000));\n var expires = \"; expires=\"+date.toGMTString();\n }\n else var expires = \"\";\n document.cookie = name+\"=\"+value+expires+\"; path=/\";\n}\nfunction readCookie( name ) {\n var nameEQ = name + \"=\";\n var ca = document.cookie.split(';');\n for(var i=0;i < ca.length;i++) {\n var c = ca[i];\n while (c.charAt(0)==' ') c = c.substring(1,c.length);\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);\n }\n return null;\n}\nfunction eraseCookie( name ) {\n setCookie(name,\"\",-1);\n}\n","/**\n * Debounce function for rate limiting a function.\n *\n * It prevents a function from being fired too frequently. This is useful\n * for resource intensive processes like resize event handlers and tap/click\n * handlers.\n *\n *\n * @see: https://davidwalsh.name/javascript-debounce-function\n *\n * @param function func - the callback function\n * @param int wait - the time to wait in milliseconds\n * @param bool immediate - call the function immediately\n *\n * @return function - the modified function that will only run once within a wait period.\n */\n function debounce( func, wait, immediate ) {\n\tvar timeout;\n\tif ( ! wait ) { console.warn( \"Debounce was called without a 'wait' argument. This renders debounce almost completely ineffective.\" ); }\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tvar later = function() {\n\t\t\ttimeout = null;\n\t\t};\n\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout( timeout );\n\t\ttimeout = setTimeout( later, wait );\n\t\tif ( callNow ) { func.apply( context, args ); }\n\t};\n};\n\n\n/**\n * Debounce scroll event for rate limiting scroll events.\n *\n * Putting events on the scroll handler should usually be discouraged\n * as they can be fired very frequently and this can cause the browser\n * to lag.\n *\n * Instead, use this event: debounceScroll\n *\n * This allows us to have only one scoll event handler that triggers\n * the debounceScoll event (on the window) 50ms (or whatever the\n * delay_time is set) after a scroll event starts and then stops.\n *\n *\n * @see: http://ejohn.org/blog/learning-from-twitter/#postcomment\n * (particularly read the comments for this variant)\n *\n * @usage:\n *\n * \twindow.addEventListener( 'debounceScroll', function() {\n * \t\tconsole.log( 'scrolled....');\n * \t}, false );\n */\nvar debounceScroll = create_event( 'debounceScroll' );\n\nwindow.addEventListener( 'load', function() {\n\tvar delay_time = 50;\n var delay_start = 0;\n var last_scroll_pos = 0;\n\n function scroll() {\n // If we are already scrolling, reset the delay\n if ( delay_start ) { clearTimeout( delay_start ); }\n\n // Are we scrolling down?\n var scrollDown = window.pageYOffset > last_scroll_pos;\n last_scroll_pos = window.pageYOffset; // Save for next time\n\n delay_start = setTimeout( function( event ) {\n debounceScroll.scrollDown = scrollDown;\n window.dispatchEvent( debounceScroll );\n }, delay_time );\n }\n\n // For momentum-scrolling touch devices that only trigger a scroll event on scroll-end\n if ('touchmove' in document.documentElement) {\n window.addEventListener('touchmove', function() {\n scroll();\n });\n } else {\n // Non-touch devices\n window.addEventListener('scroll', function() {\n scroll();\n });\n }\n});\n","/**\n * Slate Mobile Navigation Menu\n *\n */\n( function( ) {\n\n 'use strict';\n\n\t/**\n\t * 'is_mobile' variable to determine if this is a mobile size.\n\t */\n\tvar set_is_mobile, is_mobile = false;\n\n\twindow.addEventListener( 'load', function() {\n\t\tvar menuToggle = document.getElementById( 'menu-toggle' );\n\t\n\t\t(set_is_mobile = function() {\n\t\t\tif ( window.getComputedStyle( menuToggle ).display === \"none\" ) {\n\t\t\t\tis_mobile = false;\n\t\t\t} else {\n\t\t\t\tis_mobile = true;\n\t\t\t}\n\t\t})();\n\t\n\t\t/**\n\t\t * Toggle menu open/closed when clicking menu toggle\n\t\t */\n\t\tmenuToggle.addEventListener( 'click', function() {\n\t\t\tthis.classList.toggle( 'open' );\n\t\t\tdocument.getElementById( 'menu' ).classList.toggle( 'open' );\n\t\t\tdocument.querySelector( 'body' ).classList.toggle( 'opened-menu' );\n\t\n\t\t\tif ( this.classList.contains( 'open' ) ) {\n\t\t\t\tthis.setAttribute( 'aria-expanded', true );\n\t\t\t} else {\n\t\t\t\tthis.setAttribute( 'aria-expanded', false );\n\t\t\t}\n\t\t});\n\t});\n\n\n\tvar subToggles = document.querySelectorAll( '.submenu-toggle' );\n\n\tfor (var i = 0; subToggles.length > i; i++ ) {\n\t\tvar focus_out_timer = null;\n\t\tvar toggle_button = subToggles[i];\n\n\t\ttoggle_button.addEventListener( 'click', function() {\n\t\t\tthis.classList.toggle( 'open' );\n\t\t\tthis.parentNode.classList.toggle( 'open' );\n\n\t\t\tif ( this.classList.contains( 'open' ) ) {\n\t\t\t\tthis.setAttribute( 'aria-expanded', true );\n\t\t\t} else {\n\t\t\t\tthis.setAttribute( 'aria-expanded', false );\n\t\t\t}\n\t\t});\n\t}\n})();","/**\n* This file is loaded asyncronously in the footer.\n* All custom global scripts should be included here.\n*/\n\n\t/*\n\tA little info for this js file:\n\n\tAs much as possible, this file should be kept organized. Currently, two major divisions are seen below, delinitated by their respective functions of \"on load\" and \"ready\".\n\t\tAs mentioned below, most code added to this file should be included within the \"on load\" function.\n\n\tFor ease of future use, include any new code at the bottom of the relevant section of the page, adding clear comments to explain the purpose of the code being written,\n\t\tincluding any relavant details regarding what the code overrides, etc.\n\t*/\n\n\n(function(){\n\t'use strict';\n\n\t// rerun lazyload on screen size updates\n\twindow.addEventListener( 'resize', function() {\n\t\tdbs.lazyload();\n\t});\n\n\t/**\n\t * Detects if element is in viewport\n\t * \n\t * @usage\n\t * var el = document.querySelector('.home-panes__line');\n\t *\n\t * window.addEventListener('scroll', function(event) {\n\t * \t\tif (isInViewport(el)) {\n\t *\t\t\tel.classList.add(\"in-view\");\n\t*\t\t}\n\t* }, false);\n\t*/\n\tfunction isInViewport(elem) {\n\t\tvar distance = elem.getBoundingClientRect();\n\t\treturn (\n\t\t\tdistance.top >= 0 &&\n\t\t\t// distance.left >= 0 &&\n\t\t\tdistance.bottom <= (window.innerHeight || document.documentElement.clientHeight)\n\t\t\t// distance.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t\t);\n\t};\n\n\t// Load event function ... most custom stuff goes here. Safer for async.\n\twindow.addEventListener( 'load', function() {\n\t\t/* Search Form functionality\n\t\t * The click functionality involves three different actions,\n\t\t * depending on conditions the various clicks provide.\n\t\t */\n\t\tvar searchOpen = document.querySelectorAll( '.search-form__button--open' );\n\t\tvar searchClose = document.querySelectorAll( '.search-form__button--close' );\n\n\t\tif ( searchOpen ) {\n\t\t\tfor (var i=0; searchOpen.length > i; i++) {\n\t\t\t\tsearchOpen[i].addEventListener( 'click', function() {\n\t\t\t\t\tthis.parentElement.classList.add( 'search-form--active' );\n\t\t\t\t\tthis.parentElement.querySelector('.site_search__field').focus();\n\t\t\n\t\t\t\t\t// Hide the search bar after click out of it\n\t\t\t\t\tdocument.getElementById( 'content' ).addEventListener( 'click', function() {\n\t\t\t\t\t\tif ( this.parentElement.classList.contains( 'search-form--active' ) ) {\n\t\t\t\t\t\t\tthis.parentElement.classList.remove( 'search-form--active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tfor (var i=0; searchClose.length > i; i++) {\n\t\t\t\tsearchClose[i].addEventListener( 'click', function() {\n\t\t\t\t\tthis.parentElement.classList.remove( 'search-form--active' );\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Linkclicker\n\t\t * \n\t\t * A class placed on a wrapping element with a link inside to make the wrapper clickable.\n\t\t * Note: the container should have only one link.\n\t\t */\n\t\tvar linkclickers = document.querySelectorAll('.linkclicker');\n\n\t\tfor ( var i = 0; linkclickers.length > i; i++ ) {\n\t\t\tvar linkclicker = linkclickers[i];\n\n\t\t\tlinkclicker.addEventListener('click', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar link = this.querySelector('a');\n\t\t\t\tvar linkPath = link.getAttribute('href');\n\t\t\t\t\n\t\t\t\tif ( link.getAttribute('target', \"_blank\") ) {\n\t\t\t\t\twindow.open(linkPath);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = linkPath;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\n\t\t/**\n\t\t * Force external links/PDFs to open in a new tab.\n\t\t * From https://stackoverflow.com/questions/2910946/test-if-links-are-external-with-jquery-javascript\n\t\t * 2019-07-11 - TA\n\t\t */\n\t\tfunction link_is_external(link_element) {\n\t\t\treturn ( link_element.host !== window.location.host || link_element.href.indexOf(\"pdf\") > -1 );\n\t\t}\n\n\t\tvar anchorElements = document.getElementsByTagName('a');\n\t\tfor ( let anchorElement of anchorElements ) {\n\n\t\t\tif ( link_is_external( anchorElement ) ) {\n\t\t\t\tanchorElement.setAttribute( 'target','_blank' );\n\t\t\t\tanchorElement.setAttribute( 'rel','noopener' );\n\n\t\t\t\t// Add assistive text to alert of external links\n\t\t\t\tvar assistiveText = '. External Link. Opens in new window.';\n\t\t\t\tvar assistiveTextContainer = document.createElement( 'span' );\n\t\t\t\tassistiveTextContainer.innerHTML = assistiveText;\n\t\t\t\tanchorElement.appendChild( assistiveTextContainer.firstChild );\n\t\t\t}\n\t\t}\n\n\t\t// Find all animated elements and check if they're in view on load, and on scroll\n\t\tvar els = document.querySelectorAll('.animated');\n\t\t\n\t\tfor (let i = 0; els.length > i; i++) {\n\t\t\tlet _this = els[i];\n\n\t\t\t// Check on load\n\t\t\tif ( isInViewport(_this) ) {\n\t\t\t\t_this.classList.add(\"in-view\");\n\t\t\t}\n\n\t\t\t// Check on scroll\n\t\t\twindow.addEventListener('scroll', function(event) {\n\t\t\t\tif ( isInViewport(_this) ) {\n\t\t\t\t\t_this.classList.add(\"in-view\");\n\t\t\t\t}\n\t\t\t}, false);\n\t\t}\n\n\t\t/**\n\t\t * Form completion event for custom event trigger/goal completion\n\t\t * \n\t\t * The point of this method is to eliminate false conversions in Analytics\n\t\t * due to users refreshing the /thank-you/ page. This will now set a cookie after a form \n\t\t * submit event and get the form's id to pass into analytics. The analytics event for a goal\n\t\t * conversion is then generated if there a form completion cookie set, and the url is that\n\t\t * of a thank-you page. Each form will have a unique conversion event in Analytics based on\n\t\t * the formID that gets passed as the event label.\n\t\t * \n\t\t * There is the assumption that all forms on the site are a Gravity Form, and that\n\t\t * they re-direct to a /thank-you/ page of some kind on completion.\n\t\t */\n\t\tvar form = document.querySelector('.gform_wrapper form');\n\t\n\t\tif (form) {\n\t\t\tform.addEventListener('submit', function () {\n\t\t\t\tsetCookie( 'form-completion', 'form-completion-value', 1 );\n\t\t\t\tsetCookie( 'form-id', form.getAttribute( 'id' ), 1 );\n\t\t\t});\n\t\t}\n\n\t\tvar formCompleted = readCookie( 'form-completion' );\n\t\tvar formId = readCookie( 'form-id' );\n\t\tvar thank = window.location.href.indexOf( 'thank' ) >= 0; // Not exactly thank-you because the page titles/urls vary, but all contain 'thank'\n\n\t\tif ( formCompleted == 'form-completion-value' && thank ) {\n\t\t\tconsole.log(readCookie( 'form-completion' ));\n\t\t\tconsole.log(readCookie( 'form-id' ));\n\t\t\t\n\t\t\t// Create analytics event\n\t\t\twindow.dataLayer = window.dataLayer || [];\n\t\t\twindow.dataLayer.push({\n\t\t\t\tevent: \"formSubmission\",\n\t\t\t\tformID: formId\n\t\t\t});\n\n\t\t\t// Remove cookies so event cannot be fired again on /thank-you page refresh\n\t\t\teraseCookie( 'form-completion');\n\t\t\teraseCookie( 'form-id');\n\t\t}\n\t}); // End of load function\n\t\n\n\t// Include ready events here\n\twindow.addEventListener( 'DOMContentLoaded', function() {\n\t\t\n\t});\n\n\n\t/**\n\t * Cookie Popup scripts\n\t */\n\tvar popUp\t\t= document.getElementById('cookie-popup');\n\tvar popUpMain\t= document.getElementById('popup-main');\n\n\t// Hide popup and background filter and set cookie\n\tfunction accept() {\n\t\tpopUp.style.display = \"none\";\n\t\tdocument.body.classList.add('cookies');\n\t\tsetCookie( \"accepts-cookie\", \"accepts-cookie-set\", 365 );\n\t}\n\n\tdocument.getElementById('accept-button').addEventListener( 'click', function() {\n\t\taccept();\n\t});\n\n\tvar cookie = readCookie( 'accepts-cookie' );\n\t// If user already has accepted cookies, don't show popup\n\tif ( cookie == 'accepts-cookie-set' ) {\n\t\tpopUp.style.display = \"none\";\n\t} else {\n\t\t// Force screen reader to read popup\n\t\tpopUpMain.setAttribute(\"aria-live\", \"assertive\");\n\t}\n})();\n"]}