1function checkPrivacy() { 2 3 var privacyContainer = $('.js-privacy'); 4 5 privacyContainer.each(function() { 6 7 var form = $(this).closest('form'); 8 9 var input = $(this).find('input[type="checkbox"]'); 10 var submitBtn = form.find('[type=submit]'); 11 12 input.change(function() { 13 14 if(!$(this).prop('checked')) { 15 submitBtn.addClass('disabled'); 16 } else { 17 submitBtn.removeClass('disabled'); 18 form.find('.js-privacy .c-mes-popup').removeClass('active'); 19 } 20 21 }); 22 23 submitBtn.click(function() { 24 if($(this).hasClass('disabled')){ 25 form.find('.js-privacy .c-mes-popup').addClass('active'); 26 27 }else { 28 form.find('.js-privacy .c-mes-popup').removeClass('active'); 29 } 30 }) 31 32 }) 33 34} 35 36/* 37var isMobile=false; 38(function(a,b){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))isMobile=true})(navigator.userAgent||navigator.vendor||window.opera); 39 40if(isMobile) { 41 $(document).ready(function() { 42 $('#horizontal-multilevel-menu li').each(function() { 43 $(this).data('open', false); 44 }) 45 //$('#horizontal-multilevel-menu li').css('cursor', 'pointer'); 46 $('#horizontal-multilevel-menu li').bind('click', function() { 47 if(!$(this).data('open')) { 48 $(this).find('ul').css('display', 'block'); 49 $(this).data('open', true); 50 } 51 else { 52 $(this).find('ul').css('display', 'none'); 53 $(this).data('open', false); 54 } 55 }); 56 }); 57} 58*/ 59var jshover = function() 60{ 61 var menuDiv = document.getElementById("horizontal-multilevel-menu") 62 if (!menuDiv) 63 return; 64 65 var sfEls = menuDiv.getElementsByTagName("li"); 66 for (var i=0; i<sfEls.length; i++) 67 { 68 sfEls[i].onmouseover=function() 69 { 70 this.className+=" jshover"; 71 } 72 sfEls[i].onmouseout=function() 73 { 74 this.className=this.className.replace(new RegExp(" jshover\\b"), ""); 75 } 76 } 77} 78 79 80function initDetailModalScripts() { 81 // $('.js-modal-door-slider').on('afterChange', function(event, slick, currentSlide, nextSlide){ 82 // 83 // }); 84 $('.js-modal-door-slider').on('init', function(event, slick, direction) { 85 $(this).css('visibility','visible'); 86 }); 87 $('.js-modal-door-slider').slick({ 88 slidesToShow: 1, 89 slidesToScroll: 1,
90 arrows: false, 91 infinite: true, 92 fade: true, 93 speed: 300, 94 dots:true, 95 draggable: true, 96 autoplay: false, 97 autoplaySpeed: 3000, 98 pauseOnHover: false, 99 appendDots: $('.js-modal-door-thumbs'), 100 dotsClass: 'door-slider-thumbs' 101 }); 102 103 104 if (!device.mobile()) { 105 106 $('.js-point').unbind('mouseenter mouseleave') 107 $('.js-point').hover(function() { 108 var imgSrc = $(this).data('img'); 109 $('.js-doors-detail-zoom').find('img').attr('src', imgSrc); 110 $('.js-doors-detail-zoom').fadeIn(100); 111 }, function() { 112 $('.js-doors-detail-zoom').fadeOut(100, function() { 113 // $('.js-doors-detail-zoom').html(''); 114 }); 115 }); 116 117 } else { 118 119 $('.js-point').unbind('click') 120 $('.js-point').click(function() { 121 122 var imgSrc = $(this).data('img'); 123 124 $('.js-doors-detail-zoom').find('img').attr('src', imgSrc); 125 $('.js-doors-detail-zoom').fadeIn(100); 126 127 $('.js-doors-detail-zoom').append('<div class="custom-backdrop js-backdrop"></div>'); 128 129 $('.js-backdrop').click(function() { 130 $(this).unbind('click'); 131 $('.js-doors-detail-zoom').fadeOut(100); 132 $(this).remove(); 133 }) 134 135 }); 136 137 } 138 139 140 141 142 143} 144 145 146if (window.attachEvent) 147 window.attachEvent("onload", jshover); 148 149$(function() { 150 151 152// $('.js-promo-slider').on('init', function(event, slick, direction) { 153// console.log(123); 154// }); 155 156 // $('.js-promo-slider').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 157 158 // // $('.js-promo-top-link').each(function(index, value) { 159 160 161 // // if(index == nextSlide) { 162 // // $('.js-promo-top-link').removeClass('active'); 163 // // $(this).addClass('active'); 164 // // } 165 166 // // }); 167 168 // }); 169 170 $('.js-promo-slider').on('init', function(event, slick, direction) { 171 $(this).find('img').css('visibility','visible'); 172 }); 173 174 $('.js-promo-slider').slick({ 175 slidesToShow: 1, 176 slidesToScroll: 1, 177 arrows: false, 178 // prevArrow: $('.js-promo-controls .prev-arrow-button'), 179 // nextArrow: $('.js-promo-controls .next-arrow-button'), 180 infinite: true, 181 fade: true, 182 speed: 400, 183 dots: false, 184 draggable: true, 185 // appendDots: $('.js-promo-dots'), 186 // dotsClass: 'promo__dots', 187 autoplay: false, 188 autoplaySpeed: 3000, 189 pauseOnHover: false, 190 asNavFor: $('.js-promo-thumbs') 191 }); 192 193 194 $('.js-promo-thumbs').on('init', function(event, slick, direction) { 195 $(this).find('img').css('visibility','visible'); 196 if(slick.$slides.length < 5) { 197 $(slick.$slider).addClass('center'); 198 } 199 }); 200 201 202 $('.js-promo-thumbs').slick({ 203 slidesToShow: 7, 204 slidesToScroll: 1, 205 arrows: false, 206 infinite: true, 207 fade: false, 208 speed: 200, 209 dots: false, 210 draggable: true, 211 asNavFor: $('.js-promo-slider'), 212 focusOnSelect: true, 213 centerMode: true, 214 centerPadding: '0px' 215 }); 216 217 218 219 $('.js-col-main-view-slider').each(function() { 220 var self = $(this); 221 $(this).on('beforeChange', function(event, slick, currentSlide, nextSlide){ 222 $(this).parent().find('.js-door-state-control').removeClass('active'); 223 $(this).parent().find('.js-door-state-control').eq(nextSlide).addClass('active'); 224 }); 225 226 227 $(this).slick({ 228 slidesToShow: 1, 229 slidesToScroll: 1, 230 infinite: true, 231 fade: true, 232 speed: 300, 233 arrows: false, 234 // dots: true, 235 draggable: true, 236 // appendDots: $('.js-col-section-dots'), 237 // dotsClass: 'col-section__dots', 238 autoplay: false, 239 pauseOnHover: false 240 }); 241 242 243 $(this).parent().find('.js-door-state-control').click(function() { 244 self.slick('slickGoTo', $(this).index(), false); 245 self.parent().find('.js-door-state-control').removeClass('active'); 246 $(this).addClass('active'); 247 }); 248 249 250 }) 251 252 $('.js-col-preview-slider').each(function() { 253 var self = $(this); 254 255 // $(this).on('init', function(event, slick, direction) { 256 // var pictureBlockHeight = $(this).parent().find('.col-section__pr-item-pic').height(); 257 // $(this).parent().find('.slick-arrow').css('top', pictureBlockHeight / 2 + 'px'); 258 // console.log(pictureBlockHeight / 2 + 'px') 259 // }); 260 261 $(this).slick({ 262 slidesToShow: 7, 263 slidesToScroll: 1, 264 infinite: true, 265 fade: false, 266 speed: 200, 267 arrows: true, 268 prevArrow: self.parent().find('.arrow-btn-left'), 269 nextArrow: self.parent().find('.arrow-btn-right'), 270 draggable: true, 271 autoplay: false, 272 pauseOnHover: false, 273 responsive: [ 274 { 275 breakpoint: 1199, 276 settings: { 277 slidesToShow: 5 278 } 279 }, 280 { 281 breakpoint: 767, 282 settings: { 283 slidesToShow: 4 284 } 285 }, 286 { 287 breakpoint: 575, 288 settings: { 289 slidesToShow: 3 290 } 291 }, 292 { 293 breakpoint: 479, 294 settings: { 295 slidesToShow: 2 296 } 297 } 298 ] 299 }); 300 301 }); 302 303 304 305$('.js-col-detail-slider').slick({ 306 slidesToShow: 4, 307 slidesToScroll: 1, 308 infinite: true, 309 fade: false, 310 speed: 200, 311 arrows: true, 312 prevArrow: $('.js-col-detail-slider').parent().find('.arrow-btn-left'), 313 nextArrow: $('.js-col-detail-slider').parent().find('.arrow-btn-right'), 314 draggable: true, 315 autoplay: false, 316 pauseOnHover: false, 317 responsive: [ 318 { 319 breakpoint: 767, 320 settings: { 321 slidesToShow: 3 322 } 323 }, 324 { 325 breakpoint: 479, 326 settings: { 327 slidesToShow: 2 328 } 329 } 330 ] 331 }); 332 333 334 $('.js-lock-slider').each(function() { 335 var self = $(this); 336 337 $(this).slick({ 338 slidesToShow: 4, 339 slidesToScroll: 1, 340 infinite: true, 341 fade: false, 342 speed: 200, 343 arrows: true, 344 prevArrow: self.parent().find('.arrow-btn-left'), 345 nextArrow: self.parent().find('.arrow-btn-right'), 346 draggable: true, 347 autoplay: false, 348 pauseOnHover: false, 349 responsive: [ 350 { 351 breakpoint: 991, 352 settings: { 353 slidesToShow: 3 354 } 355 }, 356 { 357 breakpoint: 767, 358 settings: { 359 slidesToShow: 2 360 } 361 }, 362 { 363 breakpoint: 479, 364 settings: { 365 slidesToShow: 1 366 } 367 } 368 369 ] 370 }); 371 372 }); 373 374 375 376 377 378 $('.js-decor-slider').each(function() { 379 var self = $(this); 380 381 $(this).slick({ 382 slidesToShow: 4, 383 slidesToScroll: 1, 384 infinite: true, 385 fade: false, 386 speed: 200, 387 arrows: true, 388 prevArrow: self.parent().find('.arrow-btn-left'), 389 nextArrow: self.parent().find('.arrow-btn-right'), 390 draggable: true, 391 autoplay: false, 392 pauseOnHover: false, 393 responsive: [ 394 { 395 breakpoint: 991, 396 settings: { 397 slidesToShow: 2 398 } 399 }, 400 { 401 breakpoint: 479, 402 settings: { 403 slidesToShow: 1 404 } 405 } 406 ] 407 }); 408 409 }); 410 411 412//vertical align slider arrows 413if($('.lock-carousel').length) { 414 $('.lock-carousel').each(function() { 415 var pictureBlockHeight = $(this).find('.slick-arrow').parent().find('.lock-carousel__pic').height(); 416 $(this).find('.slick-arrow').css('top', pictureBlockHeight / 2 + 'px'); 417 }) 418} 419if($('.decor-carousel').length) { 420 $('.decor-carousel').each(function() { 421 var pictureBlockHeight = $(this).find('.slick-arrow').parent().find('.decor-carousel__pic').height(); 422 $(this).find('.slick-arrow').css('top', pictureBlockHeight / 2 + 'px'); 423 }) 424} 425 426//vertical align slider arrows 427if($('.col-section__preview').length) { 428 $('.col-section__preview').each(function() { 429 var pictureBlockHeight = $(this).find('.col-section__pr-item-pic').height(); 430 $(this).find('.slick-arrow').css('top', pictureBlockHeight / 2 + 'px'); 431 }) 432} 433 434$( window ).resize(function() { 435 436 437 //vertical align slider arrows 438 if($('.lock-carousel').length) { 439 $('.lock-carousel').each(function() { 440 var pictureBlockHeight = $(this).find('.slick-arrow').parent().find('.lock-carousel__pic').height(); 441 $(this).find('.slick-arrow').css('top', pictureBlockHeight / 2 + 'px'); 442 }) 443 } 444 if($('.decor-carousel').length) { 445 $('.decor-carousel').each(function() { 446 var pictureBlockHeight = $(this).find('.slick-arrow').parent().find('.decor-carousel__pic').height(); 447 $(this).find('.slick-arrow').css('top', pictureBlockHeight / 2 + 'px'); 448 }) 449 } 450 //vertical align slider arrows 451 if($('.col-section__preview').length) { 452 $('.col-section__preview').each(function() { 453 var pictureBlockHeight = $(this).parent().find('.col-section__pr-item-pic').height(); 454 $(this).find('.slick-arrow').css('top', pictureBlockHeight / 2 + 'px'); 455 }) 456 } 457 458 459}); 460 461// $('.js-countdown-date').val(); 462// $(".js-countdown"); 463function CountdownTimer(countDate, countCont) { 464 /* Ñ÷åò÷èê 465 ==========================================================================*/ 466 this.date = countDate.val(); 467 this.labels = ['äíåé', '÷àñîâ', 'ìèíóò', 'ñåêóíä']; 468 this.template = _.template($('.countdown-template').html()); 469 this.currDate = '00:00:00:00'; 470 this.nextDate = '00:00:00:00'; 471 this.parser = /([0-9]{2})/gi; 472 this.$cont = countCont; 473 var self = this; 474 475 // Build the layout 476 this.initData = self.strfobj(this.currDate);
477 this.labels.forEach(function(label, i) { 478 self.$cont.append(self.template({ 479 curr: self.initData[label], 480 next: self.initData[label], 481 label: label 482 })); 483 }); 484 // Starts the countdown 485 486 this.$cont.countdown(this.date, function(event) { 487 self.newDate = event.strftime('%D:%H:%M:%S'); 488 489 490 if (self.newDate !== self.nextDate) { 491 self.currDate = self.nextDate; 492 self.nextDate = self.newDate; 493 // Setup the data 494 self.data = { 495 'curr': self.strfobj(self.currDate), 496 'next': self.strfobj(self.nextDate) 497 }; 498 // Apply the new values to each node that changed 499 self.diff(self.data.curr, self.data.next).forEach(function(label) { 500 self.selector = '.%s'.replace(/%s/, label), 501 self.$node = self.$cont.find(self.selector); 502 // Update the node 503 self.$node.removeClass('flip'); 504 self.$node.find('.curr').text(self.data.curr[label]); 505 self.$node.find('.next').text(self.data.next[label]); 506 // Wait for a repaint to then flip 507 _.delay(function($node) { 508 $node.addClass('flip'); 509 }, 50, self.$node); 510 }); 511 } 512 }).on('finish.countdown', function() { 513 // $(".js-action-end").html('Àêöèÿ çàêîí÷èëàñü'); 514 // $('.js-countdown').fadeOut('slow'); 515 });; 516 517 518} 519 520 // Parse countdown string to an object 521 CountdownTimer.prototype.strfobj = function(str) { 522 var self = this; 523 self.parsed = str.match(self.parser), 524 obj = {}; 525 self.labels.forEach(function(label, i) { 526 obj[label] = self.parsed[i] 527 }); 528 return obj; 529 } 530 // Return the time components that diffs 531 CountdownTimer.prototype.diff = function(obj1, obj2) { 532 var self = this; 533 var diff = []; 534 self.labels.forEach(function(key) { 535 if (obj1[key] !== obj2[key]) { 536 diff.push(key); 537 } 538 }); 539 return diff; 540 } 541 542 $('.js-countdown').each(function() { 543 new CountdownTimer($(this).parent().find('.js-countdown-date') , $(this)); 544 }) 545 546 547 $('.js-gal-slider').on('init', function(event, slick, direction) { 548 $(this).css('visibility','visible'); 549 }); 550 551 $('.js-gal-slider').slick({ 552 slidesToShow: 1, 553 slidesToScroll: 1, 554 arrows: true, 555 prevArrow: $('.js-gal-controls .gal-btn-prev'), 556 nextArrow: $('.js-gal-controls .gal-btn-next'), 557 infinite: true, 558 fade: false, 559 speed: 200, 560 dots: false, 561 draggable: true, 562 autoplay: false, 563 autoplaySpeed: 3000, 564 pauseOnHover: false 565 }); 566 567 568 $('.js-gallery-thumb').click(function(e) { 569 e.preventDefault(); 570 $('.js-gallery-thumb.active').removeClass('active'); 571 572 var imgSrc = $(this).data('img'); 573 var hrefSrc = $(this).attr('href'); 574 var mainGalleryPic = $('.js-gallery-gal-pic').find('img'); 575 mainGalleryPic.fadeOut(300,function() { 576 mainGalleryPic.attr('src', imgSrc); 577 mainGalleryPic.parent().attr('href', hrefSrc); 578 }); 579 mainGalleryPic.fadeIn(300); 580 581 $(this).addClass('active'); 582 }) 583 584 585 586 587 $('.js-doors-slider').slick({ 588 slidesToShow: 3, 589 slidesToScroll: 1, 590 arrows: true, 591 prevArrow: $('.js-doors-slider-controls .prev-slider-button'), 592 nextArrow: $('.js-doors-slider-controls .next-slider-button'), 593 infinite: true, 594 fade: false, 595 speed: 400, 596 dots: false, 597 draggable: true, 598 // appendDots: $('.js-promo-dots'), 599 // dotsClass: 'promo__dots', 600 autoplay: false, 601 autoplaySpeed: 3000, 602 pauseOnHover: false, 603 responsive: [ 604 { 605 breakpoint: 1309, 606 settings: { 607 slidesToShow: 2 608 } 609 }, 610 { 611 breakpoint: 991, 612 settings: { 613 slidesToShow: 2, 614 dots: true, 615 draggable: true, 616 appendDots: $('.js-doors-slider-dots'), 617 dotsClass: 'promo__dots', 618 } 619 }, 620 { 621 breakpoint: 767, 622 settings: { 623 slidesToShow: 1, 624 dots: true, 625 draggable: true, 626 appendDots: $('.js-doors-slider-dots'), 627 dotsClass: 'promo__dots', 628 } 629 } 630 ] 631 }); 632 633 634 $('.js-doors-slider').on('setPosition', function () { 635 $(this).find('.slick-slide').height('auto'); 636 var slickTrack = $(this).find('.slick-track'); 637 var slickTrackHeight = $(slickTrack).height(); 638 $(this).find('.slick-slide').css('height', slickTrackHeight + 'px'); 639 }); 640 641 642
643 $('.js-section-slider').each(function() { 644 var controls = $(this).siblings('.js-section-slider-controls'); 645 var dots = $(this).siblings('.js-section-slider-dots'); 646 647 $(this).slick({ 648 slidesToShow: 5, 649 slidesToScroll: 1, 650 arrows: true, 651 prevArrow: controls.find('.prev-slider-button'), 652 nextArrow: controls.find('.next-slider-button'), 653 infinite: true, 654 fade: false, 655 speed: 400, 656 dots: false, 657 draggable: true, 658 // appendDots: $('.js-promo-dots'), 659 // dotsClass: 'promo__dots', 660 autoplay: false, 661 autoplaySpeed: 3000, 662 pauseOnHover: false, 663 responsive: [ 664 { 665 breakpoint: 1309, 666 settings: { 667 // slidesToShow: 2 668 } 669 }, 670 { 671 breakpoint: 991, 672 settings: { 673 // slidesToShow: 2, 674 dots: true, 675 draggable: true, 676 appendDots: dots, 677 dotsClass: 'promo__dots', 678 } 679 }, 680 { 681 breakpoint: 767, 682 settings: { 683 slidesToShow: 3, 684 dots: true, 685 draggable: true, 686 appendDots: dots, 687 dotsClass: 'promo__dots', 688 } 689 }, 690 { 691 breakpoint: 480, 692 settings: { 693 slidesToShow: 2, 694 dots: true, 695 draggable: true, 696 appendDots: dots, 697 dotsClass: 'promo__dots', 698 } 699 } 700 ] 701 }); 702 703 704 }); 705 706 707 $('.js-clients-slider').slick({ 708 slidesToShow: 4, 709 slidesToScroll: 1, 710 arrows: true, 711 prevArrow: $('.slider-clients .arrow-btn-left'), 712 nextArrow: $('.slider-clients .arrow-btn-right'), 713 infinite: true, 714 speed: 300, 715 autoplay: false, 716 autoplaySpeed: 3000, 717 draggable: true, 718 pauseOnHover: false, 719 responsive: [ 720 { 721 breakpoint: 1309, 722 settings: { 723 slidesToShow: 4 724 } 725 }, 726 { 727 breakpoint: 991, 728 settings: { 729 slidesToShow: 3 730 } 731 }, 732 { 733 breakpoint: 767, 734 settings: { 735 slidesToShow: 2 736 } 737 }, 738 { 739 breakpoint: 575, 740 settings: { 741 slidesToShow: 1 742 } 743 } 744 ] 745 }); 746 747 748 //ÃáÃîâëåÃèå êà ï÷è 749 750 $('.js-capcha-refresh').click(function(e) { 751 752 var $form = $(this).closest('form'); 753 var ajaxFile = '/ajax/capcha.php'; 754 e.preventDefault(); 755 $.getJSON(ajaxFile, function(data) { 756 $form.find('.js-capcha-img').attr('src', '/bitrix/tools/captcha.php?captcha_sid=' + data.CAPTCHA); 757 $form.find('input[name=captcha_sid]').val(data.CAPTCHA); 758 $('input[name=captcha]').val(''); 759 }); 760 }); 761 762 763 var feedbackForm = new Object(); 764 765 $('.bark').mouseenter(function() { 766 var fromTop, flashHeight; 767 768 fromTop = $(document).scrollTop() + $(window).height() - ($(this).offset().top + $(this).outerHeight()); 769 flashHeight = 460; 770 771 if(fromTop < flashHeight) { 772 $("html, body").animate({'scrollTop' : (flashHeight + $(this).outerHeight() + $(this).offset().top - $(window).height())}, 'slow'); 773 } 774 $(this).append('<div class="barkBanner"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="550" height="450" id="bark50" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="bark50.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="opaque" /><embed src="/flash/bark50.swf" quality="high" bgcolor="#ffffff" width="550" height="450" name="ïåòëè 50" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></div>'); 775 }); 776 777 $('.bark').mouseleave(function() { 778 $('.barkBanner').remove(); 779 }); 780 781 initDetailModalScripts(); 782 783 $('.js-detail-door-open').click(function(e) { 784 e.preventDefault(); 785 var sectionID = $(this).data('section'); 786 787 $.post( 788 '/ajax/door-details.php', 789 {SECTION_ID : sectionID}, 790 function(data) { 791 792 $('#element-preview-modal').unbind('shown.bs.modal'); 793 $('#element-preview-modal').unbind('hidden.bs.modal'); 794 $('.js-catalog-item-preview-container').html(data); 795 796 $('#element-preview-modal').on('shown.bs.modal', function() { 797 initDetailModalScripts(); 798 }); 799 800 $('#element-preview-modal').modal('show'); 801 802 // $('#detail_door-description').html(data).arcticmodal({ 803 // 'afterOpen' : function() { 804 805 // $('.detail_door-control').click(function() { 806 // if(!$(this).is('.current')) { 807 // var clickTo = $(this); 808 // var elementId = clickTo.data('id'); 809 810 // $('.js-points-container').stop(true, true); 811 // $('.js-points-container-'+elementId).stop(true, true); 812 813 // $('.detail_door-control').filter('.current').removeClass('current'); 814 // $(this).addClass('current'); 815 // var src = $(this).data('src'); 816 // $('.detail_door-mainpic').attr('src', src); 817 // $('.door_detail-point-image').attr('src', clickTo.data('himg')); 818 // $('.detail_door-point').css({'top' : clickTo.data('y'), 'left' : clickTo.data('x')}) 819 820 821 822 // $('.js-points-container').css('display', 'none'); 823 // $('.js-points-container-'+elementId).fadeIn(); 824 825 826 // } 827 // }); 828 829 830
831 // $('.detail_door-point').mouseenter(function() { 832 // var eID = $(this).data('id'); 833 // $('.js-point-hover-'+eID).fadeIn('fast'); 834 // }) 835 // $('.detail_door-point').mouseleave(function() { 836 // var eID = $(this).data('id'); 837 // $('.js-point-hover-'+eID).fadeOut('fast'); 838 // }) 839 840 // } 841 // }); 842 843 } 844 ) 845 }); 846 847 $('.js-open-door').click(function() { 848 if(!$(this).is('.current')) { 849 var clickTo = $(this); 850 var elementId = clickTo.data('id'); 851 852 $('.js-points-container').stop(true, true); 853 $('.js-points-container-'+elementId).stop(true, true); 854 855 $('.detail_door-control').filter('.current').removeClass('current'); 856 $(this).addClass('current'); 857 var src = $(this).data('src'); 858 $('.detail_door-mainpic').attr('src', src); 859 $('.door_detail-point-image').attr('src', clickTo.data('himg')); 860 $('.detail_door-point').css({'top' : clickTo.data('y'), 'left' : clickTo.data('x')}) 861 862 863 864 $('.js-points-container').css('display', 'none'); 865 $('.js-points-container-'+elementId).fadeIn(); 866 867 868 } 869 }); 870 871 // $('.callback-call').click(function(e) { 872 // e.preventDefault(); 873 // $('#callback-modal').arcticmodal(); 874 // }); 875 876 877 $(".js-phone").mask("+7 999 999-99-99"); 878 checkPrivacy(); 879 880 $('.js-callback-form').submit(function(e) { 881 882 e.preventDefault(); 883 884 // $('#message').modal('show'); 885 886 if($(this).find('[type=submit]').hasClass('disabled')) return ; 887 888 var form = $(this), 889 serialized = form.serializeArray(), 890 fields = {}; 891 892 form.find('input').removeClass('error'); 893 form.find('textarea').removeClass('error'); 894 form.find('.c-modal__captcha').removeClass('error'); 895 896 897 for (var key in serialized) { 898 fields[serialized[key].name] = serialized[key].value; 899 } 900 901 902 903 fields.is_ajax_callback = 'Y'; 904 fields.submit = 'Y'; 905 906 907 $.ajax({ 908 url: window.location.href, 909 type: "POST", 910 data: fields 911 }) 912 .done(function(data){ 913 914 console.log(data); 915 916 if(data !== undefined) { 917 918 data = JSON.parse(data); 919 if(data.length != 0) { 920 921 for (var key in data) { 922 923 if(key == 'recaptcha') { 924 form.find('.c-modal__captcha').addClass('error'); 925 form.find('.c-modal__captcha-wrapper').find('.c-mes-popup').addClass('active'); 926 setTimeout(function() { 927 form.find('.c-modal__captcha-wrapper').find('.c-mes-popup').removeClass('active'); 928 },3000); 929 930 continue; 931 } 932 933 934 (function(x) { 935 936 var inputSidSelector = '[name="' + x + '"]'; 937 938 var input = form.find(inputSidSelector); 939 940 input.addClass('error'); 941 var inputBlock = input.parent(); 942 943 inputBlock.find('.c-modal__mess').fadeIn(300); 944 945 input.focus(function() { 946 inputBlock.find('.c-modal__mess').fadeOut(300); 947 }) 948 input.blur(function() { 949 if(!$(this).val()) { 950 inputBlock.find('.c-modal__mess').fadeIn(300); 951 } 952 }) 953 954 })(key); 955 956 } 957 958 grecaptcha.reset(arrCaptchas['RecaptchaField1']); 959 960 } else { 961 962 form.find('input,textarea').not('[name=FORM_ID]').not('[name=submit]').not('[name=sessid]').not('[name=PARAMS_HASH]').val(''); 963 form.find('input,textarea').removeClass('error'); 964 form.find('.c-modal__captcha').removeClass('error'); 965 grecaptcha.reset(arrCaptchas['RecaptchaField1']); 966 967 $('#callback-modal').unbind('hidden.bs.modal'); 968 $('#message').find('.js-message-modal-body').html('<p class="c-modal__text">Âàøà çàÿâêà ïðèíÿòà.<br> Â áëèæàéøåå âðåìÿ ìåíåäæåð ñâÿæåòñÿ ñ âàìè.</p><button type="button" class="c-modal__submit-btn b-btn" data-dismiss="modal" aria-label="Close">Îê</button>'); 969 970 971 $('#callback-modal').on('hidden.bs.modal', function () { 972 $('#callback-modal').unbind('hidden.bs.modal'); 973 $('#message').modal('show'); 974 }); 975 $('#callback-modal').modal('hide'); 976 977 978 } 979 980 } else { 981 982 } 983 984 985 }); 986 987 988 }) 989 990 991 $('img.js-img-label').each(function() { 992 $(this).wrap( "<div class='img-with-label-container'></div>"); 993 if($(this).attr('alt')) { 994 $( "<span>" + $(this).attr('alt') + "</span>" ).insertAfter( $(this) ); 995 } 996 }) 997 998 $('.js-blueimp-cat').click(function(event) { 999 event = event || window.event; 1000 1001 var target = event.target || event.srcElement; 1002 var link = target.src ? target.parentNode : target; 1003 // var link = $(this); 1004 var options = {index: link, event: event}, 1005 1006 links = $(this).parent().parent().find('.js-blueimp-cat'); 1007 1008 blueimp.Gallery(links, options); 1009 1010 }); 1011 1012 1013 blueimp.Gallery.prototype.options.toggleControlsOnReturn = false;
1014 blueimp.Gallery.prototype.options.toggleControlsOnSlideClick = false; 1015 1016 1017 1018 $('.js-blueimp-gal').click(function(event) { 1019 event = event || window.event; 1020 1021 var target = event.target || event.srcElement; 1022 var link = target.src ? target.parentNode : target; 1023 // var link = $(this); 1024 var options = {index: link, event: event}, 1025 1026 // links = $(this).parent().parent().find('.js-blueimp-cat'); 1027 links = $('.js-gallery-thumb'); 1028 1029 blueimp.Gallery(links, options); 1030 1031 }); 1032 1033 1034 blueimp.Gallery.prototype.options.toggleControlsOnReturn = false; 1035 blueimp.Gallery.prototype.options.toggleControlsOnSlideClick = false; 1036 1037 1038 1039 1040 $('.js-blueimp-sl').click(function(event) { 1041 event = event || window.event; 1042 1043 var target = event.target || event.srcElement; 1044 var link = target.src ? target.parentNode : target; 1045 // var link = $(this); 1046 var options = {index: link, event: event}, 1047 1048 links = $(this).parent().parent().parent().find('.js-blueimp-sl'); 1049 1050 blueimp.Gallery(links, options); 1051 1052 }); 1053 1054 1055 1056 1057 1058 1059}); 1060 1061
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.