$(document).ready(function () { svg4everybody({}); $('.tel-icon').on('click', function(){ $('.tel-link').slideToggle(); $('.mail-link').css('display', 'none'); }); $('.mail-icon').on('click', function(){ $('.mail-link').slideToggle(); $('.tel-link').css('display', 'none'); }); $('.mod-titleBox').on('click', function(){ $(this).toggleClass('in').next().slideToggle(); $('.mod-titleBox').not(this).removeClass('in').next().slideUp(); }); $('.rev').slick({ adaptiveHeight: true, fade: true, nextArrow: '.navigation--next', prevArrow: '.navigation--prev', dots: true, appendDots: '.trust-dots', customPaging: function(slider,i) { return '
'; }, }); $('.image-popup-vertical-fit').magnificPopup({ type: 'image', closeOnContentClick: true, mainClass: 'mfp-img-mobile', image: { verticalFit: true } }); // mask $(".mask").mask("+7 (999) 999-99-99"); // форма заявки общая $('.form-js').each(function(){ var cur_form = '#' + $(this).attr('id'); var cur_form_file = $(this).attr('id'); $(this).on('click', '.form-button', function(){ if ($(cur_form + ' .validate').val() == ''){ $(cur_form + ' .validate').css({'border-color':'#de2827'}); setTimeout(function(){ $('.validate').removeAttr('style'); },500); return false; } else { if ($(cur_form + ' .confidencial__checked input').prop('checked')){ $(cur_form).closest('.form-hide').hide(); $(cur_form).closest('.form-hide').siblings('.form-ok').fadeIn(100); setTimeout(function(){ var ev = new Event("submit"); document.getElementById(cur_form_file).dispatchEvent(ev); }, 500); document.getElementById(cur_form_file).addEventListener('submit', function(evt){ var http = new XMLHttpRequest(), f = this; evt.preventDefault(); http.open("POST", "/feedback.html", true); http.onerror = function(){ console.log("Данные не были переданы"); } http.send(new FormData(f)); }, false); console.log("Отправили"); //yaCounter47342694.reachGoal('popup_form'); //dataLayer.push({'event': 'order_site'}); } else { $(cur_form + ' .confidencial__checked').css('color','#de2827'); setTimeout(function(){ $('.confidencial__checked').removeAttr('style'); },500); return false; }; } }); }); }); /** * bxSlider v4.2.12 * Copyright 2013-2015 Steven Wanderski * Written while drinking Belgian ales and listening to jazz * Licensed under MIT (http://opensource.org/licenses/MIT) */ !function(t){var e={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!1,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0}};t.fn.bxSlider=function(n){if(0===this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var s={},o=this,r=t(window).width(),a=t(window).height();if(!t(o).data("bxSlider")){var l=function(){t(o).data("bxSlider")||(s.settings=t.extend({},e,n),s.settings.slideWidth=parseInt(s.settings.slideWidth),s.children=o.children(s.settings.slideSelector),s.children.length")[0],h=e.each;c.style.cssText="background-color:rgba(1,1,1,.5)",g.rgba=c.style.backgroundColor.indexOf("rgba")>-1,h(d,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),u.fn=e.extend(u.prototype,{parse:function(r,a,s,l){if(r===t)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=e(r).css(a),a=t);var _=this,g=e.type(r),c=this._rgba=[];return a!==t&&(r=[r,a,s,l],g="array"),"string"===g?this.parse(n(r)||o._default):"array"===g?(h(d.rgba.props,function(e,t){c[t.idx]=i(r[t.idx],t)}),this):"object"===g?(r instanceof u?h(d,function(e,t){r[t.cache]&&(_[t.cache]=r[t.cache].slice())}):h(d,function(t,n){var o=n.cache;h(n.props,function(e,t){if(!_[o]&&n.to){if("alpha"===e||null==r[e])return;_[o]=n.to(_._rgba)}_[o][t.idx]=i(r[e],t,!0)}),_[o]&&e.inArray(null,_[o].slice(0,3))<0&&(_[o][3]=1,n.from&&(_._rgba=n.from(_[o])))}),this):void 0},is:function(e){var t=u(e),i=!0,n=this;return h(d,function(e,r){var o,a=t[r.cache];return a&&(o=n[r.cache]||r.to&&r.to(n._rgba)||[],h(r.props,function(e,t){return null!=a[t.idx]?i=a[t.idx]===o[t.idx]:void 0})),i}),i},_space:function(){var e=[],t=this;return h(d,function(i,n){t[n.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var n=u(e),r=n._space(),o=d[r],a=0===this.alpha()?u("transparent"):this,s=a[o.cache]||o.to(a._rgba),l=s.slice();return n=n[o.cache],h(o.props,function(e,r){var o=r.idx,a=s[o],u=n[o],d=_[r.type]||{};null!==u&&(null===a?l[o]=u:(d.mod&&(u-a>d.mod/2?a+=d.mod:a-u>d.mod/2&&(a-=d.mod)),l[o]=i((u-a)*t+a,r)))}),this[r](l)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),r=u(t)._rgba;return u(e.map(i,function(e,t){return(1-n)*r[t]+n*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),n=i.pop();return t&&i.push(~~(255*n)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,d.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,n=e[0]/255,r=e[1]/255,o=e[2]/255,a=e[3],s=Math.max(n,r,o),l=Math.min(n,r,o),u=s-l,d=s+l,_=.5*d;return t=l===s?0:n===s?60*(r-o)/u+360:r===s?60*(o-n)/u+120:60*(n-r)/u+240,i=0===u?0:.5>=_?u/d:u/(2-d),[Math.round(t)%360,i,_,null==a?1:a]},d.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],n=e[2],o=e[3],a=.5>=n?n*(1+i):n+i-n*i,s=2*n-a;return[Math.round(255*r(s,a,t+1/3)),Math.round(255*r(s,a,t)),Math.round(255*r(s,a,t-1/3)),o]},h(d,function(n,r){var o=r.props,a=r.cache,l=r.to,d=r.from;u.fn[n]=function(n){if(l&&!this[a]&&(this[a]=l(this._rgba)),n===t)return this[a].slice();var r,s=e.type(n),_="array"===s||"object"===s?n:arguments,g=this[a].slice();return h(o,function(e,t){var n=_["object"===s?e:t.idx];null==n&&(n=g[t.idx]),g[t.idx]=i(n,t)}),d?(r=u(d(g)),r[a]=g,r):u(g)},h(o,function(t,i){u.fn[t]||(u.fn[t]=function(r){var o,a=e.type(r),l="alpha"===t?this._hsla?"hsla":"rgba":n,u=this[l](),d=u[i.idx];return"undefined"===a?d:("function"===a&&(r=r.call(this,d),a=e.type(r)),null==r&&i.empty?this:("string"===a&&(o=s.exec(r),o&&(r=d+parseFloat(o[2])*("+"===o[1]?1:-1))),u[i.idx]=r,this[l](u)))})})}),u.hook=function(t){var i=t.split(" ");h(i,function(t,i){e.cssHooks[i]={set:function(t,r){var o,a,s="";if("transparent"!==r&&("string"!==e.type(r)||(o=n(r)))){if(r=u(o||r),!g.rgba&&1!==r._rgba[3]){for(a="backgroundColor"===i?t.parentNode:t;(""===s||"transparent"===s)&&a&&a.style;)try{s=e.css(a,"backgroundColor"),a=a.parentNode}catch(l){}r=r.blend(s&&"transparent"!==s?s:"_default")}r=r.toRgbaString()}try{t.style[i]=r}catch(l){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=u(t.elem,i),t.end=u(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},u.hook(a),e.cssHooks.borderColor={expand:function(e){var t={};return h(["Top","Right","Bottom","Left"],function(i,n){t["border"+n+"Color"]=e}),t}},o=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),!function(e){function t(){try{var i=this===document?e(this):e(this).contents()}catch(n){return!1}i.mousemove(function(t){e.mlp={x:t.pageX,y:t.pageY}}),i.find("iframe").on("load",t)}e.mlp={x:0,y:0},e(t),e.fn.ismouseover=function(){var t=!1;return this.eq(0).each(function(){var i=e(this).is("iframe")?e(this).contents().find("body"):e(this),n=i.offset();t=n.left<=e.mlp.x&&n.left+i.outerWidth()>e.mlp.x&&n.top<=e.mlp.y&&n.top+i.outerHeight()>e.mlp.y}),t}}(jQuery);var g_ugYoutubeAPI=new UGYoutubeAPI,g_ugVimeoAPI=new UGVimeoAPI,g_ugHtml5MediaAPI=new UGHtml5MediaAPI,g_ugSoundCloudAPI=new UGSoundCloudAPI,g_ugWistiaAPI=new UGWistiaAPI;jQuery.fn.unitegallery=function(e){var t=jQuery(this),i="#"+t.attr("id");if(!e)var e={};var n=new UniteGalleryMain;n.run(i,e);var r=new UG_API(n);return r}; $(window).on("load",function(){$(".preloader").delay(1e3).fadeOut("slow")}),setTimeout(function(){$(".ug-slide2 .ug-button-videoplay.ug-type-square").trigger("click")},1e3),$(function(){function e(e,t){e.click(function(e){e.preventDefault(),$("body,html").animate({scrollTop:t.offset().top},450)})}jQuery.browser={},jQuery.browser.mozilla=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase()),jQuery.browser.webkit=/webkit/.test(navigator.userAgent.toLowerCase()),jQuery.browser.opera=/opera/.test(navigator.userAgent.toLowerCase()),jQuery.browser.msie=/msie/.test(navigator.userAgent.toLowerCase()),jQuery.browser.webkit&&$(".projects-audience-list .big").css("width","120");var t=$(window).width(),i=$(".container").width(),r=$("#gallery img").length;$("#gallery").unitegallery;if($("#gallery").unitegallery({theme_load_panel:1!=r,theme_panel_position:t<769?"bottom":"right",thumb_width:t<769?139:175,thumb_height:t<769?93:120,slider_enable_text_panel:!1,gallery_width:1081,gallery_height:594,strip_space_between_thumbs:t<769?10:30,strip_control_avia:!1,strippanel_padding_top:0,strippanel_padding_bottom:0,strippanel_padding_left:t<769?0:8,strippanel_padding_right:t<769?0:8,slider_control_swipe:!1,slider_control_zoom:!1,slider_enable_arrows:!1,slider_enable_fullscreen_button:!1,slider_enable_zoom_panel:!1}),$(".popup-img").lightGallery({selector:"this",counter:!1,showAfterLoad:!1}),$(".popup-pdf").lightGallery({selector:"this",iframeMaxWidth:"95%",counter:!1,zoom:!1,showAfterLoad:!1}),$(".banner-articles-wrapper .bxslider").bxSlider({mode:"fade",controls:!1,oneToOneTouch:!0}),$(".date-v4.bxslider").bxSlider({mode:"fade",controls:!1,oneToOneTouch:!0,wrapperClass:"date-v4 bx-wrapper"}),$(".banner-footer-carousel .bxslider").bxSlider({mode:"horizontal",maxSlides:t<481?1:t>480&&t<769?3:t>768&&t<993?5:6,infiniteLoop:!1,prevText:"",nextText:"",slideWidth:t<480?480:t>480&&t<769?i/3:t>768&&t<993?i/5:(i-100)/6,pagerType:"short",pagerShortSeparator:"/",pager:!(t<993)}),$(".reviews-audience-company-slider .bxslider").bxSlider({mode:"horizontal",maxSlides:t<481?1:t>480&&t<769?3:t>768&&t<993?5:6,infiniteLoop:!1,prevText:"",nextText:"",slideWidth:t<480?480:t>480&&t<769?i/3:t>768&&t<993?i/5:i/6,pagerType:"short",pagerShortSeparator:"/"}),$(".reviews-audience-text-slider .bxslider").bxSlider({mode:"horizontal",controls:!1,infiniteLoop:!1,minSlides:1,maxSlides:2,prevText:"",nextText:"",slideWidth:t<993&&t>768?(i-65)/2:t<769?768:(i-100)/2,slideMargin:t<993?65:100,adaptiveHeight:!0}),$(".photo-project-slider .bxslider").bxSlider({mode:"horizontal",infiniteLoop:!1,controls:!0,maxSlides:t<769&&t>480?2:t<481?1:3,prevText:"",nextText:"",slideWidth:t<993&&t>768?(i-27)/3:t<769&&t>480?(i-27)/2:t<481?480:(i-27)/3,pagerType:"short",pagerShortSeparator:"/",slideMargin:27}),$(".thumbnails a").click(function(e){e.preventDefault(),$(".player").each(function(){this.pause()})}),$(".bxslider").bxSlider({mode:"fade",captions:!0,slideWidth:700,prevText:"",nextText:""}),function(e){var t=0;$(e).each(function(e){$(this).height()>t&&(t=$(this).height())}),e.height(t)}($(".bxslider .item")),$(".main-menu-button").click(function(){$(".main-mobile-menu").slideToggle(),$(".main-menu-button").toggleClass("close")}),$(".audience-menu .arrow").click(function(e){e.preventDefault(),$(".audience-menu ul li").not(".arrow").slideToggle(),$(".audience-menu li.arrow").toggleClass("rotate")}),$(".return-form").click(function(e){e.preventDefault(),$(".callback_done").fadeOut(250),setTimeout(function(){$(".callback-wrapper").fadeIn(250)},250)}),$("*").is(".audience-menu"))var o=+$(".audience-menu").offset().top;$(window).scroll(function(){$(this).scrollTop()>=o?($(".audience-menu").addClass("sticky"),$(".header-top-line").addClass("margin")):($(".audience-menu").removeClass("sticky"),$(".header-top-line").removeClass("margin"))}),e($('.main-navigation a[href="#reviews"]'),$(".banner-footer")),e($('.main-navigation a[href="#project"]'),$(".our-project .our-project-title")),$(".contacts-wrap").liteAccordion({containerWidth:360,containerHeight:30,firstSlide:2,theme:""}).find(".contact-text:first").hide(0)});