var ModmacMobile={};ModmacMobile.Mobilizer=function(){function e(){this.ip_checked=!1,this.ip_check_res,this.mob_root="/assets/libs/modmac_mobile",this.ww,this.get_param_test,this.window_obj,this.body_obj,this.fixed_top,this.menu_icon,this.tel_clone,this.top_tel_link,this.footer_menu_clone,this.nav_tr_clone,this.geo_city_select_clone}return e.prototype.start=function(){return this.mobCheck()?void this.init():void(ModmacMobile.DEBUG&&console.log("MM[002]: Десктоп."))},e.prototype.init=function(){function e(e){var i=jQuery('');jQuery("head").append(i.text(e.replace(/img\//g,o.mob_root+"/img/"))),o.createFixedTop(),o.createLeftBox(),o.mobilizePageContent(),o.checkHorizontal(),DialogWidget.globalDW.stopKeeping(),jQuery("#ck_phone_a").detach();var t=jQuery('');o.body_obj.append(t);{var n=t.find(".modmob-call-btn-img");setInterval(function(){n.toggleClass("active-img")},5e3),setInterval(function(){t.toggleClass("call-trnsp")},700)}$("html").css("opacity","")}ModmacMobile.DEBUG&&console.log("MM[001]: Мобильная версия. Запуск скрипта."),jQuery("body").addClass("modmob-body"),jQuery.ajax({type:"POST",url:this.mob_root+"/ModmacMobileCSS.php",success:e}),jQuery("meta[name=viewport]").attr("content","width=device-width, initial-scale=1.0, user-scalable=0");var o=this;this.body_obj=$("body"),this.window_obj=$(window),this.tel_clone=$(".tel").clone(!0,!0),this.html_obj=$("html"),o.footer_menu_clone=$("#footer .footer-nav-company").clone(!0,!0),o.nav_tr_clone=$("#nav table tr").eq(0).clone(!0,!0),o.ww=Math.min($(window).width(),$(window).height()),o.wh=Math.max($(window).width(),$(window).height()),ModmacMobile.DEBUG&&console.log("MM[009]: Ширина экрана: "+o.ww),this.window_obj.on("scroll",o.checkScrollBottom),o.geo_city_select_clone=$(".header-container .your-city__select-wrap"),o.geo_city_select_clone.find(".select").removeAttr("style");var i=$("#footer div.tel-block"),t=i.children("span"),n=$('');i.append(n),n.append(t),jQuery("a.button").unbind("click").on("click",function(){return DialogWidget.globalDW.activatePopup("Мы перезвоним за 25 секунд","Мы перезвоним Вам в ближайшее время"),!1}),o.window_obj.on("resize",o.checkHorizontal)},e.prototype.createFixedTop=function(){var e=this,o=$('
');this.fixed_top=o,this.body_obj.append(o);var i=$("#modmob_icon_menu");this.top_tel_link=$(''),this.top_tel_link.append(this.tel_clone.clone(!0,!0)).attr("href","tel:+"+this.tel_clone.text().replace(/\D/g,"")),this.fixed_top.find("#modmob_fixed_top_front").append(this.top_tel_link),this.fixed_top.find("#modmob_fixed_top_back").append(this.geo_city_select_clone),i.on("click",function(){e.body_obj.toggleClass("modmob-menu-shown")})},e.prototype.createLeftBox=function(){var e=this;left_box=$('
назад
'),this.body_obj.append(left_box),left_box.find("#modmob_in_left_1_header_addres").text($(".service-center__link.geoinfo_address").eq(0).text()),left_box.find("#modmob_in_left_1_header_time").append($(".workhours.geoinfo_work_hours").eq(0).clone(!0,!0)),left_box.find("#modmob_in_left_1_header_phone").append(this.tel_clone.clone(!0,!0)).attr("href","tel:+"+this.tel_clone.text().replace(/\D/g,"")),left_box.find("#modmob_in_left_1_header_btn").append($(".request-call.request-call_ind").eq(0).clone(!0,!0)).on("click",function(){e.body_obj.removeClass("modmob-menu-shown")}),left_box.find("#modmob_in_left_1_footer").append(this.footer_menu_clone.addClass("modmob-menu-list")),this.createMainMenu()},e.prototype.createMainMenu=function(){var e,o,i,t=this.nav_tr_clone.find("td"),n=$("#modmob_in_left_1_content"),a=$("#modmob_in_left_2"),d=t.length;n.addClass("modmob-menu-list");for(var l=0;d>l;l++)e=t.eq(l),o=e.children("a").clone(!0,!0),o.children(".nav-icon").detach(),o.children(".nav-text").children("br").replaceWith(" "),i=e.children("ul").clone(!0,!0),n.append(o),i.is("ul")&&(o.data("show-submenu",".modmob-submenu-"+l).addClass("modmob-menu-link-has-childs"),i.addClass("modmob-submenu modmob-submenu-"+l+" modmob-menu-list").children(".empty_subitem").detach(),a.append(i));$("#modmob_in_left_1_content .modmob-menu-link-has-childs").on("click",function(e){e.preventDefault(),$("#modmob_in_left_2 "+$(this).data("show-submenu")).addClass("modmob-submenu-shown"),$("#modmob_left_box").addClass("menu-2-shown")}),$("#modmob_in_left_2_back").on("click",function(){$("#modmob_in_left_2 .modmob-submenu-shown").removeClass("modmob-submenu-shown"),$("#modmob_left_box").removeClass("menu-2-shown")})},e.prototype.mobilizePageContent=function(){function e(){var e=$("#logo img").clone().attr("id","moodmob_index_logo"),o=($("#header .banner-wrapper").clone(!0,!0).attr("id","moodmob_index_banner_wrpr"),$("#header .news-wrapper").clone(!0,!0).attr("id","moodmob_index_news_wrpr")),t=$('
'),n=$('
'),a=$('
'),d=$("#nav table td > a").not("td:last-child > a").clone().addClass("modmob-index-menu-link"),l=$('
');l.append(d),o.find(".col-xs-12").eq(0).addClass("index-news-swiper-container").append(t).append(n).append(a).find(".news").eq(0).addClass("swiper-wrapper").find(".news__item").addClass("swiper-slide"),$("#header").after(l).after(e),$(".sing-repair-wrapper").after(o);var r;setTimeout(function(){r=new Swiper(".index-news-swiper-container",{direction:"horizontal",loop:!0,nextButton:".modmob-index-news-slider-nav-right",prevButton:".modmob-index-news-slider-nav-left",pagination:".modmob-index-news-slider-pagination",onInit:function(){setTimeout(function(){$(window).trigger("resize")},700)}})},600);var s=$(".offer__icon").css("backgroundImage","none");s.eq(0).append(''),s.eq(1).append(''),s.eq(2).append(''),s.eq(3).append(''),s.eq(4).append(''),$(".inform-block__section-2").eq(0).prepend('');var m,c=$(".causes-wrapper .col-xs-12").attr("id","moodmob_causes_slider_wrpr"),p=$('
'),b=$('
'),a=$('
');c.append(p).append(b).append(a).find(".causes").addClass("swiper-wrapper"),c.find(".causes__item").addClass("swiper-slide"),setTimeout(function(){m=new Swiper("#moodmob_causes_slider_wrpr",{direction:"horizontal",loop:!0,spaceBetween:Math.round(.2*i.ww),nextButton:".modmob-index-causes-slider-nav-right",prevButton:".modmob-index-causes-slider-nav-left",pagination:".modmob-index-news-causes-pagination",onInit:function(){setTimeout(function(){$(window).trigger("resize")},700)}})},600)}var o,i=this,t=0;$("head").append('