1/* jQuery Nice Select - v1.0 2 https://github.com/hernansartorio/jquery-nice-select 3 Made by Hernán Sartorio */ 4 ! function(e) { 5 e.fn.niceSelect = function(t) { 6 function s(t) { 7 t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class") || "").addClass(t.attr("disabled") ? "disabled" : "").attr("tabindex", t.attr("disabled") ? null : "0").html('<span class="current"></span><ul class="list"></ul>')); 8 var s = t.next(), 9 n = t.find("option"), 10 i = t.find("option:selected"); 11 s.find(".current").html(i.data("display") || i.text()), n.each(function(t) { 12 var n = e(this), 13 i = n.data("display"); 14 s.find("ul").append(e("<li></li>").attr("data-value", n.val()).attr("data-display", i || null).addClass("option" + (n.is(":selected") ? " selected" : "") + (n.is(":disabled") ? " disabled" : "")).html(n.text())) 15 }) 16 } 17 if ("string" == typeof t) return "update" == t ? this.each(function() { 18 var t = e(this), 19 n = e(this).next(".nice-select"), 20 i = n.hasClass("open"); 21 n.length && (n.remove(), s(t), i && t.next().trigger("click")) 22 }) : "destroy" == t ? (this.each(function() { 23 var t = e(this), 24 s = e(this).next(".nice-select"); 25 s.length && (s.remove(), t.css("display", "")) 26 }), 0 == e(".nice-select").length && e(document).off(".nice_select")) : console.log('Method "' + t + '" does not exist.'), this; 27 this.hide(), this.each(function() { 28 var t = e(this); 29 t.next().hasClass("nice-select") || s(t) 30 }), e(document).off(".nice_select"), e(document).on("click.nice_select", ".nice-select", function(t) { 31 var s = e(this); 32 e(".nice-select").not(s).removeClass("open"), s.toggleClass("open"), s.hasClass("open") ? (s.find(".option"), s.find(".focus").removeClass("focus"), s.find(".selected").addClass("focus")) : s.focus() 33 }), e(document).on("click.nice_select", function(t) { 34 0 === e(t.target).closest(".nice-select").length && e(".nice-select").removeClass("open").find(".option") 35 }), e(document).on("click.nice_select", ".nice-select .option:not(.disabled)", function(t) { 36 var s = e(this), 37 n = s.closest(".nice-select"); 38 n.find(".selected").removeClass("selected"), s.addClass("selected"); 39 var i = s.data("display") || s.text(); 40 n.find(".current").text(i), n.prev("select").val(s.data("value")).trigger("change") 41 window.location.href = s.data("value"); 42 }), e(document).on("keydown.nice_select", ".nice-select", function(t) { 43 var s = e(this), 44 n = e(s.find(".focus") || s.find(".list .option.selected")); 45 if (32 == t.keyCode || 13 == t.keyCode) return s.hasClass("open") ? n.trigger("click") : s.trigger("click"), !1; 46 if (40 == t.keyCode) { 47 if (s.hasClass("open")) { 48 var i = n.nextAll(".option:not(.disabled)").first(); 49 i.length > 0 && (s.find(".focus").removeClass("focus"), i.addClass("focus")) 50 } else s.trigger("click"); 51 return !1 52 } 53 if (38 == t.keyCode) { 54 if (s.hasClass("open")) { 55 var l = n.prevAll(".option:not(.disabled)").first(); 56 l.length > 0 && (s.find(".focus").removeClass("focus"), l.addClass("focus")) 57 } else s.trigger("click"); 58 return !1 59 } 60 if (27 == t.keyCode) s.hasClass("open") && s.trigger("click"); 61 else if (9 == t.keyCode && s.hasClass("open")) return !1 62 }); 63 var n = document.createElement("a").style; 64 return n.cssText = "pointer-events:auto", "auto" !== n.pointerEvents && e("html").addClass("no-csspointerevents"), this 65 } 66 }(jQuery); 67 68(function ($) { 69 $(function () { 70 $('#header-menu__button').on('click', function() { 71 $(this).closest('.mobile_menu').toggleClass('menu-open'); 72 }); 73 }); 74})(jQuery); 75 76$(function(){ 77 $('.header-center__search-button').hover(function(){ 78 $('.header-center__search-field').addClass('when_search-button_hover'); 79 }) 80}); 81 82 $("#button_menu").on("click", function() { 83 $(".main-sidebar").toggle(); 84}); 85 86 87 88$(document).ready( function() { 89 90 updateWorkSchedule(); 91 92 var categoryChildrenOpen = false;
93 94 $('.js-show-category-children').on('click', function() { 95 var t = $(this); 96 97 categoryChildrenOpen = categoryChildrenOpen ? false : true; 98 99 $('.category-children').slideToggle(500); 100 101 categoryChildrenOpen ? t.text('СкÑÑÑÑ ÑазделÑ') : t.text('ÐоказаÑÑ ÑазделÑ'); 102 }); 103 104 $('.header-top__place').click( function() { 105 106 $('.main-select-city').toggleClass('active'); 107 $('.header-top').toggleClass('zi'); 108 callPopup('list-of-cities'); 109 110 }); 111 $('.get_map_city').click(function(){ 112 callPopup('list-of-cities'); 113 }); 114 115 $('[data-tab-target]').click( function() { 116 var target = $(this).attr('data-tab-target'); 117 var container = $(this).attr('data-tab-container'); 118 if( target && container ) { 119 $(container).children().removeClass('active'); 120 $(this).parent().children().removeClass('active'); 121 $(this).addClass('active'); 122 $(target).addClass('active'); 123 } 124 125 }); 126 $('[data-self-active]').click( function() { 127 var selfclass = $(this).data('self-active'); 128 //$(this).toggleClass(selfclass); 129 }); 130 $('[data-another-active]').click( function() { 131 var anotheractive = $(this).data('another-active'); 132 if( anotheractive ) { 133 $(anotheractive).toggleClass('active'); 134 } 135 136 }); 137 var radioInit = function() { 138 $('.radio .radio__element').click( function() { 139 var globalparent = $(this).parent().attr('data-radio-parent'); 140 if( globalparent ) { 141 var target = $(globalparent).children('.radio').children('.radio__element').children('.radio__circle'); 142 } else { 143 var target = $(this).parent('.radio').children().children('.radio__circle'); 144 } 145 target.removeClass('active'); 146 $(this).children('.radio__circle').addClass('active'); 147 }); 148 } 149 radioInit(); 150 $('.sidebar__item .sidebar__item-title').click( function() { 151 $(this).parent().toggleClass('active'); 152 }); 153 $('.checkbox .checkbox__item').click( function() { 154 $(this).children('.checkbox__box').toggleClass('active'); 155 }); 156 $('[data-radio-element]').click( function() { 157 var target = $(this).data('radio-element'); 158 $(target).children('[data-radio-element]').removeClass('active'); 159 $(this).addClass('active'); 160 }); 161 162 var mainSidebar = $('.main-sidebar') 163 , itemWrapper = $('.main-sidebar__item-wrapper'); 164 165 mainSidebar.on('mouseenter', function() { 166 mainSidebar.addClass('is-active'); 167 }).on('mouseleave', function() { 168 mainSidebar.removeClass('is-active'); 169 }); 170 171 $('#compain-slide-container').owlCarousel({ 172 loop:true, 173 //margin:10, 174 navContainer: ".section__nav", 175 nav:true, 176 responsive:{ 177 0:{ 178 items:1 179 }, 180 576:{ 181 items:2 182 }, 183 768:{ 184 items:3 185 }, 186 1200:{ 187 items:5 188 } 189 } 190 }); 191 $('.instagram-section__slider').owlCarousel({ 192 loop:true, 193 // margin:10, 194 navContainer: ".instagram-section__nav", 195 nav:true, 196 touchDrag:true, 197 responsive:{ 198 0:{ 199 items:3 200 }, 201 768:{ 202 items:3 203 }, 204 1200:{ 205 items:4 206 } 207 } 208 }); 209 210 $(document).ready(function(){ 211 $(window).on('resize', function(){ 212 if($(window).width() < 768) { 213 $('.other-products__list').addClass('owl-carousel'); 214 $('.other-products__list').owlCarousel({ 215 loop:true, 216 dots:false, 217 // margin:10, 218 // items:1.2, 219 // center:true, 220 //margin:0, 221 //navContainer: ".other-products__nav", 222 //nav:true, 223 touchDrag:true, 224 0:{ 225 items:1.5 226 } 227 }); 228 } 229 // else if($(window).width() >= 767) { 230 // $('.other-products__list').removeClass('owl-carousel'); 231 // } 232 }).trigger('resize'); 233 }); 234 235 236 237 238 239var mainSlider = $('#main-slider'); 240 241mainSlider.owlCarousel({ 242 loop: true, 243 navContainer: ".main-slider__nav", 244 dotsContainer: ".main-slider__dots", 245 nav: true, 246 animateIn: 'fadeIn', 247 animateOut: 'fadeOut', 248 mouseDrag: false, 249 autoplay: true, 250 autoplayTimeout: 4000, 251 autoplayHoverPause: true, 252 responsive: { 253 0: { 254 items: 1 255 }, 256 768: { 257 items: 1 258 }, 259 1200: { 260 items: 1 261 } 262 } 263}); 264 265// ÐобавлÑем обÑабоÑÑик ÑобÑÑÐ¸Ñ Ð´Ð»Ñ Ð½Ð°Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½Ð° кнопки навигаÑии 266$('.main-slider__nav button').on('mouseenter', function () { 267 mainSlider.trigger('stop.owl.autoplay'); 268}); 269 270// ÐобавлÑем обÑабоÑÑик ÑобÑÑÐ¸Ñ Ð´Ð»Ñ Ð¾Ñвода мÑÑи Ð¾Ñ ÐºÐ½Ð¾Ð¿Ð¾Ðº навигаÑии 271$('.main-slider__nav').on('mouseleave', function () { 272 mainSlider.trigger('play.owl.autoplay'); 273}); 274 275 $('[data-open-target]').click( function(e) { 276 var target = $(this).attr('data-open-target'); 277 var self = $(this); 278 if($(target).hasClass('active')) { 279 $(target).removeClass('active'); 280 $('.popupclose').remove(); 281 } else { 282 $(target).addClass('active'); 283 var close = '<div class="popupclose" data-close-target="'+ target +'"></div>'; 284 $(self).parent().before(close); 285 initTragetClose(); 286 } 287 288 }); 289 290 function initTragetClose() { 291 $('[data-close-target]').click( function() { 292 var target = $(this).attr('data-close-target'); 293 console.log(target); 294 $(target).removeClass('active'); 295 $(this).remove(); 296 }); 297 } 298 299 $(document).ready(function(){ 300 if (document.querySelector(".product-page__slider-wrap")) { 301 let e = new Swiper(".product-page__slider-thumbs",{ 302 spaceBetween: 20, 303 slidesPerView: 3, 304 freeMode: !0, 305 watchSlidesVisibility: !0, 306 direction: "vertical", 307 watchSlidesProgress: !0, 308 preloadImages: !1, 309 lazy: !0, 310 breakpoints: { 311 320: {}, 312 768: {}, 313 1190: { 314 direction: "vertical" 315 } 316 } 317 }); 318 new Swiper(".product-page__slider-top",{ 319 spaceBetween: 0, 320 fadeEffect: { 321 crossFade: !0 322 }, 323 effect: "fade", 324 navigation: { 325 nextEl: ".product-page__slider-prev", 326 prevEl: ".product-page__slider-next" 327 }, 328 thumbs: { 329 swiper: e
330 } 331 }) 332 333 console.log('Swipir'); 334 } 335 /* 336 337 $(window).on('resize', function(){ 338 if($(window).width() >= 1200) { 339 $('#product-gallery').sliderPro({ 340 width: 572, 341 height: 430, 342 orientation: 'vertical', 343 loop: false, 344 arrows: true, 345 buttons: false, 346 thumbnailsPosition: 'left', 347 thumbnailPointer: true, 348 thumbnailWidth: 75, 349 thumbnailHeight: 75, 350 autoplay: false, 351 autoSlideSize: true, 352 lightbox: true 353 // breakpoints: { 354 // 800: { 355 // thumbnailsPosition: 'bottom', 356 // thumbnailWidth: 75, 357 // thumbnailHeight: 75 358 // }, 359 // 500: { 360 // thumbnailsPosition: 'bottom', 361 // thumbnailWidth: 120, 362 // thumbnailHeight: 50 363 // } 364 // } 365 }); 366 } else if($(window).width() < 1200 && $(window).width() >= 768) { 367 $('#product-gallery').sliderPro({ 368 width: 352, 369 height: 302, 370 orientation: 'horizontal', 371 loop: false, 372 arrows: true,
373 buttons: false, 374 thumbnailsPosition: 'bottom', 375 thumbnailPointer: true, 376 thumbnailWidth: 90, 377 thumbnailHeight: 110, 378 autoplay: false, 379 // breakpoints: { 380 // 800: { 381 // thumbnailsPosition: 'bottom', 382 // thumbnailWidth: 75, 383 // thumbnailHeight: 75 384 // }, 385 // 500: { 386 // thumbnailsPosition: 'bottom', 387 // thumbnailWidth: 120, 388 // thumbnailHeight: 50 389 // } 390 // } 391 }); 392 } else if($(window).width() < 768) { 393 $('#product-gallery').sliderPro({ 394 width: 322, 395 height: 242, 396 orientation: 'horizontal', 397 loop: false, 398 arrows: false, 399 buttons: false, 400 touchDrag:true, 401 //thumbnailsPosition: 'bottom', 402 //thumbnailPointer: true, 403 thumbnailWidth: 0, 404 thumbnailHeight: 0, 405 autoplay: false, 406 // breakpoints: { 407 // 800: { 408 // thumbnailsPosition: 'bottom', 409 // thumbnailWidth: 75, 410 // thumbnailHeight: 75 411 // }, 412 // 500: { 413 // thumbnailsPosition: 'bottom', 414 // thumbnailWidth: 120, 415 // thumbnailHeight: 50 416 // } 417 // } 418 }); 419 } 420 // else if($(window).width() >= 767) { 421 // $('.other-products__list').removeClass('owl-carousel'); 422 // } 423 }).trigger('resize'); 424 */ 425 }); 426 427 428 429 430 var callPopup = function(type) { 431 432 switch (type) { 433 case "order-call": 434 var item = '<div class="popup-wrapper" id="modal-ordercall"> ' + 435 '<div class="popup"> <div class="popup__title"> ' + 436 '<p>ÐеÑезвониÑе мне</p> <span class="popup__close"></span> </div> ' + 437 '<div class="call_thank">СпаÑибо за ваÑе обÑаÑение! ÐÑ ÑвÑжемÑÑ Ñ Ð²Ð°Ð¼Ð¸ в ближайÑее вÑемÑ!</div>' + 438 '<div class="poppu__text">ÐÑÑавÑÑе ваÑи конÑакÑнÑе даннÑе и Ð¼Ñ Ð²Ð°Ð¼ ÑкоÑо пеÑезвоним!</div> ' + 439 '<input autocomplete="disabled" class="popup__field" name="c_name" type="text" placeholder="ÐаÑе имÑ" required> ' + 440 '<input autocomplete="disabled" class="popup__field" name="c_phone" type="search" placeholder="+7 "> ' + 441 '<div id="captcha_container" class=""></div>' + 442 '<div class="error"></div>' + 443 '<label class="agreement"><input type="checkbox" name="c_agreement" required>Я ÑоглаÑен Ñ <a href="/terms" target="_blank">положением о пеÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ </a></label>' + 444 '<button class="popup__button call_send">ÐÑпÑавиÑÑ</button> <button class="popup__button close_popup" style="display:none">ÐакÑÑÑÑ</button> </div> </div>'; 445 var html = $.parseHTML(item); 446 $(html).insertBefore('#overlay'); 447 448 449 loadCaptcha(); 450 451 452 453 454 //popupSendInit(); 455 formSend(); 456 jQuery('#overlay').fadeIn(400, 457 function($){ 458 //$('body').addClass("fixed"); 459 jQuery(html) 460 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 461 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 462 }); 463 jQuery('.popup-wrapper .popup__close, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 464 jQuery('.popup-wrapper') 465 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 466 function($){ // пoÑле aнимaÑии 467 //$('body').removeClass("fixed"); 468 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 469 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 470 jQuery('#modal-ordercall .call_thank').hide(); 471 jQuery('#modal-ordercall .close_popup').hide(); 472 jQuery('#modal-ordercall .poppu__text').show(); 473 jQuery('#modal-ordercall .popup__field').show(); 474 jQuery('#modal-ordercall .agreement').show(); 475 jQuery('#modal-ordercall .call_send').show(); 476 477 } 478 ); 479 setTimeout(function() { 480 $(html).remove(); 481 }, 400); 482 }); 483 break; 484 case "order-one": 485 var item = '<div class="popup-wrapper" id="modal-one"> ' + 486 '<div class="popup"> <div class="popup__title"> ' + 487 '<p>ÐÑпиÑÑ Ð² 1 клик</p> <span class="popup__close"></span> </div> ' + 488 '<div class="call_thank">СпаÑибо за ваÑе обÑаÑение! ÐÑ ÑвÑжемÑÑ Ñ Ð²Ð°Ð¼Ð¸ в ближайÑее вÑемÑ!</div>' + 489 '<div class="poppu__text">ÐÑÑавÑÑе ваÑи конÑакÑнÑе даннÑе и Ð¼Ñ Ð²Ð°Ð¼ ÑкоÑо пеÑезвоним!</div> ' + 490 '<input class="popup__field" name="o_name" type="text" placeholder="ÐаÑе имÑ" required> ' + 491 '<input class="popup__field" name="o_phone" type="search" placeholder="+7 "> ' + 492 '<div id="captcha_container" class=""></div>' + 493 '<div class="error"></div>' + 494 '<label class="agreement"><input type="checkbox" name="c_agreement" required>Я ÑоглаÑен Ñ <a href="/terms" target="_blank">положением о пеÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ </a></label>' + 495 '<button class="popup__button one_send">ÐÑпÑавиÑÑ</button> <button class="popup__button close_popup" style="display:none">ÐакÑÑÑÑ</button> </div> </div>'; 496 var html = $.parseHTML(item); 497 $(html).insertBefore('#overlay'); 498 loadCaptcha(); 499 //popupSendInit(); 500 formSend(); 501 jQuery('#overlay').fadeIn(400, 502 function($){ 503 //$('body').addClass("fixed"); 504 jQuery(html) 505 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 506 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 507 }); 508 jQuery('.popup-wrapper .popup__close, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 509 jQuery('.popup-wrapper') 510 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 511 function($){ // пoÑле aнимaÑии 512 //$('body').removeClass("fixed"); 513 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 514 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 515 jQuery('#modal-one .call_thank').hide(); 516 jQuery('#modal-ordercall .close_popup').hide(); 517 jQuery('#modal-one .poppu__text').show(); 518 jQuery('#modal-ordercall .popup__field').show(); 519 jQuery('#modal-ordercall .agreement').show(); 520 jQuery('#modal-ordercall .one_send').show(); 521 } 522 ); 523 setTimeout(function() { 524 $(html).remove(); 525 }, 400); 526 }); 527 break; 528 case "order-free": 529 var item = '<div class="popup-wrapper" id="modal-free"> ' + 530 '<div class="popup"> <div class="popup__title"> ' + 531 '<p>ÐаÑли деÑевле?</p> <span class="popup__close"></span> </div> ' + 532 '<div class="call_thank">СпаÑибо за ваÑе обÑаÑение! ÐÑ ÑвÑжемÑÑ Ñ Ð²Ð°Ð¼Ð¸ в ближайÑее вÑемÑ!</div>' + 533 '<div class="poppu__text">ÐÑÑавÑÑе ваÑи конÑакÑнÑе даннÑе и Ð¼Ñ Ð²Ð°Ð¼ ÑкоÑо пеÑезвоним!</div> ' + 534 '<input class="popup__field" name="f_name" type="text" placeholder="ÐаÑе имÑ" required> ' + 535 '<input class="popup__field" name="f_phone" type="search" placeholder="+7 "> ' + 536 '<input class="popup__field" name="f_link" type="text" placeholder="СÑÑлка на ÑоваÑ"> ' + 537 '<button class="popup__button free_send">ÐÑпÑавиÑÑ</button> </div> </div>'; 538 var html = $.parseHTML(item); 539 $(html).insertBefore('#overlay'); 540 //popupSendInit(); 541 formSend(); 542 jQuery('#overlay').fadeIn(400, 543 function($){ 544 //$('body').addClass("fixed"); 545 jQuery(html) 546 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 547 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 548 }); 549 jQuery('.popup-wrapper .popup__close, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 550 jQuery('.popup-wrapper') 551 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 552 function($){ // пoÑле aнимaÑии 553 //$('body').removeClass("fixed"); 554 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 555 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 556 jQuery('#modal-free .call_thank').hide(); 557 jQuery('#modal-free .poppu__text').show(); 558 559 } 560 ); 561 setTimeout(function() { 562 $(html).remove(); 563 }, 400); 564 }); 565 break; 566 case "write-comment": 567 var item = '<div class="popup-wrapper popup-wrapper_fullwidth" id="write-comment"> ' + 568 '<div class="popup"> ' + 569 '<div class="popup__title"> ' + 570 '<p class="text-left">ÐÑÑавиÑÑ Ð¾ÑзÑв</p><span class="popup__close"></span> ' + 571 '</div>' + 572 '<div class="call_thank">СпаÑибо за Ð²Ð°Ñ Ð¾ÑзÑв. Ðн бÑÐ´ÐµÑ Ð¾Ð¿Ñбликован поÑле пÑовеÑки.</div>' + 573 '<div class="poppu__text text-left">ÐаполниÑе ÑоÑÐ¼Ñ Ð½Ð¸Ð¶Ðµ, ÑÑо Ð±Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸ÑÑ Ð½Ð¾Ð²Ñй комменÑaÑий</div>' + 574 '<input class="popup__field" name="comment_name" type="text" placeholder="ÐаÑе полное Ð¸Ð¼Ñ *" required> ' + 575 '<input class="popup__field" name="comment_mail" type="text" placeholder="E-Mail адÑÐµÑ *"> ' + 576 '<textarea class="popup__textbox" name="comment_message" placeholder="ÐомменÑаÑий к заказÑ"></textarea> ' + 577 '<div class="product-rating product-rating_working rating-4"> ' + 578 '<div id="reviewStars-input">' + 579 ' <input id="star-4" type="radio" value="5" checked
579name="reviewStars"/>' + 580 ' <label title="gorgeous" for="star-4"></label>' + 581 ' <input id="star-3" value="4" type="radio" name="reviewStars"/>' + 582 ' <label title="good" for="star-3"></label>' + 583 ' <input id="star-2" value="3" type="radio" name="reviewStars"/>' + 584 ' <label title="regular" for="star-2"></label>' + 585 ' <input id="star-1" value="2" type="radio" name="reviewStars"/>' + 586 ' <label title="poor" for="star-1"></label>' + 587 ' <input id="star-0" value="1" type="radio" name="reviewStars"/>' + 588 ' <label title="bad" for="star-0"></label>' + 589 '</div>'+ 590 '</div>' + 591 '<button class="popup__button rev_send">оÑпÑавиÑÑ</button> </div></div>'; 592 var html = $.parseHTML(item); 593 $(html).insertBefore('#overlay'); 594 //popupCloseInit(); 595 formSend(); 596 jQuery('#overlay').fadeIn(400, 597 function($){ 598 //$('body').addClass("fixed"); 599 jQuery(html) 600 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 601 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 602 }); 603 jQuery('.popup-wrapper .popup__close, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 604 jQuery('.popup-wrapper') 605 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 606 function($){ // пoÑле aнимaÑии 607 //$('body').removeClass("fixed"); 608 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 609 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 610 jQuery('#write-comment .call_thank').hide(); 611 jQuery('#write-comment .poppu__text').show(); 612 613 } 614 ); 615 setTimeout(function() { 616 $(html).remove(); 617 }, 400); 618 }); 619 break; 620 621 case "write-comment-blog": 622 var item = '<div class="popup-wrapper popup-wrapper_fullwidth" id="write-comment-blog"> <div class="popup"> ' + 623 '<div class="popup__title"> <p class="text-left">ÐÑÑавиÑÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий</p><span class="popup__close"></span> </div>' + 624 '<div class="call_thank">СпаÑибо за Ð²Ð°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий. Ðн бÑÐ´ÐµÑ Ð¾Ð¿Ñбликован поÑле пÑовеÑки.</div>' + 625 '<div class="poppu__text text-left">ÐаполниÑе ÑоÑÐ¼Ñ Ð½Ð¸Ð¶Ðµ, ÑÑо Ð±Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸ÑÑ Ð½Ð¾Ð²Ñй комменÑaÑий</div>' + 626 '<input class="popup__field" name="com_name" type="text" placeholder="ÐаÑе полное Ð¸Ð¼Ñ *" required> ' + 627 '<input class="popup__field" name="com_mail" type="text" placeholder="E-Mail адÑÐµÑ *"> ' + 628 '<textarea class="popup__textbox" name="com_message"placeholder="ÐомменÑаÑий"></textarea> ' + 629 /*'<div class="product-rating product-rating_working rating-4"> ' + 630 '<div class="product-rating__star rate-1"></div>' + 631 '<div class="product-rating__star rate-2"></div>' + 632 '<div class="product-rating__star rate-3"></div>' + 633 '<div class="product-rating__star rate-4"></div' + 634 '><div class="product-rating__star rate-5"></div>' + 635 '</div>' +*/ 636 '<button class="popup__button com_send">оÑпÑавиÑÑ</button> </div></div> '; 637 var html = $.parseHTML(item); 638 $(html).insertBefore('#overlay'); 639 //popupCloseInit(); 640 formSend(); 641 jQuery('#overlay').fadeIn(400, 642 function($){ 643 //$('body').addClass("fixed"); 644 jQuery(html) 645 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 646 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 647 }); 648 jQuery('.popup-wrapper .popup__close, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 649 jQuery('.popup-wrapper') 650 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 651 function($){ // пoÑле aнимaÑии 652 //$('body').removeClass("fixed"); 653 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 654 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 655 jQuery('#write-comment-blog .call_thank').hide(); 656 jQuery('#write-comment-blog .poppu__text').show(); 657 658 } 659 ); 660 setTimeout(function() { 661 $(html).remove(); 662 }, 400); 663 }); 664 break; 665 666 case "list-of-cities": 667 console.log(localStorage.getItem('city')); 668 var flag=0; 669 670 city1=''; 671 if(localStorage.getItem('city')=='ÐоÑква') 672 city1='active'; 673 city2=''; 674 if(localStorage.getItem('city')=='СанкÑ-ÐеÑеÑбÑÑг') 675 city2='active'; 676 city3=''; 677 if(localStorage.getItem('city')=='ÐолгогÑад') 678 city3='active'; 679 city4=''; 680 if(localStorage.getItem('city')=='ÐкаÑеÑинбÑÑг') 681 city4='active'; 682 city5=''; 683 if(localStorage.getItem('city')=='ÐазанÑ') 684 city5='active'; 685 city6=''; 686 if(localStorage.getItem('city')=='ÐÑаÑнодаÑ') 687 city6='active'; 688 city7=''; 689 if(localStorage.getItem('city')=='ÐÑаÑноÑÑÑк') 690 city7='active'; 691 city8=''; 692 if(localStorage.getItem('city')=='Ðижний ÐовгоÑод') 693 city8='active'; 694 city9=''; 695 if(localStorage.getItem('city')=='ÐовоÑибиÑÑк') 696 city9='active'; 697 city10=''; 698 if(localStorage.getItem('city')=='ÐеÑмÑ') 699 city10='active'; 700 city11=''; 701 if(localStorage.getItem('city')=='РоÑÑов-на-ÐоÐ
701½Ñ') 702 city11='active'; 703 city12=''; 704 if(localStorage.getItem('city')=='СамаÑа') 705 city12='active'; 706 city13=''; 707 if(localStorage.getItem('city')=='СоÑи') 708 city13='active'; 709 city14=''; 710 if(localStorage.getItem('city')=='ÐмÑк') 711 city14='active'; 712 city15=''; 713 if(localStorage.getItem('city')=='УÑа') 714 city15='active'; 715 city16=''; 716 if(localStorage.getItem('city')=='ÐладивоÑÑок') 717 city16='active'; 718 city17=''; 719 if(localStorage.getItem('city')=='СамаÑа') 720 city17='active'; 721 city18=''; 722 if(localStorage.getItem('city')=='ТÑменÑ') 723 city18='active'; 724 725 if(localStorage.getItem('city')!='ÐоÑква' 726 &&localStorage.getItem('city')!='СанкÑ-ÐеÑеÑбÑÑг' 727 &&localStorage.getItem('city')!='ÐолгогÑад' 728 &&localStorage.getItem('city')!='ÐкаÑеÑинбÑÑг' 729 &&localStorage.getItem('city')!='ÐазанÑ' 730 &&localStorage.getItem('city')!='ÐÑаÑнодаÑ' 731 &&localStorage.getItem('city')!='ÐÑаÑноÑÑÑк' 732 &&localStorage.getItem('city')!='Ðижний ÐовгоÑод' 733 &&localStorage.getItem('city')!='ÐовоÑибиÑÑк' 734 &&localStorage.getItem('city')!='ÐеÑмÑ' 735 &&localStorage.getItem('city')!='РоÑÑов-на-ÐонÑ' 736 &&localStorage.getItem('city')!='СамаÑа' 737 &&localStorage.getItem('city')!='СоÑи' 738 &&localStorage.getItem('city')!='ÐмÑк' 739 &&localStorage.getItem('city')!='УÑа' 740 &&localStorage.getItem('city')!='ÐладивоÑÑок' 741 &&localStorage.getItem('city')!='СамаÑа' 742 &&localStorage.getItem('city')!='ТÑменÑ' 743 ) 744 flag=1; 745 746 var item = '<div class="popup-wrapper popup-wrapper_fullwidth popup-wrapper_cities-list" id="select-city"> ' + 747 '<div class="popup"> <div class="popup__title"> ' + 748 '<p class="text-left">ÐÑÐ±Ð¾Ñ Ð³Ð¾Ñода</p><span class="popup__close"></span> </div>' + 749 '<div class="poppu__text fullwidth text-left">ÐÑбеÑиÑе ближайÑий к Ðам магазин ÐаÑÐвоÑ:</div>' + 750 /*'<div class="popup-fullwidth-field-wrapper"> ' + 751 '<input class="popup__field popup-fullwidth-field" id="city-name" data-ref="city" type="text" placeholder="ÐведиÑе название гоÑода" required> ' + 752 '<button class="pupup-button__search"></button> </div>' +*/ 753 '<div class="popup-cities-list"> <div class="popup-cities-list__item"> ' + 754 '<div class="radio" data-radio-parent=".popup-cities-list__item"> '; 755 if(flag==1) 756 item=item+'<div class="radio__element"> <div class="radio__circle active"></div><div class="radio__text">'+localStorage.getItem('city')+'</div></div>'; 757 /*item=item+ 758 '<div class="radio__element"> <div class="radio__circle '+city1+'"></div><div class="radio__text" data-region="ÐоÑква" data-postcode="101000">ÐоÑква</div></div>' + 759 '<div class="radio__element"> <div class="radio__circle '+city2+'"></div><div class="radio__text">СанкÑ-ÐеÑеÑбÑÑг</div></div>' + 760 '<div class="radio__element"> <div class="radio__circle '+city3+'"></div><div class="radio__text">ÐолгогÑад</div></div>' + 761 '<div class="radio__element"> <div class="radio__circle '+city4+'"></div><div class="radio__text">ÐкаÑеÑинбÑÑг</div></div>';*/ 762 /*if(flag==0) 763 item=item+ 764 '<div class="radio__element"> <div class="radio__circle '+city5+'"></div><div class="radio__text">ÐазанÑ</div></div>';*/ 765 item=item+ 766 '<div class="radio__element"> <div class="radio__circle '+city6+'"></div><div class="radio__text" data-region="ÐÑаÑнодаÑÑкий">ÐÑаÑнодаÑ</div></div><div class="radio__element"> <div class="radio__circle '+city13+'"></div><div class="radio__text" data-region="ÐÑаÑнодаÑÑкий">СоÑи</div></div><div class="radio__element"> <div class="radio__circle '+city11+'"></div><div class="radio__text" data-region="ÐÑаÑнодаÑÑкий">
766РоÑÑов-на-ÐонÑ</div></div></div></div><div class="popup-cities-list__item"> <div class="radio" data-radio-parent=".popup-cities-list__item"> ' + 767 /*'<div class="radio__element"> <div class="radio__circle '+city7+'"></div><div class="radio__text">ÐÑаÑноÑÑÑк</div></div>' + 768 '<div class="radio__element"> <div class="radio__circle '+city8+'"></div><div class="radio__text">Ðижний ÐовгоÑод</div></div>' + 769 '<div class="radio__element"> <div class="radio__circle '+city9+'"></div><div class="radio__text">ÐовоÑибиÑÑк</div></div>' + 770 '<div class="radio__element"> <div class="radio__circle '+city10+'"></div><div class="radio__text">ÐеÑмÑ</div></div>' + 771 '<div class="radio__element"> <div class="radio__circle '+city11+'"></div><div class="radio__text">РоÑÑов-на-ÐонÑ</div></div>' + 772 '<div class="radio__element"> <div class="radio__circle '+city12+'"></div><div class="radio__text">СамаÑа</div></div></div></div><div class="popup-cities-list__item"> <div class="radio" data-radio-parent=".popup-cities-list__item"> ' +*/ 773 /*'<div class="radio__element"> <div class="radio__circle '+city13+'"></div><div class="radio__text" data-region="ÐÑаÑнодаÑÑкий">СоÑи</div></div>' +*/ 774 /*'<div class="radio__element"> <div class="radio__circle '+city14+'"></div><div class="radio__text">ÐмÑк</div></div>' + 775 '<div class="radio__element"> <div class="radio__circle '+city15+'"></div><div class="radio__text">УÑа</div></div>' + 776 '<div class="radio__element"> <div class="radio__circle '+city16+'"></div><div class="radio__text">ÐладивоÑÑок</div></div>' + 777 '<div class="radio__element"> <div class="radio__circle '+city17+'"></div><div class="radio__text">СамаÑа</div></div>' + 778 '<div class="radio__element"> <div class="radio__circle '+city18+'"></div><div class="radio__text">ТÑменÑ</div></div>' + */ 779 '</div></div></div></div></div>'; 780 var html = $.parseHTML(item); 781 782 // ÐÑÑавиÑÑ Ð² модалке ÑолÑко ÐÑаÑÐ½Ð¾Ð´Ð°Ñ 783 (function(){ 784 var $root = jQuery(html); 785 786 var $keep = $root 787 .find('.popup-cities-list .radio__text') 788 .filter(function(){ 789 return jQuery(this).text().trim() === 'ÐÑаÑнодаÑ'; 790 }) 791 .closest('.radio__element'); 792 793 $root.find('.popup-cities-list .radio__element').not($keep).remove(); 794 795 $root.find('.popup-cities-list__item').each(function(){ 796 if (jQuery(this).find('.radio__element').length === 0) { 797 jQuery(this).remove(); 798 } 799 }); 800 801 $keep.find('.radio__circle').addClass('active'); 802 })(); 803 804 $(html).insertBefore('#overlay'); 805 jQuery('#overlay').fadeIn(400, 806 function($){ 807 //$('body').addClass("fixed"); 808 jQuery(html) 809 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 810 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 811 jQuery("#city-name").suggestions({ 812 token: "136d7d7aa701c69bea0d1954b240f97bfe24b4a6", 813 bounds: "city-settlement", 814 type: "ADDRESS", 815 /* ÐÑзÑваеÑÑÑ, когда полÑзоваÑÐµÐ»Ñ Ð²ÑбиÑÐ°ÐµÑ Ð¾Ð´Ð½Ñ Ð¸Ð· подÑказок */ 816 onSelect: function(suggestion) { 817 console.log(suggestion); 818 localStorage.setItem('set_city',1); 819 localStorage.setItem('city',suggestion.data.city); 820 localStorage.setItem('region',suggestion.data.region); 821 localStorage.setItem('postcode',suggestion.data.postal_code); 822 jQuery.cookie('set_city',1,{ path: '/' }); 823 jQuery.cookie('city',suggestion.data.city,{ path: '/' }); 824 jQuery.cookie('region',suggestion.data.region,{ path: '/' }); 825 jQuery.cookie('postcode',suggestion.data.postal_code,{ path: '/' }); 826 827 828 jQuery('.city_select_title').html(localStorage.getItem('city')); 829 jQuery('.popup-wrapper') 830 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 831 function($){ // пoÑле aнимaÑии 832 //$('body').removeClass("fixed"); 833 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 834 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 835 } 836 ); 837 updateWorkSchedule(); 838 location.reload(); 839 } 840 }); 841 842 }); 843 jQuery('.popup-wrapper .popup__close,.popup-wrapper .popup__button, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 844 jQuery('.popup-wrapper') 845 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 846 function($){ // пoÑле aнимaÑии 847 //$('body').removeClass("fixed"); 848 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 849 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 850 } 851 ); 852 setTimeout(function() { 853 $(html).remove(); 854 }, 400); 855 }); 856 radioInit(); 857 858 jQuery('#select-city .radio__text').click(function(){ 859 localStorage.setItem('set_city',1); 860 localStorage.setItem('city',jQuery(this).html()); 861 localStorage.setItem('region',jQuery(this).attr('data-region')); 862 localStorage.setItem('postcode',jQuery(this).attr('data-postcode')); 863 jQuery.cookie('set_city',1,{ path: '/' }); 864 jQuery.cookie('city',jQuery(this).html(),{ path: '/' }); 865 jQuery.cookie('region',jQuery(this).attr('data-region'),{ path: '/' }); 866 jQuery.cookie('postcode',jQuery(this).attr('data-postcode'),{ path: '/' }); 867 868 869 jQuery('.city_select_title').html(localStorage.getItem('city')); 870 jQuery('.popup-wrapper') 871 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 872 function($){ // пoÑле aнимaÑии 873 //$('body').removeClass("fixed"); 874 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 875 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 876 } 877 ); 878 updateWorkSchedule(); 879 location.reload(); 880 881 }); 882 883
884 jQuery('#select-city .radio__circle').click(function(){ 885 localStorage.setItem('set_city',1); 886 localStorage.setItem('city',jQuery(this).parent().find('.radio__text').html()); 887 localStorage.setItem('region',jQuery(this).parent().find('.radio__text').attr('data-region')); 888 localStorage.setItem('postcode',jQuery(this).parent().find('.radio__text').attr('data-postcode')); 889 jQuery.cookie('set_city',1,{ path: '/' }); 890 jQuery.cookie('city',jQuery(this).parent().find('.radio__text').html(),{ path: '/' }); 891 jQuery.cookie('region',jQuery(this).parent().find('.radio__text').attr('data-region'),{ path: '/' }); 892 jQuery.cookie('postcode',jQuery(this).parent().find('.radio__text').attr('data-postcode'),{ path: '/' }); 893 894 895 jQuery('.city_select_title').html(localStorage.getItem('city')); 896 jQuery('.popup-wrapper') 897 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 898 function($){ // пoÑле aнимaÑии 899 //$('body').removeClass("fixed"); 900 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 901 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 902 } 903 ); 904 updateWorkSchedule(); 905 location.reload(); 906 907 }); 908 909 break; 910 case "answer-popup": 911 var item = '<div class="popup-wrapper popup-wrapper_fullwidth popup-wrapper_answer" id="answer-popup"> <div class="popup"> <div class="popup__title"> <p>СпаÑибо!</p><span class="popup__close"></span> </div><div class="poppu__text fullwidth">ÐÐ°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий ÑÑпеÑно оÑпÑавлен. Ðн бÑÐ´ÐµÑ Ð¾Ð¿Ñбликован поÑле пÑÐ¾Ñ Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð´ÐµÑаÑии.</div><button class="popup__button popup__button_center">ÐакÑÑÑÑ</button> </div></div>'; 912 var html = $.parseHTML(item); 913 // ÐÑÑавлÑем ÑолÑко один ваÑÐ¸Ð°Ð½Ñ Ð³Ð¾Ñода (пеÑвÑй в ÑпиÑке) 914 jQuery('#select-city .popup-cities-list .radio .radio__element').slice(1).remove(); 915 916 $(html).insertBefore('#overlay'); 917 jQuery('#overlay').fadeIn(400, 918 function($){ 919 //$('body').addClass("fixed"); 920 jQuery(html) 921 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 922 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 923 }); 924 jQuery('.popup-wrapper .popup__close,.popup-wrapper .popup__button, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 925 jQuery('.popup-wrapper') 926 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 927 function($){ // пoÑле aнимaÑии 928 //$('body').removeClass("fixed"); 929 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 930 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 931 } 932 ); 933 setTimeout(function() { 934 $(html).remove(); 935 }, 400); 936 }); 937 break; 938 case "your-city-popup": 939 if(localStorage.getItem('set_city')!=1) 940 { 941 942 detect(); 943 } 944 setTimeout(function(){ 945 var city=localStorage.getItem('city'); 946 var item = '<div class="popup-wrapper popup-wrapper_fullwidth popup-wrapper_answer" id="your-city-popup"> <div class="popup"> <div class="popup__title"> <p>ÐÐ°Ñ Ð³Ð¾Ñод '+city+'?</p><span class="popup__close"></span> </div><div class="poppu__text fullwidth">ÐÐ°Ñ Ð³Ð¾Ñод '+city+'? ÐÑли ÑÑо не Ñак - вÑбеÑиÑе Ñвой гоÑод из ÑпиÑка или иÑполÑзÑйÑе поиÑк.</div><button class="popup__button popup__button_left city_yes_btn">Ðа, вÑе веÑно!</button> <button class="popup__button popup__button_right city_no_btn">ÐеÑ, Ñ Ð½Ð°Ñ Ð¾Ð¶ÑÑÑ Ð² дÑÑгом гоÑоде</button> </div></div>'; 947 var html = $.parseHTML(item); 948 $(html).insertBefore('#overlay'); 949 jQuery('#overlay').fadeIn(400, 950 function($){ 951 //$('body').addClass("fixed"); 952 jQuery(html) 953 .css('display', 'block') // ÑбиÑaем Ñ Ð¼oдaлÑнoгo oкнa display: none; 954 .animate({opacity: 1, top: '50%'}, 200); // плaвнo пÑибaвлÑем пÑoзÑaÑнoÑÑÑ oднoвÑеменнo Ño ÑÑезжaнием вниз 955 }); 956 jQuery('.city_yes_btn').click(function(){ 957 localStorage.setItem('set_city',1); 958 jQuery.cookie('set_city',1,{ path: '/' }); 959 jQuery('.city_select_title').html(localStorage.getItem('city')); 960 961 962 jQuery('.popup-wrapper') 963 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 964 function($){ // пoÑле aнимaÑии 965 //$('body').removeClass("fixed"); 966 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 967 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 968 } 969 ); 970 setTimeout(function() { 971 $(html).remove(); 972 }, 400); 973 }); 974 975 jQuery('.city_no_btn').click(function(){ 976 jQuery('.popup-wrapper') 977 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 978 function($){ // пoÑле aнимaÑии 979 //$('body').removeClass("fixed"); 980 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 981 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 982 } 983 ); 984 setTimeout(function() { 985 $(html).remove(); 986 }, 400); 987 setTimeout(function(){ 988 callPopup('list-of-cities'); 989 },1000); 990 991 992 }); 993 994 jQuery('.popup-wrapper .popup__close,.popup-wrapper .popup__button, #overlay').click( function(){ // лoвим клик пo кÑеÑÑÐ¸ÐºÑ Ð¸Ð»Ð¸ пoдлoжке 995 jQuery('.popup-wrapper') 996 .animate({opacity: 0, top: '45%'}, 200, // плaвнo менÑем пÑoзÑaÑнoÑÑÑ Ð½a 0 и oднoвÑеменнo двигaем oкнo ввеÑÑ 997 function($){ // пoÑле aнимaÑии 998 //$('body').removeClass("fixed"); 999 jQuery(this).css('display', 'none'); // делaем ÐµÐ¼Ñ display: none; 1000 jQuery('#overlay').fadeOut(400); // ÑкÑÑвaем пoдлoÐ¶ÐºÑ 1001 } 1002 ); 1003 setTimeout(function() { 1004 $(html).remove(); 1005 }, 400); 1006 }); 1007 1008 },2000); 1009 break; 1010 } 1011 }; 1012 1013 /*if(localStorage.getItem('set_city')!=1) 1014 { 1015 setTimeout(function(){ 1016 1017 $('.geo-confirm').show(); 1018 //callPopup('your-city-popup'); 1019 },1000); 1020 1021 }*/ 1022 1023 //callPopup('answer-popup'); 1024 //callPopup('list-of-cities'); 1025 //callPopup('write-comment'); 1026 //callPopup('order-call'); 1027 //callPopup('write-comment-blog'); 1028 $('.popupOpen').click( function(event){ 1029 event.preventDefault(); // вÑклÑÑaем ÑÑaндaÑÑнÑÑ ÑoÐ»Ñ ÑлеменÑa 1030 var type = $(this).attr('data-popup-type'); 1031 //var target = $(this).attr('data-popup-target'); 1032 //$('#write-comment').css({'display':'block','opacity':'1'};) 1033 callPopup( type ); 1034 /*$('input[name="c_phone"]').mask("+7(999)999-99-99"); 1035 $('input[name="o_phone"]').mask("+7(999)999-99-99"); 1036 $('input[name="f_phone"]').mask("+7(999)999-99-99");*/ 1037 1038 $('input[name="c_phone"]').inputmask({"mask": "+7(999)999-99-99"}); 1039 $('input[name="o_phone"]').inputmask({"mask": "+7(999)999-99-99"}); 1040 $('input[name="f_phone"]').inputmask({"mask": "+7(999)999-99-99"}); 1041 1042 1043 1044 }); 1045 /* ÐaкÑÑÑие мoдaлÑнoгo oкнa, ÑÑÑ Ð´ÐµÐ»aем Ño же Ñaмoе нo в oбÑaÑнoм пoÑÑдке */ 1046 /*var popupSendInit = function() {
1047 $('#modal-ordercall .popup__button').click(function(ev) { 1048 ev.preventDefault(); 1049 var name = $('#name').val(); 1050 var phone = $('#phone').val(); 1051 $.ajax({ 1052 url: "./subscribe.php", // ÐÑда оÑпÑавлÑем даннÑе (обÑабоÑÑик) 1053 type: "post", 1054 dataType: "json", 1055 data: { 1056 "phone" : phone, 1057 "name" : name 1058 } 1059 }); 1060 }); 1061 };*/ 1062 /*var popupCloseInit = function() { 1063 $('.popup__button').click(function(ev) { 1064 setTimeout(function() { 1065 callPopup('answer-popup'); 1066 }, 1000); 1067 }); 1068 };*/ 1069 /*popupSendInit();*/ 1070 1071}); 1072 1073 1074 1075/*$('.open-modal-btn').click(function() { 1076 $('.modal').show(); 1077 $('.dialog').css('display', 'inline-block'); 1078});*/ 1079 1080// close modal 1081$('.modal').click(function() { 1082 $(document).on('click', function(event) { 1083 var select = $('.dialog'); 1084 if ($(event.target).closest(select).length) 1085 return; 1086 $('.modal, .dialog').hide(); 1087 $(document).unbind('click'); 1088 event.stopPropagation(); 1089 }); 1090}); 1091 1092function detectAddressByIp(ip) { 1093 //console.log(1111) 1094 var token = "136d7d7aa701c69bea0d1954b240f97bfe24b4a6"; 1095 var serviceUrl = "https://suggestions.dadata.ru/suggestions/api/4_1/rs/iplocate/address"; 1096 if (ip) { 1097 serviceUrl += "?ip=" + ip; 1098 } 1099 var params = { 1100 type: "GET", 1101 contentType: "application/json", 1102 headers: { 1103 "Authorization": "Token " + token 1104 } 1105 }; 1106 return $.ajax(serviceUrl, params); 1107} 1108 1109// ÐÑÐµÐ¼Ñ ÑабоÑÑ Ð´Ð»Ñ ÑазнÑÑ Ð³Ð¾Ñодов (ÑÑаÑое, Ð´Ð»Ñ ÑовмеÑÑимоÑÑи) 1110const krasnodarWorkSchedule = "пн-пÑ: 9:00 - 19:00, Ñб-вÑ: 10:00 - 18:00"; 1111const sochiWorkSchedule = "пн-Ñб: 10:00 - 19:00, вÑ: вÑÑ Ð¾Ð´Ð½Ð¾Ð¹"; 1112const rostovNaDonuWorkSchedule = "пн-пÑ: 10:00 - 20:00, Ñб-вÑ: вÑÑ Ð¾Ð´Ð½Ð¾Ð¹"; 1113 1114function updateWorkSchedule() { 1115 const city = localStorage.getItem('city'); 1116 1117 jQuery('.header-top__work-schedule').hide(); 1118 1119 switch (city) { 1120 case 'ÐÑаÑнодаÑ': 1121 jQuery('#schedule-krasnodar').show(); 1122 break; 1123 case 'СоÑи': 1124 jQuery('#schedule-sochi').show(); 1125 break; 1126 case 'РоÑÑов-на-ÐонÑ': 1127 jQuery('#schedule-rostov').show(); 1128 break; 1129 default: 1130 jQuery('#schedule-default').show(); 1131 break; 1132 } 1133} 1134 1135function detect() { 1136 var ip = $("input[name='ip']").val(); 1137 var cities = ["ÐвиаÑоÑ","ÐдлеÑ","Ðибга","ÐлекÑеевÑкое","ÐлÑÑмеÑ","ÐÑ ÑÑÑÑÑ","ÐаÑановка","ÐеÑÑÑжевÑкое","ÐзогÑ","ÐолÑÑой ÐиÑмай","ÐаÑваÑовка","ÐаÑдане","ÐаÑдане-ÐеÑино","ÐеÑÑ Ð½ÐµÐ°ÑмÑнÑÐºÐ°Ñ Ð¥Ð¾Ð±Ð·Ð°","ÐеÑÑ Ð½ÐµÐ°ÑмÑнÑкое Ðоо","ÐеÑÑ Ð½ÐµÐ²ÐµÑÑлое","ÐеÑÑ Ð½ÐµÐµ ÐÑÑ","ÐеÑÑ Ð½ÐµÐ½Ð¸ÐºÐ¾Ð»Ð°ÐµÐ²Ñкое","ÐеÑÑ Ð½ÐµÑÑÑÑкое Ðоо","ÐеÑÑ Ð½Ð¸Ð¹ ЮÑÑ","ÐеÑелое","ÐиÑневка","Ðолковка","Ðолконка","ÐоÑонÑовка","ÐÑÑокое","ÐолиÑÑно","ÐоÑное Ðоо","ÐагомÑÑ","ÐÑбÑавнÑй","ÐÑмоловка","Ðзмайловка","ÐллаÑионовка","ÐазаÑий ÐÑод","Ðалеж","Ðалиновое ÐзеÑо","ÐаÑкова ЩелÑ","ÐаÑÑанÑ","ÐÑаевÑко-ÐÑмÑнÑкое","ÐÑаÑÐ½Ð°Ñ ÐолÑ","ÐÑаÑÐ½Ð°Ñ ÐолÑ","ÐÑдепÑÑа","ÐазаÑевÑкое","ÐеÑное","Ðипники","ÐалÑй ÐиÑмай","Ðамедовой Щели","ÐаÑÑино","Ðедовеевка","Ðолдовка","ÐонаÑÑÑÑÑ","Ðаджиго","Ðижнее УÑдеÑе","ÐижнÑÑ Ð¨Ð¸Ð»Ð¾Ð²ÐºÐ°","ÐÑÑл-ÐзÑмÑÑд","ÐеÑвÑй ХаÑÑиз","ÐлаÑÑÑнка","ÐÑогÑеÑÑ","РазбиÑÑй ÐоÑел","Ð ÑÑÑÐºÐ°Ñ Ðамайка","СовеÑ-Ðвадже","Ð¡Ð¾Ð»Ð¾Ñ Ð°Ñл","СоÑи","ТÑеÑÑÑ Ð Ð¾Ñа","Ð¢Ñ Ð°Ð³Ð°Ð¿Ñ","Хаджико","ХаÑÑиз ÐÑоÑой","ХлебоÑоб","ХоÑÑа","ЧеÑеÑнÑ","ÐÑÑоÑадок"]; 1138 detectAddressByIp(ip).done(function(response) { 1139 1140 if (response.location.data.city == 'ÐÑаÑнодаÑ' 1141 || response.location.data.city == 'СоÑи') 1142 1143 { 1144 var city = response.location.data.city; 1145 var region = response.location.data.region; 1146 var postcode = response.location.data.postal_code;
1147 1148 } else if ($.inArray( response.location.data.city, cities) != -1) { 1149 var city = "СоÑи"; 1150 var region = "РеÑпÑблика ÐдÑгеÑ"; 1151 var postcode = ""; 1152 } else if (response.location.data.region == 'ÐÐ±Ñ Ð°Ð·Ð¸Ñ') { 1153 var city = "СоÑи"; 1154 var region = "РеÑпÑблика ÐдÑгеÑ"; 1155 var postcode = ""; 1156 } else { 1157 var city = "ÐÑаÑнодаÑ"; 1158 var region = "ÐÑаÑнодаÑÑкий"; 1159 var postcode = ""; 1160 } 1161 1162 $("#suggestions").text(JSON.stringify(response, null, 4)); 1163 console.log(region); 1164 $.cookie('city',city,{ path: '/' }); 1165 localStorage.setItem('city',city); 1166 $.cookie('region',region,{ path: '/' }); 1167 localStorage.setItem('region',region); 1168 $.cookie('postcode',postcode,{ path: '/' }); 1169 localStorage.setItem('postcode',postcode); 1170 1171 jQuery('.city_select_title').html(localStorage.getItem('city')); 1172 return; 1173 1174 1175 }) 1176 .fail(function(jqXHR, textStatus, errorThrown) { 1177 console.log(textStatus); 1178 console.log(errorThrown); 1179 }); 1180 $.cookie('city','ÐÑаÑнодаÑ',{ path: '/' }); 1181 localStorage.setItem('city','ÐÑаÑнодаÑ'); 1182 $.cookie('region','ÐÑаÑнодаÑÑкий',{ path: '/' }); 1183 localStorage.setItem('region','ÐÑаÑнодаÑÑкий'); 1184 $.cookie('postcode','',{ path: '/' }); 1185 localStorage.setItem('postcode',''); 1186} 1187 1188 1189 1190 1191jQuery(document).ready(function(){ 1192 $('.custom-js-select').niceSelect(); 1193 1194 var stylerRadioChecbox = function () { 1195 $('input.ocf-target').each(function (e, t) { 1196 $(this).wrap('<div class="s-checkbox"></div>').parent().append('<div class="s-checkbox__element"><svg class="icon10 i-check"><use xlink:href="#i-check"></use></svg></div>') 1197 }) 1198 }; 1199 1200 stylerRadioChecbox(), $(".s-checkbox").on("click", ".s-checkbox__element:not(label .s-checkbox__element)", function () { 1201 var e = $(this).prev(); 1202 e.prop("checked") ? e.prop("checked", !1) : e.prop("checked", !0) 1203 }); 1204 1205 jQuery('ul.tabs__caption').each(function() { 1206 jQuery(this).find('li').each(function(i) { 1207 jQuery(this).click(function(){ 1208 jQuery(this).addClass('active').siblings().removeClass('active') 1209 .closest('div.tabs').find('div.tabs__content').removeClass('active').eq(i).addClass('active'); 1210 }); 1211 }); 1212 }); 1213 1214 jQuery('.products-basket__item-plus').click(function(){ 1215 jQuery(this).prev().val(parseInt(jQuery(this).prev().val())+1); 1216 setTimeout(function(){ 1217 jQuery('#cart_form').submit(); 1218 },2000); 1219 }); 1220 jQuery('.products-basket__item-minus').click(function(){ 1221 if(parseInt(jQuery(this).next().val())>1) 1222 { 1223 jQuery(this).next().val(parseInt(jQuery(this).next().val())-1); 1224 setTimeout(function(){ 1225 jQuery('#cart_form').submit(); 1226 },2000); 1227 1228 } 1229 1230 }); 1231 jQuery('.products-basket__item-count-text').change(function(e){ 1232 jQuery('#cart_form').submit(); 1233 }); 1234 1235 jQuery('.send_coupon').on('click', function() { 1236 jQuery.ajax({ 1237 url: 'index.php?route=extension/total/coupon/coupon', 1238 type: 'post', 1239 data: 'coupon=' + encodeURIComponent(jQuery('input[name=\'coupon\']').val()), 1240 dataType: 'json', 1241 success: function(json) { 1242 jQuery('.alert').remove(); 1243 1244 if (json['error']) { 1245 /*jQuery('.breadcrumb').after('<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + '<button type="button" class="close" data-dismiss="alert">×</button></div>'); 1246 1247 jQuery('html, body').animate({ scrollTop: 0 }, 'slow');*/ 1248 } 1249 1250 if (json['redirect']) { 1251 location = json['redirect']; 1252 } 1253 } 1254 }); 1255 }); 1256 1257 jQuery('.checkout_btn').click(function(){ 1258 var error=0; 1259 1260 1261 if(jQuery('.order-tabs__item.active').html()=='ФизиÑеÑкое лиÑо') 1262 { 1263 if(jQuery('input[name="order_fiz_name"]').val().length<3) 1264 { 1265 error=1; 1266 jQuery('input[name="order_fiz_name"]').addClass('error'); 1267 } 1268 else 1269 { 1270 jQuery('input[name="order_fiz_name"]').removeClass('error'); 1271 } 1272 if(jQuery('input[name="order_fiz_phone"]').val().length<3) 1273 { 1274 error=1; 1275 jQuery('input[name="order_fiz_phone"]').addClass('error'); 1276 } 1277 else 1278 { 1279 jQuery('input[name="order_fiz_phone"]').removeClass('error'); 1280 } 1281 1282 if(jQuery('input[name="order_fiz_mail"]').val().length<3) 1283 { 1284 error=1; 1285 jQuery('input[name="order_fiz_mail"]').addClass('error'); 1286 } 1287 else 1288 { 1289 jQuery('input[name="order_fiz_mail"]').removeClass('error'); 1290 } 1291 1292 } 1293 else 1294 { 1295 if(jQuery('input[name="order_ur_name"]').val().length<3) 1296 { 1297 error=1; 1298 jQuery('input[name="order_ur_name"]').addClass('error'); 1299 } 1300 else 1301 { 1302 jQuery('input[name="order_ur_name"]').removeClass('error'); 1303 } 1304 if(jQuery('input[name="order_ur_phone"]').val().length<3) 1305 { 1306 error=1; 1307 jQuery('input[name="order_ur_phone"]').addClass('error'); 1308 } 1309 else 1310 { 1311 jQuery('input[name="order_ur_phone"]').removeClass('error'); 1312 } 1313 1314 if(jQuery('input[name="order_ur_mail"]').val().length<3) 1315 { 1316 error=1; 1317 jQuery('input[name="order_ur_mail"]').addClass('error'); 1318 } 1319 else 1320 { 1321 jQuery('input[name="order_ur_mail"]').removeClass('error'); 1322 } 1323 if(jQuery('input[name="order_ur_inn"]').val().length<3) 1324 { 1325 error=1; 1326 jQuery('input[name="order_ur_inn"]').addClass('error'); 1327 } 1328 else 1329 { 1330 jQuery('input[name="order_ur_inn"]').removeClass('error'); 1331 } 1332 if(jQuery('input[name="order_ur_kpp"]').val().length<3) 1333 { 1334 error=1; 1335 jQuery('input[name="order_ur_kpp"]').addClass('error'); 1336 } 1337 else 1338 { 1339 jQuery('input[name="order_ur_kpp"]').removeClass('error'); 1340 } 1341 if(jQuery('input[name="order_ur_adress"]').val().length<3) 1342 { 1343 error=1; 1344 jQuery('input[name="order_ur_adress"]').addClass('error'); 1345 } 1346 else 1347 { 1348 jQuery('input[name="order_ur_adress"]').removeClass('error'); 1349 } 1350 if(jQuery('input[name="order_ur_bik"]').val().length<3) 1351 { 1352 error=1; 1353 jQuery('input[name="order_ur_bik"]').addClass('error'); 1354 } 1355 else 1356 { 1357 jQuery('input[name="order_ur_bik"]').removeClass('error'); 1358 } 1359 if(jQuery('input[name="order_ur_ras"]').val().length<3) 1360 { 1361 error=1; 1362 jQuery('input[name="order_ur_ras"]').addClass('error'); 1363 } 1364 else 1365 { 1366 jQuery('input[name="order_ur_ras"]').removeClass('error'); 1367 } 1368 if(jQuery('input[name="order_ur_kor"]').val().length<3) 1369 { 1370 error=1; 1371 jQuery('input[name="order_ur_kor"]').addClass('error'); 1372 } 1373 else 1374 { 1375 jQuery('input[name="order_ur_kor"]').removeClass('error'); 1376 } 1377 1378 1379 } 1380 if(error==0) 1381 { 1382 jQuery('input[name="custom_field[address][1]"]').val(jQuery('.order-tabs__item.active').html()); 1383 if(jQuery('.order-tabs__item.active').html()=='ФизиÑеÑкое лиÑо') 1384 { 1385 jQuery('input[name="firstname"]').val(jQuery('input[name="order_fiz_name"]').val()); 1386 jQuery('input[name="email"]').val(jQuery('input[name="order_fiz_mail"]').val()); 1387 jQuery('input[name="telephone"]').val(jQuery('input[name="order_fiz_phone"]').val()); 1388 1389 } 1390 else 1391 {
1392 jQuery('input[name="firstname"]').val(jQuery('input[name="order_ur_name"]').val()); 1393 jQuery('input[name="email"]').val(jQuery('input[name="order_ur_mail"]').val()); 1394 jQuery('input[name="telephone"]').val(jQuery('input[name="order_ur_phone"]').val()); 1395 jQuery('input[name="custom_field[address][2]"]').val(jQuery('input[name="order_ur_inn"]').val()); 1396 jQuery('input[name="custom_field[address][3]"]').val(jQuery('input[name="order_ur_kpp"]').val()); 1397 jQuery('input[name="custom_field[address][4]"]').val(jQuery('input[name="order_ur_adress"]').val()); 1398 jQuery('input[name="custom_field[address][5]"]').val(jQuery('input[name="order_ur_adress1"]').val()); 1399 jQuery('input[name="custom_field[address][6]"]').val(jQuery('input[name="order_ur_bik"]').val()); 1400 jQuery('input[name="custom_field[address][7]"]').val(jQuery('input[name="order_ur_ras"]').val()); 1401 jQuery('input[name="custom_field[address][8]"]').val(jQuery('input[name="order_ur_kor"]').val()); 1402 } 1403 jQuery('#tmdbuttonorder').click(); 1404 setTimeout(function(){ 1405 jQuery('#button-confirm').click(); 1406 },2000); 1407 } 1408 1409 1410 1411 }); 1412 //detect(); 1413 1414 if(localStorage.getItem('city')!=null && localStorage.getItem('city').length>0){ 1415 // jQuery('title').html(jQuery('title').html()+' - '+localStorage.getItem('city')); 1416 } 1417 1418 1419 /* 1420 var myAry = [1, 2, 3]; 1421 jQuery.cookie('com', JSON.stringify(myAry)); 1422 var storedAry = JSON.parse(jQuery.cookie('com')); 1423 console.log(storedAry); 1424 */ 1425 1426 jQuery('.add_comp').click(function(){ 1427 addCom(jQuery(this).attr('data-id')); 1428 }); 1429 jQuery('.add_fav').click(function(){ 1430 addFav(jQuery(this).attr('data-id')); 1431 }); 1432 1433 jQuery('.pagination li').each(function(){ 1434 if(jQuery(this).hasClass('active')) 1435 { 1436 jQuery(this).children('a').addClass('active'); 1437 jQuery(this).children('a').addClass('pagination__item'); 1438 jQuery('.pagination').append(jQuery(this).children('a')); 1439 } 1440 else 1441 { 1442 jQuery(this).children('a').addClass('pagination__item'); 1443 jQuery('.pagination').append(jQuery(this).children('a')); 1444 1445 } 1446 }); 1447 jQuery('.pagination li').remove(); 1448 1449 jQuery('.form-group.row-customer_field20 .radio label input:checked').parent().addClass('active'); 1450 jQuery('#simplecheckout_shipping label input:checked').parent().addClass('active'); 1451 1452 jQuery('.form-group.row-customer_field20 .radio label').click(function(){ 1453 jQuery('.form-group.row-customer_field20 .radio label').removeClass('active'); 1454 jQuery(this).addClass('active'); 1455 }); 1456 jQuery('#simplecheckout_shipping label').click(function(){ 1457 jQuery('#simplecheckout_shipping label').removeClass('active'); 1458 jQuery(this).addClass('active'); 1459 }); 1460 jQuery('.main-map-list-select').click(function(){ 1461 jQuery('.global-list').show(); 1462 jQuery('#map1').hide(); 1463 jQuery(this).addClass('active'); 1464 jQuery('.main-map-select').removeClass('active'); 1465 }); 1466 jQuery('.main-map-select').click(function(){ 1467 jQuery('.global-list').hide(); 1468 jQuery('#map1').show(); 1469 jQuery(this).addClass('active'); 1470 jQuery('.main-map-list-select').removeClass('active'); 1471 }); 1472 1473 1474}); 1475 1476function addCom(id) 1477{ 1478 1479 if(jQuery.cookie('com')==undefined) 1480 { 1481 var storedAry = []; 1482 } 1483 else 1484 { 1485 var storedAry = JSON.parse(jQuery.cookie('com')); 1486 } 1487 1488 var temp=[]; 1489 var flag=0; 1490 for(i=0;i<storedAry.length;i++) 1491 { 1492 if(storedAry[i]==id) 1493 { 1494 flag=1; 1495 } 1496 1497 } 1498 if(flag==0) 1499 { 1500 storedAry.push(parseInt(id)); 1501 jQuery.cookie('com', JSON.stringify(storedAry),{ path: '/' }); 1502 console.log(storedAry); 1503 jQuery('#com_count').html(storedAry.length); 1504 } 1505 else 1506 { 1507 removeCom(id); 1508 } 1509 1510} 1511 1512function removeCom(id) 1513{ 1514 var storedAry = JSON.parse(jQuery.cookie('com')); 1515 var temp=[]; 1516 var flag=0; 1517 for(i=0;i<storedAry.length;i++) 1518 { 1519 if(storedAry[i]!=id) 1520 { 1521 temp.push(storedAry[i]); 1522 } 1523 1524 } 1525 jQuery.cookie('com', JSON.stringify(temp),{ path: '/' }); 1526 jQuery('#com_count').html(temp.length); 1527 storedAry = JSON.parse(jQuery.cookie('com')); 1528 console.log(storedAry); 1529 console.log(JSON.stringify(temp)); 1530 1531} 1532 1533 1534function addFav(id) 1535{ 1536 1537 if(jQuery.cookie('fav')==undefined) 1538 { 1539 var storedAry = []; 1540 } 1541 else 1542 { 1543 var storedAry = JSON.parse(jQuery.cookie('fav')); 1544 } 1545 1546 var temp=[]; 1547 var flag=0; 1548 for(i=0;i<storedAry.length;i++) 1549 { 1550 if(storedAry[i]==id) 1551 { 1552 flag=1; 1553 } 1554 1555 } 1556 if(flag==0) 1557 { 1558 storedAry.push(parseInt(id)); 1559 jQuery.cookie('fav', JSON.stringify(storedAry),{ path: '/' }); 1560 jQuery('#fav_count').html(storedAry.length); 1561 } 1562 else 1563 { 1564 removeFav(id); 1565 } 1566 1567} 1568 1569function removeFav(id) 1570{ 1571 var storedAry = JSON.parse(jQuery.cookie('fav')); 1572 var temp=[]; 1573 var flag=0; 1574 for(i=0;i<storedAry.length;i++) 1575 { 1576 if(storedAry[i]!=id) 1577 { 1578 temp.push(storedAry[i]); 1579 } 1580 1581 } 1582 jQuery.cookie('fav', JSON.stringify(temp),{ path: '/' }); 1583 jQuery('#fav_count').html(temp.length); 1584 storedAry = JSON.parse(jQuery.cookie('fav')); 1585 console.log(storedAry); 1586 1587} 1588 1589 1590jQuery('.feedback-form__button').click(function(e){ 1591 e.preventDefault(); 1592 var error=0; 1593 if(jQuery('.form_contact').find('input[name="name"]').val().length<1) 1594 { 1595 jQuery('.form_contact').find('input[name="name"]').addClass('error'); 1596 error=1; 1597 } 1598 else 1599 { 1600 jQuery('.form_contact').find('input[name="name"]').removeClass('error'); 1601 } 1602 if(jQuery('.form_contact').find('input[name="email"]').val().length<1) 1603 { 1604 jQuery('.form_contact').find('input[name="email"]').addClass('error'); 1605 error=1; 1606 } 1607 else 1608 { 1609 jQuery('.form_contact').find('input[name="email"]').removeClass('error'); 1610 } 1611 1612 if(jQuery('.form_contact').find('textarea[name="message"]').val().length<1) 1613 { 1614 jQuery('.form_contact').find('textarea[name="message"]').addClass('error'); 1615 error=1; 1616 } 1617 else 1618 { 1619 jQuery('.form_contact').find('textarea[name="message"]').removeClass('error'); 1620 } 1621 if(error==0) 1622 { 1623 jQuery.ajax({ 1624 url:'/index.php?route=information/contact/send', 1625 type:'POST', 1626 //dataType:'json', 1627 1628 data: jQuery('.form_contact input[type=\'text\'], .form_contact input[type=\'hidden\'], .form_contact input[type=\'radio\']:checked, .form_contact input[type=\'checkbox\']:checked, .form_contact select, .form_contact textarea'), 1629 1630 success:function(data){ 1631 console.log(data); 1632 location.href = data; 1633 1634 } 1635 }); 1636 } 1637 1638}); 1639 1640function formSend() 1641{ 1642 jQuery('.call_send').click(function(e){ 1643 e.preventDefault(); 1644 var error=0; 1645 if(jQuery('input[name="c_name"]').val().length<3) 1646 { 1647 jQuery('input[name="c_name"]').addClass('error'); 1648 error=1; 1649 } 1650 else 1651 { 1652 jQuery('input[name="c_name"]').removeClass('error'); 1653 } 1654 if(jQuery('input[name="c_phone"]').val().length<16) 1655 { 1656 jQuery('input[name="c_phone"]').addClass('error'); 1657 error=1; 1658 } 1659 else 1660 { 1661 jQuery('input[name="c_phone"]').removeClass('error'); 1662 } 1663 if(error==0) 1664 { 1665 jQuery.ajax({ 1666 url:'/index.php?route=extension/module/sobfeedback/send', 1667 type:'POST', 1668 dataType:'json', 1669 data:{ 1670 'sob_input[1][ÐмÑ]':jQuery('input[name="c_name"]').val(), 1671 'sob_input[2][ТелеÑон]':jQuery('input[name="c_phone"]').val(), 1672 'recaptcha':jQuery('[name="g-recaptcha-response"]').val(), 1673 //'link_page': window.location.href, 1674 'module_name': 'ÐеÑезвониÑе мне', 1675 'module_id': 34, 1676 'form_success': 'СообÑение ÑÑпеÑно оÑпÑавлено' 1677 }, 1678 success:function(data){ 1679 //console.log(data); 1680 1681 jQuery('.popup-wrapper .error').html(''); 1682 jQuery('.popup-wrapper .error').hide(); 1683 if (data.error) { 1684 jQuery('.popup-wrapper .error').html(data.error); 1685 jQuery('.popup-wrapper .error').show(); 1686 } else { 1687 jQuery('#modal-ordercall .close_popup').show(); 1688 jQuery('#modal-ordercall .call_thank').show(); 1689 jQuery('#modal-ordercall .poppu__text').hide(); 1690 jQuery('#modal-ordercall .popup__field').hide(); 1691 jQuery('#modal-ordercall .agreement').hide(); 1692 jQuery('#modal-ordercall .one_send').hide(); 1693 jQuery('#modal-ordercall #captcha_container').hide(); 1694 1695 jQuery('#modal-ordercall .call_send').hide(); 1696 jQuery('input[name="c_name"]').val(''); 1697 jQuery('input[name="c_phone"]').val(''); 1698 } 1699 1700 1701 } 1702 }); 1703 } 1704 1705 }); 1706 1707 1708 jQuery('.free_send').click(function(e){ 1709 e.preventDefault(); 1710 var error=0; 1711 if(jQuery('input[name="f_name"]').val().length<3) 1712 { 1713 jQuery('input[name="f_name"]').addClass('error'); 1714 error=1; 1715 } 1716 else 1717 { 1718 jQuery('input[name="f_name"]').removeClass('error'); 1719 } 1720 if(jQuery('input[name="f_phone"]').val().length<16) 1721 { 1722 jQuery('input[name="f_phone"]').addClass('error'); 1723 error=1; 1724 } 1725 else 1726 { 1727 jQuery('input[name="f_phone"]').removeClass('error'); 1728 } 1729 if(jQuery('input[name="f_link"]').val().length<3) 1730 { 1731 jQuery('input[name="f_link"]').addClass('error'); 1732 error=1; 1733 } 1734 else 1735 { 1736 jQuery('input[name="f_link"]').removeClass('error'); 1737 } 1738 1739 if(error==0) 1740 { 1741 1742 console.log(9) 1743 jQuery.ajax({ 1744 url:'/index.php?route=extension/module/sobfeedback/send', 1745 type:'POST', 1746 dataType:'json', 1747 data:{ 1748 'sob_input[1][ÐмÑ]':jQuery('input[name="f_name"]').val(), 1749 'sob_input[2][ТелеÑон]':jQuery('input[name="f_phone"]').val(), 1750 'sob_input[3][СÑÑлка на более низкÑÑ ÑенÑ]':jQuery('input[name="f_link"]').val(), 1751 'link_page': window.location.href, 1752 'module_name': 'ÐаÑли деÑевле?', 1753 'module_id': 35, 1754 'form_success': 'СообÑение ÑÑпеÑно оÑпÑавлено' 1755 }, 1756 success:function(data){ 1757 //console.log(data); 1758 jQuery('#modal-free .call_thank').show(); 1759 jQuery('#modal-free .poppu__text').hide(); 1760 jQuery('input[name="f_name"]').val(''); 1761 jQuery('input[name="f_phone"]').val(''); 1762 jQuery('input[name="f_link"]').val(''); 1763 1764 jQuery('input[name="f_name"]').hide(); 1765 jQuery('input[name="f_phone"]').hide(); 1766 jQuery('input[name="f_link"]').hide(); 1767 jQuery('.popup__button.free_send').hide(); 1768 1769 } 1770 }); 1771 } 1772 1773 }); 1774 1775 1776 jQuery('.one_send').click(function(e){ 1777 e.preventDefault(); 1778 var error=0; 1779 if(jQuery('input[name="o_name"]').val().length<3) 1780 { 1781 jQuery('input[name="o_name"]').addClass('error'); 1782 error=1; 1783 } 1784 else 1785 { 1786 jQuery('input[name="o_name"]').removeClass('error'); 1787 } 1788 if(jQuery('input[name="o_phone"]').val().length<16) 1789 { 1790 jQuery('input[name="o_phone"]').addClass('error'); 1791 error=1; 1792 } 1793 else 1794 { 1795 jQuery('input[name="o_phone"]').removeClass('error'); 1796 } 1797 if(error==0) 1798 { 1799 jQuery.ajax({ 1800 url:'/index.php?route=extension/module/sobfeedback/send', 1801 type:'POST', 1802 dataType:'json', 1803 data:{ 1804 'sob_input[1][ÐмÑ]':jQuery('input[name="o_name"]').val(), 1805 'sob_input[2][ТелеÑон]':jQuery('input[name="o_phone"]').val(), 1806 'recaptcha':jQuery('[name="g-recaptcha-response"]').val(), 1807 'link_page': window.location.href, 1808 'module_name': 'ÐÑпиÑÑ Ð² 1 клик', 1809 'module_id': 36, 1810 'form_success': 'СообÑение ÑÑпеÑно оÑпÑавлено' 1811 }, 1812 success:function(data){ 1813 //console.log(data); 1814 1815 jQuery('.popup-wrapper .error').html(''); 1816 jQuery('.popup-wrapper .error').hide(); 1817 if (data.error) { 1818 jQuery('.popup-wrapper .error').html(data.error); 1819 jQuery('.popup-wrapper .error').show(); 1820 } else { 1821 jQuery('#modal-one .call_thank').show(); 1822 jQuery('#modal-one .poppu__text').hide(); 1823 jQuery('#modal-one .popup__field').hide(); 1824 jQuery('#modal-one .agreement').hide(); 1825 jQuery('#modal-one .one_send').hide(); 1826 jQuery('#modal-one #captcha_container').hide(); 1827 jQuery("#modal-one .close_popup").show(); 1828 jQuery('#modal-one .call_send').hide(); 1829 jQuery('input[name="o_name"]').val(''); 1830 jQuery('input[name="o_phone"]').val(''); 1831 } 1832 1833 } 1834 }); 1835 } 1836 1837 }); 1838 1839 jQuery('.close_popup').click(function() { 1840 jQuery("#overlay").click(); 1841 }); 1842 jQuery('.rev_send').click(function(e){ 1843 e.preventDefault(); 1844 var error=0; 1845 if(jQuery('input[name="comment_name"]').val().length<3) 1846 { 1847 jQuery('input[name="comment_name"]').addClass('error'); 1848 error=1; 1849 } 1850 else 1851 { 1852 jQuery('input[name="comment_name"]').removeClass('error'); 1853 } 1854 if(jQuery('input[name="comment_mail"]').val().length<3) 1855 { 1856 jQuery('input[name="comment_mail"]').addClass('error'); 1857 error=1; 1858 } 1859 else 1860 { 1861 jQuery('input[name="comment_mail"]').removeClass('error'); 1862 } 1863 if(jQuery('textarea[name="comment_message"]').val().length<30) 1864 { 1865 jQuery('textarea[name="comment_message"]').addClass('error'); 1866 error=1; 1867 } 1868 else 1869 { 1870 jQuery('textarea[name="comment_message"]').removeClass('error'); 1871 } 1872 1873 if(error==0) 1874 { 1875 jQuery.ajax({ 1876 url:'/index.php?route=product/product/write&product_id='+jQuery('input[name="product_id"]').val(), 1877 type:'POST', 1878 dataType:'json', 1879 data:{ 1880 'name': jQuery('input[name="comment_name"]').val(), 1881 'text': jQuery('textarea[name="comment_message"]').val(), 1882 'rating': jQuery('input[name="reviewStars"]:checked').val() 1883 1884 }, 1885 success:function(data){ 1886 console.log(data); 1887 jQuery('#write-comment .call_thank').show(); 1888 jQuery('#write-comment .poppu__text').hide(); 1889 jQuery('input[name="comment_name"]').val(''); 1890 jQuery('input[name="comment_mail"]').val(''); 1891 jQuery('textarea[name="comment_message"]').val(''); 1892 } 1893 }); 1894 } 1895 1896 }); 1897 1898 jQuery('.com_send').click(function(e){ 1899 e.preventDefault(); 1900 var error=0; 1901 if(jQuery('input[name="com_name"]').val().length<3) 1902 { 1903 jQuery('input[name="com_name"]').addClass('error'); 1904 error=1; 1905 } 1906 else 1907 { 1908 jQuery('input[name="com_name"]').removeClass('error'); 1909 } 1910 if(jQuery('input[name="com_mail"]').val().length<3) 1911 { 1912 jQuery('input[name="com_mail"]').addClass('error'); 1913 error=1; 1914 } 1915 else 1916 { 1917 jQuery('input[name="com_mail"]').removeClass('error'); 1918 } 1919 if(jQuery('textarea[name="com_message"]').val().length<1) 1920 { 1921 jQuery('textarea[name="com_message"]').addClass('error')
1921; 1922 error=1; 1923 } 1924 else 1925 { 1926 jQuery('textarea[name="com_message"]').removeClass('error'); 1927 } 1928 1929 if(error==0) 1930 { 1931 jQuery.ajax({ 1932 url:'/index.php?route=blog/blog/write&blog_id='+jQuery('input[name="blog_id"]').val(), 1933 type:'POST', 1934 dataType:'json', 1935 data:{ 1936 'name': jQuery('input[name="com_name"]').val(), 1937 'email': jQuery('input[name="com_mail"]').val(), 1938 'comment': jQuery('textarea[name="com_message"]').val() 1939 1940 }, 1941 success:function(data){ 1942 console.log(data); 1943 jQuery('#write-comment-blog .call_thank').show(); 1944 jQuery('#write-comment-blog .poppu__text').hide(); 1945 jQuery('input[name="com_name"]').val(''); 1946 jQuery('input[name="com_mail"]').val(''); 1947 jQuery('textarea[name="com_message"]').val(''); 1948 } 1949 }); 1950 } 1951 1952 }); 1953 1954 1955 jQuery('.o_type').append(jQuery('.form-group.row-customer_field20')); 1956 jQuery('.o_del').append(jQuery('.o_del_get')); 1957 jQuery('#shipping_address_field28').styler(); 1958
1959 jQuery('#simplecheckout_payment input:checked').parent().parent().addClass('active'); 1960 1961 if(jQuery('[name="shipping_method"]:checked').val()=='cs.cs_0') 1962 { 1963 jQuery('.row-shipping_address_city,.row-shipping_address_field29,.row-shipping_address_field30,.row-shipping_address_field31').hide(); 1964 jQuery('.row-shipping_address_field28').show(); 1965 } 1966 else 1967 { 1968 jQuery('.row-shipping_address_city,.row-shipping_address_field29,.row-shipping_address_field30,.row-shipping_address_field31').show(); 1969 jQuery('.row-shipping_address_field28').hide(); 1970 1971 } 1972 1973 if(jQuery('[name="customer[field20]"]:checked').val()=='ЮÑидиÑеÑкое лиÑо') 1974 { 1975 jQuery('#simplecheckout_payment').hide(); 1976 } 1977 else 1978 { 1979 jQuery('#simplecheckout_payment').show(); 1980 } 1981 1982 console.log(jQuery.cookie('city')); 1983 console.log(jQuery('#xpayment.xpayment3')); 1984 if(jQuery.cookie('city')!='ÐÑаÑнодаÑ') 1985 { 1986 console.log(1); 1987 jQuery('[value="xpayment.xpayment3"]').parent().parent().hide(); 1988 } 1989 else 1990 { 1991 console.log(2); 1992 jQuery('[value="xpayment.xpayment3"]').parent().parent().show(); 1993 } 1994 1995} 1996 1997 1998 1999$(document).on("click", "#your-city-popup>.popup>.popup__title>.popup__close", function (e) { 2000 e.preventDefault(); 2001 $('#your-city-popup').find('.popup__button.popup__button_left.city_yes_btn').click(); 2002}); 2003$(document).on("click", ".mobile_search>i", function (e) { 2004 e.preventDefault(); 2005 if ($('.search_block_mobile').hasClass('active')) { 2006 $('.search_block_mobile').slideUp(); 2007 $('.search_block_mobile').removeClass('active'); 2008 2009 } else { 2010 $('.search_block_mobile').slideDown(); 2011 $('.search_block_mobile').addClass('active'); 2012 2013 } 2014}); 2015 2016 2017 2018$(document).on("click", ".geo-confirm__close-button", function (e) { 2019 $(this).closest('.geo-confirm').hide(); 2020}); 2021 2022 2023$(document).on("click", "#close-geo-confirm", function (e) { 2024 localStorage.setItem('set_city',1); 2025 $(this).closest('.geo-confirm').find('.geo-confirm__close-button').click(); 2026}); 2027 2028$(document).on("click", "#choose-town", function (e) { 2029 $('.header-top__place').click(); 2030 $(this).closest('.geo-confirm').find('.geo-confirm__close-button').click(); 2031});
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.