(function( $ ) { $( document ).ready(function() {
'use strict';
/**
* All of the code for your public-facing JavaScript source
* should reside in this file.
*
* Note: It has been assumed you will write jQuery code here, so the
* $ function reference has been prepared for usage within the scope
* of this function.
*
* This enables you to define handlers, for when the DOM is ready:
*
* $(function() {
*
* });
*
* When the window is loaded:
*
* $( window ).load(function() {
*
* });
*
* ...and/or other possibilities.
*
* Ideally, it is not considered best practise to attach more than a
* single DOM-ready or window-load handler for a particular page.
* Although scripts in the WordPress core, Plugins and Themes may be
* practising this, we should strive to set a better example in our own work.
*/
/*ПЕРЕПИСАТЬ ВСЕ ПО РЕКОМЕНДАЦИЯМ ВЫШЕ!*/
/*ВЫКЛЮЧЕНО, ТАК КАК ОТКЛЮЧЕН БЛОГ?*/
/*jQuery(".owl-carousel").owlCarousel({
loop: true,
responsiveClass: true,
items: 1,
nav: true,
dots: false,
autoplay: false,
margin: 30,
});*/
/*ONSENT MAIL - START*/
document.addEventListener( "wpcf7mailsent", function( event ) {
jm_mail_sent(event);
}, false );
function jm_mail_sent(event) {
if (event["detail"]["contactFormId"] == "434") {
$(".jm-sentok-order").css("opacity", "1");
}
if (event["detail"]["contactFormId"] == "468") {
/*yaCounter49608673.reachGoal("call-send-bottom");*/
$(".jm-modal-before").css("display", "none");
$(".jm-modal-after").css("display", "block");
}
}
if (link != "/") {
/*console.log($("h1").text());*/
$("input[name=\'remont-item\']").val($("h1").text());
}
$(".jm-order-section input[type=\'submit\']").click(function() {
$(".jm-sentok-order").css("opacity", "0");
});
/*ONSENT MAIL - END*/
/*УПРАВЛЕНИЕ COOKIES - НАЧАЛО*/
//Например, установка куки без срока хранения:
//set_cookie ( "username", "Вася" );
//Установка куки со сроком хранения до 15 февраля 2011:
//set_cookie ( "username", "Вася", 2011, 01, 15 );
//Установка куки со сроком хранения, доменом ruseller.com, использованием SSL, но без пути:
//set_cookie ( "username", "Вася", 2003, 01, 15, "",
// "ruseller.com", "secure" );
function set_cookie ( name, value, expires_year, expires_month, expires_day, path, domain, secure )
{
var cookie_string = name + "=" + escape ( value );
if ( expires_year )
{
var expires = new Date ( expires_year, expires_month, expires_day );
cookie_string += "; expires=" + expires.toGMTString();
}
if ( path )
cookie_string += "; path=" + escape ( path );
if ( domain )
cookie_string += "; domain=" + escape ( domain );
if ( secure )
cookie_string += "; secure";
document.cookie = cookie_string;
}
function delete_cookie ( cookie_name )
{
var cookie_date = new Date ( );
cookie_date.setTime ( cookie_date.getTime() - 1 );
document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}
function get_cookie ( cookie_name )
{
var results = document.cookie.match ( "(^|;) ?" + cookie_name + "=([^;]*)(;|$)" );
if ( results )
return ( unescape ( results[2] ) );
else
return null;
}
/*УПРАВЛЕНИЕ COOKIES - КОНЕЦ*/
/*ОПОВЕЩЕНИЕ О КУКАХ - НАЧАЛО*/
$(".jm-agreement-popup .jm-cross-close").click(function() {
$(".jm-agreement-popup").css("display","none");
});
/*if ( ! get_cookie ( "agreement" ) )
{
var current_date = new Date;
var cookie_year = current_date.getFullYear ( ) + 1;
var cookie_month = current_date.getMonth ( );
var cookie_day = current_date.getDate ( );
set_cookie ( "username", username, cookie_year, cookie_month, cookie_day );
}*/
/*ОПОВЕЩЕНИЕ О КУКАХ - КОНЕЦ*/
var jm_on_mobile = false,
jm_perf_1,
jm_perf_2,
jm_navigator,
jm_restartOnVis/*(Function)*/,
jm_in_other = false;
/*PHP to JS COLORS - START:*/
var jm_main_color = "' . $jm_main_color . '";
var jm_cont_color_1 = "' . $jm_cont_color_1 . '";
var jm_cont_color_2 = "' . $jm_cont_color_2 . '";
var jm_cont_color_3 = "' . $jm_cont_color_3 . '";
var jm_cont_color_4 = "' . $jm_cont_color_4 . '";
var jm_gray_color_1 = "' . $jm_gray_color_1 . '";
var jm_gray_color_2 = "' . $jm_gray_color_1 . '";
/*PHP to JS COLORS - END:*/
var link = window.location.pathname.toLowerCase();
console.log(link);
function jm_window_heigth() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == "number" ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in "standards compliant mode"
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
return (myHeight);
}
if (localStorage.getItem("mobile") == null) {
jm_mobile_detection();
} else if (localStorage.getItem("mobile") == "true") {
jm_short_js_on_mobile();
/*-*/jm_js_for_all();
} else {
jm_js_for_all();
}
function jm_devices_inners_show() {
$(".jm-imac-inner, .jm-macbook-inner, .jm-iphone-inner, .jm-devices-phrase-block").css("opacity", "1");
}
/*ВРЕМЕННО ДЛЯ ОТЛАДКИ (сброс локальных ключей) - НАЧАЛО*/
/*$("#menu-item-XXX").click(function() {localStorage.removeItem("mobile"); localStorage.removeItem("high_perfomance"); console.log("Ключи localStorage удалены!")});*/
/*ВРЕМЕННО ДЛЯ ОТЛАДКИ (сброс локальных ключей) - КОНЕЦ*/
/*ОПРЕДЕЛЕНИЕ МОБИЛЬНОГО УСТРОЙСТВА - НАЧАЛО*/
function jm_mobile_detection() {
if (/(iphone|ipod|ipad|android|iemobile|webos|fennec|blackberry|kindle|series60|playbook|opera\smini|opera\smobi|opera\stablet|symbianos|palmsource|palmos|blazer|windows\sce|windows\sphone|wp7|bolt|doris|dorothy|gobrowser|iris|maemo|minimo|netfront|semc-browser|skyfire|teashark|teleca|uzardweb|avantgo|docomo|kddi|ddipocket|polaris|eudoraweb|opwv|plink|plucker|pie|xiino|benq|playbook|bb|cricket|dell|bb10|nintendo|up.browser|playstation|tear|mib|obigo|midp|mobile|tablet)/.test(navigator.userAgent.toLowerCase())) {
jm_short_js_on_mobile();
/*-*/jm_js_for_all();
localStorage.setItem("mobile", "true");
} else {
jm_js_for_all();
}
}
/*ОПРЕДЕЛЕНИЕ МОБИЛЬНОГО УСТРОЙСТВА - КОНЕЦ*/
/*ОПРЕДЕЛЕНИЕ БРАУЗЕРА - НАЧАЛО*/
/*function jm_navigator_detection() {
navigator.sayswho = (function(){
var ua= navigator.userAgent, tem,
M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
if(/trident/i.test(M[1])){
tem= /\brv[ :]+(\d+)/g.exec(ua) || [];
return "IE "+(tem[1] || "");
}
if(M[1]=== "Chrome"){
tem= ua.match(/\b(OPR|Edge)\/(\d+)/);
if(tem!= null) return tem.slice(1).join(" ").replace("OPR", "Opera");
}
M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, "-?"];
if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]);
return M.join(" ");
})();
jm_navigator = navigator.sayswho;
console.log("Клиентский браузер: " + jm_navigator);
jm_navigator = jm_navigator.toUpperCase();
}*/
/*ОПРЕДЕЛЕНИЕ БРАУЗЕРА - КОНЕЦ*/
function jm_js_for_all() {
function jm_map_overlay_remove() {
if (jm_on_mobile) {
$(window).on( "scroll", function() {
if($(window).scrollTop() >= $(document).height() - $(window).height()) {
setTimeout(function() {$("#jm-map-overlay").detach();}, 1000);
$(window).off( "scroll" );
}
});
} else {$("#jm-map-overlay").detach()};
}
jm_map_overlay_remove();
/*$(".jm-full-section-img").css("opacity","1");*/
/*SCROLL TO TOP BUTTON - START*/
/*$(".jm-top-button").click(function() {
$("html").animate({
scrollTop: 0
}, 300);
});
$(window).scroll(function() {
var currentScroll = $(window).scrollTop();
if (currentScroll > 200) {
$(".jm-top-button").css("opacity", "1");
} else {
$(".jm-top-button").css("opacity", "0");
}
});*/
/*SCROLL TO TOP BUTTON - END*/
/*$(window).scroll(function() {
var currentScr = $(window).scrollTop();*/
/*console.log(currentScr);
console.log($("body").innerHeight() - jm_window_heigth());*/
/*if (currentScr != $("body").innerHeight() - jm_window_heigth() ) {*/
/*$(".jm-agreement-popup").animate({
bottom: "40px"
}, 1000);*/
/*$(".jm-agreement-popup").css("bottom", "0px");
} else {
$(".jm-agreement-popup").css("display", "none").css("bottom", "31px").css("display", "none").fadeIn(1000);
});}*/
/*AIMING ANINATION - START*/
$(".jm-second-section .vc_col-sm-3, .jm-second-section .col-sm-3").hover(function(){
if (link=="/televizor" || link=="/remont-televizorov-v-saratove-i-engelse") {return;}
if (link=="/"||link=="/uslugi"||link=="/USLUGI"||link=="/shop"||link=="/SHOP") {
$(this).find(".fil_i1").css({"fill":"#df1229"});
}
$(this).find("a").css("color","#df1229");
$(this).find(".wpb_single_image").toggleClass("jm-dn");
$(this).find(".jm-aim-lefttop").animate({
opacity: 1,
left: "+=20px",
top: "+=20px"
}, 100);
$(this).find(".jm-aim-leftbottom").animate({
opacity: 1,
left: "+=20px",
bottom: "+=20px"
}, 100);
$(this).find(".jm-aim-righttop").animate({
opacity: 1,
right: "+=20px",
top: "+=20px"
}, 100);
$(this).find(".jm-aim-rightbottom").animate({
opacity: 1,
right: "+=20px",
bottom: "+=20px"
}, 100);
}, function(){
if (link=="/televizor"|| link=="/remont-televizorov-v-saratove-i-engelse") {return;}
$(this).find(".fil_i1").css({"fill":"#006f63"});
$(this).find("a").css("color","#222");
$(this).find(".wpb_single_image").toggleClass("jm-dn");
$(this).find(".jm-aim-lefttop").animate({
opacity: 0,
left: "-=20px",
top: "-=20px"
}, 100);
$(this).find(".jm-aim-leftbottom").animate({
opacity: 0,
left: "-=20px",
bottom: "-=20px"
}, 100);
$(this).find(".jm-aim-righttop").animate({
opacity: 0,
right: "-=20px",
top: "-=20px"
}, 100);
$(this).find(".jm-aim-rightbottom").animate({
opacity: 0,
right: "-=20px",
bottom: "-=20px"
}, 100);
});
$(".jm-second-section .vc_col-sm-3, .jm-second-section .col-sm-3").not(".y-brands-imgs .vc_col-sm-3").click(function(){ /*ПОВТОР В ДВУХ БЛОКАХ...*/
window.location.href=$(this).find("a").attr("href");
});
$(".jm-second-section .vc_col-sm-3").not(".jm-no-aim").not(".y-brands-imgs .vc_col-sm-3").click(function(){
window.location.href=$(this).find("a").attr("href");
});
/*AIMING ANINATION - END*/
/*TABS NEXT - START*/
var jm_tab=2;
var jm_manual=true;
$("#tabchange").click(function(e){
e.preventDefault();
jm_manual=false;
$(".jm-how-section .vc_tta-tabs-list .vc_tta-tab:nth-child("+jm_tab+")").find("a").click();
jm_tab++;
});
$(".jm-how-section .vc_tta-tabs-list .vc_tta-tab").click(function(){
$(".jm-tab-next").css("display", "block");
if (jm_manual) {jm_tab=$(this).index()+2;}
jm_manual=true;
});
$(".jm-how-section .vc_tta-tabs-list .vc_tta-tab:nth-child(6)").click(function(){
$(".jm-tab-next").css("display", "none");
});
/*TABS NEXT - END*/
/*FLEX SLIDER - START*/
$(".jm-slider-offer").hover(function(){
$(".flex-prev").css({"opacity":"0.7", "left":"10px"});
$(".flex-next").css({"opacity":"0.7", "right":"10px"});
}, function(){
$(".flex-prev").css({"opacity":"0", "left":"-50px"});
$(".flex-next").css({"opacity":"0", "right":"-50px"});
});
/*FLEX SLIDER - END*/
/*BLOG - START*/
$(".jm-blog-row .col-sm-6 .jm-wrapper").hover(function(){
$(this).css("border", "1px solid #df1229");
}, function(){
$(this).css("border", "none");
});
/*BLOG - END*/
$("#menu-item-808").click(function() {
$(".bb-dropdown-menu").css("left", "-3000px");
window.location.href = "/uslugi";
});
$("#menu-item-685").click(function() {
$(".bb-dropdown-menu").css("left", "-3000px");
window.location.href = "/shop";
});
}
function jm_short_js_on_mobile() {
jm_on_mobile = true;
/*ОТЛАДКА ТЕМП*/
/*console.output = [];*/
/*console.log = (function(log) {
return function() {
log.apply(console, arguments);
var bdy = document.getElementsByTagName("body");
var hdr = document.getElementsByTagName("header");
var jm_console_section = document.createElement("div");
jm_console_section.className = "jm-mobile-console";
jm_console_section.innerHTML = ("Консоль: " + arguments[0]+"
");
bdy[0].insertBefore(jm_console_section, hdr[0]);
}
}(console.log));*/
/*ОТЛАДКА ТЕМП*/
}
/*CALL MODAL - START*/
var jm_scroll=0;
$(".jm-call-btn").click(function(e) {
jm_scroll = $(window).scrollTop();
e.preventDefault();
window.scrollTo(0,0);
var jm_btn_title;
var jm_btn_initiator;
switch ($(this).attr("id")) {
case "#call":
jm_btn_title = "Заказать звонок";
break;
case "#cons":
jm_btn_title = "Получить консультацию";
break;
case "#register":
jm_btn_title = "Записаться на ремонт";
break;
case "#courier":
jm_btn_title = "Заказать доставку";
break;
case "#home":
jm_btn_title = "Вызвать мастера";
break;
default:
jm_btn_title = "Заказать звонок";
}
jm_btn_initiator = $(this).attr("data-initiator");
$("#jm-main-modal input[type=\'submit\']").attr("value", jm_btn_title);
$("#jm-main-modal input[name=\'remont-initiator\']").attr("value", jm_btn_initiator);
$("#jm-main-modal").css("display","block");
$("html,body").css("overflow","hidden");
setTimeout (function() {$("#jm-main-modal .jm-main-modal").css("transform","scale(1)");}, 100);
});
$(".jm-adress-modal-btn").click(function(e) {
jm_scroll = $(window).scrollTop();
e.preventDefault();
window.scrollTo(0,0);
$("#jm-how-find-modal").css("display","block");
$("html,body").css("overflow","hidden");
setTimeout (function() {$("#jm-how-find-modal .jm-main-modal").css("transform","scale(1)");}, 100);
});
$(".jm-main-modal_wrapper").click(function(e) {
if (e.target.lastElementChild!=null && e.target.lastElementChild.offsetParent!=null) {
var target = e.target.lastElementChild.offsetParent.className;
} else {
return;
}
if(target == "jm-main-modal_wrapper") {
$(window).scrollTop(jm_scroll);
$("#jm-main-modal, #jm-how-find-modal, #jm-model-modal, #jm-price-modal").css("display","none");
$("html,body").css("overflow","initial").css("overflow-x","hidden");
$("body").css("overflow-y","hidden");
$(".jm-main-modal").css("transform","scale(0)");
}
});
$(".jm-main-modal .jm-test-close, .jm-no-thx").click(function() {
$(".jm-main-modal_wrapper").click();
});
/** NEW 28082019: **/
$(".y-model-btn").click(function(e) {
jm_scroll = $(window).scrollTop();
e.preventDefault();
window.scrollTo(0,0);
var jm_btn_initiator;
switch (link.toLowerCase()) {
case "/notebook":
jm_btn_initiator = "Ремонт ноутбуков";
break;
case "/tablet":
jm_btn_initiator = "Ремонт планшетов";
break;
case "/televizor":
jm_btn_initiator = "Ремонт телевизоров";
break;
}
$("#jm-model-modal input[name=\'remont-model\']").attr("value", $("#y-models").select2().find(":selected").text());
$("#jm-model-modal input[name=\'remont-initiator\']").attr("value", jm_btn_initiator);
$("#jm-model-modal").css("display","block");
$("html,body").css("overflow","hidden");
setTimeout (function() {$("#jm-model-modal .jm-main-modal").css("transform","scale(1)");}, 100);
});
$(".y-new-price .column-3").click(function(e) {
jm_scroll = $(window).scrollTop();
e.preventDefault();
window.scrollTo(0,0);
var jm_btn_initiator;
switch (link.toLowerCase()) {
case "/notebook":
jm_btn_initiator = "Ремонт ноутбуков";
break;
case "/tablet":
jm_btn_initiator = "Ремонт планшетов";
break;
case "/televizor":
jm_btn_initiator = "Ремонт телевизоров";
break;
}
$("#jm-price-modal input[name=\'remont-work\']").attr("value", $(this).parent("tr").find(".column-1").text());
$("#jm-price-modal input[name=\'remont-initiator\']").attr("value", jm_btn_initiator);
$("#jm-price-modal").css("display","block");
$("html,body").css("overflow","hidden");
setTimeout (function() {$("#jm-price-modal .jm-main-modal").css("transform","scale(1)");}, 100);
});
$(".y-brands-imgs img, .y-bor").click(function(e) {
if($(this).find("a").length > 0) {
document.location.href = $(this).find("a").attr("href");
return;
}
var str;
if($(this).find("img").length > 0) {
str = $(this).find("img").attr("title");
} else {
str = $(this).attr("title");
}
jm_scroll = $(window).scrollTop();
e.preventDefault();
window.scrollTo(0,0);
var jm_btn_initiator;
switch (link.toLowerCase()) {
case "/notebook":
jm_btn_initiator = "Ремонт ноутбуков";
break;
case "/tablet":
jm_btn_initiator = "Ремонт планшетов";
break;
case "/televizor":
jm_btn_initiator = "Ремонт телевизоров";
break;
}
$("#jm-price-modal input[name=\'remont-work\']").attr("value", str);
$("#jm-price-modal input[name=\'remont-initiator\']").attr("value", jm_btn_initiator);
$("#jm-price-modal").css("display","block");
$("html,body").css("overflow","hidden");
setTimeout (function() {$("#jm-price-modal .jm-main-modal").css("transform","scale(1)");}, 100);
});
/*CALL MODAL - END*/
/*MASKED CF7 INPUT - START*/
! function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery)
}(function(a) {
var b, c = navigator.userAgent,
d = /iphone/i.test(c),
e = /chrome/i.test(c),
f = /android/i.test(c);
a.mask = {
definitions: {
9: "[0-9]",
a: "[A-Za-z]",
"*": "[A-Za-z0-9]"
},
autoclear: !0,
dataName: "rawMaskFn",
placeholder: "_"
}, a.fn.extend({
caret: function(a, b) {
var c;
if (0 !== this.length && !this.is(":hidden")) return "number" == typeof a ? (b = "number" == typeof b ? b : a, this.each(function() {
this.setSelectionRange ? this.setSelectionRange(a, b) : this.createTextRange && (c = this.createTextRange(), c.collapse(!0), c.moveEnd("character", b), c.moveStart("character", a), c.select())
})) : (this[0].setSelectionRange ? (a = this[0].selectionStart, b = this[0].selectionEnd) : document.selection && document.selection.createRange && (c = document.selection.createRange(), a = 0 - c.duplicate().moveStart("character", -1e5), b = a + c.text.length), {
begin: a,
end: b
})
},
unmask: function() {
return this.trigger("unmask")
},
mask: function(c, g) {
var h, i, j, k, l, m, n, o;
if (!c && this.length > 0) {
h = a(this[0]);
var p = h.data(a.mask.dataName);
return p ? p() : void 0
}
return g = a.extend({
autoclear: a.mask.autoclear,
placeholder: a.mask.placeholder,
completed: null
}, g), i = a.mask.definitions, j = [], k = n = c.length, l = null, a.each(c.split(""), function(a, b) {
"?" == b ? (n--, k = a) : i[b] ? (j.push(new RegExp(i[b])), null === l && (l = j.length - 1), k > a && (m = j.length - 1)) : j.push(null)
}), this.trigger("unmask").each(function() {
function h() {
if (g.completed) {
for (var a = l; m >= a; a++)
if (j[a] && C[a] === p(a)) return;
g.completed.call(B)
}
}
function p(a) {
return g.placeholder.charAt(a < g.placeholder.length ? a : 0)
}
function q(a) {
for (; ++a < n && !j[a];);
return a
}
function r(a) {
for (; --a >= 0 && !j[a];);
return a
}
function s(a, b) {
var c, d;
if (!(0 > a)) {
for (c = a, d = q(b); n > c; c++)
if (j[c]) {
if (!(n > d && j[c].test(C[d]))) break;
C[c] = C[d], C[d] = p(d), d = q(d)
}
z(), B.caret(Math.max(l, a))
}
}
function t(a) {
var b, c, d, e;
for (b = a, c = p(a); n > b; b++)
if (j[b]) {
if (d = q(b), e = C[b], C[b] = c, !(n > d && j[d].test(e))) break;
c = e
}
}
function u() {
var a = B.val(),
b = B.caret();
if (o && o.length && o.length > a.length) {
for (A(!0); b.begin > 0 && !j[b.begin - 1];) b.begin--;
if (0 === b.begin)
for (; b.begin < l && !j[b.begin];) b.begin++;
B.caret(b.begin, b.begin)
} else {
for (A(!0); b.begin < n && !j[b.begin];) b.begin++;
B.caret(b.begin, b.begin)
}
h()
}
function v() {
A(), B.val() != E && B.change()
}
function w(a) {
if (!B.prop("readonly")) {
var b, c, e, f = a.which || a.keyCode;
o = B.val(), 8 === f || 46 === f || d && 127 === f ? (b = B.caret(), c = b.begin, e = b.end, e - c === 0 && (c = 46 !== f ? r(c) : e = q(c - 1), e = 46 === f ? q(e) : e), y(c, e), s(c, e - 1), a.preventDefault()) : 13 === f ? v.call(this, a) : 27 === f && (B.val(E), B.caret(0, A()), a.preventDefault())
}
}
function x(b) {
if (!B.prop("readonly")) {
var c, d, e, g = b.which || b.keyCode,
i = B.caret();
if (!(b.ctrlKey || b.altKey || b.metaKey || 32 > g) && g && 13 !== g) {
if (i.end - i.begin !== 0 && (y(i.begin, i.end), s(i.begin, i.end - 1)), c = q(i.begin - 1), n > c && (d = String.fromCharCode(g), j[c].test(d))) {
if (t(c), C[c] = d, z(), e = q(c), f) {
var k = function() {
a.proxy(a.fn.caret, B, e)()
};
setTimeout(k, 0)
} else B.caret(e);
i.begin <= m && h()
}
b.preventDefault()
}
}
}
function y(a, b) {
var c;
for (c = a; b > c && n > c; c++) j[c] && (C[c] = p(c))
}
function z() {
B.val(C.join(""))
}
function A(a) {
var b, c, d, e = B.val(),
f = -1;
for (b = 0, d = 0; n > b; b++)
if (j[b]) {
for (C[b] = p(b); d++ < e.length;)
if (c = e.charAt(d - 1), j[b].test(c)) {
C[b] = c, f = b;
break
}
if (d > e.length) {
y(b + 1, n);
break
}
} else C[b] === e.charAt(d) && d++, k > b && (f = b);
return a ? z() : k > f + 1 ? g.autoclear || C.join("") === D ? (B.val() && B.val(""), y(0, n)) : z() : (z(), B.val(B.val().substring(0, f + 1))), k ? b : l
}
var B = a(this),
C = a.map(c.split(""), function(a, b) {
return "?" != a ? i[a] ? p(b) : a : void 0
}),
D = C.join(""),
E = B.val();
B.data(a.mask.dataName, function() {
return a.map(C, function(a, b) {
return j[b] && a != p(b) ? a : null
}).join("")
}), B.one("unmask", function() {
B.off(".mask").removeData(a.mask.dataName)
}).on("focus.mask", function() {
if (!B.prop("readonly")) {
clearTimeout(b);
var a;
E = B.val(), a = A(), b = setTimeout(function() {
B.get(0) === document.activeElement && (z(), a == c.replace("?", "").length ? B.caret(0, a) : B.caret(a))
}, 10)
}
}).on("blur.mask", v).on("keydown.mask", w).on("keypress.mask", x).on("input.mask paste.mask", function() {
B.prop("readonly") || setTimeout(function() {
var a = A(!0);
B.caret(a), h()
}, 0)
}), e && f && B.off("input.mask").on("input.mask", u), A()
})
}
})
});
$(".jm-tel").mask("+7 ( 9 9 9 ) 9 9 9 - 9 9 - 9 9");
/*MASKED CF7 INPUT - END*/
/*REMONTFONT64 - START*/
$(".jm-slider-offer").hover(function(){
$(".flex-prev").css({"opacity":"0.7", "left":"10px"});
$(".flex-next").css({"opacity":"0.7", "right":"10px"});
}, function(){
$(".flex-prev").css({"opacity":"0", "left":"-50px"});
$(".flex-next").css({"opacity":"0", "right":"-50px"});
});
/*TEMP - START*/
/*$("#menu-item-116 > a").attr("href","/uslugi/");*/
/*TEMP - END*/
/*REMONTFONT64 - END*/
/*SELECT2 - START:*/
/*! Select2 4.0.8 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,w;function b(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t]},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(''),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):ithis.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){n(this);this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r),n.attr("title",t.title||t.text)}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function n(e,t){n.__super__.constructor.apply(this,arguments)}return a.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html(''),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.options.get("disabled")){var t=i(this).parent(),n=a.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('×')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,s,a){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){r.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===a.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,r,i){var o=this;this.current(function(e){var t=null!=e?e.length:0;0=o.maximumSelectionLength?o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):n.call(o,r,i)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(i,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=i('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){i(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n(''),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||f(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this,i=!1;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),i||(i=!0,t.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),t.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ai.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1");
}
$(target).select2({
placeholder: ph,
/*minimumResultsForSearch: -1,*/
data: options
});
if (target == "#y-models") {
$("#y-models").select2("open");
$(".y-model-btn").removeClass("y-dis-btn");
}
}
$(document.body).on("change","#y-brands",function(){
reload_models(notebook_brands.get($("#y-brands option:selected").text()));
});
function reload_models(target) {
$.ajax({
url: ajaxscript.ajax_url,
dataType: 'json',
data: {
post_id: target,
indexed: "0",
action: 'jmaxgetposts'
},
method : 'GET',
success : function( response ){
var options = [];
if ( response ) {
$.each( response, function( index, text ) {
options.push( { id: index, text: response[index] } );
});
select_init("#y-models", options, "Выберите модель");
}
},
error : function(error){ console.log(error) },
/*!!!*/cache: false
});
}
/*ФОРМА ВЫБОРА - КОНЕЦ*/
/*БРЕНДЫ - НАЧАЛО:*/
$("y-brands-imgs img").click(function () {
});
/*БРЕНДЫ - КОНЕЦ.*/
/*ПРАЙС - НАЧАЛО*/
$(".y-price-ctrls").click(function () {
$(".y-new-price").toggleClass("y-new-price-opened");
$(".y-price-show").toggleClass("y-dn");
$(".y-price-close").toggleClass("y-dn");
});
/*ПРАЙС - КОНЕЦ*/
/*---*/
/*$(".menu-item-1629 a").click(function(e) {
e.preventDefault();
});*/
/*---*/
var y_this_wday_str = "";
var y_this_wday = "";
var y_this_year="2018";
/*var y_this_day="10";*/
var mdate = new Date();
y_this_year = mdate.getFullYear();
y_this_wday = mdate.getDay();
switch (y_this_wday) {
case 1:
y_this_wday_str = "Понедельник";
break;
case 2:
y_this_wday_str = "Вторник";
break;
case 3:
y_this_wday_str = "Среда";
break;
case 4:
y_this_wday_str = "Четверг";
break;
case 5:
y_this_wday_str = "Пятница";
break;
case 6:
y_this_wday_str = "Суббота";
break;
case 7:
y_this_wday_str = "Воскресенье";
break;
default:
y_this_wday_str = "Понедельник";
}
/*y_this_day = mdate.getDate();*/
$(".y-this-year").text(y_this_year);
/*$(".y-day").text(y_this_day);*/
$(".y-day").text(y_this_wday_str);
});})( jQuery );