jQuery(document).ready(function(){'use strict';var de_header_style=2;var de_header_layout=1;var de_header_color=1;var de_header_sticky=1;var de_header_mobile_sticky=1;var de_menu_separator=0;var de_color_style=2;var de_font_style=2;var mobile_menu_show=0;if(de_color_style==2){$('body').addClass('de_light');}if(de_font_style==2){$('head').append('');}if(de_header_style==2){$('header').addClass('transparent')}if(de_menu_separator==2){$('#mainmenu').addClass('line-separator');}else if(de_menu_separator==3){$('#mainmenu').addClass('circle-separator');}else if(de_menu_separator==4){$('#mainmenu').addClass('square-separator');}else if(de_menu_separator==5){$('#mainmenu').addClass('plus-separator');}else if(de_menu_separator==6){$('#mainmenu').addClass('strip-separator');}else if(de_menu_separator==0){$('#mainmenu').addClass('no-separator');}if(de_header_layout==2){$('header').addClass('de_header_2');$('header .info').show();}if(de_header_color==2){$('header').addClass('header-light');}if(de_header_sticky==2){$('header').addClass('header-scroll');}if(de_header_mobile_sticky==1){$('header').addClass('header-mobile-sticky');}jQuery('.simple-ajax-popup-align-top').magnificPopup({type:'ajax',alignTop:true,overflowY:'scroll'});jQuery('.simple-ajax-popup').magnificPopup({type:'ajax'});jQuery('.zoom-gallery').magnificPopup({delegate:'a',type:'image',closeOnContentClick:false,closeBtnInside:false,mainClass:'mfp-with-zoom mfp-img-mobile',image:{verticalFit:true,titleSrc:function(item){return item.el.attr('title');}},gallery:{enabled:true},zoom:{enabled:true,duration:300,opener:function(element){return element.find('img');}}});jQuery('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({disableOn:700,type:'iframe',mainClass:'mfp-fade',removalDelay:160,preloader:false,fixedContentPos:false});$('.image-popup-vertical-fit').magnificPopup({type:'image',closeOnContentClick:true,mainClass:'mfp-img-mobile',image:{verticalFit:true}});$('.image-popup-fit-width').magnificPopup({type:'image',closeOnContentClick:true,image:{verticalFit:false}});$('.image-popup-no-margins').magnificPopup({type:'image',closeOnContentClick:true,closeBtnInside:false,fixedContentPos:true,mainClass:'mfp-no-margins mfp-with-zoom',image:{verticalFit:true},zoom:{enabled:true,duration:300}});$('.image-popup-gallery').magnificPopup({type:'image',closeOnContentClick:false,closeBtnInside:false,mainClass:'mfp-with-zoom mfp-img-mobile',image:{verticalFit:true,titleSrc:function(item){return item.el.attr('title');}},gallery:{enabled:true}});new WOW().init();function init_de(){enquire.register("screen and (max-width: 993px)",{match:function(){$('header').addClass("header-mobile");},unmatch:function(){$('header').removeClass("header-mobile");}});var $window=jQuery(window);jQuery('section[data-type="background"]').each(function(){var $bgobj=jQuery(this);jQuery(window).scroll(function(){enquire.register("screen and (min-width: 993px)",{match:function(){var yPos=-($window.scrollTop()/$bgobj.data('speed'));var coords='50% '+yPos+'px';$bgobj.css({backgroundPosition:coords});}});});document.createElement("article");document.createElement("section");});jQuery('.de-team-list').each(function(){jQuery(this).find("img").on('load',function(){var w=jQuery(this).css("width");var h=jQuery(this).css("height");jQuery(this).parent().parent().find(".team-pic").css("height",h);jQuery(this).parent().parent().find(".team-desc").css("width",w);jQuery(this).parent().parent().find(".team-desc").css("height",h);jQuery(this).parent().parent().find(".team-desc").css("top",h);}).each(function(){if(this.complete)$(this).load();});});jQuery(".de-team-list").on("mouseenter",function(){var h;h=jQuery(this).find("img").css("height");jQuery(this).find(".team-desc").stop(true).animate({'top':"0px"},350,'easeOutQuad');jQuery(this).find("img").stop(true).animate({'margin-top':"-100px"},400,'easeOutQuad');}).on("mouseleave",function(){var h;h=jQuery(this).find("img").css("height");jQuery(this).find(".team-desc").stop(true).animate({'top':h},350,'easeOutQuad');jQuery(this).find("img").stop(true).animate({'margin-top':"0px"},400,'easeOutQuad');})
jQuery('.item .picframe').each(function(){jQuery(this).find("img").css("width","100%");jQuery(this).find("img").css("height","auto");jQuery(this).find("img").on('load',function(){var w=jQuery(this).css("width");var h=jQuery(this).css("height");jQuery(this).parent().css("height",h);}).each(function(){if(this.complete)$(this).load();});});jQuery('.overlay').fadeTo(1,0);jQuery(".item .picframe").on("mouseenter",function(){jQuery(this).parent().find(".overlay").width(jQuery(this).find("img").css("width"));jQuery(this).parent().find(".overlay").height(jQuery(this).find("img").css("height"));jQuery(this).parent().find(".overlay").stop(true).fadeTo(300,.9);var picheight=jQuery(this).find("img").css("height");var newheight;newheight=(picheight.substring(0,picheight.length-2)/2)-10;jQuery(this).parent().find(".pf_text").stop(true).animate({'margin-top':newheight},300,'easeOutCubic');var w=jQuery(this).find("img").css("width");var h=jQuery(this).find("img").css("height");var w=parseInt(w,10);var h=parseInt(h,10);var $scale=1.2;jQuery(this).find("img").stop(true).animate({width:w*$scale,height:h*$scale,'margin-left':-w*($scale-1)/2,'margin-top':-h*($scale-1)/2},700,'easeOutQuad');}).on("mouseleave",function(){var newheight;var picheight=jQuery(this).find("img").css("height");newheight=(picheight.substring(0,picheight.length-2)/2)-10;jQuery(this).parent().find(".pf_text").stop(true).animate({'margin-top':newheight-30},300,'easeOutCubic');jQuery(this).parent().find(".overlay").stop(true).fadeTo(300,0);jQuery(this).find("img").stop(true).animate({width:'100%',height:'100%','margin-left':0,'margin-top':0},700,'easeOutQuad');})
jQuery('.overlay').fadeTo(1,0);}init_de();jQuery('body').jpreLoader({splashID:"#jSplash",splashFunction:function(){jQuery('#jSplash').children('section').not('.selected').hide();jQuery('#jSplash').hide().fadeIn(800);init_de();var timer=setInterval(function(){splashRotator();},1500);}},function(){clearInterval();jQuery(function(){var v_url=document.URL;if(v_url.indexOf('#')!=-1){var v_hash=v_url.substring(v_url.indexOf("#")+1);jQuery('html, body').animate({scrollTop:jQuery('#'+v_hash).offset().top-70},200);return false;}});});function splashRotator(){var cur=jQuery('#jSplash').children('.selected');var next=jQuery(cur).next();if(jQuery(next).length!=0){jQuery(next).addClass('selected');}else{jQuery('#jSplash').children('section:first-child').addClass('selected');next=jQuery('#jSplash').children('section:first-child');}jQuery(cur).removeClass('selected').fadeOut(100,function(){jQuery(next).fadeIn(100);});}function video_autosize(){jQuery('.de-video-container').each(function(){var height_1=jQuery(this).css("height");var height_2=jQuery(this).find(".de-video-content").css("height");var newheight=(height_1.substring(0,height_1.length-2)-height_2.substring(0,height_2.length-2))/2;jQuery(this).find('.de-video-overlay').css("height",height_1);jQuery(this).find(".de-video-content").animate({'margin-top':newheight},'fast');});}jQuery(window).on("scroll",function(){jQuery("header").addClass("clone",1000,"easeOutBounce");var $document=$(document);var vscroll=0;if($document.scrollTop()>=50&&vscroll==0){jQuery("header.autoshow").removeClass("scrollOff");jQuery("header.autoshow").addClass("scrollOn");jQuery("header.autoshow").css("height","auto");vscroll=1;}else{jQuery("header.autoshow").removeClass("scrollOn");jQuery("header.autoshow").addClass("scrollOff");vscroll=0;}});window.onresize=function(event){enquire.register("screen and (min-width: 993px)",{match:function(){jQuery('#mainmenu').show();mobile_menu_show=1;},unmatch:function(){jQuery('#mainmenu').hide();mobile_menu_show=0;jQuery("#menu-btn").show();}});init();init_de();video_autosize();centery();jQuery('#gallery').isotope('reLayout');$('header').removeClass('smaller');$('header').removeClass('logo-smaller');$('header').removeClass('clone');};function init(){var sh=jQuery('#de-sidebar').css("height");var dh=jQuery(window).innerHeight();var h=parseInt(sh)-parseInt(dh);window.addEventListener('scroll',function(e){var mq=window.matchMedia("(min-width: 993px)");var ms=window.matchMedia("(min-width: 768px)");if(mq.matches){var distanceY=window.pageYOffset||document.documentElement.scrollTop,shrinkOn=100,header=document.querySelector("header");if(distanceY>shrinkOn){classie.add(header,"smaller");}else{if(classie.has(header,"smaller")){classie.remove(header,"smaller");}}}if(mq.matches){if(jQuery("header").hasClass("side-header")){if(jQuery(document).scrollTop()>=h){jQuery('#de-sidebar').css("position","fixed");if(parseInt(sh)>parseInt(dh)){jQuery('#de-sidebar').css("top",-h);}jQuery('#main').addClass("col-md-offset-3");jQuery('div#logo img').css("padding-left","7px");jQuery('header .h-content').css("padding-left","7px");jQuery('#mainmenu li').css("width","103%");}else{jQuery('#de-sidebar').css("position","relative");if(parseInt(sh)>parseInt(dh)){jQuery('#de-sidebar').css("top",0);}jQuery('#main').removeClass("col-md-offset-3");jQuery('div#logo img').css("padding-left","0px");jQuery('header .h-content').css("padding-left","0px");jQuery('#mainmenu li').css("width","100%");}}}});}window.onload=init();jQuery("#gallery-carousel").owlCarousel({items:4,navigation:false,pagination:false});jQuery(".carousel-gallery").owlCarousel({items:4,navigation:false,pagination:false});jQuery("#blog-carousel").owlCarousel({items:2,navigation:false,pagination:true});jQuery("#testimonial-carousel").owlCarousel({items:2,itemsDesktop:[1199,2],itemsDesktopSmall:[980,2],itemsTablet:[768,1],itemsTabletSmall:false,itemsMobile:[479,1],navigation:false,});jQuery("#logo-carousel").owlCarousel({items:6,navigation:false,pagination:false,autoPlay:true});jQuery("#contact-carousel").owlCarousel({items:1,singleItem:true,navigation:false,pagination:false,autoPlay:true});jQuery(".text-slider").owlCarousel({items:1,singleItem:true,navigation:false,pagination:false,mouseDrag:false,touchDrag:false,autoPlay:4000,transitionStyle:"fade"});jQuery(".blog-slide").owlCarousel({items:1,singleItem:true,navigation:false,pagination:false,autoPlay:false});$(".next").on("click",function(){$(this).parent().parent().find('.blog-slide').trigger('owl.next');});$(".prev").on("click",function(){$(this).parent().parent().find('.blog-slide').trigger('owl.prev');});function centery(){var $doc_height=jQuery(window).innerHeight();jQuery('#homepage #content.content-overlay').css("margin-top",$doc_height);jQuery('.full-height').css("height",$doc_height);var picheight=jQuery('.center-y').css("height");picheight=parseInt(picheight,10);jQuery('.center-y').css('margin-top',(($doc_height-picheight)/2)-90);jQuery('.full-height .de-video-container').css("height",$doc_height);}centery();jQuery(".blog-list").on("mouseenter",function(){var v_height=jQuery(this).find(".blog-slide").css("height");var v_width=jQuery(this).find(".blog-slide").css("width");var newheight=(v_height.substring(0,v_height.length-2)/2)-40;jQuery(this).find(".owl-arrow").css("margin-top",newheight);jQuery(this).find(".owl-arrow").css("width",v_width);jQuery(this).find(".owl-arrow").fadeTo(150,1);}).on("mouseleave",function(){jQuery(this).find(".owl-arrow").fadeTo(150,0);})
jQuery("#logo-carousel img").on("mouseenter",function(){jQuery(this).fadeTo(150,.5);}).on("mouseleave",function(){jQuery(this).fadeTo(150,1);})
jQuery(window).load(function(){video_autosize();var $container=jQuery('#gallery');$container.isotope({itemSelector:'.item',filter:'*'});jQuery('#filters a').on("click",function(){var $this=jQuery(this);if($this.hasClass('selected')){return false;}var $optionSet=$this.parents();$optionSet.find('.selected').removeClass('selected');$this.addClass('selected');var selector=jQuery(this).attr('data-filter');$container.isotope({filter:selector});return false;});var revapi;revapi=jQuery('#revolution-slider').revolution({delay:15000,startwidth:1170,startheight:500,hideThumbs:10,fullWidth:"off",fullScreen:"on",fullScreenOffsetContainer:"",touchenabled:"on",navigationType:"none",dottedOverlay:""});jQuery('.de_tab').find('.de_tab_content > div').hide();jQuery('.de_tab').find('.de_tab_content > div:first').show();jQuery('li').find('.v-border').fadeTo(150,0);jQuery('li.active').find('.v-border').fadeTo(150,1);jQuery('.de_nav li').click(function(){jQuery(this).parent().find('li').removeClass("active");jQuery(this).addClass("active");jQuery(this).parent().parent().find('.v-border').fadeTo(150,0);jQuery(this).parent().parent().find('.de_tab_content > div').hide();var indexer=jQuery(this).index();jQuery(this).parent().parent().find('.de_tab_content > div:eq('+indexer+')').fadeIn();jQuery(this).find('.v-border').fadeTo(150,1);});var rq_step=1;jQuery('#request_form .btn-right').click(function(){var rq_name=$('#rq_name').val();var rq_email=$('#rq_email').val();var rq_phone=$('#rq_phone').val();if(rq_step==1){if(rq_name.length==0){$('#rq_name').addClass("error_input");}else{$('#rq_name').removeClass("error_input");}if(rq_email.length==0){$('#rq_email').addClass("error_input");}else{$('#rq_email').removeClass("error_input");}if(rq_phone.length==0){$('#rq_phone').addClass("error_input");}else{$('#rq_phone').removeClass("error_input");}}if(rq_name.length!=0&&rq_email.length!=0&&rq_phone.length!=0){jQuery("#rq_step_1").hide();jQuery("#rq_step_2").fadeIn();}});jQuery('.de_review').find('.de_tab_content > div').hide();jQuery('.de_review').find('.de_tab_content > div:first').show();jQuery('.de_review').find('.de_nav li:first').fadeTo(150,1);jQuery('.de_nav li').click(function(){jQuery(this).parent().find('li').removeClass("active");jQuery(this).addClass("active");jQuery(this).fadeTo(150,1);jQuery(this).parent().parent().find('.de_tab_content > div').hide();var indexer=jQuery(this).index();jQuery(this).parent().parent().find('.de_tab_content > div:eq('+indexer+')').show();});jQuery(".toggle-list h2").addClass("acc_active");jQuery(".toggle-list h2").toggle(function(){jQuery(this).addClass("acc_noactive");jQuery(this).next(".ac-content").slideToggle(200);},function(){jQuery(this).removeClass("acc_noactive").addClass("acc_active");jQuery(this).next(".ac-content").slideToggle(200);})
var mb;jQuery('#menu-btn').on("click",function(){if(mobile_menu_show==0){jQuery('#mainmenu').slideDown();mobile_menu_show=1;}else{jQuery('#mainmenu').slideUp();mobile_menu_show=0;}})
jQuery("#homepage nav a, .scroll-to").click(function(evn){if(this.href.indexOf('#')!=-1){evn.preventDefault();jQuery('html,body').scrollTo(this.hash,this.hash);}});jQuery("a.btn").click(function(evn){if(this.href.indexOf('#')!=-1){evn.preventDefault();jQuery('html,body').scrollTo(this.hash,this.hash);}});jQuery('.de-gallery .item .icon-info').on("click",function(){jQuery('.page-overlay').show();url=jQuery(this).attr("data-value");jQuery("#loader-area .project-load").load(url,function(){jQuery("#loader-area").slideDown(500,function(){jQuery('.page-overlay').hide();jQuery('html, body').animate({scrollTop:jQuery('#loader-area').offset().top-70},500,'easeOutCubic');jQuery(".image-slider").owlCarousel({items:1,singleItem:true,navigation:false,pagination:true,autoPlay:false});jQuery(".container").fitVids();jQuery('#btn-close-x').on("click",function(){jQuery("#loader-area").slideUp(500,function(){jQuery('html, body').animate({scrollTop:jQuery('#section-portfolio').offset().top-70},500,'easeOutCirc');});return false;});});});});jQuery('.de-gallery .item').on("click",function(){$('#navigation').show();});jQuery('.side-bg').each(function(){jQuery(this).find(".image-container").css("height",jQuery(this).find(".image-container").parent().css("height"));});var target=$('.center-y');var targetHeight=target.outerHeight();$(document).scroll(function(e){var scrollPercent=(targetHeight-window.scrollY)/targetHeight;if(scrollPercent>=0){target.css('opacity',scrollPercent);}});jQuery(document).scroll(function(){jQuery('#homepage nav li a').each(function(){if(this.href.indexOf('#')!=-1){var href=jQuery(this).attr('href');if(jQuery(window).scrollTop()>jQuery(href).offset().top-140){jQuery('nav li a').removeClass('active');jQuery(this).addClass('active');}}});});});var v_count='0';jQuery(window).load(function(){jQuery('.animated').fadeTo(0,0);jQuery('.animated').each(function(){var imagePos=jQuery(this).offset().top;var timedelay=jQuery(this).attr('data-delay');var topOfWindow=jQuery(window).scrollTop();if(imagePos li > a').each(function(){if($(this).next("ul").length>0){$("").insertAfter($(this));}});jQuery('#mainmenu > li > ul > li > a').each(function(){if($(this).next("ul").length>0){$("").insertAfter($(this));}});jQuery("#mainmenu > li > span, #mainmenu > li > ul > li > span").on("click",function(){$('header').css("height","auto");var iteration=$(this).data('iteration')||1;switch(iteration){case 1:$(this).addClass("active");$(this).next("ul").css("height","auto");var curHeight=$(this).next("ul").height();$(this).next("ul").css("height","0");$(this).next("ul").animate({'height':curHeight},400,'easeInOutQuint');break;case 2:$(this).removeClass("active");$(this).next("ul").animate({'height':"0"},400,'easeInOutQuint');break;}iteration++;if(iteration>2)iteration=1;$(this).data('iteration',iteration);});if($('#back-to-top').length){var scrollTrigger=500,backToTop=function(){var scrollTop=$(window).scrollTop();if(scrollTop>scrollTrigger){$('#back-to-top').addClass('show');}else{$('#back-to-top').removeClass('show');}};backToTop();$(window).on('scroll',function(){backToTop();});$('#back-to-top').on('click',function(e){e.preventDefault();$('html,body').animate({scrollTop:0},700);});$("section,div").css('background-color',function(){return jQuery(this).data('bgcolor');});$("div").css('background-image',function(){return jQuery(this).data('bgimage');});}});