text: "use strict";$(function(){function e(){if(c.hasClass("life-categories--open"))c.animate({height:65},300),c.removeClass("life-categories--open");else{var e=c.find("ul").outerHeight()+10;c.animate({height:e},300),c.addClass("life-categories--open")}}var t=$("#jsTopSlider"),o=$(".top-slider-counter"),a=$("#jsNewsSlider"),n=$(".js-gallery, #jsGallery"),s=$("#jsMenuToggle"),i=$("#header"),l=$("body"),r=$("#jsHistoryCtrl"),c=$("#jsLifeCat"),d=$("#jsNav");if($("#map").length){var f=$(".contacts-map").attr("data-coordinates").split(",");ymaps.ready(function(){var e=new ymaps.Map("map",{center:[f[0],f[1]],zoom:17});e.behaviors.disable("scrollZoom");var t=new ymaps.Placemark([f[0],f[1]],{},{iconLayout:"default#image",iconImageHref:"/images/icons/icon-pin.png",iconImageSize:[64,68],iconImageOffset:[-32,-68]});e.geoObjects.add(t)})}document.documentElement.clientWidth>760?(c.css("height",65),$(".header-search-toggle").on("click",function(e){e.preventDefault(),$(this).closest(".header-search").addClass("header-search--open").closest(".header-options").addClass("search-open")})):c.find("li").length>4&&c.css("height",275),$("#jsSearchForm").on("submit",function(e){e.preventDefault();var t=$(this).find(".form-control").val();window.location.href="/"+$("html").attr("lang")+"/search/?query="+t});var u=function(e,t){var o=null;return function(){for(var a=this,n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];var l=function(){e.apply(a,s),o=null};o&&clearTimeout(o),o=setTimeout(l,t)}}(e,300);if(c.on("click",".life-categories-toggle",function(e){e.preventDefault(),u()}).on("click","li",function(e){e.preventDefault(),$(this).toggleClass("active")}),$("#modal-contacts").on("input","input, textarea",function(e){e.target.value.length>0?$(this).addClass("active"):$(this).removeClass("active")}).on("click",function(){$(this).removeClass("open"),l.removeClass("overflow")}).on("click",".modal-dialog",function(e){e.stopPropagation()}),$("[data-modal]").on("click",function(e){e.preventDefault(),$(".modal-contacts.open").removeClass("open");var t=$(this).data("modal");$(t).addClass("open"),l.addClass("overflow")}),$("[data-modal-close]").on("click",function(e){e.preventDefault(),$(this).closest(".open").removeClass("open"),l.removeClass("overflow")}),d.on("click",".sub",function(e){document.documentElement.clientWidth<769?(e.preventDefault(),$(this).find("nav").slideToggle(300)):$(this).toggleClass("open")}).on("click",".sub ul a",function(e){e.stopPropagation()}),r.length&&document.documentElement.clientWidth<550){var p=0;$(window).on("scroll",function(){var e=window.pageYOffset||document.documentElement.scrollTop;e<p?r.addClass("show"):r.removeClass("show"),p=e})}var h=t.find(".top-slide").length;o.find(".all").html(h).end().find(".curr").text(1),t.slick({autoplay:!0,prevArrow:$(".top-slider-prev"),nextArrow:$(".top-slider-next")}).on("afterChange",function(e,t,a){o.find(".curr").html(a+1)}),a.slick({variableWidth:!0,slidesToShow:1,centerMode:!0,appendArrows:$(".news-slider-arrows"),speed:800,autoplay:!0,infinite:!1,responsive:[{breakpoint:1024,settings:{arrows:!1,variableWidth:!1,centerMode:!1,infinite:!0}},{breakpoint:540,settings:{arrows:!1,variableWidth:!1,centerMode:!1,infinite:!0}}]}),n.slick({arrows:!1,autoplay:!0,mobileFirst:!0,centerMode:!0,centerPadding:"20px",responsive:[{breakpoint:760,settings:{centerMode:!1,slidesToShow:2}},{breakpoint:1e3,settings:{centerMode:!1,slidesToShow:3}}]}),s.on("click",function(){l.toggleClass("overflow"),i.toggleClass("header-nav--open")}),$.fancybox.defaults.toolbar=!1,$.fancybox.defaults.gutter=50,$.fancybox.defaults.baseClass="modal",$.fancybox.defaults.slideClass="modal-slide"});