1var session_pl = sessionStorage.getItem('overlaySessionPL'); 2var session_en = sessionStorage.getItem('overlaySessionEN'); 3 4function kFormatter(num) { 5 return num > 999999 ? (num / 1000000).toFixed(2).replace('.', ',') + '' : num 6} 7function addCommas(nStr) { 8 nStr += ''; 9 var x = nStr.split(' '); 10 var x1 = x[0]; 11 var x2 = x.length > 1 ? ' ' + x[1] : ''; 12 var rgx = /(\d+)(\d{3})/; 13 while (rgx.test(x1)) { 14 x1 = x1.replace(rgx, '$1' + ' ' + '$2'); 15 } 16 return x1 + x2; 17} 18 19function ukNumberFormat(num) { 20 21 if( isNaN(num) ) { 22 return num; 23 } 24 25 // If you want to abbreviate millions, handle that first: 26 if (num > 999999) { 27 // Divide by 1,000,000 and format with 2 decimals 28 return (num / 1000000).toLocaleString('en-GB', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + ''; 29 } 30 // Otherwise, just format the number 31 return num.toLocaleString('en-GB'); 32} 33 34function setWrapper() { 35 var zoom = window.devicePixelRatio; 36 37 console.log(zoom); 38 console.log(window.innerWidth); 39 console.log($(window).width()); 40 /* 41 42 -webkit-transform: none; 43 transform: none; 44 45 */ 46 47 console.log(zoom * window.innerWidth); 48 49 if (zoom == 1) { 50 $(".wrapper").css("max-width", "100%"); 51 $(".zoomPage").removeClass("transform-fix"); 52 $(".zoomPage").removeClass("notransform-fix"); 53 } else if (zoom > 1) { 54 $(".wrapper").css("max-width", "100%"); 55 $(".zoomPage").removeClass("transform-fix"); 56 $(".zoomPage").addClass("notransform-fix"); 57 } else if(zoom * window.innerWidth > 1799){ 58 $(".zoomPage").removeClass("transform-fix"); 59 $(".wrapper").css("max-width", (zoom * window.innerWidth * 0.9 )+ "px"); 60 } else { 61 $(".wrapper").css("max-width", (zoom * window.innerWidth * 0.9 )+ "px"); 62 $(".zoomPage").addClass("transform-fix"); 63 } 64} 65/* 66$(window).on('resize', function () { 67 setWrapper(); 68 69 if ($(window).width() > 1200) { 70 $('header nav').css('display', 'inline-block'); 71 } 72 else{ 73 $('header nav').css('display', 'none'); 74 } 75 76}); 77*/ 78$( window ).on( "orientationchange", function( event ) { 79 if ($(window).width() > 1200) { 80 $('header nav').css('display', 'inline-block'); 81 } 82 else{ 83 $('header nav').css('display', 'none'); 84 } 85}); 86 87$(document).ready(function () { 88 89 setWrapper(); 90 91 $(".chartContainer ul li a").on('click', function (e) { 92 e.preventDefault(); 93 $(".chartContainer ul li").removeClass('active'); 94 var chart = $(this).attr('data-dino-menu'); 95 $(this).parent().addClass('active'); 96 $(".chartContent .dino-stock-chart").hide(); 97 $(".chartContent").find("[data-dino-time='" + chart + "']").fadeIn(); 98 }); 99 if(window.currentLanguage == 'pl'){ 100 $(".marketPrice strong").html(addCommas(kFormatter(parseInt($(".marketPrice strong").html())))); 101 }else{ 102 $(".marketPrice strong").html(ukNumberFormat($(".marketPrice strong").html())); 103 } 104 105 // $(".changePrice").html($(".changePrice").html().replace('.', ',')); 106 107 $(".overlayContent").niceScroll({ 108 cursorcolor: "#c1c1c1", 109 cursoropacitymin: 0.7, 110 cursorwidth: 5 111 }); 112 113 $('.stripedTable').stacktable(); 114 115 $(".toggleContent .toggle-all").on('click', function (e) { 116 e.preventDefault(); 117 if (!($(".toggleContent .toggle-all").hasClass('active'))) { 118 $(".toggleContent .toggleElement .title").each(function () { 119 if (!($(this).hasClass('active'))) { 120 $(".toggleContent .toggle-all").addClass('active'); 121 $(".toggleContent .toggleElement .title").addClass('active'); 122 $(".toggleContent .toggleElement .title").closest('.toggleElement').find('.descElement').slideDown(); 123 } 124 }); 125 } 126 else { 127 $(".toggleContent .toggle-all").removeClass('active'); 128 $(".toggleContent .toggleElement .title").removeClass('active'); 129 $(".toggleContent .toggleElement .title").closest('.toggleElement').find('.descElement').slideUp(); 130 } 131 }); 132 133 134 $(".toggleContent .toggleElement .title").on('click', function (e) { 135 e.preventDefault(); 136 $(this).toggleClass('active'); 137 $(this).parent().find(".descElement").slideToggle(); 138 }); 139 140 $(".searcher").on('click', function () { 141 $(this).toggleClass('active'); 142 $(".searcherContainer").slideToggle(); 143 }); 144 145 var slider = $(".sliderElements").bxSlider({ 146 mode: 'fade', 147 controls: false, 148 pagerCustom: '#sliderContent', 149 autoStart: true, 150 auto: true, 151 pause: 5000, 152 speed: 1000, 153 onSliderLoad: function () { 154 $(".sliderContainer").css('opacity', 1); 155 }, 156 }); 157 158 // $("#sliderContent a").click(function (e) { 159 // var i = $(this).index(); 160 // slider.goToSlide(i); 161 // slider.stopAuto(); 162 // restart = setTimeout(function () { 163 // slider.startAuto(); 164 // }, 500); 165 // 166 // return false;
167 // }); 168 169 $("#sliderContent a").click(function (e) { 170 $link = $(this).attr('href'); 171 document.location.href = $link; 172 173 }); 174 175 $(".mobileMenu").on('click', function (e) { 176 e.preventDefault(); 177 $("header nav").slideToggle(); 178 }); 179 180 $valueOption = $(".interactiveMap .periodTime select option:selected").val() 181 $(".interactiveMap .counterShops").find("[data-option='" + $valueOption + "']").show(); 182 $(".interactiveMap").find("[data-map='" + $valueOption + "']").show(); 183 184 $(".interactiveMap .periodTime select").on('change', function () { 185 186 $(".interactiveMap img").hide(); 187 $(".interactiveMap .counterShops span").hide(); 188 $selectedElement = $(".interactiveMap .periodTime select option:selected").val(); 189 $(".interactiveMap").find("[data-map='" + $selectedElement + "']").show(); 190 $(".interactiveMap .counterShops").find("[data-option='" + $selectedElement + "']").show(); 191 192 }); 193 194 $newsElements = $(".newsWrap[data-posts=1] .singleNews").length; 195 if ($newsElements > 3) { 196 $(".newsWrap[data-posts=1] .singleNews:nth-of-type(3)").after("<hr>"); 197 } 198 199 $(".newsContent nav li a").on('click', function (e) { 200 e.preventDefault(); 201 $(".newsContent nav li").removeClass('active'); 202 $(this).parent().addClass('active'); 203 $contentNumber = $(this).attr('data-category'); 204 $(".newsContent .newsWrap").hide(); 205 $(".newsContent").find("[data-posts='" + $contentNumber + "']").fadeIn(); 206 }); 207 208 //overlay session 209 210 if (session_pl != 1 && session_en != 1) { 211 if ($(".publicOfferContentPl").hasClass("current-menu-item") || $(".publicOfferContentPL").hasClass("current-menu-ancestor") || $(".publicOfferContentPL").hasClass("current_page_ancestor") || window.disclaimer == true) { 212 $(".overlayContainer").addClass('active'); 213 $("body").addClass('fixed'); 214 $(".overlayContainer").show(); 215 } 216 217 $(".overlayContainer .overlayContent .buttons a.goIn.pl").on('click', function (e) { 218 e.preventDefault(); 219 $(".nicescroll-rails").hide(); 220 $(".overlayContainer").removeClass('active'); 221 $(".overlayContainer").fadeOut(); 222 $("body").removeClass('fixed'); 223 sessionStorage.SessionName = "overlaySessionPL" 224 sessionStorage.setItem('overlaySessionPL', 1); 225 }); 226 } 227 228 if (session_en != 1 && session_pl != 1) { 229 230 if ($(".publicOfferContentEN").hasClass("current-menu-item") || $(".publicOfferContentEN").hasClass("current-menu-ancestor") || $(".publicOfferContentEN").hasClass("current_page_ancestor") || window.disclaimer == true) { 231 $(".overlayContainer").addClass('active'); 232 $("body").addClass('fixed'); 233 $(".overlayContainer").show(); 234 } 235 236 $(".overlayContainer .overlayContent .buttons a.goIn.en").on('click', function (e) { 237 e.preventDefault(); 238 $(".nicescroll-rails").hide(); 239 $(".overlayContainer").removeClass('active'); 240 $(".overlayContainer").fadeOut(); 241 $("body").removeClass('fixed'); 242 sessionStorage.SessionName = "overlaySessionEN" 243 sessionStorage.setItem('overlaySessionEN', 1); 244 }); 245 } 246 247 function checkForChanges() { 248 var element = $(".zoomWrap"); 249 var lastHeight = $(".zoomPage").height() * 0.85; 250 251 if (element.height() != lastHeight) { 252 $(".zoomWrap").height($(".zoomPage").height() * 0.85); 253 } 254 255 setTimeout(checkForChanges, 200); 256 } 257 258// checkForChanges(); 259 260}); 261 262// $(window).load(function () { 263// if ($(window).width() <= 1800 && $(window).width() > 1199) { 264// $(".zoomWrap").height($(".zoomPage").height() * 0.85); 265// } 266// });
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.