1function trackCopyPhone() { 2 const phoneElements = document.querySelectorAll('.phone-number, [href^="tel:"]'); 3 phoneElements.forEach(function(element) { 4 element.addEventListener('copy', function() { 5 ym(18671896, 'reachGoal', 'copy_phone'); 6 console.log('ÐÐ¾Ð¼ÐµÑ ÑелеÑона ÑкопиÑован: ' + this.innerText); 7 }); 8 }); 9} 10 11document.addEventListener('DOMContentLoaded', trackCopyPhone); 12 13document.addEventListener("DOMContentLoaded", function() { 14 const modalOverlay = document.getElementById('modals'); 15 let background; 16 if(modalOverlay){background = modalOverlay.querySelector('.modals__background');} 17 const modalWindow = document.getElementById('modalInvoiceInfo'); 18 const openBtn = document.getElementById('btnInvoiceInfoModalOpener'); 19 const closeBtn = document.getElementById('modalInvoiceInfoCloseBtn'); 20 const submitBtn = document.getElementById('modalInvoiceInfoSubmitBtn'); 21 22 if (openBtn) { 23 openBtn.addEventListener('click', function(e) { 24 e.preventDefault(); 25 if (modalOverlay) modalOverlay.classList.add('active'); 26 if (modalWindow) modalWindow.classList.add('active'); 27 }); 28 } 29 30 if (closeBtn) { 31 closeBtn.addEventListener('click', function() { 32 if (modalOverlay) modalOverlay.classList.remove('active'); 33 if (modalWindow) modalWindow.classList.remove('active'); 34 }); 35 } 36 37 if (submitBtn) { 38 submitBtn.addEventListener('click', function() { 39 if (modalOverlay) modalOverlay.classList.remove('active'); 40 if (modalWindow) modalWindow.classList.remove('active'); 41 }); 42 } 43 44 if (background) { 45 background.addEventListener('click', function(event) { 46 if (event.target === background) { 47 if (modalOverlay) modalOverlay.classList.remove('active'); 48 if (modalWindow) modalWindow.classList.remove('active'); 49 } 50 }); 51 } 52}); 53 54 55document.addEventListener("DOMContentLoaded", function() { 56 const images = document.querySelectorAll('img'); // ÐÑбиÑаем вÑе изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° ÑÑÑаниÑе 57 58 images.forEach(img => { 59 const imageUrl = img.src; 60 const imageWidth = img.width || "auto"; 61 const imageHeight = img.height || "auto"; 62 const caption = img.alt || "ÐзобÑажение без опиÑаниÑ"; 63 64 // Создаем ÑÐ»ÐµÐ¼ÐµÐ½Ñ ÑкÑипÑа Ñ Ð¼Ð¸ÐºÑоÑазмеÑкой 65 const script = document.createElement('script'); 66 script.type = 'application/ld+json'; 67 script.textContent = JSON.stringify({ 68 "@context": "https://schema.org", 69 "@type": "ImageObject", 70 "url": imageUrl, 71 "height": imageHeight, 72 "width": imageWidth, 73 "caption": caption 74 }); 75 76 // ÐÑÑавлÑем ÑкÑÐ¸Ð¿Ñ Ð² ÐºÐ¾Ð½ÐµÑ body или head 77 document.head.appendChild(script); 78 }); 79}); 80 81 82 83function onSubmit(token) { 84 //submit_divForm(); 85} 86 87function addScriptToHead(src) { 88 var script = document.createElement('script'); 89 script.src = src; 90 document.head.appendChild(script); 91} 92 93// ФÑнкÑÐ¸Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÑÐµÑ Ñег link Ð´Ð»Ñ css в head Ñ ÑказаннÑм src 94function addCSSToHead(src) { 95 var link = document.createElement("link"); 96 link.href = src; 97 link.type = "text/css"; 98 link.rel = "stylesheet"; 99 document.head.appendChild(link); 100} 101 102 103var isFancyboxLoaded = false; 104 105function loadFancybox(callback) { 106 107 if (!isFancyboxLoaded) { 108 isFancyboxLoaded = true; 109 110 addScriptToHead('/bitrix/templates/corp_services_blue/js/vendor/fancybox/source/jquery.fancybox.pack.js?v=2.1.5'); 111 addCSSToHead('/bitrix/templates/corp_services_blue/js/vendor/fancybox/source/jquery.fancybox.css?v=2.1.5'); 112 113 console.log('loadFancybox_'); 114 } 115 116 117 118 // ÐÑдем ждаÑÑ Ð¿Ð¾ ÑаймеÑÑ, пока не подгÑÑзиÑÑÑ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñека Fancybox 119 var waitForFancybox = setInterval(function() { 120 if (typeof jQuery.fn.fancybox !== 'undefined') { 121 clearInterval(waitForFancybox); 122 if (typeof callback === 'function') { 123 callback(); 124 } 125 } 126 }, 500); 127 128 129} 130 131 132 133var isMaskLoaded = false;
134 135function loadMask(callback) { 136 137 if (!isMaskLoaded) { 138 isMaskLoaded = true; 139 140 addScriptToHead('/bitrix/templates/corp_services_blue/js//jquery.maskedinput.min.js?ver=6'); 141 console.log('loadMask'); 142 } 143 144 145 var waitForMask = setInterval(function() { 146 if (typeof jQuery.fn.mask !== 'undefined') { 147 clearInterval(waitForMask); 148 callback(); 149 } 150 }, 500); 151} 152 153function loadRecaptcha() { 154 console.log('loadRecaptcha'); 155 window.removeEventListener('scroll', loadRecaptcha); 156 clearTimeout(waitForRecaptcha); 157 addScriptToHead('https://www.google.com/recaptcha/api.js?render=6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8'); 158 159} 160var waitForRecaptcha = setTimeout(loadRecaptcha, 4000); 161window.addEventListener('scroll', loadRecaptcha); 162 163function submit_divForm() { 164 165 /*event.preventDefault(); 166 167 var consent = $('#consent-zakaz').prop('checked'); 168 var form = $('#divForm'); 169 if (!consent) { 170 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 171 return false; 172 } 173 174 form.find('input[required]').each(function(){ 175 if($(this).val() == ''){ 176 $(this).addClass('error'); 177 return false; 178 } else { 179 $(this).removeClass('error'); 180 } 181 }) 182 183 grecaptcha.execute(); 184 var str = $('#divForm').serialize(); 185 $.ajax({ 186 type: "POST", 187 url: "/form/ajax_popup.php", 188 data: str, 189 success: function(msg) { 190 if(msg == 'ok') { 191 $('#divForm .form-zakaz__errors').hide(); 192 //console.log('true'); 193 $('#divForm').html('СпаÑибо! ÐаÑа заÑвка оÑпÑавлена!'); 194 setTimeout(function () { 195 $('.fancybox-close').click(); 196 },4000); 197 } else { 198 form.find('input[required]').each(function(){ 199 if($(this).val() == ''){ 200 $(this).addClass('error'); 201 return false; 202 } else { 203 $(this).removeClass('error'); 204 } 205 }) 206 $('#divForm .form-zakaz__errors').show(); 207 //console.log('false'); 208 } 209 } 210 }); 211 return false;*/ 212}; 213 214 215var bxSliderLoaded = false; // поднимем Ñлаг пÑи пеÑвом вÑзове loadbxslider 216// ФÑнкÑÐ¸Ñ Ð´Ð»Ñ Ð¾Ñложенного подклÑÑÐµÐ½Ð¸Ñ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñеки bxslider-ÑлайдеÑа 217function loadbxSlider(callback) { 218 219 if (!bxSliderLoaded) { 220 bxSliderLoaded = true; 221 console.log('loadbxSlider'); 222 223 addScriptToHead('/bitrix/templates/corp_services_blue/js/vendor/bxSlider/jquery.bxslider.min.js'); 224 addCSSToHead('/bitrix/templates/corp_services_blue/js/vendor/bxSlider/jquery.bxslider.css'); 225 } 226 227 // ÐÑдем ждаÑÑ Ð¿Ð¾ ÑаймеÑÑ, пока не подгÑÑзиÑÑÑ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñека bxslider 228 var waitForbxSlider = setInterval(function() { 229 if (typeof jQuery.fn.bxSlider !== 'undefined') { 230 clearInterval(waitForbxSlider); 231 callback(); 232 } 233 }, 500); 234} 235 236 237 238addToCompare = (event) => { 239 const product = event.target, 240 productId = product.dataset.id, 241 url = '/bitrix/templates/corp_services_blue/include/compare.php'; 242 243 if (product.classList.contains('in-compare')) { 244 $.get(url, { 245 action: 'DELETE_FROM_COMPARE_LIST', 246 id: productId 247 }, 248 function(data) { 249 console.log('remove from compare', productId) 250 //product.textContent = 'СÑавниÑÑ'; 251 checkCompare(); 252 } 253 ); 254 } else { 255 $.get(url, { 256 action: 'ADD_TO_COMPARE_LIST', 257 id: productId 258 }, 259 function(data) { 260 console.log('add to compare', productId) 261 $.fancybox.open('<div class="popup-incompare">Ð¢Ð¾Ð²Ð°Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½ в <a href="/compare/">ÑÑавнение</a></div>', { 262 helpers: { 263 overlay: {
264 locked: false 265 } 266 } 267 }); 268 //product.textContent = 'Ð ÑÑавнении'; 269 checkCompare(); 270 setTimeout(() => { 271 $.fancybox.close(); 272 }, 3000); 273 } 274 ); 275 } 276 product.classList.toggle('in-compare'); 277} 278 279checkCompare = (event) => { 280 $.post('/bitrix/templates/corp_services_blue/include/compare.php', { 281 GET_COUNT: 'Y' 282 }, 283 function(data) { 284 const result = $.parseJSON(data), 285 count = result.COUNT; 286 $('.compare__icon .count').text(count); 287 } 288 ); 289} 290 291addToFavor = (event) => { 292 const product = event.target; 293 294 let action = $(product).hasClass('in-favor') ? 'delete' : 'add', 295 productId = product.dataset.id, 296 url = '/bitrix/templates/corp_services_blue/include/favor.php'; 297 $.get(url, { 298 action: action, 299 id: productId 300 }, 301 function(data) { 302 303 let result = $.parseJSON(data); 304 305 if (result.status == 1) { 306 $.fancybox.open('<div class="popup-incompare popup-invafor">Ð¢Ð¾Ð²Ð°Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½ в <a href="/wishlist/">избÑанное</a></div>', { 307 helpers: { 308 overlay: { 309 locked: false 310 } 311 } 312 }); 313 $(product).addClass('in-favor'); 314 setTimeout(() => { 315 $.fancybox.close(); 316 }, 3000); 317 } else if (result.status == 2) { 318 $(product).removeClass('in-favor'); 319 if ($(product).parents('.wishlist_page').length > 0) { 320 $(product).parents('.catalog_element_item').remove(); 321 } 322 } 323 checkFavor(); 324 } 325 ); 326} 327 328checkFavor = (event) => { 329 $.post('/bitrix/templates/corp_services_blue/include/favor.php', { 330 GET_COUNT: 'Y' 331 }, 332 function(data) { 333 let result = $.parseJSON(data); 334 $('.favor__icon span.count').text(Object.keys(result.COUNT).length); 335 } 336 ); 337} 338 339$(document).ready(function() { 340 341 342 343 checkCompare(); 344 checkFavor(); 345 346 /*let compareBtns = document.querySelectorAll('.add-to-compare'); 347 for (const compareBtn of compareBtns) { 348 compareBtn.addEventListener('click', addToCompare) 349 }*/ 350 351 $('body').on('click', '.add-to-compare', function(e) { 352 addToCompare(e); 353 }) 354 $('body').on('click', '.add-to-favor', function(e) { 355 addToFavor(e); 356 }) 357 358 $('.catalog__page').append($('.bx_catalog_tile_recomended')); 359 360 $('[name="or_name"]').on('input', function() { 361 var str = $(this).val(); 362 str = str.replace(/\s/g, ''); 363 str = str.replace(/[^a-z\u0400-\u04FF]/gi, ""); 364 $(this).val(str); 365 }); 366 367 if ($('.icons__top > div').length > 6) { 368 $('.icons__top').after('<div class="show_all__icons">ÐоказаÑÑ ÐµÑе</div>'); 369 370 } 371 372 $('body').on('click', '.show_all__icons', function() { 373 if ($(this).hasClass('active')) { 374 $(this).text('ÐоказаÑÑ ÐµÑе'); 375 $(this).removeClass('active'); 376 $('.icons__top > div').addClass('hide'); 377 $('.icons__top > div').removeClass('show'); 378 } else { 379 $(this).text('СкÑÑÑÑ'); 380 $(this).addClass('active'); 381 $('.icons__top > div').addClass('show'); 382 $('.icons__top > div').removeClass('hide'); 383 } 384 385 }) 386 387 $('#spFormOuter2').submit(function(e) { 388 var $form = $(this); 389 390 let consent = $('#consent-webinar').prop('checked'); 391 if (!consent) { 392 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 393 return false; 394 } 395 396 var srlz = $form.serializeArray(); 397 398 grecaptcha.ready(function() { 399 grecaptcha.execute('6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8', { action: 'click' }).then(function(token) { 400 //console.log(token); 401 // srlz = srlz + '&recaptcha_response='+token; 402 console.log(srlz); 403 if (token && token != null && token != '') { 404 405 $.ajax({ 406 type: "POST", 407 url: "/form/sendform_webinar.php", 408 data: { submitForm: 1, form: srlz, recaptcha_response: token }, 409 success: function(resp) { 410 $form.find('.res').addClass('show'); 411 console.log(srlz); 412 ym(18671896, 'reachGoal', 'get_webinar_success') 413 }, 414 error: function(resp) { //ÐÑли оÑибка 415 //$('#feedback h2').after('<div class="ts-alert ts-alert-error"><p>ÐÑибка.</p></div>'); 416 } 417 }); 418 } 419 }); 420 }); 421 422 e.preventDefault(); 423 }); 424 425 426 if ($(window).width() < 992) { 427 428 $('#block-menu-menu-main-menu-mobile-full .content').append($('#search form')); 429 $('#block-menu-menu-main-menu-mobile-full .content').append($('.title-search-results')); 430 $('#block-menu-menu-main-menu-mobile-full .content').append($('#top-menu').html()); 431 $('.header-parts-container .regim').clone().appendTo('#block-menu-menu-main-menu-mobile-full .content'); 432 $('.header-parts-container .call-order').clone().appendTo('#block-menu-menu-main-menu-mobile-full .content'); 433 434 $("#block-menu-menu-main-menu-mobile-full").mmenu({ 435 extensions: { 436 all: ["listview-50", "theme-white", "pagedim-black"], 437 "(min-width: 320px)": ["fx-menu-slide"], 438 "(max-width: 320px)": ["fx-menu-slide"] 439 }, 440 counters: !0, 441 dividers: { fixed: !0 }, 442 navbar: { title: false } 443 }); 444 445 var API = $("#block-menu-menu-main-menu-mobile-full").data("mmenu"); 446 447 $('body').on('click', '.menu-button.show_mmenu:not(.active)', function() { 448 API.close(); 449 }); 450 451 $('.menu-button').click(function(event) { 452 $(this).toggleClass('active'); 453 }); 454 455 456 457 458 } 459 460 $('.faq-list .hd').click(function() { 461 var t = $(this).closest('.bl'); 462 463 $(t).find('.tx').slideToggle(); 464 }); 465 466 467 $('.products_list .submit-button, .prod_price .divForm:not(.product-buy-link, .orders), .products_list .divForm:not(.product-buy-link, .orders), .
467item_info_section .submit-button').on("click", function() { 468 ym(18671896, 'reachGoal', 'zakaz_click'); 469 //ga('gtag_UA_77707744_1.send', 'pageview', '/kp_click'); 470 dataLayer.push({ 'event': 'kp_click' }); //идÑм в GTM 471 }); 472 473 $('#sub_form .sp-button').click(function() { 474 //console.log('podpiska'); 475 ym(18671896, 'reachGoal', 'podpiska'); 476 //ga('gtag_UA_77707744_1.send', 'pageview', '/podpiska'); 477 dataLayer.push({ 'event': 'podpiska' }); //идÑм в GTM 478 }); 479 480 $('.uniSform').click(function() { 481 ym(18671896, 'reachGoal', 'rassilka_click'); 482 //ga('gtag_UA_77707744_1.send', 'pageview', '/rassilka_click'); 483 dataLayer.push({ 'event': 'rassilka_click' }); //идÑм в GTM 484 setTimeout(() => { 485 $('#spFormOuter .sp-form-control').focus(); 486 }, 500) 487 }); 488 489 $('#header-wrap .call-order, .feedback .feedback-element .send_call').click(function() { 490 // ym(18671896, 'reachGoal', 'open_callback_form'); 491 //ga('gtag_UA_77707744_1.send', 'pageview', '/open_callback_form'); 492 dataLayer.push({ 'event': 'open_callback_form' }); //идÑм в GTM 493 }); 494 495 496 if ($('.map__button').length) { 497 loadFancybox(function() { 498 $('.map__button').fancybox({ 499 padding: "0px", 500 width: "400px", 501 helpers: { 502 overlay: { 503 locked: false 504 } 505 } 506 }); 507 }); 508 } 509 510 if ($('.fancybox').length) { 511 loadFancybox(function() { 512 $('.fancybox').fancybox(); 513 }); 514 } 515 516 517 if ($('.fancy').length) { 518 loadFancybox(function() { 519 $('.fancy').attr("rel", "ttt").fancybox({ 520 openEffect: 'fade', 521 closeEffect: 'fade', 522 nextEffect: 'fade', 523 prevEffect: 'fade', 524 525 tpl: { 526 closeBtn: '<a title="' + BX.message('FANCY_CLOSE') + '" class="fancybox-item fancybox-close" href="javascript:;"></a>', 527 next: '<a title="' + BX.message('FANCY_NEXT') + '" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 528 prev: '<a title="' + BX.message('FANCY_PREV') + '" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>' 529 }, 530 helpers: { 531 media: {} 532 } 533 534 }); 535 }); 536 } 537 538 if ($('.videoblock').length) { 539 loadFancybox(function() { 540 $(".videoblock").fancybox({ 541 openEffect: 'none', 542 closeEffect: 'none', 543 helpers: { 544 media: {} 545 } 546 }); 547 }); 548 } 549 550 551 552 $('.web-list .submit-button').click(function() { 553 var webinar = $(this).closest('.bl').find('.tx').text(); 554 $('.sp-form2 .res').removeClass('show'); 555 $('.sp-form2 input').val(''); 556 $('.sp-form2 input[name="webinar"]').val(webinar); 557 }); 558 559 $(".cnt_item").click(function() { 560 bit_photo = $("#main-img img"); 561 if ($(this).hasClass('vd')) { 562 if ($(this).data('loaded') === 'true') { 563 return; 564 } 565 bit_photo.css({ display: 'none' }); 566 $('#main-img').append($(this).html()); 567 $(this).data('loaded', 'true'); 568 } else { 569 $('#main-img iframe').remove(); 570 $(".cnt_item.vd").data('loaded', 'false'); 571 bit_photo.css({ display: 'block' }); 572 bit_photo.attr({ "src": $(this).data("src") }); 573 $('#main-img').attr({ "href": $(this).data("src") }); 574 } 575 }); 576 if ($('.web-list .submit-button').length) { 577 loadFancybox(function() { 578 $(".web-list .submit-button").fancybox({ 579 padding: "0px", 580 helpers: { 581 overlay: { 582 locked: false 583 } 584 } 585 }); 586 }); 587 } 588 589 if ($('.docs_form_link').length) { 590 loadFancybox(function() { 591 $(".docs_form_link").fancybox({ 592 padding: "0px", 593 helpers: { 594 overlay: {
595 locked: false 596 } 597 }, 598 afterShow: function(instance, current) { 599 $('#docs_form_send .sp-form-control-phone').focus(); 600 } 601 }); 602 }); 603 } 604 605 606 $('.childs').siblings('span').append('<div class="show_child_cats"></div>'); 607 $('.catalog_category_item.id_208, .catalog_category_item.id_55, .catalog_category_item.id_50_, .catalog_category_item.id_46_, .catalog_category_item.id_67, .catalog_category_item.id_71, .catalog_category_item.id_231, .catalog_category_item.id_228, .catalog_category_item.id_53').wrapAll('<div class="childs childs_rele"></div>'); 608 $('.childs_rele').wrapAll('<div class="catalog_category_item rele_catalog level_1"></div>'); 609 $('.rele_catalog').prepend('<span><div class="title">Реле</div><div class="show_child_cats"></div></span>'); 610 $('.rele_catalog .childs_rele').find('.catalog_category_item').removeClass('level_1').addClass('level_2'); 611 612 $('body').on('click', '.catalog_category_item.level_1 > span > .show_child_cats', function() { 613 if ($(this).closest('.catalog_category_item').find('.childs:first').hasClass('active')) { 614 $('.catalog_category_item .childs').removeClass('active'); 615 $(this).closest('.catalog_category_item').find('.childs:first').removeClass('active'); 616 } else { 617 $('.catalog_category_item .childs').removeClass('active'); 618 $(this).closest('.catalog_category_item').find('.childs:first').addClass('active'); 619 } 620 }) 621 622 $('body').on('click', '.catalog_category_item.level_2 > span >.show_child_cats', function() { 623 if ($(this).closest('.catalog_category_item').find('.childs:first').hasClass('active')) { 624 $('.catalog_category_item.level_2 .childs').removeClass('active'); 625 $(this).closest('.catalog_category_item').find('.childs:first').removeClass('active'); 626 } else { 627 $('.catalog_category_item.level_2 .childs').removeClass('active'); 628 $(this).closest('.catalog_category_item').find('.childs:first').addClass('active'); 629 } 630 }) 631 632 $('body').on('click', '.catalog_category_item.level_3 > span > .show_child_cats', function() { 633 if ($(this).closest('.catalog_category_item').find('.childs:first').hasClass('active')) { 634 $('.catalog_category_item.level_3 .childs').removeClass('active'); 635 $(this).closest('.catalog_category_item').find('.childs:first').removeClass('active'); 636 } else { 637 $('.catalog_category_item.level_3 .childs').removeClass('active'); 638 $(this).closest('.catalog_category_item').find('.childs:first').addClass('active'); 639 } 640 }) 641 642 $('div.tabs__caption').on('click', 'span:not(.active)', function() { 643 $(this) 644 .addClass('active').siblings().removeClass('active') 645 .closest('div.tabs').find('div.tabs__content').removeClass('active').eq($(this).index()).addClass('active'); 646 }); 647 648 $('.orders.divForm').click(function(e) { 649 e.preventDefault(); 650 texts = $(this).closest('.catalog_element_item').find('div.title').html(); 651 src = $(this).closest('.catalog_element_item').find('img').attr('src'); 652 price = $(this).closest('.catalog_element_item').find('.price:first').html(); 653 //console.log(texts); 654 $('.form-zakaz__new input[name="or_name_post"]').attr('value', texts); 655 $('.form-zakaz__new input[name="or_name_post"]').val(texts); 656 $('.form-zakaz__new .names_title').html(texts); 657 $('.form-zakaz__new .form-zakaz__product .form-zakaz__image').html('<img loading="lazy" src="' + src + '"/>'); 658 $('.form-zakaz__new .form-zakaz__product .form-zakaz__price').html(price); 659 }); 660 661 662 663 $('.tabs__content .divForm').click(function() { 664 console.log('ok'); 665 texts = $('h1').html(); 666 src = $('.bx_bigimages_imgcontainer #main-img').find('img').attr('src'); 667 /*price = $('.prod_price').html();*/ 668 price = $('meta[itemprop=price]').attr('content') + ' p.'; 669 console.log(texts); 670 $('.form-zakaz__new input[name="or_name_post"]').attr('value', texts); 671 $('.form-zakaz__new input[name="or_name_post"]').val(texts); 672 $('.form-zakaz__new .names_title').html(texts); 673 $('.form-zakaz__new .form-zakaz__product .form-zakaz__image').html('<img src="' + src + '"/>'); 674 $('.form-zakaz__new .form-zakaz__product .form-zakaz__price').html('Цена: <span class="price">' + price + '</span>'); 675 }); 676 677 $('.item_info_section .divForm').click(function(e) { 678 e.preventDefault(); 679 texts = $('h1').html(); 680 src = $('.bx_bigimages_imgcontainer #main-img').find('img').attr('src'); 681 price = $('.prod_price').html(); 682 //console.log(texts); 683 684 $('.form-zakaz__new .names_title').html(texts); 685 $('.form-zakaz__new .form-zakaz__product .form-zakaz__image').html('<img loading="lazy" src="' + src + '"/>'); 686 $('.form-zakaz__new .form-zakaz__product .form-zakaz__price').html('Цена: <span class="price">' + price + '</span>'); 687 }); 688 689 $('.description_text_content_from_admin_panel .divForm').click(function(e) { 690 e.preventDefault(); 691 texts = $('h1').html(); 692 //src = $('.carousel ul li:first').find('img').attr('src'); 693 src = $('.description_text_content_from_admin_panel').find('img').attr('src'); 694 if (src === undefined || src == '') { 695 src = $('.carousel ul li:first').find('img').attr('src'); 696 } 697 price = $('.prod_price').html(); 698 //console.log(texts); 699 700 $('.form-zakaz__new .names_title').html(texts); 701 $('.form-zakaz__new .form-zakaz__product .form-zakaz__image').html('<img loading="lazy" src="' + src + '"/>'); 702 $('.form-zakaz__new .form-zakaz__product .form-zakaz__price').html('Цена: <span class="price">' + price + '</span>'); 703 }); 704 705 $('.prod_price .divForm').click(function() { 706 texts = $('h1').html(); 707 src = $('.carousel ul li:first').find('img').attr('src'); 708 if (!src) { 709 src = $('.description_text_content_from_admin_panel').find('img').attr('src'); 710 } 711 price = 'Ðо запÑоÑÑ'; 712 //console.log(texts); 713 714 $('.form-zakaz__new .names_title').html(texts); 715 $('.form-zakaz__new .form-zakaz__product .form-zakaz__image').html('<img loading="lazy" src="' + src + '"/>'); 716 $('.form-zakaz__new .form-zakaz__product .form-zakaz__price').html('Цена: <span class="price">' + price + '</span>'); 717 $('.form-zakaz__new [name="or_name_post"]').val(texts); 718 }); 719 720 if ($('.divForm').length) { 721 loadFancybox(function() { 722 $(".divForm").fancybox({ 723 helpers: { 724 overlay: {
725 locked: false 726 } 727 }, 728 beforeShow: (i, c) => { 729 let $form = $('#divForm'); 730 731 $form.find('.form-zakaz__title').hasClass('dop') ? '' : $form.find('.form-zakaz__title').html('ÐÑоÑмиÑе заказ на обоÑÑдование'); 732 $form.find('input[name="or_name"]').closest('.line-block').remove(); 733 $form.find('input[name="or_email"]').attr('placeholder', '[email protected]'); 734 $form.find('input#consent-zakaz').closest('.line-block').replaceWith('<div class="line-block"><input type="checkbox" checked="" id="consent-zakaz"><label class="consent-label"><span>Я ознакомлен Ñ <a href="/personal-data-policy/" target="_blank">ÑÑловиÑми</a> и Ð´Ð°Ñ Ñвое ÑоглаÑие на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ </span></label></div>'); 735 }, 736 afterShow: function(instance, current) { 737 $('#divForm input[name="or_phone"]').focus(); 738 } 739 }); 740 }); 741 } 742 if ($('.divForm3').length) { 743 loadFancybox(function() { 744 $(".divForm3").fancybox(); 745 }); 746 } 747 748 if ($('.divForm78').length) { 749 loadFancybox(function() { 750 $(".divForm78").fancybox({ 751 helpers: { 752 overlay: { 753 locked: false 754 } 755 } 756 }); 757 }); 758 } 759 $('.divForm78').click((e) => { 760 setTimeout(() => { 761 $('#divForm78 input[name="problem_email"]').focus(); 762 }, 500) 763 }); 764 765 $(".divForm3").click(function() { 766 767 var clickId = $(this).attr('id'); 768 $('#divForm input[name="or_name_post"]').val(clickId); 769 770 771 }); 772 773 if ($('.or_phone').length) { 774 loadMask(function() { 775 $(".or_phone").mask("+7 (999) 999-99-99"); 776 }); 777 } 778 if ($("input[name='or_phone']").length) { 779 loadMask(function() { 780 $("input[name='or_phone']").mask("+7 (999) 999-99-99"); 781 }); 782 } 783 784 785 $('#divForm .submit-button').click(function() { 786 var consent = $('#consent-zakaz').prop('checked'); 787 /*if (!consent) { 788 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 789 return false; 790 }*/ 791 //заÑем два Ñаза алеÑÑ, еÑли и Ñак внÑÑÑи обÑабоÑÑика еÑÑÑ ÑÑа пÑовеÑка? 792 }); 793 794 795 $('#divForm').submit(function(e) { 796 797 e.preventDefault(); 798 799 //console.log(111); 800 801 var consent = $('#consent-zakaz').prop('checked'); 802 var form = $('#divForm'); 803 if (!consent) { 804 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 805 return false; 806 } 807 808 var str = $('#divForm').serialize(); 809 console.log(str); 810 var $that = $(this), 811 812 formData = new FormData($that.get(0)); 813 814 grecaptcha.ready(function() { 815 grecaptcha.execute('6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8', { action: 'submit' }).then(function(token) { 816 817 console.log(token); 818 819 if (token && token != null && token != '') { 820 $.ajax({ 821 type: "POST", 822 url: "/form/ajax_popup.php", 823 data: formData, 824 processData: false, 825 contentType: false, 826 success: function(msg) { 827 console.log(msg); 828 if (msg == 'ok') { 829 830 831 dataLayer.push({ 'event': 'send_form' }); 832 /*task 79708*/ 833 console.log('dataLayer event send_form'); 834 835 $('#divForm .form-zakaz__errors').hide(); 836 console.log('true'); 837 $('#divForm').html('СпаÑибо! ÐаÑа заÑвка ÑÑпеÑно пÑинÑÑа.<br>РближайÑее вÑÐµÐ¼Ñ Ð½Ð°Ñ Ð¼ÐµÐ½ÐµÐ´Ð¶ÐµÑ ÑвÑжеÑÑÑ Ñ Ðами!'); 838 839 ym(18671896, 'reachGoal', 'form_order_product'); 840 //ga('gtag_UA_77707744_1.send', 'pageview', '/form_order_product'); 841 dataLayer.push({ 'event': 'form_order_product' }); //идÑм в GTM 842 843 setTimeout(function() { 844 $('.fancybox-close').click(); 845 }, 4000); 846 } else { 847 form.find('input[required]').each(function() { 848 if ($(this).val() == '') { 849 $(this).addClass('error'); 850 return false;
851 } else { 852 $(this).removeClass('error'); 853 } 854 }) 855 $('#divForm .form-zakaz__errors').show(); 856 console.log('false'); 857 } 858 } 859 }); 860 } 861 862 }); 863 }); 864 865 866 return false; 867 }); 868 869 // ФоÑма "ÐÑÐ¾Ð±Ð»ÐµÐ¼Ñ Ñ Ð¾Ð±ÑÑдованием" на главной 870 if ($("input[name='problem_phone']").length) { 871 loadMask(function() { 872 $("input[name='problem_phone']").mask("+7 (999) 999-99-99"); 873 }); 874 } 875 $('#divForm78').submit(function() { 876 let consent = $('#consent-problem').prop('checked'); 877 if (!consent) { 878 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 879 return false; 880 } 881 let str = $(this).serialize(); 882 $.ajax({ 883 type: "POST", 884 url: "/form/ajax_popup_problem.php", 885 data: str, 886 success: function(msg) { 887 if (msg == 'ok') { 888 dataLayer.push({ 'event': 'send_form' }); 889 /*task 79708*/ 890 //console.log('dataLayer event send_form'); 891 892 //console.log('true'); 893 $('#divForm78').html('<p style="text-align:center;">ÐлагодаÑим ÐÐ°Ñ Ð·Ð° обÑаÑнÑÑ ÑвÑзÑ!<br>ÐаÑи ÑпеÑиалиÑÑÑ Ñже пÑиÑÑÑпили к ÑеÑÐµÐ½Ð¸Ñ ÐаÑей пÑоблемÑ.</p>'); 894 ym(18671896, 'reachGoal', 'problema'); 895 //ga('gtag_UA_77707744_1.send', 'pageview', '/problema'); 896 dataLayer.push({ 'event': 'problema' }); //идÑм в GTM 897 898 setTimeout(function() { 899 $('.fancybox-close').click(); 900 }, 3000); 901 } else { 902 $('#divForm78 .result').html('<span>СообÑение не оÑпÑавлено, ÑбедиÑеÑÑ Ð² пÑавилÑноÑÑи заполнение полей</span>') 903 //console.log('false'); 904 } 905 } 906 }); 907 return false; 908 }); 909 910 // ФоÑма заказа обÑаÑного звонка из header'a 911 $('#divForm1').submit(function(e) { 912 e.preventDefault(); 913 914 let consent = $('#consent').prop('checked'); 915 if (!consent) { 916 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 917 return false; 918 } 919 let str = $(this).serialize(); 920 921 922 grecaptcha.ready(function() { 923 grecaptcha.execute('6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8', { action: 'submit' }).then(function(token) { 924 //console.log(token); 925 str = str + '&recaptcha_response=' + token; 926 console.log(str); 927 if (token && token != null && token != '') { 928 $.ajax({ 929 type: "POST", 930 url: "/form/ajax_popup.php", 931 data: str, 932 success: function(msg) { 933 if (msg === 'ok') { 934 dataLayer.push({ 'event': 'send_form' }); 935 936 // //console.log('dataLayer event send_form'); 937 $('#divForm1 .form-zakaz__errors').html('').hide(); 938 $('#divForm1').html('СпаÑибо! ÐаÑа заÑвка ÑÑпеÑно пÑинÑÑа.<br>РближайÑее вÑÐµÐ¼Ñ Ð½Ð°Ñ Ð¼ÐµÐ½ÐµÐ´Ð¶ÐµÑ ÑвÑжеÑÑÑ Ñ Ðами!'); 939 ym(18671896, 'reachGoal', 'callback_form_id'); 940 //ga('gtag_UA_77707744_1.send', 'pageview', '/callback_form_id'); 941 dataLayer.push({ 'event': 'callback_form_id' }); //идÑм в GTM 942 943 setTimeout(function() { 944 $('.fancybox-close').click(); 945 }, 4000); 946 } else { 947 $('#divForm1 .form-zakaz__errors').html('СообÑение не оÑпÑавлено, ÑбедиÑеÑÑ Ð² пÑавилÑноÑÑи заполнение полей').show(); 948 // //console.log('false'); 949 } 950 } 951 }); 952 953 } 954 }); 955 }); 956 return false;
957 }); 958 959 $('#divForm5').submit(function(e) { 960 961 e.preventDefault(); 962 963 let consent = $('#consent-form').prop('checked'); 964 if (!consent) { 965 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 966 return false; 967 } 968 969 let form = $(this), 970 formdata = false; 971 972 if (window.FormData) { 973 formdata = new FormData(form[0]); 974 } 975 976 let formAction = form.attr('action'); 977 978 //console.log(formdata); 979 980 grecaptcha.ready(function() { 981 grecaptcha.execute('6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8', { action: 'submit' }).then(function(token) { 982 983 //console.log(token); 984 985 if (token && token != null && token != '') { 986 987 $.ajax({ 988 type: "POST", 989 url: "/form/ajax_popup_form.php", 990 data: formdata ? formdata : form.serialize(), 991 contentType: false, 992 cache: false, 993 processData: false, 994 success: function(msg) { 995 if (msg == 'ok') { 996 dataLayer.push({ 'event': 'send_form' }); 997 /*task 79708*/ 998 //console.log('dataLayer event send_form'); 999 1000 $('#divForm5 .form-zakaz__errors').html('').hide(); 1001 1002 $('#divForm5').html('СпаÑибо! ÐаÑа заÑвка ÑÑпеÑно пÑинÑÑа.<br>РближайÑее вÑÐµÐ¼Ñ Ð½Ð°Ñ Ð¼ÐµÐ½ÐµÐ´Ð¶ÐµÑ ÑвÑжеÑÑÑ Ñ Ðами!'); 1003 1004 1005 setTimeout(function() { 1006 $('.fancybox-close').click(); 1007 }, 4000); 1008 } else { 1009 $('#divForm5 .form-zakaz__errors').html('СообÑение не оÑпÑавлено, ÑбедиÑеÑÑ Ð² пÑавилÑноÑÑи заполнение полей').show(); 1010 //console.log('false'); 1011 } 1012 } 1013 }); 1014 1015 } 1016 }); 1017 }); 1018 return false; 1019 }); 1020 1021 $('#divForm4').submit(function(e) { 1022 1023 e.preventDefault(); 1024 1025 var consent = $('#consent-call-bottom').prop('checked'); 1026 if (!consent) { 1027 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 1028 return false; 1029 } 1030 1031 var str = $(this).serialize(); 1032 1033 grecaptcha.ready(function() { 1034 grecaptcha.execute('6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8', { action: 'submit' }).then(function(token) { 1035 1036 //console.log(token); 1037 1038 if (token && token != null && token != '') { 1039 1040 str = str + '&recaptcha_response=' + token; 1041 1042 $.ajax({ 1043 type: "POST", 1044 url: "/form/ajax_popup.php", 1045 data: str, 1046 success: function(msg) { 1047 if (msg == 'ok') { 1048 dataLayer.push({ 'event': 'send_form' }); 1049 /*task 79708*/ 1050 //console.log('dataLayer event send_form'); 1051 1052 ym(18671896, 'reachGoal', 'callback_form_id'); 1053 //ga('gtag_UA_77707744_1.send', 'pageview', '/callback_form_id'); 1054 dataLayer.push({ 'event': 'callback_form_id' }); //идÑм в GTM 1055 1056 $('#divForm4 .form-zakaz__errors').hide(); 1057 //console.log('true'); 1058 $('#divForm4').html('СпаÑибо! ÐаÑа заÑвка ÑÑпеÑно пÑинÑÑа.<br>РближайÑее вÑÐµÐ¼Ñ Ð½Ð°Ñ Ð¼ÐµÐ½ÐµÐ´Ð¶ÐµÑ ÑвÑжеÑÑÑ Ñ Ðами!'); 1059 1060 setTimeout(function() { 1061 $('.fancybox-close').click(); 1062 }, 4000); 1063 } else { 1064 $('#divForm4 .form-zakaz__errors').show(); 1065 //console.log('false'); 1066 } 1067 } 1068 }); 1069 } 1070 1071 }); 1072 }); 1073 1074 return false;
1075 }); 1076 1077 1078 // ФоÑма обÑаÑной ÑвÑзи из конÑакÑов 1079 if ($("#divForm2 .or_phone").length) { 1080 loadMask(function() { 1081 $("#divForm2 .or_phone']").mask("+7 (999) 999-99-99"); 1082 }); 1083 } 1084 1085 $('#divForm2').submit(function(e) { 1086 e.preventDefault(); 1087 1088 let consent = $('#consent-contacts').prop('checked'); 1089 if (!consent) { 1090 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð´Ð°ÑÑ ÑоглаÑие на обÑабоÑÐºÑ ÑÐ²Ð¾Ð¸Ñ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ .'); 1091 return false; 1092 } 1093 1094 let str = $(this).serialize(); 1095 1096 grecaptcha.ready(function() { 1097 grecaptcha.execute('6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8', { action: 'submit' }).then(function(token) { 1098 1099 // //console.log(token); 1100 1101 if (token && token != null && token != '') { 1102 str = str + '&recaptcha_response=' + token; 1103 $.ajax({ 1104 type: "POST", 1105 url: "/form/ajax_popup.php", 1106 data: str, 1107 success: function(msg) { 1108 if (msg == 'ok') { 1109 dataLayer.push({ 'event': 'send_form' }); 1110 /*task 79708*/ 1111 // //console.log('dataLayer event send_form'); 1112 1113 $('#divForm2 .form-zakaz__errors').hide(); 1114 // //console.log('true'); 1115 $('#divForm2').html('СпаÑибо! ÐаÑа заÑвка ÑÑпеÑно пÑинÑÑа.<br>РближайÑее вÑÐµÐ¼Ñ Ð½Ð°Ñ Ð¼ÐµÐ½ÐµÐ´Ð¶ÐµÑ ÑвÑжеÑÑÑ Ñ Ðами!'); 1116 1117 1118 ym(18671896, 'reachGoal', 'svyaz_kontakty'); 1119 //ga('gtag_UA_77707744_1.send', 'pageview', '/svyaz_kontakty'); 1120 dataLayer.push({ 'event': 'svyaz_kontakty' }); //идÑм в GTM 1121 1122 setTimeout(function() { 1123 $('.fancybox-close').click(); 1124 }, 4000); 1125 } else { 1126 1127 $('#divForm2 .form-zakaz__errors').show(); 1128 //console.log('false'); 1129 } 1130 } 1131 }); 1132 } 1133 1134 }); 1135 }); 1136 1137 return false; 1138 1139 }); 1140 1141 if ($(".sp-form-control-phone").length) { 1142 loadMask(function() { 1143 $(".sp-form-control-phone").mask("+7 (999) 999-99-99"); 1144 }); 1145 } 1146 1147 1148 /*$('.sp-form-control-phone').focus( 1149 function(){ 1150 $('.sp-form-control-phone').mask("+7 (999) 999-99-99"); 1151 } 1152 );*/ 1153 1154 $('#docs_form_send .sp-button ').click( 1155 function() { 1156 $('.sp-form-control-phone').removeClass('none_box'); 1157 } 1158 ); 1159 1160 1161 $('#docs_form_send').submit(function() { 1162 var str = $(this).serialize(); 1163 1164 1165 $.ajax({ 1166 type: "POST", 1167 url: "/form/ajax_popup_docs.php", 1168 data: str, 1169 success: function(msg) { 1170 //console.log(msg); 1171 if (msg == 'ok') { 1172 dataLayer.push({ 'event': 'send_form' }); 1173 /*task 79708*/ 1174 //console.log('dataLayer event send_form'); 1175 1176 //console.log('true'); 1177 $('#docs_form').html('<div style="text-align: center; padding-top: 50px; padding-bottom: 50px;">ÐокÑÐ¼ÐµÐ½Ñ Ð¾ÑпÑавлен вам на поÑÑÑ!</div>'); 1178 1179 ym(18671896, 'reachGoal', 'katalog'); 1180 //ga('gtag_UA_77707744_1.send', 'pageview', '/katalog'); 1181 dataLayer.push({ 'event': 'katalog' }); //идÑм в GTM 1182 1183 setTimeout(function() { 1184 $('.fancybox-close').click(); 1185 }, 2000); 1186 } else { 1187 $('#docs_form').append(msg) 1188 //console.log('false'); 1189 } 1190 } 1191 }); 1192 return false;
1193 }); 1194 1195 1196 1197 $('#docs_form_send_2 .sp-button ').click( 1198 function() { 1199 $('.sp-form-control-phone').removeClass('none_box'); 1200 } 1201 ); 1202 1203 1204 $('#docs_form_send_2').submit(function() { 1205 var str = $(this).serialize(); 1206 1207 1208 $.ajax({ 1209 type: "POST", 1210 url: "/form/ajax_popup_docs.php", 1211 data: str, 1212 success: function(msg) { 1213 //console.log(msg); 1214 if (msg == 'ok') { 1215 dataLayer.push({ 'event': 'send_form' }); 1216 /*task 79708*/ 1217 //console.log('dataLayer event send_form'); 1218 1219 //console.log('true'); 1220 $('#docs_form').html('<div style="text-align: center; padding-top: 50px; padding-bottom: 50px;">ÐокÑÐ¼ÐµÐ½Ñ Ð¾ÑпÑавлен вам на поÑÑÑ!</div>'); 1221 1222 ym(18671896, 'reachGoal', 'katalog'); 1223 //ga('gtag_UA_77707744_1.send', 'pageview', '/katalog'); 1224 dataLayer.push({ 'event': 'katalog' }); //идÑм в GTM 1225 1226 setTimeout(function() { 1227 $('.fancybox-close').click(); 1228 }, 2000); 1229 } else { 1230 $('#docs_form').append(msg) 1231 //console.log('false'); 1232 } 1233 } 1234 }); 1235 return false; 1236 }); 1237 1238 1239 let numberOfVisibleSlides = 4, 1240 slideWidth = 210, 1241 slideResponsive = false; 1242 //console.log($(document).width()) 1243 if ($(document).width() < 500) { 1244 numberOfVisibleSlides = 1; 1245 slideWidth = 0; 1246 slideResponsive = true; 1247 } 1248 //console.log(numberOfVisibleSlides) 1249 if ($('#slider-main .slider-main').length) { 1250 1251 loadbxSlider(function() { 1252 $('#slider-main .slider-main').bxSlider({ 1253 slideWidth: slideWidth, 1254 responsive: slideResponsive, 1255 minSlides: 1, 1256 maxSlides: numberOfVisibleSlides, 1257 moveSlides: 1, 1258 slideMargin: 35, 1259 }); 1260 1261 $('#slider-main .bx-wrapper').css('max-width', '100%'); 1262 $('#slider-main .bx-viewport').css('width', '946px'); 1263 $('#slider-main .bx-default-pager').remove(); 1264 $('#slider-main .slider-main-title').prependTo('.bx-wrapper'); 1265 }); 1266 } 1267 1268 1269 let numberOfVisibleSlides1 = 4, 1270 slideWidth1 = 210, 1271 slideResponsive1 = false; 1272 //console.log($(document).width()) 1273 if ($(document).width() < 500) { 1274 numberOfVisibleSlides1 = 1; 1275 slideWidth1 = 0; 1276 slideResponsive1 = true; 1277 } 1278 //console.log(numberOfVisibleSlides) 1279 if ($('.bx_catalog_tile_recomended.bx_catalog_tile_recomended_slider .bx_catalog_tile_ul_recomended').length) { 1280 1281 loadbxSlider(function() { 1282 $('.bx_catalog_tile_recomended.bx_catalog_tile_recomended_slider .bx_catalog_tile_ul_recomended').bxSlider({ 1283 slideWidth: slideWidth1, 1284 responsive: slideResponsive1, 1285 minSlides: 1, 1286 maxSlides: numberOfVisibleSlides1, 1287 moveSlides: 1, 1288 slideMargin: 35, 1289 }); 1290 1291 $('.bx_catalog_tile_recomended.bx_catalog_tile_recomended_slider .bx-wrapper').css('max-width', '100%'); 1292 $('.bx_catalog_tile_recomended.bx_catalog_tile_recomended_slider .bx-viewport').css('width', '946px'); 1293 $('.bx_catalog_tile_recomended.bx_catalog_tile_recomended_slider .bx-default-pager').remove(); 1294 $('.bx_catalog_tile_recomended.bx_catalog_tile_recomended_slider .title_recomended').prependTo('.bx-wrapper'); 1295 }); 1296 } 1297 1298 // ÐÐ¾Ð½ÐµÑ ÑлайдеÑа на главной 1299 // Ð¡Ð»Ð°Ð¹Ð´ÐµÑ Ð² Ñапке 1300 if ($('#header-img .slider_in_header').length) { 1301 loadbxSlider(function() { 1302 $('#header-img .slider_in_header').bxSlider({ 1303 auto: true, 1304 speed: 2000, 1305 pause: 8000 1306 }); 1307 }); 1308 } 1309 // ÐÐ¾Ð½ÐµÑ ÑлайдеÑа в Ñапке 1310 1311 // ÐеÑеменнÑй Ñок 1312 setInterval(function() {
1313 var margin = $('.wave').css('margin-right'); 1314 $('.wave').css('margin-right', parseInt(margin) - 1); 1315 }, 10); 1316 // ÐÐ¾Ð½ÐµÑ Ð¿ÐµÑеменного Ñока 1317 1318 // ÐаÑÑÑÐµÐ»Ñ 1319 /* $("#carousel").featureCarousel({ 1320 largeFeatureWidth: 430, 1321 largeFeatureHeight: 305, 1322 smallFeatureWidth: 330, 1323 smallFeatureHeight: 245, 1324 smallFeatureOffset: 30, 1325 sidePadding: 100, 1326 topPadding: 70, 1327 trackerIndividual: true, 1328 trackerSummation: false, 1329 autoPlay: 0, 1330 carouselSpeed: 500 1331 // include options like this: 1332 // (use quotes only for string values, and no trailing comma after last option) 1333 // option: value, 1334 // option: value 1335 }); 1336 var nameArr = []; 1337 $('#carousel .carousel-feature').each(function () { 1338 var name = $(this).find('.carousel-caption p').text(); 1339 nameArr.push(name); 1340 });*/ 1341 // ЧекбокÑÑ 1342 // $('.checkbox').iCheck({ 1343 // checkboxClass: 'icheckbox_minimal' 1344 // }); 1345 // ÐÐ¾Ð½ÐµÑ ÑекбокÑов 1346 setTimeout(function() { 1347 $('.tracker-individual-container > li').each(function() { 1348 $(this).find('div').text(nameArr[$(this).index()]); 1349 $('.tracker-individual-container').appendTo('.select'); 1350 $('.carousel-container .select .box').text($('.tracker-individual-container > li:first-child > div').text()); 1351 }); 1352 $('.tracker-individual-container').addClass('close'); 1353 jQuery(document).click(function(event) { 1354 event.stopPropagation(); 1355 var target = jQuery(event.target), 1356 ul = target.siblings(".tracker-individual-container"); 1357 if ((target.hasClass('box') && ul.hasClass('close')) || (target.hasClass('box-arr') && ul.hasClass('close'))) { 1358 ul.removeClass('close').addClass('open'); 1359 } else { 1360 $('.tracker-individual-container').removeClass('open').addClass('close'); 1361 } 1362 }); 1363 $('.tracker-individual-container li div').click(function() { 1364 var aWeight = $(this).text(); 1365 $(this).parents(".tracker-individual-container").siblings(".box").text(aWeight); 1366 }); 1367 }, 1000); 1368 //ÐÐ¾Ð½ÐµÑ ÐºÐ°ÑÑÑели 1369 //Фон каÑÑÑели 1370 setTimeout(function() { 1371 if ($('.carousel-container').length > 0) { 1372 var leftSidePage = $('.carousel-container').offset().left; 1373 $('.carousel-container .bg').css('left', '-' + leftSidePage + 'px'); 1374 $('.carousel-container .bg').css('width', $('body').width()); 1375 $(window).resize(function() { 1376 var leftSidePage = $('.carousel-container').offset().left; 1377 $('.carousel-container .bg').css('left', '-' + leftSidePage + 'px'); 1378 $('.carousel-container .bg').css('width', $('body').width()); 1379 }); 1380 } 1381 }, 500); 1382 //ÐÐ¾Ð½ÐµÑ Ñона каÑÑÑели 1383 1384 //ÐпиÑание каÑÑоÑки ÑоваÑа 1385 $('.description-section').after($('.description-section-two')); 1386 // $('.description-section-two').after($('.tech-table')); 1387 // $('.tech-table-content').addClass('close'); 1388 $('.tech-table-content.test').addClass('open-tab').removeClass('close'); 1389 1390 function slideTable() { 1391 $('.tech-table-content').slideToggle(); 1392 $('.tech-table-content').toggleClass('close open'); 1393 if ($('.tech-table-content').hasClass('close')) { 1394 $('.down-up').removeClass('up').addClass('down').text('РазвеÑнÑÑÑ'); 1395 } else if ($('.tech-table-content').hasClass('open')) { 1396 $('.down-up').removeClass('down').addClass('up').text('СвеÑнÑÑÑ'); 1397 } 1398 }; 1399 $('.tech-table-link').click(slideTable); 1400 $('.down-up').click(slideTable); 1401 //ÐÐ¾Ð½ÐµÑ Ð¾Ð¿Ð¸ÑÐ°Ð½Ð¸Ñ ÐºÐ°ÑÑоÑки ÑоваÑа 1402 //Ð¤Ð°Ð¹Ð»Ñ Ð´Ð»Ñ ÑкаÑÐ¸Ð²Ð°Ð½Ð¸Ñ 1403 $('.description-section').after($('.download-files')); 1404 $('.download-files').after($('.tech-table-after-files')); 1405 //ÐÐ¾Ð½ÐµÑ Ñайлов Ð´Ð»Ñ ÑкаÑÐ¸Ð²Ð°Ð½Ð¸Ñ 1406 //ÐонÑакÑÑ 1407 $("#tabs").tabs(); 1408 $('.feedback .tpl_default_author_name, .feedback .tpl_default_author_email, .feedback .tpl_default_author_city, .feedback .tpl_default_author_work_phone').wrapAll('<div class="left">'); 1409 $('.feedback .tpl_default_author_message_theme, .feedback .tpl_default_author_message').wrapAll('<div class="right">'); 1410 $('.right').after('<div class="clear"></div>'); 1411 //ÐÐ¾Ð½ÐµÑ ÐºÐ¾Ð½ÑакÑов 1412 //Ðде кÑпиÑÑ 1413 $('.select-city-list').heapbox({ 1414 onChange: function() { 1415 selectCity(); 1416 } 1417 }); 1418 1419 1420 function selectCity() {
1421 var city_name = $('.heapOption').find('a.selected').attr('rel'); 1422 $('.contact-item').each(function() { 1423 var city_contact = $(this).attr('data-city'); 1424 $(this).removeClass('active'); 1425 if (city_contact == city_name) { 1426 $(this).addClass('active'); 1427 }; 1428 }); 1429 } 1430 1431 selectCity(); 1432 //ÐÐ¾Ð½ÐµÑ Ð³Ð´Ðµ кÑпиÑÑ 1433 //ÐÐµÐ½Ñ ÐºÐ°Ñалога 1434 if ($('.left-menu-catalog').length > 0) { 1435 $('section > article').addClass('with-left-menu'); 1436 }; 1437 //ÐÐ¾Ð½ÐµÑ Ð¼ÐµÐ½Ñ ÐºÐ°Ñалога 1438 //СÑавнение 1439 $('select#list1').heapbox(); 1440 $('select#list2').heapbox(); 1441 $('select#list3').heapbox(); 1442 $('select#list4').heapbox(); 1443 //ÐÐ¾Ð½ÐµÑ ÑÑÐ°Ð²Ð½ÐµÐ½Ð¸Ñ 1444 //ÐÑÑоÑа блоков 1445 function height_of_blocks(argument) { 1446 var stabH = $(argument).innerHeight(); 1447 var heightArray = []; 1448 $('.bx_sitemap_ul > li').each(function() { 1449 heightArray.push($(this).find('ul:first').innerHeight()); 1450 //console.log(stabH); 1451 //console.log($(this).find('ul:first').innerHeight()); 1452 if ($(this).find('ul:first').innerHeight() > stabH) { 1453 $(this).find('ul:first').css('height', stabH + 'px'); 1454 $(this).find('ul:first').css('overflow', 'hidden'); 1455 var thisH = $(this).innerHeight(); 1456 $(this).addClass('close'); 1457 $(this).append('<a class="more" href="javascript:void(0);">ÐоказаÑÑ Ð²Ñе</a>'); 1458 var more = $(this).find('.more'); 1459 var thisIs = $(this); 1460 more.click( 1461 function() { 1462 if (thisIs.hasClass('close')) { 1463 thisIs.find('ul:first').animate({ height: heightArray[thisIs.index()] + 'px' }, 400); 1464 thisIs.removeClass('close').addClass('open'); 1465 $(this).text('СкÑÑÑÑ'); 1466 } else if (thisIs.hasClass('open')) { 1467 thisIs.find('ul:first').animate({ height: stabH + 'px' }, 400); 1468 thisIs.removeClass('open').addClass('close'); 1469 $(this).text('ÐоказаÑÑ Ð²Ñе'); 1470 } 1471 } 1472 ); 1473 }; 1474 if ($(this).innerHeight() < stabH) { 1475 $(this).innerHeight(stabH); 1476 }; 1477 }); 1478 } 1479 1480 $('.bx_sitemap_ul > li').each(function() { 1481 /*if ($(this).attr('id') == 'bx_1847241719_1') {*/ 1482 height_of_blocks('#bx_1847241719_1 > ul'); 1483 /*} else if ($(this).attr('id') == 'bx_1847241719_8') { 1484 height_of_blocks('#bx_1847241719_8'); 1485 }*/ 1486 1487 }); 1488 //ÐÐ¾Ð½ÐµÑ Ð²ÑÑоÑÑ Ð±Ð»Ð¾ÐºÐ¾Ð² 1489 //Ðобавлени клаÑÑов поÑледним ÑеÑÑÑÑм блокам 1490 $('.bx_sitemap_ul > li:nth-child(4n)').addClass('four'); 1491 $('.bx_sitemap_ul > li:nth-child(5)').addClass('five'); 1492 $('.bx_sitemap_ul > li:nth-child(6)').addClass('six'); 1493 $('.bx_sitemap_ul > li:nth-child(7)').addClass('seven'); 1494 $('.bx_sitemap_ul > li:nth-child(8)').addClass('eight'); 1495 if ($('.bx_sitemap_ul > li > .bx_sitemap_li_img').length == 0) { 1496 $('.bx_sitemap_ul > li').addClass('wimg'); 1497 } 1498 //ÐÐ¾Ð½ÐµÑ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÐºÐ»Ð°ÑÑов поÑледним ÑеÑÑÑÑм блокам 1499 //ÐÑÑоÑа заголовков 1500 var arrayTitles = []; 1501 $('.bx_sitemap_ul > li > .bx_sitemap_li_title').each(function() { 1502 arrayTitles.push($(this).height()); 1503 }); 1504 var titileMaxHeight = Math.max.apply(Math, arrayTitles); 1505 $('.bx_sitemap_ul > li > .bx_sitemap_li_title').each(function() { 1506 $(this).height(titileMaxHeight); 1507 }); 1508 //ÐÐ¾Ð½ÐµÑ Ð²ÑÑоÑÑ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¾Ð² 1509 //ÐÑÑавнивание изобÑажение Ñазделов каÑалога на главной 1510 /*setTimeout( function() { 1511 $('.bx_catalog_tile_img').each(function(){ 1512 var boxImgHeight = $(this).height(), 1513 imgHeight = $(this).children().height(); 1514 if (imgHeight < boxImgHeight) { 1515 var imgPadTop = (boxImgHeight - imgHeight) / 2; 1516 $(this).children().css('padding-top',imgPadTop); 1517 } 1518 }); 1519 },1);*/ 1520 //ÐÐ¾Ð½ÐµÑ ÑÑÐ°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¸Ð·Ð¾Ð±Ñажение Ñазделов каÑалога на главной 1521 //Ðоковое Ð¼ÐµÐ½Ñ 1522 $('.bx_hma_one_lvl:not(.open)').addClass('close'); 1523 $('.bx_hma_one_lvl > span').click(function() { 1524 $(this).parent('li').toggleClass('close open'); 1525 }); 1526 $('.bx_hma_one_lvl').each(function() { 1527 if ($(this).find('ul').length == 0) { 1528 $(this).find('.arrow').remove(); 1529 } 1530 }); 1531 //ÐÐ¾Ð½ÐµÑ Ð±Ð¾ÐºÐ¾Ð²Ð¾Ð³Ð¾ Ð¼ÐµÐ½Ñ 1532 1533 if ($('.fancybox').length) { 1534 loadFancybox(function() { 1535 $(".fancybox").fancybox(); 1536 }); 1537 } 1538 1539 if ($('.modalbox').length) { 1540 loadFancybox(function() { 1541 $('.modalbox').fancybox({ 1542 afterShow: function(instance, current) { 1543 setTimeout(() => { 1544 $('#divForm4 .or_phone').focus(); 1545 }, 500); 1546 } 1547 }); 1548 }); 1549 } 1550 1551 //СеÑÑиÑикаÑÑ 1552 if ($('.slider_sertif').length) { 1553 loadbxSlider(function() { 1554 $('.slider_sertif').bxSlider({ 1555 slideWidth: 110,
1556 pager: false 1557 }); 1558 }); 1559 } 1560 //ÐÐ¾Ð½ÐµÑ ÑеÑÑиÑикаÑов 1561 1562 //Ðаказ обÑаÑного звонка 1563 $('.divForm5').click(function() { 1564 $(this).toggleClass('close open'); 1565 $('.order-form').toggleClass('close open'); 1566 $(this).after('<div class="fancybox-overlay-2"></div>'); 1567 setTimeout(() => { 1568 $('#divForm5 .or_phone').focus(); 1569 }, 500) 1570 }); 1571 1572 $('.call-order').click(function() { 1573 $(this).toggleClass('close open'); 1574 $('.order-call').toggleClass('close open'); 1575 $('.order-call .or_phone').focus(); 1576 $(this).after('<div class="fancybox-overlay-2"></div>'); 1577 ym(18671896, 'reachGoal', 'open_callback_form'); 1578 //ga('gtag_UA_77707744_1.send', 'pageview', '/open_callback_form'); 1579 dataLayer.push({ 'event': 'open_callback_form' }); //идÑм в GTM 1580 }); 1581 1582 // ÐÑзов ÑоÑÐ¼Ñ Ð½Ð° ÑÑÑаниÑе "/service/" 1583 $('.sc-form .call-form, .ngr-wrap .call-form').click(function() { 1584 $('.order-call').toggleClass('close open'); 1585 $('.order-call .or_phone').focus(); 1586 $('#header .call-order').after('<div class="fancybox-overlay-2"></div>'); 1587 }); 1588 1589 // ÑаÑкÑÑÑие/ ÑкÑÑÑие ÑлеменÑов в блоки "ЧаÑÑÑе вопÑоÑÑ", на ÑÑÑаниÑе "/service/" 1590 jQuery('.faq-wrap .item').on('click', function(evt){ 1591 evt.preventDefault(); 1592 console.log('Fired #3579'); 1593 1594 if (jQuery(this).hasClass("opened")) { 1595 jQuery(this).removeClass("opened"); 1596 } else { 1597 jQuery(this).addClass("opened"); 1598 } 1599 }) 1600 1601 1602 1603 1604 $('.close-button').click(function() { 1605 $('.fancybox-overlay-2').remove(); 1606 }); 1607 $('body').on('click', '.fancybox-overlay-2', function() { 1608 $('.close-button').trigger('click'); 1609 }); 1610 $('.feedback-url').click(function() { 1611 yaCounter18671896.reachGoal('click_write_us'); 1612 }); 1613 //ÐÐ¾Ð½ÐµÑ Ð·Ð°ÐºÐ°Ð·Ð° обÑаÑного звонка 1614 //ÐÑокÑÑÑка навеÑÑ 1615 $("#toTop").scrollToTop(); 1616 //ÐÐ¾Ð½ÐµÑ Ð¿ÑокÑÑÑки навеÑÑ 1617 1618 //$('.description-section').prependTo('.with-left-menu'); 1619 //$('.connected-carousels').prependTo('.with-left-menu'); 1620 1621 //$('.description-section').after('<div class="" style="clear:both;margin-bottom:10px"></div>'); 1622 //$('.description-section-s').after($('.download-files')); 1623 //$('h1').prependTo('.with-left-menu'); 1624 1625 $('.rele-page__head').click(function() { 1626 var el = $(this).closest('.rele-page__block'); 1627 1628 if (el.find('.rele-page__cont').hasClass('show')) { 1629 el.find('.rele-page__cont').removeClass('show'); 1630 } else { 1631 el.find('.rele-page__cont').addClass('show'); 1632 } 1633 }); 1634 loadFancybox(); 1635}); 1636Array.prototype.in_array = function(p_val) { 1637 for (var i = 0, l = this.length; i < l; i++) { 1638 if (this[i] == p_val) { 1639 return true; 1640 } 1641 } 1642 return false; 1643} 1644var compareid = []; 1645$('.compare-list').each(function() { 1646 compareid.push($(this).val()); 1647}); 1648$('.compare-id').each(function() { 1649 if (compareid.in_array($(this).attr("id"))) { 1650 $(this).parent().find('input').attr("checked", "checked"); 1651 } 1652}); 1653 1654 1655$(document).ready(function() { 1656 1657 function searchAjax(qtext) { 1658 if (qtext.length > 2) { 1659 var resSearch = $('.title-search-results'), 1660 resSearchWrap = resSearch.find('.search-wrap'), 1661 url = "/search/?q=" + qtext; 1662 1663 $.ajax({ 1664 type: "GET", 1665 dataType: "html", 1666 url: url + '&ajax=Y', 1667 success: function(data) { 1668 var success = $($.parseHTML(data)).find("#search-item_list"); 1669 if (success.length > 0) { 1670 resSearchWrap.html(success.html()); 1671 if (resSearchWrap.find('.search-item').length > 4) { 1672 resSearchWrap.html(resSearchWrap.html() + '<div class="search-item"><div class="search-error"><a href="' + url + '">ÐÑе ÑезÑлÑÑаÑÑ</a></div></div>'); 1673 } 1674 } else {
1675 resSearchWrap.html('<div class="search-item"><div class="search-error">ÐÐµÑ ÑезÑлÑÑаÑов</div></div>'); 1676 } 1677 resSearch.slideDown(); 1678 } 1679 }) 1680 } 1681 } 1682 var input = $('#new_search_input'), 1683 timeOut; 1684 input.on('keyup', function() { 1685 clearTimeout(timeOut); 1686 timeOut = setTimeout(searchAjax, 300, $(this).val()); 1687 }); 1688 $('body').on('click', '.title-search-close', function() { 1689 $('.title-search-results').slideUp(); 1690 }) 1691 1692 $(document).on('click', '.load_more', function(e) { 1693 1694 e.preventDefault(); 1695 var targetDiv = '.products_list', 1696 url = $(this).attr('href'); 1697 1698 if (url !== undefined) { 1699 $('.tech-table').animate({ opacity: 0.6 }, 400); 1700 $.ajax({ 1701 type: 'GET', 1702 url: url, 1703 dataType: 'html', 1704 success: function(data) { 1705 $(targetDiv).html($(data).find(targetDiv).html()); 1706 $('.tech-table').animate({ opacity: 1 }, 400); 1707 } 1708 }) 1709 } else { 1710 $('.tech-table').animate({ opacity: 1 }, 400); 1711 } 1712 }); 1713 1714 if ($('.description-section-two-no .stabilizators .item').length < 3) { 1715 $('.description-section-two.description-section-two-no td > div').addClass('two-child'); 1716 } 1717 1718 /*$(window).on("resize", function () { 1719 //console.log('ok1'); 1720 var maxH = 0; 1721 $('.description-section-two .stabilizators .item').each(function(){ 1722 1723 //$(this).css('height','auto'); 1724 //console.log('ok'); 1725 //console.log($(this).height()); 1726 if ( $(this).height() > maxH ) { 1727 maxH = $(this).height(); 1728 } 1729 1730 }); 1731 1732 $('.description-section-two .stabilizators .item').height(maxH); 1733 }).resize();*/ 1734 1735 1736 let timeline = document.querySelectorAll('.timeline__date'); 1737 1738 timeline.forEach((item) => { 1739 item.addEventListener('click', () => { 1740 item.closest('.timeline__item').classList.toggle('hide'); 1741 }) 1742 }) 1743 1744 $(document).on('click', '.product_order-count_plus', function(e) { 1745 var nvInput = $(this).parents('.product_order-count').find('input'), 1746 nvInputVal = nvInput.val() * 1 + 1; 1747 nvInput.val(nvInputVal < 1 ? 1 : nvInputVal); 1748 }) 1749 $(document).on('click', '.product_order-count_minus', function(e) { 1750 var nvInput = $(this).parents('.product_order-count').find('input'), 1751 nvInputVal = nvInput.val() * 1 - 1; 1752 nvInput.val(nvInputVal < 1 ? 1 : nvInputVal); 1753 }) 1754 $(document).on('change', '#product_order-count input', function(e) { 1755 if ($(this).val() < 1) { 1756 $(this).val(1); 1757 } 1758 }) 1759 1760 1761 1762 $(document).on('click', 'a.oneclick', function(e) { 1763 e.preventDefault(); 1764 $('#form1click .oneclick-name').text($(this).data('name')); 1765 $('#form1click input[name=oneclick-name]').val($(this).data('name')); 1766 $('#form1click input[name=oneclick-id]').val($(this).data('id')); 1767 $('#form1click input[name=oneclick-price]').val($(this).data('price')); 1768 $.fancybox({ 1769 type: 'inline', 1770 content: $($(this).attr('href')), 1771 maxWidth: '320', 1772 height: '570', 1773 autoSize: false, 1774 helpers: { 1775 overlay: { 1776 locked: false 1777 } 1778 } 1779 }); 1780 }) 1781 $(document).on('click', 'input[name=submit-oneclick]', function(e) { 1782 $('#form1click .form-zakaz__errors').hide(); 1783 if ($('#form1click input[name=one_name]').val() == '' || $('#form1click input[name=one_phone]').val() == '' || !$('#form1click #consent').is(':checked')) { 1784 $('#form1click .form-zakaz__errors').text('ÐаполниÑе обÑзаÑелÑнÑе полÑ').show(); 1785 } else { 1786 let orderdata = $('#form1click form').serialize(); 1787 grecaptcha.ready(function() { 1788 grecaptcha.execute('6Lftc9kZAAAAAHdoopPrw3MPQh0XkDpAY7asbJR8', { action: 'click' }).then(function(token) { 1789 //console.log(token); 1790 orderdata = orderdata + '&recaptcha_response=' + token; 1791 console.log(orderdata); 1792 if (token && token != null && token != '') { 1793 1794 1795 $.ajax({ 1796 type: "POST", 1797 url: "/bitrix/templates/corp_services_blue/include/oneclick.php", 1798 data: orderdata, 1799 success: function(res) { 1800 if (res == 'error') { 1801 $('#form1click .form-zakaz__errors').text('ЧÑо-Ñо поÑло Ð
1801½Ðµ Ñак ...').show(); 1802 } else { 1803 $('#form1click .form-zakaz__left').html('<h2>Ðаказ â' + res + ' оÑоÑмлен.</h2><p>ÐÑ ÑвÑжемÑÑ Ñ Ðами в ближайÑее вÑемÑ</p>').show(); 1804 } 1805 } 1806 }); 1807 1808 } 1809 }); 1810 1811 }); 1812 } 1813 }) 1814 1815 $('#divForm1 .update-captcha').on('click', function() { 1816 $.ajax({ 1817 url: '/captcha.php', 1818 type: 'post', 1819 data: 'captcha=yes', 1820 success: function(data) { 1821 $('#divForm1 .captcha_pic').attr('src', '/bitrix/tools/captcha.php?captcha_sid=' + data); 1822 $('#divForm1 input[name="divForm1_captcha_sid"]').val(data); 1823 $('#divForm1 .captcha-err').html('ÐведиÑе код Ñ ÐºÐ°ÑÑинки:<span class="asterisk"> *</span>'); 1824 } 1825 }); 1826 return false; 1827 }); 1828 1829 $('.uniSform').on('click', function(e) { 1830 e.preventDefault(); 1831 let this_ = $(this); 1832 1833 if (!window.MsndrPopup) { 1834 this_.addClass('load'); 1835 addScriptToHead('https://ru.msndr.net/subscriptions/c459d69b0ffd3f543fa1d94ec7a13f1f/popup.js'); 1836 } 1837 let waitMsndr = setInterval(function() { 1838 if (typeof window.MsndrPopup !== 'undefined') { 1839 clearInterval(waitMsndr); 1840 MsndrPopup.show('c459d69b0ffd3f543fa1d94ec7a13f1f'); 1841 setTimeout(function() { 1842 this_.removeClass('load'); 1843 }, 1500); 1844 } 1845 }, 500); 1846 }) 1847 1848}); 1849 1850// ФÑнкÑÐ¸Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÑÐµÑ Ñег в head Ñ ÑказаннÑм src 1851function addScriptToHead1(src) { 1852 var script = document.createElement('script'); 1853 script.src = src; 1854 script.setAttribute('async', ''); 1855 document.head.appendChild(script); 1856} 1857 1858// ÐобавлÑем JivoSite 1859// ÐодклÑÑиÑÑÑ Ð»Ð¸Ð±Ð¾ ÑеÑез 7 ÑекÑнд, либо на пеÑвÑй ÑкÑолл 1860addEventListener("DOMContentLoaded", (event) => { 1861 function loadInputMask() { 1862 window.removeEventListener('scroll', loadInputMask); 1863 clearTimeout(waitForInputMask); 1864 1865 addScriptToHead1('//code.jivo.ru/widget/P1BxkwPnmV'); 1866 } 1867 var waitForInputMask = setTimeout(loadInputMask, 7000); 1868 window.addEventListener('scroll', loadInputMask); 1869}); 1870 1871$(function(){ 1872 $('.categories_list.section_id_1 .section_show_all').on('click', function(){ 1873 $('.categories_list.section_id_1 .show').toggleClass('hidden'); 1874 $(this).toggleClass('active'); 1875 if($(this).hasClass('active')){ 1876 $(this).text('СкÑÑÑÑ'); 1877 }else{ 1878 $(this).text('ÐоказаÑÑ Ð²Ñе'); 1879 } 1880 }) 1881})
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.