1//Hide top navigation 2var d = document, e = d.documentElement, s = d.createElement('style'); 3s.textContent = '#global-navigation {visibility:hidden; overflow: hidden;}'; 4var r = document.getElementsByTagName('script')[0]; 5r.parentNode.insertBefore(s, r); 6 7jQuery(function ($) { 8 9 function checkWidth() { 10 var windowsize = $(window).width(); 11 12 if (windowsize <= 1000) { 13 ////hides container when no mobile nav 14 //console.log('wide'); 15 $('#ow-nav').css('right', '-240px').removeClass('open'); 16 $('main').css('left', '0px'); 17 //$(".mega-menu").attr("style", ""); 18 $('#ow-nav .navbar-nav a.dropdown-toggle').removeClass('active'); 19 20 //$('#ow-nav .dropdown-toggle').click(function () { 21 // $(this).parent('li').siblings().children('.dropdown-menu').slideUp(); 22 // if ($(this).parent().hasClass('open')) { 23 // //alert('b'); 24 // $(this).siblings('.dropdown-menu').slideUp(); 25 // } else { 26 // $(this).siblings('.dropdown-menu').slideDown(); 27 28 // } 29 //}); 30 } 31 }; 32 33 $('#ow-nav .navbar-nav a.has-children').click(function (e) { 34 var windowsize = $(window).width(); 35 if (windowsize <= 1000) { 36 e.preventDefault(); 37 $(this).parent().siblings().children('.dropdown-toggle').removeClass('active'); 38 $(this).parent().siblings().children('.dropdown-menu').slideUp(); 39 if ($(this).hasClass('active')) { 40 $(this).removeClass('active').siblings('.dropdown-menu').slideUp(); 41 } else { 42 $(this).addClass('active').siblings('.dropdown-menu').slideDown(); 43 } 44 return false; 45 } 46 else 47 return true; 48 }); 49 50 equalheight = function (container) { 51 52 var currentTallest = 0, 53 currentRowStart = 0, 54 rowDivs = new Array(), 55 $el, 56 topPosition = 0; 57 $(container).each(function () { 58 59 $el = $(this); 60 $($el).height('auto') 61 topPostion = $el.position().top; 62 63 if (currentRowStart != topPostion) { 64 for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { 65 rowDivs[currentDiv].height(currentTallest); 66 } 67 rowDivs.length = 0; // empty the array 68 currentRowStart = topPostion; 69 currentTallest = $el.height(); 70 rowDivs.push($el); 71 } else { 72 rowDivs.push($el); 73 currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); 74 } 75 for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { 76 rowDivs[currentDiv].height(currentTallest); 77 } 78 }); 79 } 80 81 $(window).load(function () { 82 checkWidth(); 83 equalheight('#home #product-buckets .bucket'); 84 equalheight('#home #news-buckets .bucket'); 85 equalheight('.product-sitemap .prod-cat .prod-text'); 86 }); 87 88 $(window).resize(function () { 89 checkWidth(); 90 equalheight('#home #product-buckets .bucket'); 91 equalheight('#home #news-buckets .bucket'); 92 equalheight('.product-sitemap .prod-cat .prod-text'); 93 }); 94 95 // Mobile Nav Open/Close 96 $('.navbar-toggle').click(function () { 97 var slideoutMenu = $('#ow-nav'); 98 var pagebody = $('main'); 99 // toggle open class 100 slideoutMenu.toggleClass("open"); 101 //$('.nav-main a.top').removeClass('active'); 102 $('.dropdown-menu').slideUp(); 103 104 // slide menu 105 if (slideoutMenu.hasClass("open")) { 106 slideoutMenu.animate({ 107 right: "0" 108 }, 300); 109 pagebody.animate({ 110 left: "-240px" 111 }, 300); 112 $('.navbar-toggle, .navbar-header').animate({ 113 left: "-240px" 114 }, 300); 115 } else { 116 slideoutMenu.animate({ 117 right: "-240px" 118 }, 300); 119 pagebody.animate({ 120 left: "0" 121 }, 300); 122 $('.navbar-toggle, .navbar-header').animate({ 123 left: "0" 124 }, 300); 125 } 126 });
127 128 // Mini gallery 129 $('.mini-gallery li:eq(0)').siblings('li').hide(); //Catch if nth-child doesn't work 130 $('.mini-gallery-nav li a').click(function (e) { 131 e.preventDefault() 132 var el = $(this).parent('li'); 133 134 if (!el.hasClass('active')) { 135 el.addClass('active').siblings('li').removeClass('active'); 136 navIndex = el.index(); 137 $('.mini-gallery li:eq(' + navIndex + ')').stop(true, true).fadeIn().siblings('li').hide(); 138 139 } 140 }); 141 142 $('a.yt-btn').magnificPopup({ 143 type: 'iframe' 144 }); 145 $('a.yt-btn2').magnificPopup({ 146 type: 'iframe' 147 }); 148 149 150//Privacy Notice Popup 151 $("#privacy-message-close").on("click", function() { 152 $("#privacy-message").animate( 153 {bottom: "-1000px"}, 154 2000, 155 function(){ 156 $(this).hide(); 157 } 158 ); 159 document.cookie = "cookeMessageClicked=true;max-age=31536000"; 160 }); 161 162 $("#privacy-message-link").on("click", function(){ 163 document.cookie = "cookeMessageClicked=true;max-age=31536000"; 164 }); 165 166 $( window ).on( 'load', ()=> { 167 if( document.cookie.indexOf( 'cookeMessageClicked=true' ) === -1 ){ 168 $("#privacy-message").show().animate({bottom: "0px"}, 2000); 169 } 170 } ); 171 172}); 173 174 175//GUP 176function gup(name) { 177 name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); 178 var regexS = "[\\?&]" + name + "=([^&#]*)"; 179 var regex = new RegExp(regexS); 180 var results = regex.exec(window.location.href); 181 if (results == null) 182 return ""; 183 else 184 return unescape(results[1]); 185} 186
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.