1$(document).ready(function() { 2 3 $('.liame').nospam({ filterLevel: 'normal',replaceText: true }); 4 $('.email').nospam({ filterLevel: 'normal',replaceText: false }); 5 6 $('.lazy').lazyLoad(); 7 $(window).on( 'scroll', function(){ 8 $('.lazy').lazyLoad(); 9 }); 10 11 $('.adtop.hdr').delay(500).slideDown(450); 12 13 $.cookieBar({closeButton: '.close-button'}); 14 15 $('.hnewsslider').on('init', function(event, slick) { 16 $(this).removeClass('preload'); 17 }).slick({ 18 infinite: true, 19 slidesToShow: 4, 20 slidesToScroll: 4, 21 dots: true, 22 speed: 600, 23 autoplay: true, 24 autoplaySpeed: 5000, 25 responsive: [{ 26 breakpoint: 768, 27 settings: { 28 slidesToShow: 3, 29 slidesToScroll: 3 30 } 31 },{ 32 breakpoint: 600, 33 settings: { 34 slidesToShow: 2, 35 slidesToScroll: 2 36 } 37 },{ 38 breakpoint: 480, 39 settings: { 40 slidesToShow: 1, 41 slidesToScroll: 1 42 } 43 }] 44 }); 45 46 47 48 $('.toggle-button').click(function() { 49 $(this).toggleClass('open'); 50 $(this).closest('li.menu-item-has-children').find('ul.sub-menu:first').slideToggle(); 51 return false; 52 }); 53 $('.closebtn').click(function() { 54 $('body').removeClass('modalopen'); 55 $('.openmenu').removeClass('active'); 56 $('.hdrsearch').slideUp(); 57 $('#bt').removeClass('menuon'); 58 $('.sidenav .adtop').slideUp('fast'); 59 $('.sidenavmenu').hide() 60 $('#sidenav').delay(500).css('width', '0px'); 61 return false; 62 }); 63 $('.openmenu').on('click', function(e) { 64 e.preventDefault(); 65 if ($(this).hasClass('active')) { 66 $('body').removeClass('modalopen'); 67 $(this).removeClass('active'); 68 $('#bt').removeClass('menuon'); 69 $('.sidenavmenu').hide(); 70 $('.sidenav .adtop').slideUp('fast'); 71 $('#sidenav').delay(500).css('width', '0px'); 72 //$('.outer').css('marginLeft', '0px'); 73 } else { 74 $(this).addClass('active'); 75 $('body').addClass('modalopen'); 76 $('.hdrsearch').slideUp(); 77 $('#bt').addClass('menuon'); 78 if ($(window).width() < 601){ 79 $('#sidenav').css('width', '100%'); 80 } else { 81 $('#sidenav').css('width', '380px'); 82 } 83 $('.sidenav .sidenavmenu').delay(500).fadeIn(1000); 84 $('.sidenav .adtop').delay(750).slideDown('fast'); 85 //$('.outer').css('marginLeft', '250px'); 86 //$('.outer').css('marginRight', '-250px'); 87 } 88 }); 89 90 $('.sidenavinner').each(function(){ const ps = new PerfectScrollbar($(this)[0]); }); 91 92 $(document).on('click', '.j-store-select', function() { 93 $(this).find('ul').slideToggle(); 94 }); 95 96 $(document).on('click', '.j-store', function() { 97 var store = $(this).html(); 98 $(this).toggleClass('selected'); 99 $('.j-store').not($(this)).removeClass('selected'); 100 $('.store-default').html(store).css('color', 'black'); 101 $('#competitor').val($(this).attr('data-value')); 102 103 }); 104}); 105 106$(window).resize(function(){ 107 if ($(window).width() < 769){ 108 $('.openmenu').removeClass('active'); 109 $('#bt').removeClass('menuon'); 110 $('.sidenav ul.menu').hide(); 111 $('#sidenav').delay(500).css('width', '0px'); 112 } 113}); 114 115function startTime() { 116 var today = new Date(); 117 var h = today.getUTCHours(); 118 var m = today.getUTCMinutes(); 119 if (m < 10) {m = "0" + m}; 120 document.getElementById('hdrclock').innerHTML = h + "<span>:</span>" + m + " <em>GMT</em>"; 121 var t = setTimeout(startTime, 500); 122} 123 124$.fn.extend({ 125 lazyLoad : function() { 126 $(this).each( function() { 127 if( inViewPort( $(this) ) ) { 128 $(this).addClass('in'); 129 } else { 130 $(this).removeClass('in'); 131 } 132 }); 133 } 134}); 135 136$(function(){ 137 setInterval(function(){ 138 var utcTime = $('#utc_time'); 139 var localTime = $('#local_time'); 140 //put UTC time into utc_time 141 utcTime.text(moment.utc().format('YYYY-MM-DD HH:mm:ss')); 142 //get text from utc_time and convert to local timezone 143 var formattedTime = moment.utc(utcTime.text()).toDate(); 144 formattedTime = moment(formattedTime).format('HH:mm'); 145 localTime.text(formattedTime); 146 },1000); 147}); 148 149function inViewPort(e) { 150 // cache viewport height and object offset 151 var windowBottom = $(window).scrollTop() + $(window).height(), 152 objectBottom = e.offset().top + e.outerHeight() / 2, 153 inView = false;
154 155 // if the object is completely visible in the window 156 if ( windowBottom >= objectBottom ){ 157 inView = true; 158 } 159 return inView; 160} 161 162function addLink() { 163 if (window.getSelection().containsNode(document.getElementsByClassName("article")[0], true)) { 164 var body_element = document.getElementsByTagName("body")[0]; 165 var selection; 166 selection = window.getSelection(); 167 var oldselection = selection 168 var url = document.URL 169 var pagelink = " Read more at <a href='" + url + "'>" + url + "</a>"; 170 var copy_text = selection + pagelink; 171 var new_div = document.createElement("div"); 172 new_div.style.left="-99999px"; 173 new_div.style.position="absolute"; 174 body_element.appendChild(new_div ); 175 new_div.innerHTML = copy_text ; 176 selection.selectAllChildren(new_div ); 177 window.setTimeout(function() { 178 body_element.removeChild(new_div ); 179 },0); 180 } 181} 182 183/* 184* No Spam (1.3.2) 185*/ 186(function($){ 187 $.fn.nospam = function(settings) { 188 settings = $.extend({ 189 replaceText: false, // optional, accepts true or false 190 filterLevel: 'normal' // optional, accepts 'low' or 'normal' 191 }, settings); 192 return this.each(function(){ 193 e = null; 194 if(settings.filterLevel == 'low') { // Can be a switch() if more levels added 195 if($(this).is('a[rel]')) { 196 e = $(this).attr('rel').replace('//', '@').replace(/\//g, '.'); 197 } else { 198 e = $(this).text().replace('//', '@').replace(/\//g, '.'); 199 } 200 } else { // 'normal' 201 if($(this).is('a[rel]')) { 202 e = $(this).attr('rel').split('').reverse().join('').replace('//', '@').replace(/\//g, '.'); 203 } else { 204 e = $(this).text().split('').reverse().join('').replace('//', '@').replace(/\//g, '.'); 205 } 206 } 207 if(e) { 208 if($(this).is('a[rel]')) { 209 $(this).attr('href', 'mailto:' + e); 210 if(settings.replaceText) { 211 $(this).text(e); 212 } 213 } else { 214 $(this).text(e); 215 } 216 } 217 }); 218}; 219})(jQuery); 220
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.