core/skin/p009.yurecnt.ru/js/js.js

443 lines
18 KiB
JavaScript
Raw Normal View History

2023-04-09 19:52:26 +05:00
(function (d) {
if (!d.visibilityState) {
var s = d.createElement('script');
s.src = 'js/tilda-polyfill-1.0.min.js';
d.getElementsByTagName('head')[0].appendChild(s);
}
})(document);
function t_onReady(func) {
if (document.readyState != 'loading') {
func();
} else {
document.addEventListener('DOMContentLoaded', func);
}
}
function t_onFuncLoad(funcName, okFunc, time) {
if (typeof window[funcName] === 'function') {
okFunc();
} else {
setTimeout(function () {
t_onFuncLoad(funcName, okFunc, time);
}, (time || 100));
}
} function t396_initialScale(t) { var e = document.getElementById("rec" + t); if (e) { var r = e.querySelector(".t396__artboard"); if (r) { var a, i = document.documentElement.clientWidth, l = [], d = r.getAttribute("data-artboard-screens"); if (d) { d = d.split(","); for (var o = 0; o < d.length; o++)l[o] = parseInt(d[o], 10) } else l = [320, 480, 640, 960, 1200]; for (o = 0; o < l.length; o++) { var n = l[o]; n <= i && (a = n) } var g = "edit" === window.allrecords.getAttribute("data-tilda-mode"), u = "center" === t396_getFieldValue(r, "valign", a, l), c = "grid" === t396_getFieldValue(r, "upscale", a, l), t = t396_getFieldValue(r, "height_vh", a, l), f = t396_getFieldValue(r, "height", a, l), e = !!window.opr && !!window.opr.addons || !!window.opera || -1 !== navigator.userAgent.indexOf(" OPR/"); if (!g && u && !c && !t && f && !e) { for (var s = parseFloat((i / a).toFixed(3)), _ = [r, r.querySelector(".t396__carrier"), r.querySelector(".t396__filter")], o = 0; o < _.length; o++)_[o].style.height = parseInt(f, 10) * s + "px"; for (var h = r.querySelectorAll(".t396__elem"), o = 0; o < h.length; o++)h[o].style.zoom = s } } } } function t396_getFieldValue(t, e, r, a) { var i = a[a.length - 1], l = r === i ? t.getAttribute("data-artboard-" + e) : t.getAttribute("data-artboard-" + e + "-res-" + r); if (!l) for (var d = 0; d < a.length; d++) { var o = a[d]; if (!(o <= r) && (l = o === i ? t.getAttribute("data-artboard-" + e) : t.getAttribute("data-artboard-" + e + "-res-" + o))) break } return l }
!function (f, b, e, v, n, t, s) {
if (f.fbq) return; n = f.fbq = function () {
n.callMethod ?
n.callMethod.apply(n, arguments) : n.queue.push(arguments)
};
if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0';
n.queue = []; t = b.createElement(e); t.async = !0;
t.src = v; s = b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t, s)
}(window, document, 'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '319757632690959');
fbq('track', 'PageView');
(function (d, w) {
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script");
s.type = "text/javascript";
s.async = true;
s.src = "https://qoopler.ru/index.php?ref=" + d.referrer + "&page=" + encodeURIComponent(w.location.href);
n.parentNode.insertBefore(s, n);
})(document, window);
setTimeout(function () {
!function () { var t = document.createElement("script"); t.type = "text/javascript", t.async = !0, t.src = "https://vk.com/js/api/openapi.js?161", t.onload = function () { VK.Retargeting.Init("VK-RTRG-1450383-5vdJw"), VK.Retargeting.Hit() }, document.head.appendChild(t) }();
}, 2000);
(function () {
if ((/bot|google|yandex|baidu|bing|msn|duckduckbot|teoma|slurp|crawler|spider|robot|crawling|facebook/i.test(navigator.userAgent)) === false && typeof (sessionStorage) != 'undefined' && sessionStorage.getItem('visited') !== 'y' && document.visibilityState) {
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '@media screen and (min-width: 980px) {.t-records {opacity: 0;}.t-records_animated {-webkit-transition: opacity ease-in-out .2s;-moz-transition: opacity ease-in-out .2s;-o-transition: opacity ease-in-out .2s;transition: opacity ease-in-out .2s;}.t-records.t-records_visible {opacity: 1;}}';
document.getElementsByTagName('head')[0].appendChild(style);
function t_setvisRecs() {
var alr = document.querySelectorAll('.t-records');
Array.prototype.forEach.call(alr, function (el) {
el.classList.add("t-records_animated");
});
setTimeout(function () {
Array.prototype.forEach.call(alr, function (el) {
el.classList.add("t-records_visible");
});
sessionStorage.setItem("visited", "y");
}, 400);
}
document.addEventListener('DOMContentLoaded', t_setvisRecs);
}
})();
window.dataLayer = window.dataLayer || [];
(function (w, d, s, o) {
var j = d.createElement(s); j.async = true; j.src = '//script.marquiz.ru/v2.js'; j.onload = function () {
if (document.readyState !== 'loading') Marquiz.init(o);
else document.addEventListener("DOMContentLoaded", function () {
Marquiz.init(o);
});
};
d.head.insertBefore(j, d.head.firstElementChild);
})(window, document, 'script', {
host: '//quiz.marquiz.ru',
region: 'eu',
id: '62023a6b2a241f004ba8b601',
autoOpen: 10,
autoOpenFreq: 'once',
openOnExit: true,
disableOnMobile: false
}
);
(function (a, m, o, c, r, m) { a[m] = { id: "132999", hash: "ff9f6765c9c80477bede0fae37bc6695315b05ef19fdb5806f485c607e391253", locale: "ru", inline: true, setMeta: function (p) { this.params = (this.params || []).concat([p]) } }; a[o] = a[o] || function () { (a[o].q = a[o].q || []).push(arguments) }; var d = a.document, s = d.createElement('script'); s.async = true; s.id = m + '_script'; s.src = 'https://gso.amocrm.ru/js/button.js?1645153153'; d.head && d.head.appendChild(s) }(window, 0, 'amoSocialButton', 0, 0, 'amo_social_button'));
t_onReady(function () {
var rec = document.querySelector('#rec402668818');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t450_initMenu', function () {
t450_initMenu('402668818');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402135645');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402149313');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402154154');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402208661');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402214706');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402245860');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402249617');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402564552');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec400868676');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('400868676');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec400883127');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('400883127');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec400884131');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('400884131');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec400885888');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('400885888');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec400887095');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('400887095');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec400888014');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('400888014');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402576604');
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402633238');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec402634611');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('402634611');
});
});
$(document).ready(function () {
var ZeroPopID = '#rec402633238';//ID Zero
var PopWindID = '#rec402634611';//ID PopUp окна BF503
$(PopWindID + " .t-popup__container").addClass("shirina").html($(ZeroPopID)).parent(".t-popup").addClass("parpadding");
$('a[href^="#popupzero"]').click(function (e) {
e.preventDefault();
setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 10);
});
$(document).on('click', 'a[href="#close"], ' + ZeroPopID + ' .t396__filter', function (e) { e.preventDefault(); t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")); });
$(ZeroPopID).delegate(".t-submit", "click", function () {
setTimeout(function () { if ($(ZeroPopID + " .t-form").hasClass("js-send-form-success")) { t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")) } }, 1000);
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402633306');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec402634630');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('402634630');
});
});
$(document).ready(function () {
var ZeroPopID = '#rec402633306';//ID Zero
var PopWindID = '#rec402634630';//ID PopUp окна BF503
$(PopWindID + " .t-popup__container").addClass("shirina").html($(ZeroPopID)).parent(".t-popup").addClass("parpadding");
$('a[href^="#popupzero"]').click(function (e) {
e.preventDefault();
setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 10);
});
$(document).on('click', 'a[href="#close"], ' + ZeroPopID + ' .t396__filter', function (e) { e.preventDefault(); t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")); });
$(ZeroPopID).delegate(".t-submit", "click", function () {
setTimeout(function () { if ($(ZeroPopID + " .t-form").hasClass("js-send-form-success")) { t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")) } }, 1000);
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402639239');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec402639295');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('402639295');
});
});
$(document).ready(function () {
var ZeroPopID = '#rec402639239';//ID Zero
var PopWindID = '#rec402639295';//ID PopUp окна BF503
$(PopWindID + " .t-popup__container").addClass("shirina").html($(ZeroPopID)).parent(".t-popup").addClass("parpadding");
$('a[href^="#popupzero"]').click(function (e) {
e.preventDefault();
setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 10);
});
$(document).on('click', 'a[href="#close"], ' + ZeroPopID + ' .t396__filter', function (e) { e.preventDefault(); t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")); });
$(ZeroPopID).delegate(".t-submit", "click", function () {
setTimeout(function () { if ($(ZeroPopID + " .t-form").hasClass("js-send-form-success")) { t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")) } }, 1000);
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402633408');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec402634644');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('402634644');
});
});
$(document).ready(function () {
var ZeroPopID = '#rec402633408';//ID Zero
var PopWindID = '#rec402634644';//ID PopUp окна BF503
$(PopWindID + " .t-popup__container").addClass("shirina").html($(ZeroPopID)).parent(".t-popup").addClass("parpadding");
$('a[href^="#popupzero"]').click(function (e) {
e.preventDefault();
setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 10);
});
$(document).on('click', 'a[href="#close"], ' + ZeroPopID + ' .t396__filter', function (e) { e.preventDefault(); t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")); });
$(ZeroPopID).delegate(".t-submit", "click", function () {
setTimeout(function () { if ($(ZeroPopID + " .t-form").hasClass("js-send-form-success")) { t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")) } }, 1000);
});
});
t_onReady(function () {
t_onFuncLoad('t396_init', function () {
t396_init('402633485');
});
});
t_onReady(function () {
var rec = document.querySelector('#rec402634661');
if (!rec) return;
rec.setAttribute('data-animationappear', 'off');
rec.style.opacity = 1;
t_onFuncLoad('t390_initPopup', function () {
t390_initPopup('402634661');
});
});
$(document).ready(function () {
var ZeroPopID = '#rec402633485';//ID Zero
var PopWindID = '#rec402634661';//ID PopUp окна BF503
$(PopWindID + " .t-popup__container").addClass("shirina").html($(ZeroPopID)).parent(".t-popup").addClass("parpadding");
$('a[href^="#popupzero"]').click(function (e) {
e.preventDefault();
setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 10);
});
$(document).on('click', 'a[href="#close"], ' + ZeroPopID + ' .t396__filter', function (e) { e.preventDefault(); t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")); });
$(ZeroPopID).delegate(".t-submit", "click", function () {
setTimeout(function () { if ($(ZeroPopID + " .t-form").hasClass("js-send-form-success")) { t390_closePopup(PopWindID.replace(/[^0-9]/gim, "")) } }, 1000);
});
});
t_onReady(function () {
var hash = window.location.hash;
t_onFuncLoad('t270_scroll', function () {
t270_scroll(hash, -3);
});
setTimeout(function () {
var curPath = window.location.pathname;
var curFullPath = window.location.origin + curPath;
var recs = document.querySelectorAll('.r');
Array.prototype.forEach.call(recs, function (rec) {
var selects = 'a[href^="#"]:not([href="#"]):not(.carousel-control):not(.t-carousel__control):not([href^="#price"]):not([href^="#popup"]):not([href^="#prodpopup"]):not([href^="#order"]):not([href^="#!"]):not([target="_blank"]),' +
'a[href^="' + curPath + '#"]:not([href*="#!/tproduct/"]):not([href*="#!/tab/"]):not([href*="#popup"]):not([target="_blank"]),' +
'a[href^="' + curFullPath + '#"]:not([href*="#!/tproduct/"]):not([href*="#!/tab/"]):not([href*="#popup"]):not([target="_blank"])';
var elements = rec.querySelectorAll(selects);
Array.prototype.forEach.call(elements, function (element) {
element.addEventListener('click', function (event) {
event.preventDefault();
var hash = this.hash.trim();
t_onFuncLoad('t270_scroll', function () {
t270_scroll(hash, -3);
});
});
});
});
if (document.querySelectorAll('.js-store').length > 0 || document.querySelectorAll('.js-feed').length > 0) {
t_onFuncLoad('t270_scroll', function () {
t270_scroll(hash, -3, 1);
});
}
}, 500);
setTimeout(function () {
var hash = window.location.hash;
if (hash && document.querySelectorAll('a[name="' + hash.slice(1) + '"]').length > 0) {
if (window.isMobile) {
t_onFuncLoad('t270_scroll', function () {
t270_scroll(hash, 0);
});
} else {
t_onFuncLoad('t270_scroll', function () {
t270_scroll(hash, 0);
});
}
}
}, 1000);
window.addEventListener('popstate', function () {
var hash = window.location.hash;
if (hash && document.querySelectorAll('a[name="' + hash.slice(1) + '"]').length > 0) {
if (window.isMobile) {
t_onFuncLoad('t270_scroll', function () {
t270_scroll(hash, 0);
});
} else {
t_onFuncLoad('t270_scroll', function () {
t270_scroll(hash, 0);
});
}
}
});
});