window.prices = {}; window.lang = {}; window.prices['iphone4_scr'] = '2590'; window.prices['iphone4_scr_2'] = '990'; window.prices['iphone4_bat'] = '1490'; window.prices['iphone4_key_home'] = '1490'; window.prices['iphone4_key_power'] = '1590'; window.prices['iphone4_key_vibro'] = '1590'; window.prices['iphone4_key_sound'] = '1590'; window.prices['iphone4_cam_front'] = '1590'; window.prices['iphone4_cam_back'] = '1590'; window.prices['iphone4_dyn_1'] = '1690'; window.prices['iphone4_dyn_2'] = '1490'; window.prices['iphone4_dyn_3'] = '1490'; window.prices['iphone4_uho'] = '1590'; window.prices['iphone5_scr'] = '1990'; window.prices['iphone5_scr_2'] = '1190'; window.prices['iphone5_bat'] = '1690'; window.prices['iphone5_key_home'] = '1490'; window.prices['iphone5_key_power'] = '1890'; window.prices['iphone5_key_vibro'] = '1990'; window.prices['iphone5_key_sound'] = '1990'; window.prices['iphone5_cam_front'] = '1790'; window.prices['iphone5_cam_back'] = '1990'; window.prices['iphone5_dyn_1'] = '1590'; window.prices['iphone5_dyn_2'] = '1490'; window.prices['iphone5_dyn_3'] = '1590'; window.prices['iphone5_uho'] = '1690'; window.prices['iphone5_korpus'] = '2290'; window.prices['iphonese_scr'] = '1990'; window.prices['iphonese_scr_2'] = '1190'; window.prices['iphonese_bat'] = '1790'; window.prices['iphonese_key_home'] = '1690'; window.prices['iphonese_key_power'] = '2190'; window.prices['iphonese_key_vibro'] = '2190'; window.prices['iphonese_key_sound'] = '2190'; window.prices['iphonese_cam_front'] = '1890'; window.prices['iphonese_dyn_1'] = '1890'; window.prices['iphonese_dyn_2'] = '1590'; window.prices['iphonese_dyn_3'] = '1690'; window.prices['iphonese_uho'] = '1890'; window.prices['iphonese_korpus'] = '2290'; window.prices['iphone6_scr'] = '2390'; window.prices['iphone6_bat'] = '1690'; window.prices['iphone6_key_home'] = '1490'; window.prices['iphone6_key_power'] = '1690'; window.prices['iphone6_key_vibro'] = '1790'; window.prices['iphone6_key_sound'] = '1790'; window.prices['iphone6_cam_front'] = '1590'; window.prices['iphone6_cam_back'] = '1590'; window.prices['iphone6_dyn_1'] = '1690'; window.prices['iphone6_dyn_2'] = '1390'; window.prices['iphone6_dyn_3'] = '1490'; window.prices['iphone6_uho'] = '1690'; window.prices['iphone6_korpus'] = '2690'; window.prices['iphone6plus_scr'] = '2690'; window.prices['iphone6plus_bat'] = '1790'; window.prices['iphone6plus_key_home'] = '1490'; window.prices['iphone6plus_key_power'] = '1690'; window.prices['iphone6plus_key_vibro'] = '1790'; window.prices['iphone6plus_key_sound'] = '1790'; window.prices['iphone6plus_cam_front'] = '1790'; window.prices['iphone6plus_cam_back'] = '2390'; window.prices['iphone6plus_dyn_1'] = '1690'; window.prices['iphone6plus_dyn_2'] = '1590'; window.prices['iphone6plus_dyn_3'] = '1490'; window.prices['iphone6plus_uho'] = '1690'; window.prices['iphone6plus_korpus'] = '2890'; window.prices['iphone6s_scr'] = '2790'; window.prices['iphone6s_bat'] = '1890'; window.prices['iphone6s_key_home'] = '1490'; window.prices['iphone6s_key_power'] = '2190'; window.prices['iphone6s_key_vibro'] = '2190'; window.prices['iphone6s_key_sound'] = '2190'; window.prices['iphone6s_cam_front'] = '1990'; window.prices['iphone6s_cam_back'] = '2490'; window.prices['iphone6s_dyn_1'] = '1990'; window.prices['iphone6s_dyn_2'] = '1690'; window.prices['iphone6s_dyn_3'] = '1790'; window.prices['iphone6s_uho'] = '1990'; window.prices['iphone6s_korpus'] = '2790'; window.prices['iphone6splus_scr'] = '3190'; window.prices['iphone6splus_bat'] = '1990'; window.prices['iphone6splus_key_home'] = '1790'; window.prices['iphone6splus_key_power'] = '2090'; window.prices['iphone6splus_key_vibro'] = '2690'; window.prices['iphone6splus_key_sound'] = '2690'; window.prices['iphone6splus_cam_front'] = '1990'; window.prices['iphone6splus_cam_back'] = '3890'; window.prices['iphone6splus_dyn_1'] = '2290'; window.prices['iphone6splus_dyn_2'] = '1690'; window.prices['iphone6splus_dyn_3'] = '1790'; window.prices['iphone6splus_uho'] = '2290'; window.prices['iphone6splus_korpus'] = '3090'; window.prices['iphone7_scr'] = '2790'; window.prices['iphone7_bat'] = '1890'; window.prices['iphone7_key_power'] = '1990'; window.prices['iphone7_key_vibro'] = '1990'; window.prices['iphone7_key_sound'] = '1990'; window.prices['iphone7_cam_front'] = '2290'; window.prices['iphone7_cam_back'] = '3790'; window.prices['iphone7_dyn_1'] = '1690'; window.prices['iphone7_dyn_2'] = '1490'; window.prices['iphone7_dyn_3'] = '1490'; window.prices['iphone7_korpus'] = '4390'; window.prices['iphone7plus_scr'] = '3290'; window.prices['iphone7plus_bat'] = '2690'; window.prices['iphone7plus_key_power'] = '1890'; window.prices['iphone7plus_key_vibro'] = '1890'; window.prices['iphone7plus_key_sound'] = '1890'; window.prices['iphone7plus_cam_front'] = '2490'; window.prices['iphone7plus_cam_back'] = '4790'; window.prices['iphone7plus_dyn_1'] = '1790'; window.prices['iphone7plus_dyn_2'] = '1490'; window.prices['iphone7plus_dyn_3'] = '1590'; window.prices['iphone7plus_korpus'] = '4690'; window.prices['iphone8_scr'] = '2990'; window.prices['iphone8_bat'] = '2690'; window.prices['iphone8_key_power'] = '2590'; window.prices['iphone8_key_vibro'] = '2590'; window.prices['iphone8_key_sound'] = '2590'; window.prices['iphone8_cam_front'] = '3290'; window.prices['iphone8_cam_back'] = '4590'; window.prices['iphone8_dyn_1'] = '2390'; window.prices['iphone8_dyn_2'] = '1790'; window.prices['iphone8_dyn_3'] = '1790'; window.prices['iphone8_korpus'] = '10990'; window.prices['iphone8plus_scr'] = '3290'; window.prices['iphone8plus_bat'] = '2890'; window.prices['iphone8plus_key_power'] = '2990'; window.prices['iphone8plus_key_vibro'] = '2990'; window.prices['iphone8plus_key_sound'] = '2990'; window.prices['iphone8plus_cam_front'] = '3890'; window.prices['iphone8plus_cam_back'] = '6690'; window.prices['iphone8plus_dyn_1'] = '2490'; window.prices['iphone8plus_dyn_2'] = '1890'; window.prices['iphone8plus_dyn_3'] = '1890'; window.prices['iphone8plus_korpus'] = '15990'; window.prices['iphonex_scr'] = '15690'; window.prices['iphonex_bat'] = '4190'; window.prices['iphonex_korpus'] = '16290'; window.prices['iphonex_cam_backst'] = '1790'; window.lang['iphone4'] = 'iPhone 4/4s'; window.lang['iphone5'] = 'iPhone 5/5c/5s'; window.lang['iphonese'] = 'iPhone SE'; window.lang['iphone6'] = 'iPhone 6'; window.lang['iphone6plus'] = 'iPhone 6 Plus'; window.lang['iphone6s'] = 'iPhone 6s'; window.lang['iphone6splus'] = 'iPhone 6s Plus'; window.lang['iphone7'] = 'iPhone 7'; window.lang['iphone7plus'] = 'iPhone 7 Plus'; window.lang['iphone8'] = 'iPhone 8'; window.lang['iphone8plus'] = 'iPhone 8 Plus'; window.lang['iphonex'] = 'iPhone X'; window.lang['scr'] = 'Разбитый экран'; window.lang['scr_2'] = 'Разбито стекло + дисплей'; window.lang['bat'] = 'Батарея*'; window.lang['key_home'] = 'Не работает кнопка домой'; window.lang['key_power'] = 'Не работает вкл/выкл'; window.lang['key_vibro'] = 'Не включается вибро'; window.lang['key_sound'] = 'Не работают кнопки громкости'; window.lang['cam_front'] = 'Не работает передняя камера'; window.lang['cam_back'] = 'Не работает задняя камера'; window.lang['dyn_1'] = 'Меня не слышат'; window.lang['dyn_2'] = 'Верхний динамик'; window.lang['dyn_3'] = 'Нижний динамик'; window.lang['uho'] = 'Не работают наушники'; window.lang['korpus'] = 'Разбито заднее стекло (корпус)'; window.lang['cam_backst'] = 'Разбито стекло задней камеры'; window.lang['scr_1'] = 'Разбито стекло'; TypeClick = function(div) { var tp = div.getAttribute("id").split("type_selector_")[1]; $(".type_selector").children("div").removeClass("active"); $(div).addClass("active"); $(".model_selector").hide(); $(".model_selector_big").hide(); $(".trouble_selector").hide(); $("#model_selector_big_"+tp).fadeIn("slow"); } ModelClick = function(div) { var tp = div.getAttribute("id").split("_")[1]; var md = div.getAttribute("id").split("_")[2]; $(".model_selector").children("div").removeClass("active"); $(div).addClass("active"); $(".trouble_selector").hide(); $("#trouble_selector_"+tp+"_"+md).fadeIn("slow"); $(".trouble_selector").children("div").removeClass("active"); $('.order_form').find(".input_model").val(md); CalcPrice(); } ModelClickBig = function(div) { var tp = div.getAttribute("id").split("_")[2]; var md = div.getAttribute("id").split("_")[3]; $(".model_selector_big").hide(); $("#model_selector_"+tp).fadeIn("slow"); ModelClick($('#model_'+tp+'_'+md)[0]); } TroubleClick = function(div) { var tp = div.getAttribute("id").split("_")[1]; var md = div.getAttribute("id").split("_")[2]; var tr = div.getAttribute("id").split("_")[3]; $(div).toggleClass("active"); CalcPrice(); } CalcPrice = function() { var price = 0; var tro = ""; $(".trouble_selector").children("div.active").each(function(ind){ price += this.getAttribute("price")-0; if (tro) tro += ", "; tro += this.getAttribute("tr") + " - " + this.getAttribute("price")+"р"; }); if (price) { // $("#price").css("fontStyle", "normal"); $("#price").html('Итого = '+price+' Р
(все включено: выезд мастера, диагностика, ремонт, запчасть)'); $('.order_form').find(".input_trouble").val(tro); } else { $("#price").html('Цена от: укажите поломку и модель'); $('.order_form').find(".input_trouble").val(""); } } $(document).ready(function(){ $(".type_selector").children("div").on('click', function(){ TypeClick(this); }); $(".model_selector").children("div").on('click', function(){ ModelClick(this); }); $(".model_selector_big").children("div").on('click', function(){ ModelClickBig(this); }); $(".trouble_selector").children("div").on('click', function(){ TroubleClick(this); }); $("#type_selector_iPhone").click(); function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; }); return vars; } $(".mobile-btn button").on('click', function(){ $(".header-nav").slideToggle().addClass('opened'); }); $(".mobile-btn button").on('click', function(){ $(".header-nav").slideToggle().addClass('opened'); }); $(".mobile-btn-region").on('click', function(){ return; $( ".region-select" ).selectmenu( "option", "position", { my : "left top", at: "left+"+($(document).width()-215)+" top+"+$(".header").css("height") }); $( ".region-select" ).selectmenu( "open" ); $( ".ui-menu" ).css("height", "300px"); }); $('#region_mob').on('change', function(){ document.location.href = this.value; }); /* $(".top-section__lc .tocalc").on('click', function(){ document.location.href="http://fixland.ru/repair/"; }); $(".footer-form .tocalc").on('click', function(){ document.location.href="http://fixland.ru/repair/"; }); */ $(".footer-form .tocalc").on('click', function(){ $('html, body').animate({ scrollTop: $("#form_new_meta").offset().top - 60 }, 600); }); $(".top-section__lc .tocalc").on('click', function(){ $('html, body').animate({ scrollTop: $("#form_new_meta").offset().top - 60 }, 600); }); $(document).click(function(e){ if ($(".header-nav").hasClass('opened') && $(".header-nav").is(":visible") && !$(e.target).closest(".header-nav").length && !$(e.target).closest(".mobile-btn").length) { $(".header-nav").slideUp().removeClass('opened'); } e.stopPropagation(); }); $("a.link").click(function () { elementClick = $(this).attr("href"); destination = $(elementClick).offset().top; $('body, html').animate({scrollTop: destination}, 1100); return false; }); $(window).scroll(function () { if ($(this).scrollTop() > 50) { $('body').addClass("scrolling"); } else { $('body').removeClass("scrolling"); } }); $(".free-phone").inputmask("+7(999)999-99-99", {showMaskOnHover: !1}); $(".ms-wrapper").slick({ arrows: false, infinite: true, slidesToShow: 1, slidesToScroll: 1, dots: false, draggable: false }); $(".show-more a").on('click', function(e){ e.preventDefault(); $('.ms-wrapper').slick('slickNext') }); $(".trust-slider").slick({ infinite: true, slidesToShow: 3, slidesToScroll: 3, responsive: [ { breakpoint: 500, settings: { slidesToShow: 2 } } ] }); $( "#accordion" ).accordion({ heightStyle: "content", collapsible: true }); $(".fancybox").fancybox({ openEffect : 'none', closeEffect : 'none' }); $(".region-select").selectmenu({ change: function( event, ui ) { document.location.href = this.value; }, width: 200 }); /* $(".custom-select").selectmenu({ change: function( event, ui ) { var m=$('#model').val(); var t=$('#trouble').val(); changePrice('#price',m,t); } }); */ $("#model,#trouble").change(function(){ var m=$('#model').val(); var t=$('#trouble').val(); changePrice('#price',m,t); }) $(".custom-select2").selectmenu({ appendTo: ".sel-wrapper2", change: function( event, ui ) { var m=$('#model_1').val(); var t=$('#trouble_1').val(); changePrice('#price_1',m,t); } }); $(".custom-select3").selectmenu({ appendTo: ".sel-wrapper3", change: function( event, ui ) { var m=$('#model_2').val(); var t=$('#trouble_2').val(); changePrice('#price_2',m,t); } }); function changePrice(element,model,trouble) { if (!model) { $(element).text('Цена от: укажите поломку и модель'); $(element).css("fontStyle", "italic"); } else if(!trouble) { $(element).text('Цена: Укажите поломку'); $(element).css("fontStyle", "italic"); } else { var price = window.prices[model+"_"+trouble]; // $(element).text('Цена: '+price+' рублей (все включено: выезд мастера, диагностика, ремонт, запчасть)'); $(element).css("fontStyle", "normal"); $(element).html(''+price+' Р
(все включено: выезд мастера, диагностика, ремонт, запчасть)'); } } function callback(phone) { //http://masterzen.ru/wunder_amo/callback.php var txt='phone='+phone; $.ajax({ type: 'POST', url: ' 992){ var $banner = $('.free-form'), topPos; if ($banner.length) { topPos = $banner.offset().top; $(window).scroll(function() { var top = $(document).scrollTop(), pip = $('.bottom-contant').offset().top - 90, height = $banner.outerHeight(), bottom; if (top > topPos - 70 && top < pip - height) { $banner.addClass('fixed').removeAttr('style'); } else if (top >= pip - height) { if ($('.contact-page-banner').length) { bottom = '-166px' } else { bottom = 0 } $banner .removeClass('fixed') .css({ 'position': 'absolute', 'bottom': '1010px' }); $("main.content").css({'position': 'relative'}) } else { $banner.removeClass('fixed'); } }); } } if($(window).width() < 768){ $(".top-section__lc").insertAfter($(".top-section__rc")); $(".visa-section").insertAfter($(".bottom-contant .align-center")); // $(".trust-slider").slick('unslick'); $(".mobile-slider_01").slick({ dots: true }); $(".mobile-slider_02").slick({ dots: true, responsive: [ { breakpoint: 768, settings: { adaptiveHeight: true } } ] }); } });