1// ============= PRELOADER SCRIPT =================== 2window.onload = function(){ 3 $('#preloader').addClass('hid'); 4 5 if (window.devicePixelRatio > 1) { 6 var lowresImages = $('img[data-retinasrc]'), thiswidth, thisheight; 7 8 lowresImages.each(function(i) { 9 thiswidth = $(this).width(); 10 thisheight = $(this).height(); 11 12 $(this).attr( 'width', thiswidth ); 13 $(this).attr( 'height', thisheight ); 14 15 var lowres = $(this).attr('src'); 16 var highres = $(this).data('retinasrc'); 17 $(this).attr('src', highres); 18 }); 19 } 20}; 21// ============= END PRELOADER SCRIPT =================== 22 23 24/*closestchild*/ 25 26 ;(function($){ 27 $.fn.closestChild = function(selector) { 28 var $children, $results; 29 30 $children = this.children(); 31 32 if ($children.length === 0) 33 return $(); 34 35 $results = $children.filter(selector); 36 37 if ($results.length > 0) 38 return $results; 39 else 40 return $children.closestChild(selector); 41 }; 42 })(window.jQuery); 43 44/* /. closestchild*/ 45 46 47 48$(function(){ 49 50 var top_show = 280; // Ркаком положении полоÑÑ Ð¿ÑокÑÑÑки наÑинаÑÑ Ð¿Ð¾ÐºÐ°Ð· кнопки "ÐавеÑÑ " 51 var speed = 500; // СкоÑоÑÑÑ Ð¿ÑокÑÑÑки 52 var $backButton = $('#up'); 53 $(window).scroll(function () { // ÐÑи пÑокÑÑÑке попадаем в ÑÑÑ ÑÑнкÑÐ¸Ñ 54 /* РзавиÑимоÑÑи Ð¾Ñ Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»Ð¾ÑÑ Ð¿ÑокÑÑкÑи и знаÑÐµÐ½Ð¸Ñ top_show, ÑкÑÑваем или оÑкÑÑваем ÐºÐ½Ð¾Ð¿ÐºÑ "ÐавеÑÑ " */ 55 if ($(this).scrollTop() > top_show) { 56 $backButton.fadeIn(); 57 } 58 else { 59 $backButton.fadeOut(); 60 } 61 }); 62 $backButton.click(function () { // ÐÑи клике по кнопке "ÐавеÑÑ " попадаем в ÑÑÑ ÑÑнкÑÐ¸Ñ 63 /* ÐÐ»Ð°Ð²Ð½Ð°Ñ Ð¿ÑокÑÑÑка навеÑÑ */ 64 scrollto(0, speed); 65 }); 66 67 // scrollto 68 window.scrollto = function(destination, speed) { 69 if (typeof speed == 'undefined') { 70 speed = 800; 71 } 72 jQuery("html:not(:animated),body:not(:animated)").animate({scrollTop: destination-60}, speed); 73 }; 74 $("a.scrollto").click(function () { 75 var elementClick = $(this).attr("href") 76 var destination = $(elementClick).offset().top; 77 scrollto(destination); 78 return false; 79 }); 80 // end scrollto 81 82 // fancybox 83 $('.fancybox').fancybox({ 84 padding: 0, 85 helpers: { 86 overlay: { 87 locked: false 88 } 89 }, 90 lang : 'ru', 91 i18n : { 92 'ru' : { 93 CLOSE : 'ÐакÑÑÑÑ', 94 NEXT: "Ðалее", 95 PREV: "Ðазад", 96 ERROR: "ÐапÑоÑеннÑе даннÑе не могÑÑ Ð±ÑÑÑ Ð·Ð°Ð³ÑÑженÑ. <br/> ÐовÑоÑиÑе попÑÑÐºÑ Ð¿Ð¾Ð·Ð¶Ðµ.", 97 PLAY_START: "ÐаÑаÑÑ Ñлайд-ÑоÑ", 98 PLAY_STOP: "ÐавеÑÑиÑÑ Ñлайд-ÑоÑ", 99 FULL_SCREEN: "Ðа веÑÑ ÑкÑан", 100 THUMBS: "ÐиниаÑÑÑÑ", 101 DOWNLOAD: "СкаÑаÑÑ", 102 SHARE: "ÐоделиÑÑÑÑ", 103 ZOOM: "УвелиÑиÑÑ" 104 } 105 } 106 }); 107 108 $('.fancyboxModal').fancybox({ 109 autoResize:true, 110 padding: 0, 111 fitToView : false, 112 maxWidth: '100%', 113 scrolling : "no", 114 wrapCSS : 'fancybox-animate-wrap', 115 touch: false, 116 autoFocus: false, 117 lang : 'ru', 118 i18n : { 119 'ru' : { 120 CLOSE : 'ÐакÑÑÑÑ', 121 NEXT: "Ðалее", 122 PREV: "Ðазад", 123 } 124 } 125 }); 126 127 $('.fancyboxvideo').fancybox({ 128 padding: 0, 129 width: '1300px', 130 height: '', 131 maxWidth: '100%', 132 maxHeight: '100%', 133 helpers: { 134 overlay: {
135 locked: false 136 } 137 }, 138 lang : 'ru', 139 i18n : { 140 'ru' : { 141 CLOSE : 'ÐакÑÑÑÑ', 142 NEXT: "Ðалее", 143 PREV: "Ðазад", 144 } 145 } 146 }); 147 148 $('.fancyboxVideo-xs').fancybox({ 149 padding: 0, 150 width: '1300px', 151 height: '', 152 maxWidth: '100%', 153 maxHeight: '100%', 154 helpers: { 155 overlay: { 156 locked: false 157 } 158 }, 159 lang : 'ru', 160 i18n : { 161 'ru' : { 162 CLOSE : 'ÐакÑÑÑÑ', 163 NEXT: "Ðалее", 164 PREV: "Ðазад", 165 } 166 } 167 }); 168 // end fancybox 169 170 171 172 173 // slick-carousel 174 $('.top-slider').slick({ 175 infinite: true, 176 slidesToShow: 1, 177 slidesToScroll: 1, 178 autoplay: true, 179 autoplaySpeed: 6000, 180 speed: 1000, 181 fade: true, 182 arrows: true, 183 prevArrow: '<a href="#" class="slick-prev"><i class="material-icons">navigate_before</i></a>', 184 nextArrow: '<a href="#" class="slick-next"><i class="material-icons">navigate_next</i></a>', 185 dots: false, 186 responsive: [ 187 { 188 breakpoint: 1330, 189 settings: { 190 arrows: false, 191 } 192 } 193 ] 194 }); 195 196 197 slickVar = { 198 infinite: true, 199 slidesToShow: 4, 200 slidesToScroll: 1, 201 autoplay: true, 202 autoplaySpeed: 6000, 203 speed: 500, 204 dots: false, 205 swipeToSlide: true, 206 arrows: true, 207 prevArrow: '<span class="slick-prev"><i class="material-icons">navigate_before</i></span>', 208 nextArrow: '<span class="slick-next"><i class="material-icons">navigate_next</i></span>', 209 responsive: [ 210 { 211 breakpoint: 992, 212 settings: { 213 slidesToShow: 3 214 } 215 }, 216 { 217 breakpoint: 768, 218 settings: { 219 slidesToShow: 2 220 } 221 }, 222 { 223 breakpoint: 500, 224 settings: { 225 slidesToShow: 1 226 } 227 } 228 ] 229 } 230 231 $('.products-carousel').slick(slickVar); 232 233 234 $('.brands-carousel').slick({ 235 infinite: true, 236 slidesToShow: 5, 237 slidesToScroll: 1, 238 autoplay: true, 239 autoplaySpeed: 4000, 240 speed: 500, 241 arrows: false, 242 dots: false, 243 swipeToSlide: true, 244 responsive: [ 245 { 246 breakpoint: 1229, 247 settings: { 248 slidesToShow: 4 249 } 250 }, 251 { 252 breakpoint: 991, 253 settings: { 254 slidesToShow: 3 255 } 256 }, 257 { 258 breakpoint: 767, 259 settings: { 260 slidesToShow: 2 261 } 262 } 263 ] 264 }); 265 266 //slick-carousels end 267 268 269 // checking for placeholder 270 if (Modernizr.input.placeholder) { 271 $('.label').hide(); 272 } 273 // end 274 275 276 // validation 277 $('.rf').each(function(){ 278 var item = $(this), 279 btn = item.find('.btn'); 280 281 function checkInput(){ 282 item.find('select.required').each(function(){ 283 if($(this).val() == '0'){ 284 $(this).parents('.form-group').addClass('error'); 285 $(this).parents('.form-group').find('.error-message').show(); 286 } else { 287 $(this).parents('.form-group').removeClass('error'); 288 } 289 }); 290 291 item.find('input[type=text].required').each(function(){ 292 if($(this).val() != ''){ 293 $(this).removeClass('error'); 294 } else { 295 $(this).addClass('error'); 296 $(this).parent('.form-group').find('.error-message').show(); 297 } 298 }); 299 300 item.find('input[type=tel].required').each(function(){ 301 if($(this).val() != ''){ 302 $(this).removeClass('error'); 303 } else { 304 $(this).addClass('error'); 305 $(this).parent('.form-group').find('.error-message').show(); 306 } 307 }); 308 309 item.find('textarea.required').each(function(){ 310 if($(this).val() != ''){ 311 $(this).removeClass('error'); 312 } else { 313 $(this).addClass('error'); 314 $(this).parent('.form-group').find('.error-message').show(); 315 } 316 }); 317 318 item.find('input[type=email]').each(function(){ 319 var regexp = /^([a-z0-9_-]+\.)*[a-z0-9_-]+@[a-z0-9_-]+(\.[a-z0-9_-]+)*\.[a-z]{2,6}$/i; 320 var $this = $(this); 321 if($this.hasClass('required')){ 322 if (regexp.test($this.val())) { 323 $this.removeClass('error'); 324 } else { 325 $this.addClass('error'); 326 $(this).parent('.form-group').find('.error-message').show(); 327 } 328 } else{ 329 if($this.val() != ''){ 330 if (regexp.test($this.val())) { 331 $this.removeClass('error'); 332 }else { 333 $this.addClass('error'); 334 $(this).parent('.form-group').find('.error-message').show(); 335 } 336 } else{ 337 $this.removeClass('error'); 338 } 339 } 340 }); 341 342 item.find('input[type=checkbox].required').each(function(){ 343 if($(this).is(':checked')){ 344 $(this).removeClass('error'); 345 } else { 346 $(this).addClass('error'); 347 $(this).parent('.form-group').find('.error-message').show(); 348 } 349 }); 350 } 351 352 btn.click(function(){ 353 checkInput(); 354 var sizeEmpty = item.find('.error:visible').length; 355 if(sizeEmpty > 0){ 356 return false;
357 } else { 358 item.submit(); 359 $.fancybox.close(); 360 } 361 }); 362 }); 363 364 $('select').change(function(){ 365 if($(this).val() == ''){ 366 $(this).parents('.form-group').removeClass('selected'); 367 } else { 368 $(this).parents('.form-group').addClass('selected'); 369 $(this).parents('.form-group').removeClass('error'); 370 } 371 }); 372 // end validation 373 374 375 376 $('.mob-menu-btn').click(function(){ 377 if($(this).hasClass('active')){ 378 $('.mobile-menu').slideUp(200); 379 $(this).removeClass('active') 380 }else{ 381 $('.mobile-menu').slideDown(200); 382 $(this).addClass('active') 383 } 384 }); 385 386 $('.mobile-menu ul > li').has('ul').addClass('down'); 387 388 389 $('.mobile-menu .down .dropdown-button').click(function(){ 390 $(this).toggleClass('active'); 391 $(this).siblings('ul:visible').slideUp(200); 392 $(this).siblings('ul:hidden').slideDown(200); 393 }); 394 395 $('.top-menu ul > li').has('ul').addClass('down'); 396 397 398 // mobMenuHeight begin 399 400 var windHeight; 401 402 function mobMenuHeight(){ 403 windHeight = $( window ).height(); 404 $('.mobile-menu > ul').height(windHeight - $('.top-bar').height()); 405 } 406 mobMenuHeight(); 407 408 409 window.addEventListener("resize", function() { 410 mobMenuHeight(); 411 }, false); 412 413 414 window.addEventListener("orientationchange", function() { 415 mobMenuHeight(); 416 }, false); 417 418 419 // mobMenuHeight end 420 421 422 423 var panel=$('.top-bar'),pos=panel.offset().top; 424 425 $(window).scroll(function(){ 426 if($(this).scrollTop() > pos && !panel.hasClass('fixed')){ 427 panel.addClass('fixed'); 428 }else if($(this).scrollTop() < pos && panel.hasClass('fixed')){ 429 panel.removeClass('fixed'); 430 } 431 }); 432 433 434 window.addEventListener("resize", function() { 435 panel.removeClass('fixed'); 436 panel=$('.top-bar'),pos=panel.offset().top; 437 438 $(window).scroll(function(){ 439 if($(this).scrollTop() > pos && !panel.hasClass('fixed')){ 440 panel.addClass('fixed'); 441 }else if($(this).scrollTop() < pos && panel.hasClass('fixed')){ 442 panel.removeClass('fixed'); 443 } 444 }); 445 }, false); 446 447 448 window.addEventListener("orientationchange", function() { 449 panel.removeClass('fixed'); 450 panel=$('.top-bar'),pos=panel.offset().top; 451 452 $(window).scroll(function(){ 453 if($(this).scrollTop() > pos && !panel.hasClass('fixed')){ 454 panel.addClass('fixed'); 455 }else if($(this).scrollTop() < pos && panel.hasClass('fixed')){ 456 panel.removeClass('fixed'); 457 } 458 }); 459 }, false); 460 461 462 463 464 465 // map height begin 466 467 var contactswrapperHeight; 468 function mapHeight(){ 469 contactswrapperHeight = $('.contacts-wrapper').height(); 470 $('.map-wrapper').css({'height':contactswrapperHeight}); 471 } 472 mapHeight(); 473 474 window.addEventListener("resize", function() { 475 mapHeight(); 476 }, false); 477 478 479 window.addEventListener("orientationchange", function() { 480 mapHeight(); 481 }, false); 482 483 // map height end 484 485 486 // ASIDE MENU 487 $('.aside-menu li').has('ul').addClass('down'); 488 $('.aside-menu > ul li.down > ul').before('<span class="dropdown-button"></span>'); 489 $('.aside-menu .down .dropdown-button').each(function(){ 490 if($(this).siblings('ul').is(':visible')){ 491 $(this).addClass('active'); 492 } 493 }); 494 $('.aside-menu .down .dropdown-button').click(function(){ 495 $(this).parent().toggleClass('open'); 496 if($(this).siblings('ul').is(':visible')){ 497 $(this).siblings('ul').slideUp(); 498 $(this).removeClass('active'); 499 }else{ 500 $(this).siblings('ul').slideDown(); 501 $(this).addClass('active'); 502 } 503 }); 504 $('.aside-menu-title').click(function(){ 505 $('.aside-menu').toggleClass('active'); 506 }); 507 // ASIDE MENU END 508 509 510 511 512 /* plus minus goods counter */ 513 $.fn.globalNumber = function(){ 514 $('.btn-number').click(function(e){ 515 e.preventDefault(); 516 fieldName = $(this).attr('data-field'); 517 type = $(this).attr('data-type'); 518 var input = $("input#"+fieldName); 519 520 var currentVal = parseInt(input.val()); 521 if (!isNaN(currentVal)) { 522 if(type == 'minus') { 523 524 if(currentVal > input.attr('data-min')) { 525 input.val(currentVal - 1).change(); 526 } 527 if(parseInt(input.val()) == input.attr('data-min')) { 528 $(this).attr('disabled', true); 529 } 530 531 } else if(type == 'plus') { 532 533 if(currentVal < input.attr('data-max')) { 534 input.val(currentVal + 1).change(); 535 } 536 if(parseInt(input.val()) == input.attr('data-max')) { 537 $(this).attr('disabled', true); 538 } 539 540 } 541 } else { 542 input.val(0); 543 } 544 }); 545 $('.input-number').focusin(function(){ 546 $(this).data('oldValue', $(this).val()); 547 }); 548 $('.input-number').change(function() { 549 550 minValue = parseInt($(this).attr('data-min')); 551 maxValue = parseInt($(this).attr('data-max')); 552 valueCurrent = parseInt($(this).val()); 553 554 name = $(this).attr('id'); 555 if(valueCurrent >= minValue) { 556 $(".btn-number[data-type='minus'][data-field='"+name+"']").removeAttr('disabled') 557 } else { 558 alert('Ð ÑожалениÑ, бÑло доÑÑигнÑÑо минималÑное знаÑение'); 559 $(this).val($(this).data('oldValue')); 560 } 561 if(valueCurrent <= maxValue) { 562 $(".btn-number[data-type='plus'][data-field='"+name+"']").removeAttr('disabled') 563 } else { 564 alert('Ð ÑожалениÑ, бÑло пÑевÑÑено макÑималÑное знаÑение'); 565 $(this).val($(this).data('oldValue')); 566 } 567 568 569 }); 570 $(".input-number").keydown(function (e) { 571 // Allow: backspace, delete, tab, escape, enter and . 572 if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 190]) !== -1 || 573 // Allow: Ctrl+A 574 (e.keyCode == 65 && e.ctrlKey === true) || 575 // Allow: home, end, left, right 576 (e.keyCode >= 35 && e.keyCode <= 39)) { 577 // let it happen, don't do anything 578 return; 579 } 580 // Ensure that it is a number and stop the keypress 581 if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { 582 e.preventDefault(); 583 } 584 }); 585 };$.fn.globalNumber(); 586 /* /. plus minus goods counter */ 587 588 589 590 591 // tabs 592 $('ul.tabs').on('click', 'li:not(.current)', function() { 593 594 $(this) 595 .addClass('current').siblings().removeClass('current') 596 .closest('div.section').closestChild('div.box').removeClass('visible').eq($(this).index()).addClass('visible'); 597 }); 598 599 $('ul.tabs.mobile li').click(function(){ 600 $(this).parent().hide().siblings('.mobile-tab-header').html($(this).html()); 601 $('.mobile-tab-header').removeClass('active'); 602 }); 603 $('.mobile-tab-header').click(function(e){ 604 if($(this).hasClass('active')){ 605 $(this).removeClass('active'); 606 $(this).siblings('.tabs.mobile').stop().slideUp(0); 607 }else{ 608 $(this).addClass('active'); 609 $(this).siblings('.tabs.mobile').stop().slideDown(0); 610 } 611 612 e.stopPropagation(); 613 }); 614 // end tabs 615 616 617 $('#orderbutton').prop('disabled', true); 618 619 $('#agreement_order').change(function () { 620 621 if ($(this).prop('checked')==false){ 622 $('#orderbutton').prop('disabled', true).addClass('disabled'); 623 }else{ 624 $('#orderbutton').prop('disabled', false).removeClass('disabled'); 625 } 626 }); 627 628 var productapplicationtheme; 629 $('a[href="#productapplication"]').click(function(){ 630 productapplicationtheme = $(this).data('theme'); 631 $('#productapplicationinput').val(productapplicationtheme); 632 }); 633 634 635});// end ready
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.