1jQuery(document).ready(function() { 2 3 themeURL = WPURLS.themeurl; 4 siteURL = WPURLS.siteurl; 5 6 jQuery('.alert-banner i').click(function() { 7 jQuery('.alert-banner').addClass('closed'); 8 jQuery('#page').addClass('banner-closed'); 9 setCookie('closedAlert', 1, 365); 10 }); 11 12 //Showalert banner if no cookie 13 var alertCook = getCookie('closedAlert'); 14 if(alertCook != 1) { 15 //console.log('no closed cookie exists'); 16 jQuery('.alert-banner').removeClass('closed'); 17 jQuery('#page').removeClass('banner-closed'); 18 } 19 20 jQuery('ul#primary li.menu-item-has-children > a').append('<i class="fa fa-angle-down"></i>'); 21 jQuery('#mobile-menu li.menu-item-has-children > a').append('<i class="fa fa-angle-down"></i>'); 22 23 jQuery('.general-content p, .general-content h2, .general-content h3, .general-content h4, .general-content h5, .general-content h6, .general-content .wp-block-pullquote, .general-content .wp-block-quote, .general-content .wp-block-verse, .general-content ul, .general-content ol').wrap('<div class="container"></div>'); 24 25 jQuery('.bg-green-primary button').addClass('ghost'); 26 27 28 //Show mobile menu 29 jQuery(".openmenu").click(function() { 30 jQuery("body").toggleClass('menu-opened'); 31 jQuery("#mobile-menu-container").toggleClass('hide'); 32 jQuery(".openmenu .hamburger").toggleClass('is-active'); 33 }); 34 jQuery("#mobile-menu a[href='#']").click(function(event) { 35 event.preventDefault(); 36 }); 37 jQuery(".menu-item-has-children").click(function(event) { 38 //jQuery('.sub-menu').removeClass('opened'); 39 jQuery(this).find('a i').toggleClass('opened'); 40 jQuery(this).find('.sub-menu').toggleClass('opened'); 41 }); 42 43 44 // Search appear 45 jQuery(".navsearch, .search-box .close-x").click(function(event) { 46 event.preventDefault(); 47 jQuery(".search-box").toggle(); 48 }); 49 50 51 //Styled Radio and Checkboxes 52 53 jQuery('input:checked').parents('.gchoice').addClass('checked'); 54 55 jQuery( ".gfield_radio .gchoice, .gfield_radio .gchoice label" ).on( "click", function() { 56 jQuery(this).parents('.gfield_radio').find('.gchoice').removeClass('checked'); 57 jQuery(this).addClass('checked'); 58 }); 59 jQuery( ".gfield_checkbox .gchoice" ).on( "click", function() { 60 jQuery(this).toggleClass('checked'); 61 console.log('whole click'); 62 }); 63 jQuery( ".gfield_checkbox .gchoice label" ).on( "click", function() { 64 jQuery(this).parents('.gchoice').toggleClass('checked'); 65 console.log('label click'); 66 }); 67 68 jQuery( ".gform_wrapper .styled-form .gfield_radio" ).addClass('row'); 69 jQuery( ".gform_wrapper .styled-form .gfield_radio .gchoice" ).addClass('col-6 col-md-4'); 70 71 72 //Replace all SVG images with inline SVG 73 jQuery('img.svg').each(function(){ 74 var $img = jQuery(this); 75 var imgID = $img.attr('id'); 76 var imgClass = $img.attr('class'); 77 var imgURL = $img.attr('src'); 78 79 jQuery.get(imgURL, function(data) { 80 // Get the SVG tag, ignore the rest 81 var $svg = jQuery(data).find('svg'); 82 83 // Add replaced image's ID to the new SVG 84 if(typeof imgID !== 'undefined') { 85 $svg = $svg.attr('id', imgID); 86 } 87 // Add replaced image's classes to the new SVG 88 if(typeof imgClass !== 'undefined') { 89 $svg = $svg.attr('class', imgClass+' replaced-svg'); 90 } 91 92 // Remove any invalid XML tags as per http://validator.w3.org 93 $svg = $svg.removeAttr('xmlns:a'); 94 95 // Replace image with new SVG 96 $img.replaceWith($svg); 97 98 }, 'xml'); 99 100 }); 101 102 103 //If request quote checked, fire linkedin tracking 104 jQuery('#gform_1').submit(function() { 105 let isChecked = jQuery('#choice_1_11_1')[0].checked; 106 if(isChecked) { 107 console.log(isChecked); 108 window.lintrk('track', { conversion_id: 8961162 }); 109 } 110 }); 111 112 113 114 115 //Get Querystring values 116 function GetParameterValues(sParam) { 117 var sPageURL = window.location.search.substring(1); 118 var sURLVariables = sPageURL.split('&'); 119 for (var i = 0; i < sURLVariables.length; i++) 120 { 121 var sParameterName = sURLVariables[i].split('='); 122 if (sParameterName[0] == sParam) 123 { 124 return sParameterName[1]; 125 } 126 } 127 } 128 129 130}); 131 132 133// Cookie management 134function setCookie(key, value, days) { 135 var expires = new Date(); 136 expires.setTime(expires.getTime() + (days * 24 * 60 * 60 * 1000)); 137 document.cookie = key + '=' + value + ';expires=' + expires.toUTCString() + ';path=/'; 138} 139 140function getCookie(key) { 141 var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)'); 142 return keyValue ? keyValue[2] : null; 143} 144 145function deleteCookie(key) { 146 document.cookie = key + '=;expires=1;path=/';
147 setCookie(key, "", null , null , null, 1); 148} 149 150
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.