1// eslint-disable-next-line no-undef 2jQuery( document ).ready( function( $ ) { 3 /* function setMobileTable( selector ) { 4 // if (window.innerWidth > 600) return false; 5 const tableEl = document.querySelector( selector ); 6 if ( $( selector ).length ) { 7 const thEls = tableEl.querySelectorAll( 'thead th:not([colspan="3"]):not(:empty)' ); 8 const tdLabels = Array.from( thEls ).map( ( el ) => el.innerText ); 9 tableEl.querySelectorAll( 'tbody tr' ).forEach( ( tr ) => { 10 Array.from( tr.children ).forEach( 11 ( td, ndx ) => td.setAttribute( 'label', tdLabels[ ndx ] ) 12 ); 13 } ); 14 } 15 } 16 setMobileTable( 'table' ); */ 17 18 if ( $( '.template-slider' ).length ) { 19 20 const slider = $( '.template-slider' ).bxSlider( { 21 controls: false, 22 touchEnabled: false, 23 adaptiveHeight: false, 24 auto: true, 25 pause: 8000, 26 } ); 27 28 resizeSlider( slider ); 29 30 $( window ).resize( function() { 31 resizeSlider( slider ); 32 } ); 33 34 function resizeSlider() { 35 const container = $( '#primary > .container' ).width(); 36 const body = $( 'body' ).width(); 37 const margins = body - container; 38 const margin = margins / 2; 39 const sliderWidth = container + margin; 40 $( '.bx-wrapper' ).width( sliderWidth ); 41 slider.redrawSlider(); 42 } 43 44 $( '.vc-testionials .slider' ).bxSlider( {} ); 45 } //end conditional call to .template-slider 46 47 let hashTagActive = ''; 48 $( '.scroll' ).on( 'click touchstart', function( event ) { 49 if ( hashTagActive !== this.hash ) { //this will prevent if the user click several times the same link to freeze the scroll. 50 event.preventDefault(); 51 //calculate destination place 52 let dest = 0; 53 if ( $( this.hash ).offset().top > $( document ).height() - $( window ).height() ) { 54 dest = $( document ).height() - $( window ).height(); 55 } else { 56 dest = $( this.hash ).offset().top; 57 } 58 //go to destination 59 $( 'html,body' ).animate( { 60 scrollTop: dest, 61 }, 2000, 'swing' ); 62 hashTagActive = this.hash; 63 } 64 } ); 65 66 $(".modal").click(function() { 67 $(".modal").removeClass("open"); 68 }); 69 70//Site updates 2/2025 71 72 //Sticky nav on scroll on all pages 73 var $nav = $("#masthead"); 74 var $placeholder = $("#navPlaceholder"); 75 var bannerHeight = $(".update").outerHeight() > 0 ? $(".update").outerHeight() : 0; 76 var navHeight = $nav.outerHeight(); 77 78 $(window).scroll(function () { 79 if ($(window).scrollTop() > bannerHeight) { 80 if (!$nav.hasClass("sticky-nav")) { 81 $placeholder.height((navHeight - bannerHeight)).show(); 82 $nav.addClass("sticky-nav"); 83 } 84 } else { 85 $placeholder.hide(); // Remove space 86 $nav.removeClass("sticky-nav"); 87 } 88 }); 89 90} ); 91 92//Add an email placeholder to the dynamically added constant contact form on the homepage 93function applyWhenElementExists(selector, myFunction, intervalTime) { 94 var interval = setInterval(function() { 95 if (jQuery(selector).length > 0) { 96 myFunction(); 97 clearInterval(interval); 98 } 99 }, intervalTime); 100 } 101 applyWhenElementExists("#email_address_0", function(){ 102 document.getElementById("email_address_0").placeholder = "enter your email"; 103 }, 50); 104 105//Remove the popup form if the trigger class of 'popmake-1763' isn't present on the page 106document.addEventListener('DOMContentLoaded', function() { 107 // Check if the trigger element with the class .popmake-1763 exists 108 const triggerElement = document.querySelector('.popmake-1763'); 109 110 // If the trigger element does NOT exist on the page 111 if (!triggerElement) { 112 // Get the modal popup element by its ID 113 const popupElement = document.getElementById('pum-1763'); 114 115 // If the popup element exists, remove it from the DOM 116 if (popupElement) { 117 popupElement.remove(); //remove the popup element from DOM 118 } 119 } 120});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.