1$(function () { 2 $nav = $('.desktop-only .col-right'); 3 $nav.css('width', $nav.outerWidth()); 4 $window = $(window); 5 $h = $nav.offset().top; 6 $window.scroll(function(){ 7 if ($window.scrollTop() > $h) { 8 $nav.addClass('fixed'); 9 } else { 10 $nav.removeClass('fixed'); 11 } 12 }); 13 $(window).stellar(); 14 villagesMainSlider(); 15 16 const urlParams = new URLSearchParams(window.location.search); 17 const authAjaxFile = $('a[data-type="AUTH"]').first().attr("href"); 18 19 if(urlParams.has("change_password") && urlParams.get("change_password") == "yes"){ 20 urlParams.append("TYPE", "CHANGE_PWD_FIRST"); 21 showModal("changepasswdModal", authAjaxFile, urlParams.toString()) 22 } 23 24 new Swiper('#main-slider-top', { 25 loop: false, 26 pagination: { 27 el: '.swiper-pagination', 28 clickable: true 29 } 30 }); 31 var isTablet = $(window).width() >= 767 && $(window).width() <= 900 ? true : false; 32 var isMobile = $(window).width() <= 767 ? true : false; 33 34 new Swiper('.works-suggestions-slider', { 35 loop: false, 36 spaceBetween: isTablet? 18 : 52, 37 centeredSlides: false, 38 slidesPerView: isMobile? 1 : 'auto', 39 navigation: {nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev'}, 40 }); 41 42 if ($(window).width() <= 900) 43 { 44 new Swiper('#projects-slider', { 45 loop: isTablet ? true: false, 46 spaceBetween: isTablet ? 15 : 5, 47 centeredSlides: true, 48 slidesPerView: isTablet ? 2 : 'auto', 49 navigation: isTablet ? {nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev'} : "", 50 pagination: { el: '.swiper-pagination', type: 'bullets', bulletClass:'dot', bulletActiveClass:'is-selected'} 51 }); 52 new Swiper('#reviews-slider', { 53 loop: false, 54 spaceBetween: 5, 55 centeredSlides: true, 56 slidesPerView: isMobile ? 1 : 'auto', 57 navigation: isTablet || isMobile ? {nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev'} : "", 58 pagination: isTablet || isMobile ? { el: '.swiper-pagination', type: 'bullets', bulletClass:'dot', bulletActiveClass:'is-selected'} : "" 59 }); 60 const houseSwiper = new Swiper('#houses-slider', { //navigation: isTablet || isMobile ? {nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev'} : "", 61 loop: false, 62 spaceBetween: isTablet? 15 : 5, 63 centeredSlides: isTablet ? false : true, 64 slidesPerView: isTablet ? 2 : 'auto', 65 pagination: { el: '.swiper-pagination', type: 'bullets', bulletClass:'dot', bulletActiveClass:'is-selected'}, 66 }); 67 68 houseSwiper.on("slideChangeTransitionEnd", async function(){ // transitionEnd 69 $("ul.houses-tabs li").removeClass("active"); 70 index = await $(".houses-block .swiper-slide-active").data("index"); 71 $('ul.houses-tabs li[data-index="'+index+'"]').addClass("active"); 72 }); 73 $("ul.houses-tabs li").click( async function() { 74 index = await $(this).data("index"); 75 $("ul.houses-tabs li").removeClass("active"); 76 houseSwiper.slideTo(index-1, 500); 77 console.log("second time: ",index); 78 $(this).addClass("active"); 79 delete index; 80 }); 81 } 82 else 83 { 84 $("ul.houses-tabs li").click(function() { 85 if (!$(this).hasClass('active')) 86 { 87 var activeTab = $(this).attr("rel"); 88 $(".houses-content-tabs .tab_content").hide(); 89 $("#"+activeTab).fadeIn(); 90 $("ul.houses-tabs li").removeClass("active"); 91 $(this).addClass("active"); 92 } 93 }); 94 } 95 96 97 $(document).on('click', '#header-toggler', function() { 98 $(this).toggleClass('active'); 99 if ($(this).hasClass('active')) 100 $('.navigation-block').css('transform', 'none'); 101 else 102 $('.navigation-block').css('transform', ''); 103 }); 104 $(document).on('click', '.checkbox-block label', function() { 105 var checkbox = $(this).closest('.checkbox-block').find('input.new-checkbox'); 106 checkbox.attr('checked', !checkbox.attr('checked')); 107 }); 108 $(document).on('click', 'li.have-menu-2lvl:not(.mobile-active) a.nav-link-page', function() { 109 $(this).toggleClass('active'); 110 $(this).next().slideToggle(); 111 }); 112 113 phoneInputMask('input[name="user_phone"]'); 114 115 $(document).on('click', 'ul.nav-main .have-menu-2lvl a.link-to-2lvl', function(e) { 116 if ($(window).width() <= 820) 117 e.preventDefault(); 118 }); 119 120 121 $(document).on('click', '#js-login-button', function(e) { 122 if ($(window).width() <= 820) 123 e.preventDefault(); 124 }); 125 126 $(document).on('click', '#js-login-button', function(e) { 127 e.stopPropagation(); 128 $(this).find(".login-menu").fadeIn(); 129 }); 130 131 $(document).on('click', function(e) { 132 var $trigger = $(".login-menu"); 133 if($trigger !== event.target && !$trigger.has(event.target).length) 134 $('#js-login-button').find(".login-menu").hide(); 135 }); 136 137 $(document).on('click', '.stages-dropdown-button', function(e) { 138 e.stopPropagation(); 139 $(this).next().fadeIn(); 140 }); 141 142 $(document).on('click', ':not(.stages-dropdown-button)', function(e) { 143 $('.stages-dropdown-list').hide(); 144 }); 145 146 147 $(document).on('click', '[data-toggle="ajaxModal"]', function(e) { 148 e.preventDefault(); 149 transparent = false; 150 if($(this).closest('.modal').length) $(this).closest('.modal').modal('hide'); 151 modalId = $(this).attr('data-target'); 152 remote = $(this).data('remote') || $(this).attr('href'); 153 if($(this).data('type')) data = {"TYPE": $(this).data('type')}; 154 else if($(this).data('section')){ 155 data = {"SECTION_CODE": $(this).data('section')}; 156 transparent = true; 157 } 158 if($(this).data('json')) data = $(this).data('json'); 159 showModal(modalId, remote, data, transparent); 160 }); 161 162 $(document).on('click', '[data-toggle="ajaxModalCallManager"]', function(e) { 163 e.preventDefault(); 164 transparent = false; 165 if($(this).closest('.modal').length) $(this).closest('.modal').modal('hide'); 166 modalId = $(this).attr('data-target'); 167 remote = $(this).data('remote') || $(this).attr('href'); 168 data = {"STH": "SH"}; 169 showModal(modalId, remote, data, transparent); 170 }); 171 172 $(document).on('click', '.ajax-modal .modal-close', function(e) { 173 $(this).parent().modal('hide'); 174 }); 175 176 177 $(document).on('change', '.js-policy', function(e) { 178 submitInput = $(this).closest('form').find('input[type="submit"]'); 179 submitInput.prop('disabled', false); 180 if(!$(this).is(':checked')) submitInput.prop('disabled', true); 181 }); 182 183 $(document).on('submit', 'form#auth_form, form#reg_form', function(e) { 184 e.preventDefault(); 185 186 // form#reg_form Only 187 var villagePlotInput = $(this).find('input[name="UF_USER_VILLAGE_PLOT"]'); 188 if (villagePlotInput.length) { 189 villagePlotNumber = $(this).find('input[name="VILLAGE_PLOT"]:checked').val(); 190 if(villagePlotNumber) { 191 villagePlotName = $(this).find('input[name="VILLAGE"]:checked').val() + "/ " + villagePlotNumber; 192 $(villagePlotInput).val(villagePlotName); 193 } 194 }
195 // ******************* 196 197 var validated = true; 198 $(this).find('input[type="text"], input[type="email"], input[type="password"]').each(function(){ 199 if(!$(this).val()) { 200 $(this).addClass("item-error"); 201 validated = false; 202 } 203 }); 204 205 if(validated == false) return false; 206 207 values = $(this).serializeArray(); 208 for (index = 0; index < values.length; ++index) { 209 if (values[index].name == "PHONE_NUMBER") { 210 values[index].value = "+7" + values[index].value; 211 break; 212 } 213 } 214 wrapper = $(this).closest('.modal'); 215 $.ajax({ 216 url: $(this).attr('action'), 217 method: $(this).attr('method'), 218 data: $.param(values), 219 success: function (msg) 220 { 221 //console.log(msg); 222 if(!$(msg).find('input').length || msg == '1') window.location.href = $(wrapper).find('input[name="backurl"]').val(); 223 else { 224 $(wrapper).html(msg); 225 } 226 } 227 }); 228 return false; 229 }); 230 231 $(document).on('submit', 'form#forgotpasswd_form', async function(e) { 232 e.preventDefault(); 233 var currentForm = $(this); 234 var wrapper = $(this).closest('.modal'); 235 236 var email = $(this).find('input[name="USER_EMAIL"]').val(); 237 var phone = $(this).find('input[name="PERSONAL_PHONE"]').val(); 238 239 if(!email && !phone){ 240 $(this).find('input').addClass("item-error"); 241 return false; 242 } 243 244 245 if(!email) { 246 phone = "+7" + phone; 247 $.ajax({ 248 url: currentForm.attr('action'), 249 method: currentForm.attr('method'), 250 data: new URLSearchParams({TYPE: "USER_EMAIL", PERSONAL_PHONE: phone }).toString(), 251 success: function (msg) 252 { 253 254 $.ajax({
255 url: currentForm.attr('action'), 256 method: currentForm.attr('method'), 257 data: currentForm.serialize()+"&USER_EMAIL="+msg, 258 success: function (msg) 259 { 260 $(wrapper).html(msg); 261 } 262 }); 263 } 264 }); 265 } 266 267 else{ 268 $.ajax({ 269 url: $(this).attr('action'), 270 method: $(this).attr('method'), 271 data: $(this).serialize(), 272 success: function (msg) 273 { 274 $(wrapper).html(msg); 275 } 276 }); 277 } 278 279 return false; 280 }); 281 282 $(document).on('submit', 'form#changepasswd_form', function(e) { 283 e.preventDefault(); 284 var validated = true; 285 $(this).find('input[type="text"], input[type="email"], input[type="password"]').each(function(){ 286 if(!$(this).val()) { 287 $(this).addClass("item-error"); 288 validated = false; 289 } 290 }); 291 292 var pw = $(this).find('input[name="USER_PASSWORD"]') 293 var pw_confirm = $(this).find('input[name="USER_CONFIRM_PASSWORD"]') 294 var email = $(this).find('input[name="USER_LOGIN"]') 295 var code = $(this).find('input[name="USER_CHECKWORD"]') 296 297 if(pw.val().length < 6) { 298 pw.addClass("item-error"); 299 pw_confirm.addClass("item-error"); 300 validated = false; 301 } 302 303 if(pw.val()!= pw_confirm.val()){ 304 pw_confirm.addClass("item-error"); 305 validated = false; 306 } 307 308 if(validated == false) return false; 309 310 311 wrapper = $(this).closest('.modal'); 312 313 $.ajax({ 314 url: $(this).attr('action'), 315 method: $(this).attr('method'), 316 data: $(this).serialize(), 317 success: function (msg) 318 { 319 msg_text = $(msg).find('.modal-text').first().text(); 320 if(msg_text.includes("конÑÑолÑное")) { 321 code.addClass("item-error"); 322 return; 323 } 324 if(msg_text.includes("ÐолÑзоваÑÐµÐ»Ñ Ð½Ðµ найден")) { 325 email.addClass("item-error"); 326 return; 327 } 328 else { 329 $(wrapper).html(msg); 330 } 331 } 332 }); 333 return false; 334 }); 335 336 $(document).on('keypress', 'form#auth_form input.item-error, form#reg_form input.item-error, form#forgotpasswd_form input.item-error, form#changepasswd_form input.item-error, form#reserve_form input.item-error', function(e) { 337 $(this).removeClass("item-error"); 338 }); 339 $(document).on('input', 'form#auth_form input.item-error, form#reg_form input.item-error, form#forgotpasswd_form input.item-error, form#changepasswd_form input.item-error, form#reserve_form input.item-error', function(e) { 340 $(this).removeClass("item-error"); 341 }); 342 343 344 $(document).on('focus', 'form#auth_form input, form#reg_form input, form#forgotpasswd_form input, form#changepasswd_form input, form#reserve_form input', function(e) { 345 $(this).siblings('.form-item-placeholder').hide(); 346 }); 347 $(document).on('keyup', 'form#auth_form input, form#reg_form input, form#forgotpasswd_form input, form#changepasswd_form input, form#reserve_form input', function(e) { 348 if($(this).val().length < 1 && !["PERSONAL_BIRTHDAY", "PHONE_NUMBER", "USER_PHONE_NUMBER", "DATE"].includes($(this).attr("name"))) { 349 $(this).siblings('.form-item-placeholder').show(); 350 } 351 else { 352 $(this).siblings('.form-item-placeholder').hide(); 353 } 354 }); 355 356 $(document).on('blur', 'form#auth_form input, form#reg_form input, form#forgotpasswd_form input, form#changepasswd_form input, form#reserve_form input', function(e) { 357 if( $(this).val().length >= 1) { 358 $(this).siblings('.form-item-placeholder').hide(); 359 } 360 else { 361 $(this).siblings('.form-item-placeholder').show(); 362 } 363 }); 364 365 $(document).on('mouseenter', 'form#reg_form input[name="PERSONAL_BIRTHDAY"], form#reg_form input[name="PHONE_NUMBER"], form#forgotpasswd_form input[name="PERSONAL_PHONE"], form#reserve_form input[name="PHONE_NUMBER"]', function(e) { 366 $(this).siblings('.form-item-placeholder').hide(); 367 }); 368 369 $(document).on('mouseleave', 'form#reg_form input[name="PERSONAL_BIRTHDAY"], form#reg_form input[name="PHONE_NUMBER"], form#forgotpasswd_form input[name="PERSONAL_PHONE"], form#reserve_form input[name="PHONE_NUMBER"]', function(e) { 370 if( $(this).val().length < 1 && !$(this).is(":focus")) { 371 $(this).siblings('.form-item-placeholder').show(); 372 } 373 }); //, form#reserve_form input[name="DATE"] 374 375 $(document).on('change', 'form#reserve_form input[name="DATE"]', function(e) { 376 if( $(this).val().length < 1 && !$(this).is(":focus")) { 377 $(this).siblings('.form-item-placeholder').show(); 378 } 379 else 380 $(this).siblings('.form-item-placeholder').hide(); 381 }); 382 383 384 385 $(document).on('click', '.personal-info-edit-icon', function(e) { 386 e.preventDefault(); 387 e.stopPropagation(); 388 $('.personal-info-input-box').hide(); 389 currentInput = $(this).prev(); 390 currentValue = currentInput.val(); 391 392 newInput = $(this).closest('.personal-info-section-item').next().find('input'); 393 newInput.inputmask('remove'); 394 395 newInput.data("input", currentInput.attr("name"));
396 if(currentInput.data("type") == "date") dateInputMask(newInput); 397 else if(currentInput.data("type") == "phone") phoneInputMask(newInput); 398 399 newInput.val(currentValue); 400 newInput.parent().fadeIn(); 401 }); 402 403 $(document).on('click', '.personal-info-input-box .input-box-button', function(e) { 404 input = $(this).prev(); 405 if(input.data("input") == "PERSONAL_PHONE" && input.val() == "") return false; 406 value = (input.data("input") == "PERSONAL_PHONE")? "+7"+input.val() : input.val(); 407 $(this).closest('.personal-info-section').find('input[name="'+ input.data("input") +'"]').val(value); 408 $(this).closest('form').submit(); 409 $(this).closest('.personal-info-input-box').fadeOut(); 410 return false; 411 }); 412 413 414 $(document).on('submit', 'form.personal-info-section', function(e) { 415 e.preventDefault(); 416 417 $("input.item-value").prop('disabled', false); 418 data = $(this).serialize(); 419 $("input.item-value").prop('disabled', true); 420 421 var wrapper = $(this).closest('.personal-info'); 422 var wrapper_id = $(this).attr('id'); 423 $.ajax({ 424 url: $(this).attr('action'), 425 method: $(this).attr('method'), 426 data: data, 427 success: function (msg) 428 { 429 $(wrapper).html($(msg).find('.personal-info').html()); 430 $(wrapper).find('.personal-info-section-title').removeClass('rotated'); 431 } 432 }); 433 return false; 434 }); 435 436 $(document).on('click', '.js-expand-text', function(e) { 437 $(this).prev().toggleClass("expanded"); 438 $(this).toggleClass("rotated"); 439 }); 440 441 $(document).on('click', '.personal-info-section-title', function(e) { 442 if ($(window).width() <= 820){ 443 $(this).next().slideToggle(); 444 $(this).toggleClass("rotated"); 445 } 446 }); 447 448 /* 449 $(document).on('click', '.comment-buttons-reply', function(e) { 450 $(this).closest('.comment-one').find('form').toggle(); 451 }); 452 453 $(document).on('click', '.js-show-comments', function(e) { 454 e.preventDefault(); 455 target = $($(this).attr('href') ?? $(this).data('href')); 456 if(target.is(":visible") && $(this).data('toggle')) target.slideUp(); 457 else{ 458 target.slideDown(); 459 $([document.documentElement, document.body]).animate({ 460 scrollTop: target.offset().top, 461 easing: 'linear'}, 462 100); 463 } 464 }); 465 466 $(document).on('click', '.js-hide-comments', function(e) { 467 $('#comments-add, #comments-all').slideUp(); 468 }); 469 470 471 $(document).on('input', 'form.comment-form [name="PREVIEW_TEXT"].error-red', function(e) { 472 $(this).removeClass('error-red'); 473 }); 474 475 $(document).on('change', 'form.comment-form input[type="radio"]', function(e) { 476 currentForm = $(this).closest('form'); 477 currentForm.find('.comment-notification span[data-field="rating"]').hide(); 478 }); 479 480 $(document).on('submit', 'form.comment-form', function(e) { 481 e.preventDefault(); 482 rating = $(this).find('input[type="radio"]'); 483 var checked = false; 484 var validated = true; 485 if(rating.length){ 486 rating.each(function() { 487 if($(this).prop('checked')) checked = true; 488 }); 489 if(!checked) { 490 $(this).find('.comment-notification span[data-field="rating"]').show(); 491 } 492 else { 493 $(this).find('.comment-notification span[data-field="rating"]').hide(); 494 } 495 } 496 else checked = true; 497 498 if(!$(this).find('[name="PREVIEW_TEXT"]').val()) { 499 $(this).find('[name="PREVIEW_TEXT"]').addClass('error-red'); 500 validated = false; 501 } 502 503 if(!checked || !validated) return false; 504 wrapper = $(this).closest('.comments-section'); 505 $.ajax({ 506 url: $(this).attr('action'), 507 method: $(this).attr('method'), 508 data: $(this).serialize(), 509 success: function (msg) 510 { 511 if(msg!=1) $(wrapper).html($(msg).find('.comments-section').html()); 512 $("div[id^='wait_']").each(function (i, el) { $(el).hide();}); 513 } 514 }); 515 return false; 516 }); 517 518 */ 519 520 521 522 $('form#works-filter #del_filter').unbind('click').bind('click', function (e) { 523 e.preventDefault(); 524 $('.popup-window .smart-filter-dropdown-popup').each(function(){ 525 $(this).find('label').first().click(); 526 $(this).closest('.popup-window').hide(); 527 }) 528 $('form#works-filter .smart-filter-slider-handle.left, .smart-filter-slider-price-bar-vd, .smart-filter-slider-price-bar-vn, .smart-filter-slider-price-bar-v').css('left',0); 529 $('form#works-filter .smart-filter-slider-handle.right, .smart-filter-slider-price-bar-vd, .smart-filter-slider-price-bar-vn, .smart-filter-slider-price-bar-v').css('right',0); 530 $('form#works-filter .smart-filter-slider-handle.left input').val($('form#works-filter .smart-filter-slider-handle.left input').placeholder); 531 $('form#works-filter .smart-filter-slider-handle.right input').val($('form#works-filter .smart-filter-slider-handle.right input').placeholder); 532 $('form#works-filter').submit(); 533 return false; 534 }); 535 536 $(document).on('submit', 'form#works-filter', function(e) { 537 e.preventDefault(); 538 wrapper = $(this).closest('.container').find('.works-block'); 539 $.ajax({
540 url: $(this).attr('action'), 541 method: $(this).attr('method'), 542 data: $(this).serialize(), 543 success: function (msg) 544 { 545 wrapper.html($(msg).find('.works-block').html()); 546 } 547 }); 548 return false; 549 }); 550 551 $(document).on('click', '.works-subsections-btn', function(e) { 552 var urlValue = $(this).closest('.modal-body').find('input[name="SUBSECTION"]:checked').val(); 553 window.location.href = urlValue; 554 555 }); 556 557 if($('.modal#subsectionModal').length){ 558 $('.modal#subsectionModal').modal(); 559 } 560 561 562 if (window.location.hash == "#comments-add") { 563 $(".js-show-comments").click(); 564 } 565 566 $(document).on('click', '.form-dropdown', function() { 567 $(this).closest('form').find('.form-dropdown').not(this).removeClass("clicked"); 568 $(this).toggleClass("clicked"); 569 }); 570 $(document).on('click', '.form-dropdown-content label', function() { 571 parent = $(this).closest('.form-dropdown'); 572 parent.find('.form-dropdown-input span').text($(this).text()); 573 parent.closest('.form-dropdown').find('.form-dropdown-input').removeClass("empty"); 574 parent.closest('.form-dropdown').toggleClass("clicked"); 575 }); 576 $(document).on('change', '.form-dropdown-content input:radio[name="VILLAGE"]', function() { 577 if (!this.checked) return; 578 idsString = $(this).data("ids") + ''; 579 var idsArray = idsString.split(","); 580 var parentForm = $(this).closest('form'); 581 $.ajax({ 582 url: $(parentForm).attr('action'), 583 method: $(parentForm).attr('method'), 584 data: {DATA: idsArray, TYPE: "VILLAGE"}, 585 success: function (msg) 586 { 587 $(parentForm).find('.uchastk-form-dropdown').html($(msg).find('.uchastk-form-dropdown').html()); 588 } 589 }); 590 }); 591 592 593 /*****reserve_form*******/ 594 $(document).on('submit', 'form#reserve_form', function(e) { 595 e.preventDefault(); 596 var form = $(this); 597 var checked = true; 598 form.find('input.field-required').each(function(){ 599 if($(this).attr('name') == "EMAIL" && validateEmail($(this).val())) return; 600 if($(this).val().length >= 1 && !($(this).attr('name') == "EMAIL" && !validateEmail($(this).val()))) return; 601 $(this).addClass('item-error'); 602 checked = false; 603 }) 604 response = grecaptcha.getResponse(); 605 if(response.length == 0) { 606 $('div#g-recaptcha').find('iframe').find('body').css("border", "2px solid #f19494"); 607 checked = false; 608 } 609 610 if(!checked) return; 611 $.ajax ({ 612 url: form.attr('action'), 613 type: form.attr('method'), 614 data: form.serialize(), 615 success: function(msg) { 616 form.addClass('hide'); 617 if(msg == "1") 618 form.closest('.modal--form').find('div.success_mess_form').addClass('show'); 619 else 620 form.closest('.modal--form').find('div.error_mess_form').addClass('show'); 621 } 622 }) 623 }); 624 $(document).on('change', '#reserve_form .policy', function() { 625 response = grecaptcha.getResponse(); 626 if(!$(this).is(":checked") || response.length == 0) 627 $('#reserve_form input[type="submit"]').attr('disabled', true); 628 else 629 $('#reserve_form input[type="submit"]').attr('disabled', false); 630 }); 631 /*****End of reserve_form*******/ 632}); 633 634function grecaptchaClickedHandler(){ 635 if(!$('#reserve_form .policy').is(":checked")) 636 $('#reserve_form input[type="submit"]').attr('disabled', true); 637 else 638 $('#reserve_form input[type="submit"]').attr('disabled', false); 639} 640function grecaptchaExpiredHandler() { 641 $('#reserve_form input[type="submit"]').attr('disabled', true); 642} 643 644 645 646function phoneInputMask(selector) { 647 $(selector).inputmask({ 648 mask: "+7 (x99) 999-99-99", 649 "clearIncomplete": true, 650 "removeMaskOnSubmit": false, 651 'autoUnmask' : true, 652 definitions: { 653 x: { 654 validator: '[0-79-9]' 655 } 656 } 657 }); 658} 659 660function dateInputMask(selector) { 661 $(selector).inputmask("datetime", { inputFormat: "dd.mm.yyyy", placeholder: "дд.мм.гггг" , clearIncomplete: true}); // 662} 663 664function villagesMainSlider() { 665 const $slider = $('#villages-list'); 666 const $slide = $('.villages-item'); 667 if (!$slider.length) { 668 return; 669 } else if (window.innerWidth > 820) { 670 $slider.addClass('villages-list-grid'); 671 return; 672 } 673 674 $slider.flickity({ 675 cellAlign: 'left', 676 pageDots: true, 677 wrapAround: true, 678 imagesLoaded: true,
679 prevNextButtons: false, 680 groupCells: 1 681 }); 682 $slider.on('dragStart.flickity', function() { 683 $(this).addClass('is-dragging'); 684 }); 685 $slider.on('dragEnd.flickity', function() { 686 $(this).removeClass('is-dragging'); 687 }); 688} 689 690function showModal(modalId, remote, data, transparent){ 691 $('#' + modalId).remove(); 692 var modal = $('<div class="modal modal--form ajax-modal" id="'+modalId+'"></div>'); // fade 693 if(transparent) modal.addClass('modal--form_transparent'); 694 $('body').append(modal); 695 modal.modal(); 696 modal.load(remote, data); 697} 698 699 700$(function(){ 701 $(document).on('click', '.works-img .expand-button', function(e) { 702 var newlightbox = $(this).closest('.works-card').find('.newlightbox'); 703 704 if($(newlightbox).hasClass("active")) 705 { 706 $(newlightbox).removeClass("active"); 707 $(newlightbox).addClass("notshow"); 708 }else{ 709 $(newlightbox).addClass("active"); 710 $(newlightbox).removeClass("notshow"); 711 } 712 }); 713 714 $(document).on('click', '.works-card .lightbox-close', function(e) { 715 $(".newlightbox").removeClass("active"); 716 $(".newlightbox").addClass("notshow"); 717 }); 718}) 719 720function validateEmail(email) 721{ 722 var re = /\S+@\S+\.\S+/; 723 return re.test(email); 724} 725
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.