(function($){"use strict";jQuery(document).ready(function(){'use strict';jQuery(window).load(function(){"use strict";jQuery("#mainmenu li a[href^='#'], a.scroll").mPageScroll2id({highlightSelector:"#mainmenu li a",offset:80,scrollSpeed:800,scrollEasing:"easeInOutCubic"});jQuery('.owl-custom-nav').each(function(){var owl=$('.owl-custom-nav').next();var h=$(this).height();var ow=owl.height();$(this).css("margin-top",(ow/2)-h);owl.owlCarousel();$(".btn-next").on("click",function(){owl.trigger('owl.next')});$(".btn-prev").on("click",function(){owl.trigger('owl.prev')})});$.stellar({horizontalScrolling:!1,hideDistantElements:!1})});jQuery('#preloader').delay(500).fadeOut(500);jQuery(".gallery-carousel").owlCarousel({items:3,navigation:!1,pagination:!0,});jQuery(".carousel-text").owlCarousel({singleItem:!0,lazyLoad:!0,navigation:!1,pagination:!1});jQuery(".single-carousel-arrow-nav").owlCarousel({singleItem:!0,lazyLoad:!1,navigation:!1,pagination:!1});jQuery(".single-carousel-no-nav").owlCarousel({singleItem:!0,lazyLoad:!1,navigation:!1,pagination:!1});jQuery(".carousel-1").owlCarousel({singleItem:!0,lazyLoad:!1,navigation:!1,pagination:!1,autoPlay:!0,});jQuery(".single-carousel-1").owlCarousel({singleItem:!0,lazyLoad:!1,navigation:!1,pagination:!0,mouseDrag:!1,transitionStyle:"fade"});jQuery(".client-quotes").owlCarousel({singleItem:!0,lazyLoad:!1,navigation:!1,pagination:!0});jQuery(".container").fitVids();var $container=jQuery('.service-grid');$container.imagesLoaded(function(){$container.isotope({itemSelector:'.item'})});var $container=jQuery('#gallery-isotope');$container.imagesLoaded(function(){$container.isotope({itemSelector:'.item',filter:'*',})});var $newslist=jQuery('#newslist');$newslist.imagesLoaded(function(){$newslist.isotope({itemSelector:'.item',filter:'*',})});var $gallery=jQuery('.gallery');$gallery.imagesLoaded(function(){$gallery.isotope({itemSelector:'.item',filter:'*',})});var $testimonial=jQuery('#testimonial-masonry');$testimonial.imagesLoaded(function(){$testimonial.isotope({itemSelector:'.item',filter:'*',})});jQuery('#filters a').on("click",function(){var $this=jQuery(this);if($this.hasClass('selected')){return!1} var $optionSet=$this.parents();$optionSet.find('.selected').removeClass('selected');$this.addClass('selected');var selector=jQuery(this).attr('data-filter');$container.isotope({filter:selector,});return!1});jQuery('.animated').fadeTo(0,0);function equalHeight(group){var tallest=0;group.each(function(){thisHeight=$(this).parent().height();if(thisHeight>tallest){tallest=thisHeight}});group.height(tallest)} equalHeight($(".item-blog"));function setHeight(column){var maxHeight=0;column=$(column);column.each(function(){if($(this).height()>maxHeight){maxHeight=$(this).height()}});column.height(maxHeight)} setHeight('.col-1, .col-2');setHeight('.footer-col');jQuery('.small-pic').each(function(){w=jQuery(this).parent().css("width");wd=(parseInt(w,10)-40)/4;jQuery(this).css("width",wd);jQuery(this).css("height",wd)});jQuery('.wide-pic').each(function(){w=jQuery(this).parent().css("width");wd=(parseInt(w,10)-40)/2;jQuery(this).css("width",wd+10);jQuery(this).css("height",wd/2)});jQuery('.long-pic').each(function(){w=jQuery(this).parent().css("width");wd=(parseInt(w,10)-40)/4;jQuery(this).css("width",wd);jQuery(this).css("height",wd*2+10)});function init(){jQuery('.gallery .item').each(function(){jQuery(this).find(".overlay").fadeTo(1,0);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().find(".overlay").css("width",w);jQuery(this).parent().find(".overlay").css("height",h);jQuery(this).parent().find(".pf_text").css("width",w);jQuery(this).parent().find(".pf_text").css("height",h)}).each(function(){if(this.complete)$(this).load()})});jQuery('.center-xy').each(function(){jQuery(this).parent().find("img").on('load',function(){var w=parseInt(jQuery(this).parent().find(".center-xy").css("width"),10);var h=parseInt(jQuery(this).parent().find(".center-xy").css("height"),10);var pic_w=jQuery(this).css("width");var pic_h=jQuery(this).css("height");jQuery(this).parent().find(".center-xy").css("left",parseInt(pic_w,10)/2-w/2);jQuery(this).parent().find(".center-xy").css("top",parseInt(pic_h,10)/2-h/2);jQuery(this).parent().find(".bg-overlay").css("width",pic_w);jQuery(this).parent().find(".bg-overlay").css("height",pic_h)}).each(function(){if(this.complete)$(this).load()})});jQuery(".gallery .item").on("mouseenter",function(){var w=jQuery(this).find("img").css("width");var h=jQuery(this).find("img").css("height");jQuery(this).find(".overlay").stop().fadeTo(300,1);var margin_top=parseInt(h,10)/2-10;jQuery(this).find(".project-name").stop().animate({"margin-top":margin_top+"px"},400,'easeOutCubic');jQuery(this).find(".small-border").stop().animate({"width":"150px"},600,'easeOutCubic')}).on("mouseleave",function(){jQuery(this).find(".overlay").stop().fadeTo(300,0);jQuery(this).find(".project-name").stop().animate({"margin-top":"20px"},400,'easeOutCubic');jQuery(this).find(".small-border").stop().animate({"width":"50px"},600,'easeOutCubic')});jQuery('#gallery-isotope').isotope('reLayout');var wh=jQuery(window).height();jQuery(".autoheight").css("height",wh);var ch=jQuery('.autoheight .center-y').css("height");var mt=(parseInt(wh,10)-parseInt(ch,10))/2;mt=Math.floor(mt);jQuery('.autoheight .center-y').css("padding-top",mt)} init();var $window=jQuery(window);jQuery('section[data-type="background"]').each(function(){var $bgobj=jQuery(this);jQuery(window).scroll(function(){var yPos=-($window.scrollTop()/$bgobj.data('speed'));var coords='50% '+yPos+'px';$bgobj.css({backgroundPosition:coords})})});jQuery('article[data-type="background"]').each(function(){var $bgobj=jQuery(this);jQuery(window).scroll(function(){var yPos=-($window.scrollTop()/$bgobj.data('speed'));var coords='50% '+yPos+'px';$bgobj.css({backgroundPosition:coords})})});document.createElement("article");document.createElement("section");jQuery(".fx .desc").fadeTo(0,0);jQuery(".fx .item").on("mouseenter",function(){speed=700;jQuery(this).find(".desc").stop(!0).animate({'height':"120px",'margin-top':"20px","opacity":"100"},speed,'easeOutCubic');jQuery(this).find(".overlay").stop(!0).animate({'height':"100%",'margin-top':"20px"},speed,'easeOutCubic');jQuery(this).parent().parent().find(".item").not(this).stop(!0).fadeTo(speed,'.5')}).on("mouseleave",function(){jQuery(this).find(".desc").stop(!0).animate({'height':"0px",'margin-top':"0px","opacity":"0"},speed,'easeOutCubic');jQuery(this).find(".overlay").stop(!0).animate({'height':"84px",'margin-top':"20px"},speed,'easeOutCubic');jQuery(this).parent().parent().find(".item").not(this).stop(!0).fadeTo(speed,1)});jQuery('.img-hover').on("mouseenter",function(){jQuery(this).stop().animate({opacity:'.5'},100)}).on("mouseleave",function(){jQuery(this).stop().animate({opacity:1})},100);window.onresize=function(event){init();equalHeight(jQuery(".item-blog"))};jQuery('.callbacks_nav').hide();jQuery('#slider').on("mouseenter",function(){jQuery('.callbacks_nav').stop().animate({opacity:1},100)}).on("mouseleave",function(){jQuery('.callbacks_nav').stop().animate({opacity:0})},100);jQuery(".pic-hover .hover").hide();jQuery(".pic-hover").on("mouseenter",function(){jQuery(this).find(".hover").width(jQuery(this).find("img").css("width"));jQuery(this).find(".hover").height(jQuery(this).find("img").css("height"));jQuery(this).find(".hover").fadeTo(150,'.9');picheight=jQuery(this).find("img").css("height");newheight=(picheight.substring(0,picheight.length-2)/2);jQuery(this).find(".btn-view-details").css({'margin-top':newheight},'fast')}).on("mouseleave",function(){jQuery(this).find(".hover").fadeTo(150,0)});jQuery('.exo_tab').find('.exo_tab_content > div').hide();jQuery('.exo_tab').find('.exo_tab_content > div:first').show();jQuery('.exo_nav .nav-item').click(function(){jQuery(this).parent().find('.nav-item span').removeClass("active");jQuery(this).find('span').addClass("active");jQuery(this).parent().parent().find('.exo_tab_content > div').hide();var indexer=jQuery(this).index();jQuery(this).parent().parent().find('.exo_tab_content > div:eq('+indexer+')').fadeIn()});jQuery('.exo_tab.tab_map').find('.exo_tab_content > div').css('height','0');jQuery('.exo_tab.tab_map').find('.exo_tab_content > div').show();jQuery('.exo_tab').find('.exo_tab_content > div:first').css('height','auto');jQuery('.tab_map .exo_nav .nav-item').click(function(){jQuery(this).parent().find('.nav-item div').removeClass("active");jQuery(this).find('div').addClass("active");jQuery(this).parent().parent().find('.exo_tab_content > div').css('height','0');var indexer=jQuery(this).index();jQuery(this).parent().parent().find('.exo_tab_content > div:eq('+indexer+')').css('height','auto')});jQuery('.expand .title').on("click",function(){jQuery(this).parent().parent().removeClass(".active");jQuery(this).parent().parent().find(".content").slideUp();jQuery(this).parent().find(".content").slideDown();jQuery(this).parent().addClass("active")});jQuery(".accordion div").show();jQuery(".accordion h3").on("click",function(){jQuery(this).next(".pane").slideToggle("slow").siblings(".pane:visible").slideUp("slow");jQuery(this).toggleClass("current");jQuery(this).siblings("h3").removeClass("current")});$(".accordion div").css('display','none');var link=$(".accordion a");link.on('click',function(e){e.preventDefault();var a=$(this).next(".content");$(a).slideDown('fast');$(".accordion div").not(a).slideUp('fast')});jQuery('.zoom-gallery').magnificPopup({delegate:'a',type:'image',closeOnContentClick:!1,closeBtnInside:!1,mainClass:'mfp-with-zoom mfp-img-mobile',image:{verticalFit:!0,titleSrc:function(item){return item.el.attr('title')}},gallery:{enabled:!0},zoom:{enabled:!0,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:!1,fixedContentPos:!1});$('.gallery-item').magnificPopup({delegate:'a',type:'image'});$(".typed").typed({stringsElement:$('.typed-strings'),typeSpeed:100,backDelay:1500,loop:!0,contentType:'html',loopCount:!1,callback:function(){null},resetCallback:function(){newTyped()}});jQuery(".expand-box .btn-expand").on("click",function(){var iteration=$(this).data('iteration')||1;switch(iteration){case 1:jQuery(this).parent().find(".hide-content").slideDown(500);jQuery(this).parent().parent().find(".btn-fullwidth").stop().fadeTo(100,1);jQuery(this).parent().parent().find(".btn-fullwidth").css("margin-bottom","30px");jQuery(this).addClass('click');break;case 2:jQuery(this).parent().find(".hide-content").slideUp(500);jQuery(this).parent().parent().find(".btn-fullwidth").stop().fadeTo(100,0);jQuery(this).parent().parent().find(".btn-fullwidth").css("margin-bottom","0px");jQuery(this).removeClass('click');break} iteration++;if(iteration>2)iteration=1;$(this).data('iteration',iteration)});jQuery(".btn-open-map").on("click",function(){var iteration=$(this).data('iteration')||1;switch(iteration){case 1:jQuery(this).parent().parent().parent().parent().find(".gocargo_gmap").animate({height:300},300);jQuery(this).parent().parent().parent().parent().find(".gocargo_gmap").css("margin","30px 0 0 0");jQuery(this).find(".url").html("Close Map");jQuery(this).addClass('click');break;case 2:jQuery(this).parent().parent().parent().parent().find(".gocargo_gmap").animate({height:0},300);jQuery(this).parent().parent().parent().parent().find(".gocargo_gmap").animate({margin:0},300);jQuery(this).find(".url").html("View on Map");jQuery(this).removeClass('click');break} iteration++;if(iteration>2)iteration=1;$(this).data('iteration',iteration)});jQuery(".faq .btn-expand").on("click",function(){var iteration=$(this).data('iteration')||1;switch(iteration){case 1:jQuery(this).parent().find(".hide-content").slideDown(500);jQuery(this).addClass('click');break;case 2:jQuery(this).parent().find(".hide-content").slideUp(500);jQuery(this).removeClass('click');break} iteration++;if(iteration>2)iteration=1;$(this).data('iteration',iteration)});var mb;jQuery('#menu-btn').on("click",function(){var iteration=$(this).data('iteration')||1;switch(iteration){case 1:jQuery('#mainmenu').show();jQuery('header').css("height","auto");mb=1;break;case 2:jQuery('#mainmenu').hide();jQuery('header').css("height","80px");mb=0;break} iteration++;if(iteration>2)iteration=1;$(this).data('iteration',iteration)});$(function(){var x=0;setInterval(function(){x-=1;$('#section-welcome').css('background-position',x+'px 0');$('#subheader.bgloop').css('background-position',x/2+'px 0')},10)});var footerHeight=jQuery("footer").css("height");if(jQuery("footer").hasClass("sticky")){jQuery("body").css("margin-bottom",footerHeight)} 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)})} $.letItSnow('.let-it-snow',{stickyFlakes:'lis-flake--js',makeFlakes:!0,sticky:!0})})})(jQuery)