1$(function () { 2 !(function () { 3 var n = document.querySelector(".main__countdown"); 4 if (n) 5 var e = n.dataset.date, 6 o = setInterval(function () { 7 var n = new Date().getTime(), 8 t = e - n, 9 a = Math.floor(t / 864e5); 10 a < 10 && (a = "0" + a); 11 var c = Math.floor((t % 864e5) / 36e5); 12 c < 10 && (c = "0" + c); 13 var d = Math.floor((t % 36e5) / 6e4); 14 d < 10 && (d = "0" + d), 15 (document.querySelector(".countdown__middle").innerHTML = 16 a + 17 "<span class='countdown__dpoint'>:</span>" + 18 c + 19 "<span class='countdown__dpoint'>:</span>" + 20 d), 21 t < 0 && 22 (clearInterval(o), 23 (document.querySelector(".countdown__middle").innerHTML = 24 "00<span class='countdown__dpoint'>:</span>00<span class='countdown__dpoint'>:</span>00"), 25 document 26 .querySelector(".countdown__middle") 27 .classList.remove("animated")); 28 }, 1e3); 29 })(); 30 31 function popupBfInit() { 32 const popupBf = $('.popupbf'); 33 const popupBfClose = popupBf.find('.popup__close'); 34 const popupBfLink = popupBf.find('.popupbf__dynamic-btn'); 35 if (popupBf.length) { 36 popupBf.addClass('open'); 37 $('body').css({overflow: 'hidden'}); 38 popupBfClose.on('click', () => { 39 popupBf.removeClass('open'); 40 $('body').css({overflow: ''}); 41 }) 42 popupBfLink.on('click', () => { 43 popupBf.removeClass('open'); 44 $('body').css({overflow: ''}); 45 }) 46 } 47 } 48 49 function initBgColors() { 50 const mediaQuery = window.matchMedia('(max-width: 1000px)'); 51 function applyColors(e) { 52 const isMobile = e.matches; 53 54 $('[data-color], [data-mcolor]').each(function() { 55 const $el = $(this); 56 const color = (isMobile && $el.attr('data-mcolor')) ? $el.attr('data-mcolor') : $el.attr('data-color'); 57 58 if (color) { 59 $el.css('background-color', color); 60 } 61 }); 62 } 63 applyColors(mediaQuery); 64 65 mediaQuery.addEventListener('change', applyColors); 66 } 67 68 69 popupBfInit(); 70 initBgColors(); 71 72 73 74 $('.main__banner--v2').on('click', function(e){ 75 e.preventDefault(); 76 // $('.menu__biglinks a[href="#impforbuy"]').click(); 77 let link = $(this).attr('href'); 78 79 if(link.startsWith('http')){ 80 window.open(link, '_blank'); 81 }else{ 82 // let sectionId = link.startsWith('#') ? link.slice(1) : link; 83 if(!link.startsWith('#')){ 84 link = `#${link}`; 85 } 86 let section = $(link); 87 if(section.length){ 88 $(`.menu__container a[href='${link}']`).trigger('click'); 89 }else{ 90 $(`.impforbuy__item[data-code="${link}"]`).click(); 91 $('.news__block a').addClass('hidden'); 92 } 93 } 94 }) 95 96 97 98 99 // $('.js-open-offer').on('click', function(e){ 100 // e.preventDefault(); 101 // 102 // $('.impforbuy__item[data-code="'+ $(this).attr('data-link') + '"]').click(); 103 // $('.news__block a').addClass('hidden'); 104 // 105 // }) 106 107 108 // $('.menu__biglinks a[href="#impforbuy"]').click(); 109 // $('.impforbuy__item[data-code="#ipoteka-3"]').click(); 110 111// $('.impforbuy__item[data-code="#ipoteka-3"]').click(); 112 113 114});
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.