1/*closestchild*/ 2;(function($){ 3 $.fn.closestChild = function(selector) { 4 var $children, $results; 5 6 $children = this.children(); 7 8 if ($children.length === 0) 9 return $(); 10 11 $results = $children.filter(selector); 12 13 if ($results.length > 0) 14 return $results; 15 else 16 return $children.closestChild(selector); 17 }; 18})(window.jQuery); 19/* /. closestchild*/ 20 21 22$(function(){ 23 24 let top_show = 280, speed = 500, $backButton = $('#up'); 25 $(window).scroll(function () { 26 if ($(this).scrollTop() > top_show) { 27 $backButton.addClass('active'); 28 } 29 else { 30 $backButton.removeClass('active'); 31 } 32 }); 33 $backButton.click(function () { 34 scrollto(0, speed); 35 }); 36 37 // scrollto 38 window.scrollto = function(destination, speed) { 39 if (typeof speed == 'undefined') { 40 speed = 800; 41 } 42 jQuery("html:not(:animated),body:not(:animated)").animate({scrollTop: destination-60}, speed); 43 }; 44 $("a.scrollto").click(function () { 45 var elementClick = $(this).attr("href") 46 var destination = $(elementClick).offset().top; 47 scrollto(destination); 48 return false; 49 }); 50 // end scrollto 51 52 53 // fancybox 54 $('.fancybox').fancybox({ 55 padding: 0, 56 helpers: { 57 overlay: { 58 locked: false 59 } 60 }, 61 lang : 'ru', 62 i18n : { 63 'ru' : { 64 CLOSE : 'ÐакÑÑÑÑ', 65 NEXT: "Ðалее", 66 PREV: "Ðазад", 67 ERROR: "ÐапÑоÑеннÑе даннÑе не могÑÑ Ð±ÑÑÑ Ð·Ð°Ð³ÑÑженÑ. <br/> ÐовÑоÑиÑе попÑÑÐºÑ Ð¿Ð¾Ð·Ð¶Ðµ.", 68 PLAY_START: "ÐаÑаÑÑ Ñлайд-ÑоÑ", 69 PLAY_STOP: "ÐавеÑÑиÑÑ Ñлайд-ÑоÑ", 70 FULL_SCREEN: "Ðа веÑÑ ÑкÑан", 71 THUMBS: "ÐиниаÑÑÑÑ", 72 DOWNLOAD: "СкаÑаÑÑ", 73 SHARE: "ÐоделиÑÑÑÑ", 74 ZOOM: "УвелиÑиÑÑ" 75 } 76 }, 77 closeExisting: true 78 }); 79 80 $('.fancyboxModal').fancybox({ 81 autoResize:true, 82 padding: 0, 83 fitToView : false, 84 maxWidth: '100%', 85 scrolling : "no", 86 touch: false, 87 autoFocus: false, 88 lang : 'ru', 89 i18n : { 90 'ru' : { 91 CLOSE : 'ÐакÑÑÑÑ', 92 NEXT: "Ðалее", 93 PREV: "Ðазад", 94 } 95 }, 96 closeExisting: true 97 }); 98 99 $('.fancyboxvideo').fancybox({ 100 backFocus : false, 101 padding: 0, 102 width: '1300px', 103 height: '', 104 maxWidth: '100%', 105 maxHeight: '100%', 106 helpers: { 107 overlay: { 108 locked: false 109 } 110 }, 111 lang : 'ru', 112 i18n : { 113 'ru' : { 114 CLOSE : 'ÐакÑÑÑÑ', 115 NEXT: "Ðалее", 116 PREV: "Ðазад", 117 } 118 } 119 }); 120 // end fancybox 121 122 123 124 // validation 125 $('.rf').each(function(){ 126 var item = $(this), 127 btn = item.find('.btn'); 128 129 function checkInput(){ 130 item.find('select.required').each(function(){ 131 if($(this).val() == '0'){ 132 $(this).parents('.form-group').addClass('rferr'); 133 $(this).parents('.form-group').find('.rferr-message').show(); 134 } else { 135 $(this).parents('.form-group').removeClass('rferr'); 136 } 137 }); 138 139 item.find('input[type=text].required').each(function(){ 140 if($(this).val() != ''){ 141 $(this).removeClass('rferr'); 142 } else { 143 $(this).addClass('rferr'); 144 $(this).parent('.form-group').find('.rferr-message').show(); 145 } 146 }); 147 148 item.find('input[type=tel].required').each(function(){ 149 if($(this).val() != ''){ 150 $(this).removeClass('rferr'); 151 } else { 152 $(this).addClass('rferr'); 153 $(this).parent('.form-group').find('.rferr-message').show(); 154 } 155 }); 156 157 item.find('textarea.required').each(function(){ 158 if($(this).val() != ''){ 159 $(this).removeClass('rferr'); 160 } else { 161 $(this).addClass('rferr'); 162 $(this).parent('.form-group').find('.rferr-message').show(); 163 } 164 }); 165 166 item.find('input[type=email]').each(function(){ 167 var regexp = /^([a-z0-9_-]+\.)*[a-z0-9_-]+@[a-z0-9_-]+(\.[a-z0-9_-]+)*\.[a-z]{2,6}$/i; 168 var $this = $(this); 169 if($this.hasClass('required')){ 170 if (regexp.test($this.val())) { 171 $this.removeClass('rferr'); 172 } else { 173 $this.addClass('rferr'); 174 $(this).parent('.form-group').find('.rferr-message').show(); 175 } 176 } else{ 177 if($this.val() != ''){ 178 if (regexp.test($this.val())) { 179 $this.removeClass('rferr'); 180 }else { 181 $this.addClass('rferr'); 182 $(this).parent('.form-group').find('.rferr-message').show(); 183 } 184 } else{ 185 $this.removeClass('rferr'); 186 } 187 } 188 }); 189 190 item.find('input[type=checkbox].required').each(function(){ 191 if($(this).is(':checked')){ 192 $(this).removeClass('rferr'); 193 } else { 194 $(this).addClass('rferr'); 195 $(this).parent('.form-group').find('.rferr-message').show(); 196 } 197 }); 198 } 199 200 btn.click(function(){ 201 checkInput(); 202 var sizeEmpty = item.find('.rferr:visible').length; 203 if(sizeEmpty > 0){ 204 return false;
205 } else { 206 item.submit(); 207 $.fancybox.close(); 208 } 209 }); 210 }); 211 212 $('select').change(function(){ 213 if($(this).val() == ''){ 214 $(this).parents('.form-group').removeClass('selected'); 215 } else { 216 $(this).parents('.form-group').addClass('selected'); 217 $(this).parents('.form-group').removeClass('rferr'); 218 } 219 }); 220 // end validation 221 222 223 224 // Carousels 225 $('.top-slider').slick({ 226 lazyLoad: 'ondemand', 227 fade: true, 228 infinite: true, 229 slidesToShow: 1, 230 slidesToScroll: 1, 231 autoplay: true, 232 autoplaySpeed: 5000, 233 speed: 2000, 234 arrows: true, 235 prevArrow: '<a href="#" class="slick-prev"></a>', 236 nextArrow: '<a href="#" class="slick-next"></a>', 237 responsive: [ 238 { 239 breakpoint: 992, 240 settings: { 241 //arrows: false, 242 }, 243 }, 244 ] 245 }); 246 247 248 $('.reviews-carousel').slick({ 249 infinite: true, 250 slidesToShow: 3, 251 slidesToScroll: 1, 252 autoplay: true, 253 autoplaySpeed: 5000, 254 speed: 800, 255 arrows: false, 256 lazyLoad: 'ondemand', 257 responsive: [ 258 { 259 breakpoint: 1429, 260 settings: { 261 slidesToShow: 2, 262 }, 263 }, 264 { 265 breakpoint: 991, 266 settings: { 267 slidesToShow: 1, 268 }, 269 }, 270 ] 271 }); 272 273 274 $('.product-gallery-carousel').slick({ 275 lazyLoad: 'ondemand', 276 infinite: true, 277 slidesToShow: 1, 278 slidesToScroll: 1, 279 arrows: false, 280 fade: true, 281 asNavFor: '.product-gallery-carousel-nav' 282 }); 283 284 285 $('.product-gallery-carousel-nav').slick({ 286 lazyLoad: 'ondemand', 287 infinite: true, 288 slidesToShow: 3, 289 slidesToScroll: 1, 290 autoplay: true, 291 autoplaySpeed: 4000, 292 speed: 800, 293 arrows: true, 294 nextArrow: '.carousel-prev', 295 prevArrow: '.carousel-next', 296 asNavFor: '.product-gallery-carousel', 297 vertical: true, 298 focusOnSelect: true, 299 responsive:[ 300 { 301 breakpoint: 1599, 302 settings: { 303 vertical: false, 304 slidesToShow: 4, 305 } 306 }, 307 { 308 breakpoint: 767, 309 settings: { 310 vertical: false, 311 slidesToShow: 3, 312 } 313 }, 314 { 315 breakpoint: 390, 316 settings: { 317 vertical: false, 318 slidesToShow: 2, 319 } 320 } 321 ] 322 }); 323 324 $('.items-carousel-cols4-infinite').slick({ 325 infinite: true, 326 slidesToShow: 4, 327 slidesToScroll: 1, 328 autoplay: true, 329 autoplaySpeed: 5000, 330 speed: 800, 331 arrows: true, 332 prevArrow: '<a href="#" class="slick-prev"></a>', 333 nextArrow: '<a href="#" class="slick-next"></a>', 334 dots: false, 335 responsive: [ 336 { 337 breakpoint: 1299, 338 settings: { 339 slidesToShow: 3, 340 }, 341 }, 342 { 343 breakpoint: 767, 344 settings: { 345 slidesToShow: 2, 346 }, 347 }, 348 { 349 breakpoint: 599, 350 settings: { 351 slidesToShow: 1, 352 }, 353 }, 354 ] 355 }); 356 357 // End Carousels 358 359 360 // пÑовеÑка на Internet Explorer 6-11 361 var isIE = /*@cc_on!@*/false || !!document.documentMode; 362 if(isIE){ 363 $('body').addClass('ie'); 364 } 365 // end 366 367 let menuButton = $('.menu-button'), mobMenuWrap = $('.mobile-menu-wrapper'); 368 menuButton.click(function(){ 369 menuButton.toggleClass('active'); 370 mobMenuWrap.toggleClass('open'); 371 }); 372 $('.mobile-menu-wrapper, .menu-button').click(function(e){
373 if ($(e.target).hasClass('fancyboxModal') == false) { 374 e.stopPropagation(); 375 } 376 }); 377 378 $('.swipe-area, .overlay').swipe({ 379 swipeStatus:function(event, phase, direction, distance, duration, fingers) 380 { 381 if (phase=='move' && direction =='left') { 382 mobMenuWrap.addClass('open'); 383 menuButton.addClass('active'); 384 return false; 385 } 386 if (phase=='move' && direction =='right') { 387 mobMenuWrap.removeClass('open'); 388 menuButton.removeClass('active'); 389 return false; 390 } 391 } 392 }); 393 394 $('body').click(function(){ 395 mobMenuWrap.removeClass('open'); 396 menuButton.removeClass('active'); 397 }); 398 399 400 $('.mobile-menu ul > li').has('ul').addClass('down'); 401 $('.mobile-menu .down > ul').before('<span class="dropdown-button"></span>'); 402 403 404 $('.mobile-menu .dropdown-button').click(function(){ 405 $(this).toggleClass('active'); 406 if($(this).siblings('ul').is(':visible')){ 407 $(this).siblings('ul').slideUp(); 408 }else{ 409 $(this).siblings('ul').slideDown(); 410 } 411 412 }); 413 414 415 if (window.devicePixelRatio > 1) { 416 var lowresImages = $('img[data-retinasrc]'), thiswidth, thisheight; 417 lowresImages.each(function(i) { 418 thiswidth = $(this).width(); 419 thisheight = $(this).height(); 420 421 $(this).attr( 'width', thiswidth ); 422 $(this).attr( 'height', thisheight ); 423 424 var lowres = $(this).attr('src'); 425 var highres = $(this).data('retinasrc'); 426 $(this).attr('src', highres); 427 }); 428 } 429 430 var panel = $('.header-bottom'), pos = $('.header').height() - $('.header-bottom').height(); 431 432 $(window).scroll(function() { 433 if ($(this).scrollTop() > pos && !panel.hasClass('fixed')) { 434 panel.addClass('fixed'); 435 $('.header-push').addClass('fixed'); 436 } else if ($(this).scrollTop() < pos && panel.hasClass('fixed')) { 437 panel.removeClass('fixed'); 438 $('.header-push').removeClass('fixed'); 439 } 440 }); 441 442 // accordion 443 let $thisElement, 444 $thisElementContent, 445 $elements, 446 $elementsContent; 447 448 $('.accordion .item-head').click(function() { 449 $thisElement = $(this).parent(); 450 $thisElementContent = $thisElement.find('.item-body'); 451 $elements = $thisElement.siblings(); 452 $elementsContent = $elements.find('.item-body'); 453 454 $elements.removeClass('active'); 455 $elementsContent.slideUp(); 456 if (!$thisElement.hasClass('active')) { 457 $thisElement.addClass('active'); 458 $thisElementContent.slideDown(); 459 } else { 460 $thisElement.removeClass('active'); 461 $thisElementContent.slideUp(); 462 } 463 464 }); 465 // end accordion 466 467 468 $('.footer .item-title-btn').click(function(){ 469 if(!$(this).parents('.item').hasClass('active')){ 470 $(this).parents('.item').addClass('active') 471 $(this).parents('.item').find('.dropdown').slideDown(); 472 }else{ 473 $(this).parents('.item').removeClass('active'); 474 $(this).parents('.item').find('.dropdown').slideUp(); 475 } 476 }); 477 478 let btn_theme, btn_title; 479 $('[data-theme]').click(function(){ 480 btn_theme = $(this).data('theme'); 481 btn_title = $(this).data('title'); 482 483 $('#themeinput').val(btn_theme); 484 $('#feedback_title').text(btn_title); 485 }); 486 487 $('.header-search-btn').click(function(){ 488 $('.header-search').addClass('active'); 489 $('.header-search input[type="text"]').focus(); 490 }); 491 492 $('.header-search-close').click(function(){ 493 $('.header-search').removeClass('active'); 494 }); 495 496 497 // ASIDE MENU 498 499 500 $('.aside-menu li').has('ul').addClass('down'); 501 $('.aside-menu > ul li.down > ul').before('<span class="dropdown-button"></span>'); 502 503 $('.aside-menu .down .dropdown-button').each(function(){ 504 if($(this).siblings('ul').is(':visible')){ 505 $(this).addClass('active'); 506 } 507 }); 508 509 $('.aside-menu .down .dropdown-button').click(function(){ 510 $(this).parent().toggleClass('open'); 511 if($(this).siblings('ul').is(':visible')){ 512 $(this).siblings('ul').slideUp(); 513 $(this).removeClass('active'); 514 }else{ 515 $(this).siblings('ul').slideDown(); 516 $(this).addClass('active'); 517 } 518 519 }); 520 521 $('.aside-menu-title-xs').click(function(){ 522 $('.aside-menu').toggleClass('active'); 523 }); 524 525 526 // ASIDE MENU END 527 528 function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure ){ 529 var cookie_string = name + "=" + value ; 530 531 if ( exp_y ) 532 { 533 var expires = new Date ( exp_y, exp_m, exp_d ); 534 cookie_string += "; expires=" + expires.toGMTString(); 535 } 536 537 if ( path ) 538 cookie_string += "; path=" + path ; 539 540 if ( domain ) 541 cookie_string += "; domain=" + domain ; 542 543 if ( secure ) 544 cookie_string += "; secure"; 545 546 document.cookie = cookie_string; 547 } 548 549 function get_cookie ( cookie_name ){ 550 var results = document.cookie.match ( '(^|;
550) ?' + cookie_name + '=([^;]*)(;|$)' ); 551 552 if ( results ) 553 return ( unescape ( results[2] ) ); 554 else 555 return null; 556 } 557 558 559 function deleteCookie(name) { 560 set_cookie(name, "", { 561 expires: -1 562 }) 563 } 564 565 $('.modal-cookie .btn').click(function(){ 566 $('.modal-cookie').addClass('cookie-modal-hide'); 567 set_cookie( 'modalcookie', 'cookie-modal-hide' , '', '', '', '/' ); 568 }); 569 570 571 572 // contacts-list-mobile-tabs 573 $('.contacts-list-tabs').on('click', 'li:not(.current)', function() { 574 $(this) 575 .addClass('current').siblings().removeClass('current') 576 .closest('.contacts-list-section').closestChild('.contacts-list-box').removeClass('visible').eq($(this).index()).addClass('visible'); 577 }); 578 579 $('.contacts-list-tabs li').click(function(){ 580 $(this).parent().hide().siblings('.contacts-list-mobile-tab-header').html($(this).html()); 581 $('.contacts-list-mobile-tab-header').removeClass('active'); 582 }); 583 584 $('.contacts-list-mobile-tab-header').click(function(e){ 585 if($(this).hasClass('active')){ 586 $(this).removeClass('active'); 587 $(this).siblings('.contacts-list-tabs').stop().slideUp(0); 588 }else{ 589 $(this).addClass('active'); 590 $(this).siblings('.contacts-list-tabs').stop().slideDown(0); 591 } 592 593 e.stopPropagation(); 594 }); 595 596 $(document).mouseup(function (e){ 597 var div = $(".map-links"); 598 if (!div.is(e.target) 599 && div.has(e.target).length === 0) { 600 $('.contacts-list-mobile-tab-header').removeClass('active'); 601 } 602 }); 603 // ./ contacts-list-mobile-tabs 604 605 606 // Anchor menu 607 608 let lastId, 609 anchorMenu = $(".anchor-menu"), 610 menuItems = anchorMenu.find('li > a[href^="#"]'), 611 scrollItems = menuItems.map(function(){ 612 let item = $($(this).attr("href")); 613 if (item.length) { return item; } 614 }); 615 616 menuItems.click(function(e){ 617 let href = $(this).attr("href"), 618 offsetTop = href === "#" ? 0 : $(href).offset().top-100; 619 $('html, body').stop().animate({ 620 scrollTop: offsetTop 621 }, 500); 622 623 mobMenuWrap.removeClass('open'); 624 menuButton.removeClass('active'); 625 $('body').removeClass('overflow_hidden'); 626 627 e.preventDefault(); 628 }); 629 630 function currentAnchorLink(){ 631 let fromTop = $(this).scrollTop()+200; 632 let cur = scrollItems.map(function(){ 633 if ($(this).offset().top < fromTop) 634 return this; 635 }); 636 cur = cur[cur.length-1]; 637 let id = cur && cur.length ? cur[0].id : ""; 638 if (lastId !== id) { 639 lastId = id; 640 menuItems.parent().removeClass("active").end().filter('[href="#'+id+'"]').parent().addClass("active"); 641 } 642 } 643 currentAnchorLink(); 644 // Bind to scroll 645 $(window).scroll(function(){ 646 currentAnchorLink(); 647 }); 648 649 // End anchor menu 650 651 652 653}); // end ready 654 655 656window.onload = function() { 657 let top_menu_w, 658 top_menu_first_ul_w, 659 candidate_li_w, 660 coming_ul_w, 661 $top_menu_li, 662 this_top_menu_li_w, 663 total_top_menu_li_w=0, 664 $top_menu_more_list = $('.top-menu-more-list'), 665 $top_menu_more_list_sublist = $('.top-menu-more-list-sublist'), 666 windWidth = window.innerWidth; 667 668 function topMenuWidthComparison(){ 669 top_menu_w = $('.top-menu').width()-50; 670 total_top_menu_li_w=0; 671 $('.top-menu > ul:first-of-type > li').each(function(){ 672 $top_menu_li = $(this); 673 this_top_menu_li_w = $top_menu_li.width(); 674 $top_menu_li.attr('data-realwidth', this_top_menu_li_w); 675 total_top_menu_li_w += this_top_menu_li_w; 676 }); 677 if(total_top_menu_li_w > top_menu_w){ 678 if(!$top_menu_more_list.hasClass('active')){ 679 $top_menu_more_list.addClass('active'); 680 } 681 $('.top-menu > ul:first-of-type > li:last-of-type').prependTo($top_menu_more_list_sublist).addClass('transferred'); 682 } 683 } 684
685 function topmenumorelink(){ 686 do{ 687 topMenuWidthComparison() 688 }while (total_top_menu_li_w > top_menu_w); 689 690 if(!$('.top-menu').hasClass('loaded')){ 691 $('.top-menu').addClass('loaded'); 692 } 693 } 694 695 function topmenumorelinkReverse(){ 696 top_menu_w = $('.top-menu').width()-50; 697 top_menu_first_ul_w = $('.top-menu > ul').width(); 698 candidate_li_w = $('.top-menu-more-list-sublist .transferred:first').data('realwidth'); 699 coming_ul_w = top_menu_first_ul_w + candidate_li_w; 700 if(coming_ul_w < top_menu_w){ 701 $('.top-menu-more-list-sublist .transferred:first').appendTo('.top-menu > ul:first-of-type'); 702 } 703 if($('.top-menu-more-list-sublist .transferred').length < 1){ 704 $top_menu_more_list.removeClass('active'); 705 } 706 } 707 708 if(windWidth > 991){ 709 topmenumorelink(); 710 } 711 712 window.addEventListener("resize", function() { 713 windWidth = window.innerWidth; 714 if(windWidth > 991){ 715 topmenumorelink(); 716 topmenumorelinkReverse(); 717 } 718 719 }, false); 720 721 window.addEventListener("orientationchange", function() { 722 windWidth = window.innerWidth; 723 if(windWidth > 991){ 724 topmenumorelink(); 725 topmenumorelinkReverse(); 726 } 727 }, false); 728 729 $('.categories-nav-title').click(function(){ 730 $(this).toggleClass('active'); 731 }); 732}; 733 734 735 736 737 738 739 740 741
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.