1$(document).ready(function() { 2 3 /** 4 * Mobile Nav 5 * 6 * Hubspot Standard Toggle Menu 7 */ 8 9 $('.custom-menu-primary').addClass('js-enabled'); 10 $('.custom-menu-primary .hs-menu-wrapper').before('<div class="mobile-trigger cta_border_button">MENU</div>'); 11 $('.custom-menu-primary .flyouts .hs-item-has-children > a').after(' <div class="child-trigger"><i></i></div>'); 12 $('.mobile-trigger').click(function() { 13 $(this).next('.custom-menu-primary .hs-menu-wrapper').slideToggle(250); 14 $('body').toggleClass('mobile-open'); 15 $('.child-trigger').removeClass('child-open'); 16 $('.hs-menu-children-wrapper').slideUp(250); 17 return false; 18 }); 19 20 $('.child-trigger').click(function() { 21 $(this).parent().siblings('.hs-item-has-children').find('.child-trigger').removeClass('child-open'); 22 $(this).parent().siblings('.hs-item-has-children').find('.hs-menu-children-wrapper').slideUp(250); 23 $(this).next('.hs-menu-children-wrapper').slideToggle(250); 24 $(this).next('.hs-menu-children-wrapper').children('.hs-item-has-children').find('.hs-menu-children-wrapper').slideUp(250); 25 $(this).next('.hs-menu-children-wrapper').children('.hs-item-has-children').find('.child-trigger').removeClass('child-open'); 26 $(this).toggleClass('child-open'); 27 return false; 28 }); 29 30 31 32 /** 33 * Set Banner Image on Homepage 34 */ 35 36 // Grab the SRC of the Background Image module uploaded image 37 var bannerSRC = $(".background-image").find("img").attr("src"); 38 39 // Apply the src as the background image for the banner area 40 $("#banner-background-image").css('background-image', 'url(' + bannerSRC + ')'); 41 42 43 44 /** 45 * Set Offer Image on Homepage 46 */ 47 48 // Grab the SRC of the Background Image module uploaded image 49 var offerBannerSRC = $(".offer-image").find("img").attr("src"); 50 51 // Apply the src as the background image for the banner area 52 $("#offer-background-image").css('background-image', 'url(' + offerBannerSRC + ')'); 53 54 55 56 57 58 59 /** 60 * Small Header on Page Scroll 61 */ 62 63 $(window).scroll(function(){ 64 65 // Variables 66 var $body = $("body"); 67 var windowScrollTop = $(window).scrollTop(); 68 var secondRowOffset = $(".body-container").offset(); 69 70 if(windowScrollTop > secondRowOffset.top){ 71 $body.addClass("small-header"); 72 } 73 else { 74 $body.removeClass("small-header"); 75 } 76 }); 77 78 79 80 // Body Padding based off from Header Height & Stick Footer 81 82 function updateheaderHeight(){ 83 var pageWidth = $(window).width(); 84 var headerHeight = $('.header-container-wrapper').height() ; 85 var bodyHeight = $( window ).height() - headerHeight - $('.footer-container-wrapper').height(); 86 if (pageWidth > 767) { 87 $('.body-container-wrapper').css('padding-top', headerHeight + 'px'); 88 } 89 else { 90 $('.body-container-wrapper').css('padding-top', '0' + 'px'); 91 } 92 $('.body-container-wrapper').css('min-height', bodyHeight + 'px'); 93 } 94 updateheaderHeight(); 95 $(window).on("resize", updateheaderHeight); 96 97 98 99 /** * Hide Footer Contact Icons if content doesn't exist */ 100 $(document).ready(function() { 101 if (!$.trim($(".phone-icon .contact-info").html()) == true) { 102 $(".contact-us .fa-phone").hide(); 103 } 104 if (!$.trim($(".envelope-icon .contact-info").html()) == true) { 105 $(".contact-us .fa-envelope").hide(); 106 } 107 if (!$.trim($(".home-icon .contact-info").html()) == true) { 108 $(".contact-us .fa-home").hide(); 109 } 110 }); 111 112}); /* End of Document Ready */ 113 114
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.