var appMaster={pageLoader:function(){$(".loader-item").delay(700).fadeOut();$("#pageloader").delay(800).fadeOut("slow");},navBar:function(){if($('#sticker').length){$("#sticker").sticky({topSpacing:0});}$(".transparent-header header .header-search").click(function(){$('.sticky-wrapper').addClass('search-open');});$(".transparent-header header .close").click(function(){$('.sticky-wrapper').removeClass('search-open');});if($('#slides').length){$('#slides').superslides({});}$('[data-toggle="tooltip"]').tooltip()},toggleNav:function(){$(".header-contact").click(function(){$(".header-contact-content").show("fast",function(){});$(".close").click(function(){$(".header-contact-content").hide("fast",function(){});})});},owlCarousel:function(){(function($){"use strict";if($('.owl-carousel').length){$(".owl-carousel").each(function(index){var effect_mode=$(this).data('effect');var autoplay=$(this).data('autoplay');var navigation=$(this).data('navigation');var pagination=$(this).data('pagination');var singleitem=$(this).data('singleitem');var items=$(this).data('items');$(this).owlCarousel({transitionStyle:effect_mode,autoPlay:autoplay,navigation:navigation,pagination:pagination,singleItem:singleitem,items:items,navigationText:["",""],itemsDesktop:[1250,3],itemsDesktopSmall:[991,3]});});}})(jQuery);},dataAnimations:function(){$('[data-animation]').each(function(){var element=$(this);element.addClass('animated');element.appear(function(){var delay=(element.data('delay')?element.data('delay'):1);if(delay>1)element.css('animation-delay',delay+'ms');element.addClass(element.data('animation'));setTimeout(function(){element.addClass('visible');},delay);});});},progressBar:function(){if($('.progress-bar').length){$('.progress-bar').each(function(){$(this).appear(function(){var datavl=$(this).attr('data-percentage');$(this).animate({"width":datavl+"%"},'1200');});});}},bgImage:function(){var pageSection=$(".image-bg, .parallax-bg");pageSection.each(function(indx){if($(this).attr("data-background")){$(this).css("background-image","url("+$(this).data("background")+")");}});},funFactor:function(){(function($){$(".count-number").appear(function(){$(this).each(function(){datacount=$(this).attr('data-count');$(this).find('.counter').delay(6000).countTo({from:10,to:datacount,speed:3000,refreshInterval:50,});});});})(jQuery);},parallaxBg:function(){if($('.image-bg').length!=0&&!navigator.userAgent.match(/iPad|iPhone|Android/i)){$(".parallax-1").parallax("50%",0.1);$(".parallax-2").parallax("50%",0.2);$(".parallax-3").parallax("50%",0.3);$(".parallax-4").parallax("50%",0.4);$(".parallax-5").parallax("50%",0.5);$(".parallax-6").parallax("50%",0.6);$(".parallax-7").parallax("50%",0.7);$(".parallax-8").parallax("50%",0.5);$(".parallax-9").parallax("50%",0.5);$(".parallax-10").parallax("50%",0.5);$(".parallax-11").parallax("50%",0.05);}},portfolioFilter:function(){if($('#mix-container').length!=0){$('#mix-container').mixItUp();}},prettyPhoto:function(){(function($){"use strict";if($("a[rel^='prettyPhoto'], a[data-rel^='prettyPhoto']").length!=0){$("a[rel^='prettyPhoto'], a[data-rel^='prettyPhoto']").prettyPhoto({hook:'data-rel',theme:"dark_square",social_tools:false,deeplinking:false});}})(jQuery);},backgroundVideo:function(){if(typeof $.fn.mb_YTPlayer!='undefined'&&$.isFunction($.fn.mb_YTPlayer)){var m=false;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)){m=true}var v=$('.player');if(m==false){v.mb_YTPlayer();$('#video-controls a').each(function(){var t=$(this);t.on('click',(function(e){e.preventDefault();if(t.hasClass('fa-volume-off')){t.removeClass('fa-volume-off').addClass('fa-volume-down');v.unmuteYTPVolume();return false}if(t.hasClass('fa-volume-down')){t.removeClass('fa-volume-down').addClass('fa-volume-off');v.muteYTPVolume();return false}if(t.hasClass('fa-pause')){t.removeClass('fa-pause').addClass('fa-play');v.pauseYTP();return false}if(t.hasClass('fa-play')){t.removeClass('fa-play').addClass('fa-pause');v.playYTP();return false}}));});$('#video-controls').show();}}},contactForm:function(){if($("#contactform").length!==0){$('#contactform').bootstrapValidator({container:'tooltip',feedbackIcons:{valid:'fa fa-check',warning:'fa fa-user',invalid:'fa fa-times',validating:'fa fa-refresh'},fields:{contact_name:{validators:{notEmpty:{message:''}}},contact_email:{validators:{notEmpty:{message:''},emailAddress:{message:''},regexp:{regexp:'^[^@\\s]+@([^@\\s]+\\.)+[^@\\s]+$',message:'Пожалуйста, введите корректный E-mail'}}},contact_phone:{validators:{notEmpty:{message:''}}},contact_message:{validators:{notEmpty:{message:''}}},}}).on('success.form.bv',function(e){e.preventDefault();var $form=$(e.target),validator=$form.data('bootstrapValidator'),submitButton=validator.getSubmitButton();var form_data=$('#contactform').serialize();$.ajax({type:"POST",dataType:'json',url:"",data:form_data,success:function(msg){$('.form-message').html(msg.data);$('.form-message').show();$('#contactform').hide();},error:function(msg){}});return false;});}function resetForm($form){$form.find('input:text, input:password, input, input:file, select, textarea').val('');$form.find('input:radio, input:checkbox').removeAttr('checked').removeAttr('selected');$form.find('button[type=submit]').attr("disabled","disabled");}},navMenu:function(){jQuery('.scroll').on('click',function(event){var $anchor=jQuery(this);var headerH=jQuery('#navigation').outerHeight();jQuery('html, body').stop().animate({scrollTop:jQuery($anchor.attr('href')).offset().top-60+"px"},1200,'easeInOutExpo');event.preventDefault();});jQuery('body').scrollspy({target:'#topnav',offset:95}) $('.one-page .nav li a.scroll').click(function(){$('.navbar-collapse').removeClass('in');});jQuery('.page-scroll a').on('click',function(event){var $anchor=jQuery(this);jQuery('html, body').stop().animate({scrollTop:jQuery($anchor.attr('href')).offset().top},1500,'easeInOutExpo');event.preventDefault();});},typedSlider:function(){jQuery(".element").each(function(){var $this=jQuery(this);$this.typed({strings:$this.attr('data-elements').split(','),typeSpeed:100,backDelay:3000});});},videotextSlider:function(){$(function(){"use strict";if(jQuery(".video-slider-text").length!==0){jQuery('.video-slider-text').easyTicker({direction:'up',speed:'slow',interval:4000,height:'auto',visible:1,mousePause:0,});}});},countDown:function(){$('.daycounter').each(function(){var counter_id=$(this).attr('id');var counter_type=$(this).data('counter');var year=$(this).data('year');var month=$(this).data('month');var date=$(this).data('date');var countDay=new Date();countDay=new Date(year,month-1,date);if(counter_type=="down"){$("#"+counter_id).countdown({labels:['Years','Months','Weeks','Days','Hours','Mins','Secs'],labels1:['Year','Month','Week','Day','Hour','Min','Sec'],until:countDay});}else if(counter_type=="up"){$("#"+counter_id).countdown({labels:['Years','Months','Weeks','Days','Hours','Mins','Secs'],labels1:['Year','Month','Week','Day','Hour','Min','Sec'],since:countDay});}});},sideNav:function(){$("#navigation-menu").click(function(e){e.preventDefault();$("#wrapper .toggle-menu").animate({right:'0px'},"slow");return false;});$("#navigation-close").click(function(e){e.preventDefault();$("#wrapper .toggle-menu").animate({right:'-50%'},"slow");return false;});$('#wrapper .nav li a').click(function(){$("#wrapper .toggle-menu").animate({right:'-50%'},"slow");return false;});$('.scroll-2').bind('click',function(event){var $anchor=$(this);var headerH=$('#navigation-menu').outerHeight();$('html, body').stop().animate({scrollTop:$($anchor.attr('href')).offset().top+1+"px"},1200,'easeInOutExpo');event.preventDefault();});},fullScreen:function(){$('.full-screen').css({'height':$(window).height()});$(window).on('resize',function(){$('.full-screen').css({'height':$(window).height()});});},fancySelect:function(){"use strict";if($(".fancy-select").length!==0){$('.fancy-select').fancySelect();}},masonryGrid:function(){$('.masonry-grid').each(function(){var $port_container=$(this);var filter_selector=$port_container.parent().find('.works-filters li.active').data('filter');$port_container.imagesLoaded(function(){$port_container.isotope({itemSelector:'.grid-item',filter:filter_selector,animationEngine:"css",masonry:{columnWidth:'.grid-sizer'}});});$('.works-filters li').click(function(){$(this).parents().find('.works-filters li.active').removeClass('active');$(this).addClass('active');var selector=$(this).parents().find('.works-filters li.active').attr('data-filter');$(this).parents().find('.masonry-grid').isotope({filter:selector,animationEngine:"css"});return false;});});},hostedVideo:function(){if($(".video-section").length!==0){var player=videojs('really-cool-video',{},function(){console.log('Good to go!');this.play();this.on('ended',function(){console.log('awww...over so soon?');});});}}};$(document).ready(function(){appMaster.pageLoader();appMaster.navBar();appMaster.toggleNav();appMaster.owlCarousel();appMaster.progressBar();appMaster.dataAnimations();appMaster.bgImage();appMaster.funFactor();appMaster.parallaxBg();appMaster.portfolioFilter();appMaster.prettyPhoto();appMaster.backgroundVideo();appMaster.contactForm();appMaster.navMenu();appMaster.typedSlider();appMaster.videotextSlider();appMaster.countDown();appMaster.masonryGrid();appMaster.sideNav();appMaster.fullScreen();appMaster.fancySelect();appMaster.hostedVideo();});$(window).load(function(){$('img:not(".site_logo")').each(function(){if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1) if(ieversion>=9)if(typeof this.naturalWidth==="undefined"||this.naturalWidth===0){this.src="https://placehold.it/"+($(this).attr('width')||this.width||$(this).naturalWidth())+"x"+(this.naturalHeight||$(this).attr('height')||$(this).height());}}else{if(!this.complete||typeof this.naturalWidth==="undefined"||this.naturalWidth===0){this.src="https://placehold.it/"+($(this).attr('width')||this.width)+"x"+($(this).attr('height')||$(this).height());}}});$('.image-bg').each(function(){var imageSrc=$(this).data('background');if(imageSrc!==undefined){var newSrc=imageSrc.replace(/url\((['"])?(.*?)\1\)/gi,'$2').split(',')[0];}var image=new Image();image.src=newSrc;var width=image.width,height=image.height;if(width===0||height===0){$(this).attr('data-background',"https://placehold.it/"+('1900')+"x"+('700')+"/2e2e2e/666.jpg");$(this).removeAttr('style');$(this).css("background-image","url("+"https://placehold.it/1900x700/2e2e2e/666.jpg"+")");}});});window.onload=MapLoadScript;function GmapInit(){Gmap=$('.map-canvas');Gmap.each(function(){var $this=$(this),lat=52.087699,lng=23.6764788,zoom=17,scrollwheel=false,zoomcontrol=true,draggable=true,mapType=google.maps.MapTypeId.ROADMAP,title='',contentString='',dataLat=$this.data('lat'),dataLng=$this.data('lng'),dataZoom=$this.data('zoom'),dataType=$this.data('type'),dataScrollwheel=$this.data('scrollwheel'),dataZoomcontrol=$this.data('zoomcontrol'),dataHue=$this.data('hue'),dataTitle=$this.data('title'),dataContent=$this.data('content');if(dataZoom!==undefined&&dataZoom!==false){zoom=parseFloat(dataZoom);}if(dataLat!==undefined&&dataLat!==false){lat=parseFloat(dataLat);}if(dataLng!==undefined&&dataLng!==false){lng=parseFloat(dataLng);}if(dataScrollwheel!==undefined&&dataScrollwheel!==null){scrollwheel=dataScrollwheel;}if(dataZoomcontrol!==undefined&&dataZoomcontrol!==null){zoomcontrol=dataZoomcontrol;}if(dataType!==undefined&&dataType!==false){if(dataType=='satellite'){mapType=google.maps.MapTypeId.SATELLITE;}else if(dataType=='hybrid'){mapType=google.maps.MapTypeId.HYBRID;}else if(dataType=='terrain'){mapType=google.maps.MapTypeId.TERRAIN;}}if(dataTitle!==undefined&&dataTitle!==false){title=dataTitle;}if(navigator.userAgent.match(/iPad|iPhone|Android/i)){draggable=false;}var mapOptions={zoom:zoom,scrollwheel:scrollwheel,zoomControl:zoomcontrol,draggable:draggable,center:new google.maps.LatLng(lat,lng),mapTypeId:mapType};var map=new google.maps.Map($this[0],mapOptions);var image='images/map-marker.png';if(dataContent!==undefined&&dataContent!==false){contentString='
'+'
'+title+'
'+'
'+dataContent+'
'+'
';}var infowindow=new google.maps.InfoWindow({content:contentString});var marker=new google.maps.Marker({position:new google.maps.LatLng(lat,lng),map:map,icon:image,title:title});if(dataContent!==undefined&&dataContent!==false){google.maps.event.addListener(marker,'click',function(){infowindow.open(map,marker);});}if(dataHue!==undefined&&dataHue!==false){var styles=[{stylers:[{hue:dataHue},{saturation:80},{lightness:-10}]}];map.setOptions({styles:styles});}});}function MapLoadScript(){var script=document.createElement('script');script.type='text/javascript';script.src='https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyAGKCpRVihnChXePPOG521sNcbTJi0oJKc&'+'callback=GmapInit';document.body.appendChild(script);}var header=jQuery('#home'),headerPos=header.offset();$(window).scroll(function(){if($(".side-nav").length!=0){if($(this).scrollTop()>headerPos.top+header.height()){$('#sticky').addClass('nav-fixed').fadeIn('medium');}else{$('#sticky').removeClass('nav-fixed').fadeIn('medium');}}});