1$(document).ready(function () { 2 $('.ginput_recaptcha').each(function(i) 3 { 4 var thisID = $(this).attr('id'); 5 $(this).attr('id', thisID+'_'+i); 6 $(this).closest('.gfield').addClass('captcha-style'); 7 }); 8 $('#plyr-script').after( 9 "<script>const playerHome = new Plyr.setup('.plyr__video-embed-home', {autoplay: true, quality: {default: 1080}, muted: true, loop: {active: true}, fullscreen: {enabled: true,fallback: true,iosNative: true}});" 10 ); 11 $('#defer-plyr').remove(); 12 13 setTimeout(() => { 14 $('button.plyr__control.plyr__control--overlaid:not(.plyr__control--pressed)').trigger('click'); 15 }, 1000); 16 17 18 19 // Create a method that sees if we have any url paramaters and we store them in the vistors session storage 20 retrieveUTMparamaters(); 21 function retrieveUTMparamaters() { 22 let siteUrl = window.location.toString(); 23 if(siteUrl){ 24 let searchIndex = siteUrl.indexOf("?"); 25 if (searchIndex === -1) { 26 return false; 27 } 28 let sPageURL = siteUrl.substring(searchIndex + 1), 29 sURLVariables = sPageURL.split(/[&||?]/); 30 31 for (let i = 0; i < sURLVariables.length; i++) { 32 // Now seperate the key from the value and split the label and the value 33 let sParameterName = sURLVariables[i]; 34 let sParameterSplit = sParameterName.split('='); 35 let sParameterLabel = sParameterSplit[0]; 36 let sParameterValue = sParameterSplit[1]; 37 38 // Now we check if the paramaters are valid so we don't store every url parameter in the session 39 if(sParameterLabel !== 'utm_source' && sParameterLabel !== 'gclid'){ 40 continue; 41 } 42 43 // Now we store the paramaters in the session storage 44 sessionStorage.setItem(sParameterLabel, sParameterValue); 45 } 46 return false; 47 } 48 } 49 50 $(document).on('gform_post_render', function (object, form_id, page) { 51 if( form_id === 7 || form_id === 12 ){ 52 let utm_source = sessionStorage.getItem('utm_source'); 53 let gclid = sessionStorage.getItem('gclid'); 54 55 if(utm_source){ 56 $('#input_'+ form_id +'_15').val(utm_source); 57 } 58 if(gclid){ 59 $('#input_'+ form_id +'_16').val(gclid); 60 } 61 } 62 }); 63}); 64 65$(document).on('gform_post_render', function () { 66 67 $('.gform-body input') 68 .add('.gform-body textarea') 69 .each(function (i, v) { 70 var id = $(v).attr('id'); 71 72 if ($(v).val() != '') { 73 $(`label[for="${id}"]`).addClass('filled'); 74 return; 75 } 76 77 $(v).on('focus', () => { 78 $(`label[for="${id}"]`).addClass('focus'); 79 }); 80 81 $(v).on('blur', () => { 82 if ($(v).val() == '') { 83 $(`label[for="${id}"]`).removeClass('focus filled'); 84 return; 85 } 86 87 $(`label[for="${id}"]`).removeClass('focus'); 88 $(`label[for="${id}"]`).addClass('filled'); 89 }); 90 }); 91}); 92 93(function () { 94 var mq = window.matchMedia('(max-width: 767px)'); 95 var matches = mq.matches; 96 97 submenu(matches); 98 99 $(window).on('resize', function () { 100 matches = mq.matches; 101 submenu(matches); 102 }); 103 104 function submenu(matches) { 105 if (matches) { 106 $('.submenu__menu').each(function (index, elem) { 107 var $elem = $(elem); 108 var $container = $elem.closest('.submenu__container'); 109 var $toggle = $container.find('.toggle-submenu'); 110 111 $container.attr({ 112 role: 'dialog', 113 'data-trap': false, 114 }); 115 $toggle.attr({ 116 'aria-expanded': false, 117 }); 118 $elem.attr({ 119 'aria-hidden': true, 120 hidden: 'hidden', 121 }); 122 123 $toggle.on('click', () => { 124 var state = $toggle.attr('aria-expanded') == 'true' ? true : false;
125 if (state) { 126 $container.attr({ 127 'data-trap': false, 128 }); 129 $toggle.attr({ 130 'aria-expanded': false, 131 }); 132 $elem.attr({ 133 'aria-hidden': true, 134 hidden: 'hidden', 135 }); 136 } else { 137 $container.attr({ 138 'data-trap': true, 139 }); 140 $toggle.attr({ 141 'aria-expanded': true, 142 }); 143 $elem 144 .attr({ 145 'aria-hidden': false, 146 }) 147 .removeAttr('hidden'); 148 } 149 }); 150 }); 151 } else { 152 $('.submenu__container').removeAttr('role data-trap'); 153 $('.toggle-submenu').removeAttr('aria-expanded'); 154 $('.submenu__menu').removeAttr('aria-hidden hidden'); 155 } 156 } 157 158 159 $('.textblock--expandable').removeAttr('hidden'); 160 $('.toggle.button').on('click', function () { 161 if ($(this).closest('.textblock-media__content').find('.textblock--expandable').attr('aria-hidden') === 'true') { 162 $(this).closest('.textblock-media__content').find('.textblock--expandable').attr('aria-hidden', 'false'); 163 $(this).closest('.textblock-media__content').find('.textblock--expandable').remove('hidden'); 164 } else { 165 $(this).closest('.textblock-media__content').find('.textblock--expandable').attr('aria-hidden', 'true'); 166 $(this).closest('.textblock-media__content').find('.textblock--expandable').remove('hidden'); 167 } 168 }); 169 170 $('.toggle.button').on('click', function () { 171 if ($(this).closest('.textblock-intro__content').find('.textblock--expandable').attr('aria-hidden') === 'true') { 172 $(this).closest('.textblock-intro__content').find('.textblock--expandable').attr('aria-hidden', 'false'); 173 $(this).closest('.textblock-intro__content').find('.textblock--expandable').remove('hidden'); 174 } else { 175 $(this).closest('.textblock-intro__content').find('.textblock--expandable').attr('aria-hidden', 'true'); 176 $(this).closest('.textblock-intro__content').find('.textblock--expandable').remove('hidden'); 177 } 178 }); 179 180 $(document).on('click', '.scroll-down', function () { 181 $('html, body').animate( 182 { 183 scrollTop: $(window).innerHeight(), 184 }, 185 1000 186 ); 187 }); 188 //change background for testimonial wrapper by upper div 189 if ($('.testimonial__wrapper.section').length > 0) { 190 $('.testimonial__wrapper.section').each(function () { 191 var bgAboveDiv = $(this).prev('div'); 192 if (bgAboveDiv.hasClass('background-gradient-reverse')) { 193 $(this).css('--backgroundVar', '#F7F7F7'); 194 } else { 195 $(this).css('--backgroundVar', bgAboveDiv.css('background')); 196 } 197 }); 198 } 199 200 // Below we push data to the dataLayer after certain forms have been filled in. 201 $(document).on('gform_confirmation_loaded', function(event, formId){ 202 console.log(window.dataLayer); 203 // code to be triggered when the confirmation page is loaded 204 // if(formId === 7){ 205 // window.dataLayer = window.dataLayer || []; 206 // dataLayer.push({ 207 // 'event': 'offerte-aanvraag' 208 // }); 209 // } 210 // 211 // console.log(window); 212 213 // if(formId === 5){ 214 // console.log(event); 215 // window.dataLayer = window.dataLayer || []; 216 // dataLayer.push({ 217 // 'event': 'contact-aanvraag' 218 // }); 219 // } 220 }); 221 222 223 $(document).on("click", ".section summary", function () { 224 if (!$(this).closest('details').attr('open')) { 225 $(this).closest('ol').find('details').removeAttr('open'); 226 } 227 }); 228})();
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.