1window.readyTest = function() { 2 $(document).on('mousedown', '.ya-share2__link', function(e){ 3 if ($(this).closest('.product_card_container').length) { 4 if ($(this).closest('li').hasClass('ya-share2__item_service_vkontakte')) { 5 yaCounter15466654.reachGoal('sendtovk'); 6 } 7 if ($(this).closest('li').hasClass('ya-share2__item_service_facebook')) { 8 yaCounter15466654.reachGoal('sendtofb'); 9 } 10 if ($(this).closest('li').hasClass('ya-share2__item_service_odnoklassniki')) { 11 yaCounter15466654.reachGoal('sendtook'); 12 } 13 } 14 else if ($(this).closest('.basket_container').length) { 15 if ($(this).closest('li').hasClass('ya-share2__item_service_vkontakte')) { 16 yaCounter15466654.reachGoal('basket_vk_share'); 17 } 18 if ($(this).closest('li').hasClass('ya-share2__item_service_facebook')) { 19 yaCounter15466654.reachGoal('basket_fb_share'); 20 } 21 if ($(this).closest('li').hasClass('ya-share2__item_service_odnoklassniki')) { 22 yaCounter15466654.reachGoal('basket_ok_share'); 23 } 24 } 25 else if ($('body').attr('class').indexOf('page_news_') >= -1) { 26 if ($(this).closest('li').hasClass('ya-share2__item_service_vkontakte')) { 27 yaCounter15466654.reachGoal('newstovk'); 28 } 29 if ($(this).closest('li').hasClass('ya-share2__item_service_facebook')) { 30 yaCounter15466654.reachGoal('newstofb'); 31 } 32 if ($(this).closest('li').hasClass('ya-share2__item_service_odnoklassniki')) { 33 yaCounter15466654.reachGoal('newstook'); 34 } 35 } 36 }); 37 38 $('.long-check__btn').click(function(){ 39 let $this = $(this); 40 41 $this.toggleClass('js__open'); 42 $('.long-check__form').slideToggle(); 43 $('html, body').animate({ scrollTop: $(".long-check__form").offset().top - 20}, 500); 44 }); 45 46 if ($('.left_catalog .left_catalog_hide_active').length) { 47 $('.left_catalog_hide_active').click(function(e){ 48 $('.left_catalog').toggleClass('left_catalog_hide'); 49 }); 50 } 51 52 $('#page_content').on('mousewheel', '.shop_list_cont_sp', function(e){ 53 return; 54 if (typeof(e.originalEvent.deltaY) != 'undefined') { 55 $(window).scrollTop($(window).scrollTop() + e.originalEvent.deltaY); 56 } 57 e.preventDefault(); 58 return false; 59 }); 60 61 $(".seo-text-btn").click(function(){ 62 let $this = $(this), 63 $parent = $this.closest(".seo-text"); 64 65 $('.seo-text__text--full').slideToggle(300); 66 67 $parent.toggleClass("js__opened"); 68 }); 69 70 /*$('.prop--multiple').each(function(){ 71 var $addBtn = $('<a/>') 72 .addClass('form_file_add_link') 73 .addClass('btn') 74 .addClass('btn_blue') 75 .attr('href', 'javascript:void(0);') 76 .text('ÐобавиÑÑ ÐµÑÑ'); 77 $addBtn.appendTo($(this)); 78 $addBtn.click(function(e){ 79 propId = $(this).closest('.prop--multiple').attr('data-property-id'); 80 count = $(this).closest('.prop--multiple').find('.bl_input_file').length; 81 $newFile = $(this).closest('.prop--multiple').find('.bl_input_file').first().clone(); 82 $newFile.find('.filename').val(''); 83 $newFile.insertBefore($(this).closest('.prop--multiple').find('.bl_attention_file')); 84 $newFile.find('[name="PROPERTY['+propId+'][0]"]').attr('name', 'PROPERTY['+propId+']['+count+']'); 85 $newFile.find('[name="PROPERTY_FILE_'+propId+'_0"]').attr('name', 'PROPERTY_FILE_'+propId+'_'+count); 86 }); 87 });*/ 88 window.propMultipleAddButton(); 89 $(document).on('change', '.bl_input_file [type="file"]', function(e){ 90 if ($(this)[0].files.length) { 91 filename = $(this)[0].files[0].name; 92 if(!$(this).closest('.bl_input_file').find('.bl_input_file__delete').length) 93 { 94 $deleteLink=$('<a/>'); 95 $deleteLink.addClass('bl_input_file__delete'); 96 $deleteLink.text('ÑдалиÑÑ Ñайл'); 97 $deleteLink.attr('href', 'javascript:void(0)'); 98 $(this).closest('.bl_input_file').append($deleteLink); 99 } 100 } 101 else { 102 filename = ''; 103 $(this).closest('.bl_input_file').find('.bl_input_file__delete').remove(); 104 } 105 $(this).closest('.bl_input_file').find('.filename').val(filename); 106 }); 107 108 $(document).on('click touchstart', '.bl_input_file .bl_input_file__delete', function(e){ 109 const fileInput = $(this).closest('.bl_input_file').find('[type="file"]'); 110 fileInput.val('').trigger('change'); 111 fileInput[0].dispatchEvent(new Event('change')); 112 return false;
113 }); 114 115 $('.suppliers_edu_slider').slick({ 116 dots: false, 117 infinite: true, 118 speed: 600, 119 slide: '.suppliers_edu_slider__item', 120 slidesToShow: 1, 121 slidesToScroll: 1, 122 touchMove: false, 123 pauseOnHover: false, 124 autoplay: true, 125 fade: true, 126 cssEase: 'linear', 127 }); 128 // $('body:not(.test) .pr_card_images_carousel').slick({ 129 // dots: false, 130 // infinite: true, 131 // speed: 600, 132 // slide: '.pr_card_images_slide', 133 // slidesToShow: 1, 134 // slidesToScroll: 1, 135 // touchMove: false, 136 // pauseOnHover: false, 137 138 // }); 139 140 $('.bl_imp_carousel').slick({ 141 dots: true, 142 arrow: true, 143 infinite: true, 144 speed: 600, 145 slide: '.bl_imp_slide', 146 slidesToShow: 1, 147 slidesToScroll: 1, 148 touchMove: false, 149 pauseOnHover: false, 150 autoplay: true, 151 autospeed: 2000, 152 responsive: [ 153 { 154 breakpoint: 800, 155 settings: { 156 dots: false 157 } 158 } 159 ] 160 }); 161 162 $('.job-advantages__slider').slick({ 163 dots: false, 164 arrow: true, 165 infinite: true, 166 speed: 600, 167 slide: '.job-advantages__slide', 168 slidesToShow: 3, 169 slidesToScroll: 1, 170 touchMove: false, 171 pauseOnHover: false, 172 autoplay: true, 173 autospeed: 2000, 174 responsive: [ 175 { 176 breakpoint: 800, 177 settings: { 178 slidesToShow: 1.03, 179 } 180 } 181 ] 182 }); 183 184 $('.m_promo_slider').slick({ 185 dots: false, 186 arrow: false, 187 infinite: true, 188 speed: 600, 189 slide: '.m_promo_slide', 190 slidesToShow: 1, 191 slidesToScroll: 1, 192 touchMove: false, 193 pauseOnHover: false, 194 autoplay: true, 195 autospeed: 5000, 196 fade: true, 197 cssEase: 'linear', 198 responsive: [ 199 { 200 breakpoint: 1025, 201 settings: { 202 dots: true, 203 fade: false, 204 } 205 } 206 ] 207 }); 208 209 $('.bl_mobileapp_phone_carousel').on({ 210 beforeChange: function(event, slick, current_slide_index, next_slide_index) { 211 jQuery('.bl_mobile_carousel_links_carousel .slick-slide').removeClass('slick-current'); 212 jQuery('.bl_mobile_carousel_links_carousel .slick-slide[data-slick-index='+next_slide_index+']').addClass('slick-current'); 213 } 214 }).slick({ 215 dots: false, 216 arrow: false, 217 infinite: true, 218 speed: 300, 219 slide: '.bl_mobileapp_phone_slide', 220 slidesToShow: 1, 221 slidesToScroll: 1, 222 touchMove: false, 223 pauseOnHover: false, 224 fade: true, 225 cssEase: 'linear', 226 asNavFor: '.bl_mobile_carousel_links_carousel', 227 autoplay: true, 228 autospeed: 2000, 229 230 }); 231 232 $('.bl_mobile_carousel_links_carousel').slick({ 233 dots: false, 234 arrow: false, 235 infinite: true, 236 speed: 600, 237 slide: '.bl_mobile_carousel_links_slide', 238 slidesToShow: 5, 239 slidesToScroll: 1, 240 touchMove: false, 241 pauseOnHover: false, 242 asNavFor: '.bl_mobileapp_phone_carousel', 243 focusOnSelect: true 244 }); 245 246 247 $('.faq_item_question').on('click', function(){ 248 249 var $that = $(this); 250 251 if($that.hasClass('active')){ 252 253 $that.removeClass('active'); 254 $that.next().slideUp(); 255 } 256 else{ 257 $('.faq_item_answer').slideUp(); 258 $('.faq_item_question').removeClass('active'); 259 260 $(this).toggleClass('active'); 261 $(this).next().slideToggle(); 262 263 } 264 265 }); 266 267 // пеÑеÑабоÑка ваканÑий 268 $(document).on('click', '.job-accordeon__item-top', function(){ 269 var $this = $(this); 270 $this.toggleClass('active'); 271 $this.next().slideToggle(); 272 }); 273 274 $('.job-faq__item-top').on('click', function(){ 275 var $this = $(this); 276 if($this.hasClass('active')){ 277 $this.removeClass('active'); 278 $this.next().slideUp(); 279 } 280 else{ 281 $('.job-faq__item-cont').slideUp(); 282 $('.job-faq__item-top').removeClass('active'); 283 $(this).toggleClass('active'); 284 $(this).next().slideToggle(); 285 } 286 }); 287 288 $('.text-hide__btn').on('click', function(){ 289 $(this).prev().slideToggle(); 290 $(this).toggleClass('active'); 291 }); 292 293 // $('.job-select__select').selectize({ 294 // plugins: ["remove_button"], 295 // onDropdownOpen : function(elem) { 296 // var selected_val = $(this.$control).find('.item').attr('data-value'); 297 // this.default_val = selected_val; 298 // this.clear(true); 299 // }, 300 // onDropdownClose : function(elem) { 301 // if (!this.getValue() && typeof(this.default_val) != 'undefined') { 302 // this.setValue(this.default_val); 303 // } 304 // $(this.$control).trigger('change'); 305 // }, 306 // }); 307 308 // добавÑÑе к Ð·Ð°ÐºÐ°Ð·Ñ Ð² коÑзине 309 $('.cart-product__list').slick({ 310 slidesToShow: 4, 311 slidesToScroll: 1, 312 infinite: false, 313 // variableWidth: true, 314 responsive: [ 315 { 316 breakpoint: 768, 317 settings: { 318 slidesToShow: 3.3, 319 }, 320 }, 321 { 322 breakpoint: 640, 323 settings: { 324 slidesToShow: 2.3, 325 } 326 }, 327 { 328 breakpoint: 380, 329 settings: { 330 slidesToShow: 2.1, 331 } 332 } 333 ] 334 }); 335 336 // мои Ð·Ð°ÐºÐ°Ð·Ñ 337 $('.order-item__slider').slick({ 338 slidesToShow: 5, 339 slidesToScroll: 1, 340 // variableWidth: true, 341 infinite: false 342 }); 343 344 $('.b_bl_magazine_carousel').slick({ 345 dots: true, 346 infinite: true, 347 speed: 600,
348 slide: '.b_bl_magazine_slide', 349 arrows: false, 350 slidesToShow: 1, 351 slidesToScroll: 1, 352 touchMove: false, 353 pauseOnHover: false, 354 }); 355 356 357 /** 358 * Ð¡Ð»Ð¹Ð´ÐµÑ Ð´Ð»Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ Howto 359 */ 360 if ($(window).width() > 800) { 361 $('.how-to-slider .main-slider .container').slick({ 362 dots: true, 363 infinite: true, 364 speed: 600, 365 slide: 'figure', 366 slidesToShow: 1, 367 slidesToScroll: 1, 368 touchMove: false, 369 pauseOnHover: false, 370 autoplay: true, 371 arrows: true, 372 autospeed: 5000, 373 fade: true, 374 asNavFor: ".how-to-slider .list", 375 cssEase: 'linear', 376 //variableWidth: true 377 }); 378 379 $('.how-to-slider .list').slick({ 380 dots: false, 381 infinite: true, 382 speed: 600, 383 slide: 'li', 384 slidesToShow: 1, 385 slidesToScroll: 1, 386 touchMove: false, 387 pauseOnHover: false, 388 arrows: false, 389 //autospeed: 3000, 390 fade: true, 391 //vertical: true, 392 asNavFor: ".how-to-slider .main-slider .container", 393 cssEase: 'linear' 394 }); 395 } 396 /****!СлайдеÑ!******/ 397 398 399 $('.b-city_btn .btn_blue').on('click', function(){ 400 401 $(this).parent().prev().slideToggle(); 402 $(this).parent().toggleClass('active'); 403 404 }); 405 406 win_width = $(window).width(); 407 if (win_width < 430) { 408 magazine_slides_count = 1; 409 } 410 else if (win_width < 720) { 411 magazine_slides_count = 2; 412 } 413 else if (win_width < 1000) { 414 magazine_slides_count = 3; 415 } 416 else { 417 magazine_slides_count = 4; 418 } 419 $('.bl_magazine_carousel').slick({ 420 dots: false, 421 infinite: true, 422 speed: 600, 423 slide: '.bl_magazine_slide', 424 slidesToShow: magazine_slides_count, 425 slidesToScroll: 1, 426 touchMove: false, 427 pauseOnHover: false, 428 }); 429 430 $('.btn_show_hide .btn').on('click', function(){ 431 432 $(this).parent().prev().slideToggle(); 433 $(this).parent().toggleClass('active'); 434 435 }); 436 437 438 $('.lk_cat_header_item').on('click', function(){ 439 if ($(this).hasClass('select_shop')) 440 $('[name=SELECT_SHOP]').val('Y'); 441 else 442 $('[name=SELECT_SHOP]').val('N'); 443 $(this).parent().find('.lk_cat_header_item').removeClass('lk_cat_header_item_active'); 444 $(this).addClass('lk_cat_header_item_active'); 445 $(this).parent().next().find('.lk_cat_cont_item_active').removeClass('lk_cat_cont_item_active'); 446 $(this).parent().next().find('.lk_cat_cont_item:eq(' + $(this).index() + ')').addClass('lk_cat_cont_item_active'); 447 448 $.cookie('lk_cat_header_item_active', $(this).attr('data-lk-cat-item-type')); 449 }); 450 $('.lk_cat_header_item_active').click(); 451 452 453 454 455 $(document).on('click', '.bl_item_accord_head', function(){ 456 457 var $win_width = $(window).width(); 458 var $that = $(this); 459 460 461 462 463 $that.toggleClass('active'); 464 $that.next().slideToggle(); 465 466 467 /* else{ 468 if($that.hasClass('active')){ 469 470 $that.removeClass('active'); 471 $that.next().slideUp(); 472 } 473 else{ 474 $('.bl_item_accord_c').slideUp(); 475 $('.bl_item_accord_head').removeClass('active'); 476 477 $(this).toggleClass('active'); 478 $(this).next().slideToggle(); 479 480 } 481 } */ 482 483 }); 484 485 486 $('#show_menu').on('click', function(){ 487 488 $('.sidebar').toggleClass('show_menu'); 489 490 }); 491 492 $('#show_catalog').on('click', function(){ 493 494 $('.sidebar').addClass('show_catalog'); 495 496 }); 497 498 499 $('#back_menu_hide').on('click', function(){ 500 501 $('.sidebar').removeClass('show_menu'); 502 503 }); 504 505 $('#back_catalog_hide').on('click', function(){ 506 507 $('.sidebar').removeClass('show_catalog'); 508 509 }); 510 setPhoneMask($('.phoneInputMask')); 511 512 513} 514 515var chunkArray = function(array, size) { 516 var result = []; 517 for (var i = 0; i < array.length; i += size) 518 result.push(array.slice(i, i + size)) 519 520 return result; 521}; 522 523 524$(window).on('load resize', function(){ 525 $(".catalog_container_view_pl .catalog_cont_row").each(function(){ 526 $(this).find('.product_item_name').height( 527 Math.max.apply( 528 null, 529 $(this).find('.product_item_name').map( 530 function(){ 531 return $(this).height(); 532 } 533 ) 534 ) 535 ); 536 537 $(this).find(".product_item_bottom").height( 538 Math.max.apply( 539 null, 540 $(this).find('.product_item_bottom').map( 541 function(){ 542 return $(this).height(); 543 } 544 ) 545 ) 546 ); 547 }); 548 549}); 550 551 552$(window).on('load resize', function(){ 553 $('.bl_howto_item_default .bl_howto_item_name').height(Math.max.apply(null, $('.bl_howto_item_default .bl_howto_item_name').map(function(){ return $(this).height(); }))); 554}); 555 556 557$(window).on('load resize', function(){ 558 $('.bl_actions_item_cont .product_item_name').height(Math.max.apply(null, $('.bl_actions_item_cont .product_item_name').map(function(){ return $(this).height(); }))); 559}); 560 561$(window).on('load resize', function(){ 562 $('.product_card_bottom_prs .product_item_name').height(Math.max.apply(null, $('.product_card_bottom_prs .product_item_name').map(function(){ return $(this).height(); }))); 563}); 564 565$(window).on('load resize', function(){ 566 $('.bl_actions_item_cont .product--discount').height(Math.max.apply(null, $('.bl_actions_item_cont .product--discount').map(function(){ return $(this).height(); }))); 567}); 568 569 570$(window).on('load resize', function(){ 571 $('.catalog_container_view_pl .product_item_images').height(Math.max.apply(null, $('.catalog_container_view_pl .product_item_images').map(function(){ return $(this).height(); }))); 572}); 573 574$(window).scroll(function() { 575 var scroll = $(window).scrollTop(); 576 577 if (scroll >= 10) { 578 $('header').addClass('scroll_header'); 579 } else { 580 $('header').removeClass('scroll_header'); 581 } 582}); 583 584 585$( document ).ready(function() { 586 $(document).on('click', '#hamburger-icon', function() { 587 $(this).toggleClass('active'); 588 $('#main').toggleClass('sidebar_active') 589 return false;
590 }); 591 592 $('[rel=example_group]').fancybox(); 593 594 // $(".seo-text-btn").click(function(){ 595 // let $this = $(this), 596 // $parent = $this.closest(".seo-text"); 597 598 // $('.seo-text__text--full').slideToggle(300); 599 600 // $parent.toggleClass("js__opened"); 601 // }); 602 603 604}); 605 606 607window.propMultipleAddButton = function() { 608 $('.prop--multiple').each(function(){ 609 if($(this).find(".form_file_add_link").length === 0) 610 { 611 var $addBtn=$('<a/>') 612 .addClass('form_file_add_link') 613 .addClass('btn') 614 .addClass('btn_blue') 615 .attr('href', 'javascript:void(0);') 616 .attr('onchange', 'upload_check(this)') 617 .text('ÐобавиÑÑ ÐµÑÑ'); 618 $addBtn.appendTo($(this)); 619 $addBtn.click(function( e ) 620 { 621 propId =$(this).closest('.prop--multiple').attr('data-property-id'); 622 count =$(this).closest('.prop--multiple').find('.bl_input_file').length; 623 $newFile=$(this).closest('.prop--multiple').find('.bl_input_file').first().clone(); 624 $newFile.addClass('bl_input_file--add'); 625 $newFile.append('<span class="form_file_delete_link">УдалиÑÑ</span>'); 626 $newFile.find('.form_file_delete_link').click(function(){ 627 $(this).parent('.bl_input_file--add').remove(); 628 }) 629 $newFile.find('.filename').val(''); 630 $newFile.insertBefore($(this).closest('.prop--multiple').find('.bl_attention_file')); 631 $newFile.find('[name="PROPERTY[' + propId + '][0]"]').attr('name', 'PROPERTY[' + propId + '][' + count + ']'); 632 $newFile.find('[name="PROPERTY_FILE_' + propId + '_0"]').attr('name', 'PROPERTY_FILE_' + propId + '_' + count); 633 }); 634 } 635 }); 636} 637 638function upload_check(el) 639 { 640 let upl = document.getElementById("file_id"); 641 let max = 20971520; 642 if(el && el.files.length && el.files[0].size > max) 643 { 644 showHeaderMessage("ÐакÑималÑнÑй ÑÐ°Ð·Ð¼ÐµÑ Ð·Ð°Ð³ÑÑжаемого Ñайла 20мб", "error"); 645 el.value = ""; 646 } 647 }; 648 649$(window).on('load resize', function(){ 650 $('.bl_podarki_name_tb').height(Math.max.apply(null, $('.bl_podarki_name_tb').map(function(){ return $(this).height(); }))); 651}); 652 653$(window).on("load", function() { 654 if ($(".pr_card_char_item--COUNTRY p").length){ 655 var text = $(".pr_card_char_item--COUNTRY p").text(); 656 657 if (text.length > 11) 658 $(".pr_card_char_item--COUNTRY").addClass("flag-move") 659 } 660}) 661 662$(function(){ 663 $("body").on("click", ".promo-app-discount-popup .close", function(){ 664 $(this).closest(".promo-app-discount-popup").addClass("closed"); 665 Cookies.set("promoShowed4", true); 666 }); 667 668 $("body").on("click", "#addAllFavorites", function(){ 669 670 let body = new FormData; 671 body.append('ajax_command', 'addAllFavorites'); 672 body.append('z', '1'); 673 fetch('/local/php_interface/ajax/', { method: 'POST', body }) 674 .then(response => response.json()) 675 .then(json => { 676 location.href = location.href; 677 }) 678 .catch(console.error) 679 .finally(() => { 680 681 }) 682 }); 683 684 $("body").on("change", "#korp_order", function(){ 685 let body = new FormData; 686 body.append('ajax_command', 'korp_order'); 687 var korpOrder = document.getElementById('korp_order'); 688 if (korpOrder.checked){ 689 body.append('KORP_ORDER', korpOrder.value); 690 }else{ 691 body.append('KORP_ORDER', ""); 692 } 693 body.append('z', '1'); 694 695 696 fetch('/local/php_interface/ajax/', { method: 'POST', body }) 697 .then(response => response.json()) 698 .then(json => { 699 location.href = location.href; 700 }) 701 .catch(console.error) 702 .finally(() => { 703 704 }) 705 }); 706}); 707 708window.giftCardCallery = function() { 709 // gift-card 710 $('.gift-card__slider').each(function(){ 711 let topGallery = $(this).find('.gift-card__gallery:not(.slick-initialized)'); 712 let thumbGallery = $(this).find('.gift-card__thumb:not(.slick-initialized)'); 713 topGallery.slick({ 714 slidesToShow: 1, 715 slidesToScroll: 1, 716 speed: 300, 717 asNavFor: '.gift-card__thumb' 718 }); 719 thumbGallery.slick({ 720 slidesToShow: 3, 721 slidesToScroll: 1, 722 asNavFor: topGallery, 723 focusOnSelect: true, 724 arrows: false, 725 speed: 300, 726 }); 727 }); 728} 729 730window.specialSliderInit = function() { 731 // special-slider 732 $('.special-slider').slick({ 733 slidesToShow: 2, 734 slidesToScroll: 1, 735 autoplay: true, 736 autoplaySpeed: 3000, 737 infinite: true, 738 }); 739} 740 741 742/* gift-card__design */ 743window.initTabs = () => { 744 const allTabs = document.querySelectorAll("[data-tabs]") 745 746 if (allTabs) {
747 allTabs.forEach((tabs) => { 748 const arr = Array.from(tabs.children) 749 const tabPages = document.querySelectorAll(`${tabs.getAttribute("data-tabs")} > *`) 750 arr.forEach((elem) => { 751 elem.addEventListener("click", () => { 752 arr.forEach((e) => e.classList.remove("active")) 753 tabPages.forEach((item) => item.classList.remove("active")) 754 755 elem.classList.add("active") 756 try { 757 tabPages[elem.getAttribute("data-tab-page")].classList.add("active") 758 } catch (e) { 759 console.error(e) 760 } 761 }) 762 }) 763 }) 764 } 765} 766
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.