!function(a){"use strict";jQuery(function(a){a(".row-has-seperator").length&&a(".row-has-seperator").each(function(){var b=a(this);b.after('<div class="row-seperator"></div>'),a(".row-seperator").each(function(){var b=a(this),c=b.prev().css("background-color");"transparent"==c&&(c=a("body.meteorite-boxed").length?a(".meteorite-boxed #page").css("background-color"):a("body.custom-background").length?a("body.custom-background").css("background-color"):a("body").css("background-color")),b.css("background-color",c);var d=b.prev().css("border-bottom-color");b.css({"border-bottom-color":d,"border-right-color":d})})})}),jQuery.fn.meteorite_submenu_positioning=function(b){return a(this).children(".sub-menu").each(function(){var b=a(this);if(b.length){var c=b.offset(),d=c.left,g=(c.top,b.height(),b.outerWidth()),i=d+g,k=(a(window).height(),a(window).width());i>k&&(b.parent().parent(".sub-menu").parent().parent(".sub-menu").length?b.css({left:"0",top:b.parent().height()}):b.parent().parent(".sub-menu").length?b.css({left:-1*g,top:"0px"}):b.css({left:-1*g+b.parent().width(),top:b.parent().height()}))}})},jQuery.fn.meteorite_walk_through_menu_items=function(){a(this).meteorite_submenu_positioning(),a(this).find(".sub-menu").length&&a(this).find(".sub-menu li").meteorite_walk_through_menu_items()},jQuery(function(a){a.fn.meteorite_submenu_positioning&&(a(".menu-item-has-children, .menu-item-has-children li").mouseenter(function(){a(this).meteorite_submenu_positioning()}),a(".menu-item-has-children > ul > li").each(function(){a(this).meteorite_walk_through_menu_items()}),a(window).on("resize",function(){a(".menu-item-has-children > ul > li").each(function(){a(this).meteorite_walk_through_menu_items()})}))});var b=function(){a('#main-nav a[href^="#"]:not(.search-button-toggle), .meteorite-button[href^="#"], .button[href^="#"], .smooth-scroll').on("click",function(b){b.preventDefault();var c=this.hash,d=a(c);matchMedia("only screen and (min-width: 992px)").matches?a("html, body").stop().animate({scrollTop:d.offset().top-a(".nav-container").outerHeight()},1e3):a("html, body").stop().animate({scrollTop:d.offset().top},1e3)})},c=function(){a(window).on("scroll load",function(){a(document).scrollTop()>a(".header-container").height()?a(".upbutton").addClass("meteorite-show"):a(".upbutton").removeClass("meteorite-show")}),a(".scroll-to-top").click(function(){return a("html, body").animate({scrollTop:0},800),!1})},d=function(){a(".search-button-toggle").length&&(a(".search-button-toggle").on("click",function(b){b.preventDefault(),a(".meteorite-header-search").fadeToggle(200),a(".overlay-search input").focus()}),a(".overlay-search-close").on("click",function(b){b.preventDefault(),a(this).closest(".meteorite-header-search").fadeToggle(200)}),a(window).on("load resize",function(){matchMedia("only screen and (max-width: 1024px)").matches&&a(".meteorite-header-search").removeAttr("style")}))},e=function(){a(window).on("load resize",function(){matchMedia("only screen and (max-width: 1024px)").matches||(a("#mobile-menu").removeAttr("style"),a(".btn-menu").removeClass("open-nav-cross"))}),a(window).on("load",function(){a(".btn-menu, #mobile-menu a").on("click",function(){a("#mobile-menu").stop().slideToggle(300),a(".btn-menu").toggleClass("open-nav-cross")});var b=a("#mobile-menu").find("li:has(ul)");b.children("a").after('<span class="btn-submenu"></span>'),a("#mobile-menu .btn-submenu").on("click",function(){a(this).next("ul").stop().slideToggle(300),a(this).toggleClass("active")})})},f=function(){a(".nav-container").wrap("<div class='nav-placeholder'></div>"),a(window).on("load resize",function(){a(".nav-placeholder").height(a(".nav-container").outerHeight()),a(window).width()<1024&&(a(".nav-container").removeClass("fixed"),a(".parallax-header").css({top:"0"}))}),a(window).on("scroll load",function(){var b=a(".nav-container"),c=a(".header-area").height();a("#masthead.below .nav-container").hasClass("sticky")?(a(document).scrollTop()>c+a(".topbar").outerHeight()?b.addClass("fixed"):b.removeClass("fixed"),a(document).scrollTop()>c+a(".topbar").outerHeight()?b.addClass("floated"):b.removeClass("floated")):a("#masthead.above .nav-container").hasClass("sticky")&&(a(document).scrollTop()>0+a(".topbar").outerHeight()?b.addClass("fixed"):b.removeClass("fixed"),a(document).scrollTop()>0+a(".topbar").outerHeight()+c/2?b.addClass("floated"):b.removeClass("floated"))})},g=function(){a(window).on("load scroll",function(){if(a(window).width()>991){var b=a(".parallax-text"),c=a(".parallax-header"),d=a(".header-button"),e=a(".header-image").height()/1.5,f=a(this).scrollTop(),g=a(".parallax-text"),h=a(".header-image").height()/2;f<1.5*e+a("#masthead").height()&&(b.css({opacity:1-f/e}),d.css({opacity:1-f/e}),g.css("top",h+.1*f+"px"),c.css("top",.45*f+"px"))}})},h=function(){a(window).on("scroll load",function(){a('.meteorite-parallax[data-hasbg="hasbg"]').each(function(){var b=a(window).scrollTop(),c=a(this).offset().top,d=b+a(window).height();if(d>c){if(c>b)var e=Math.abs(b-c)/2;else var e=(c-b)/2;a(this).css("backgroundPosition","0px "+parseInt(e).toString()+"px")}else a(this).css({backgroundPosition:""})})})},i=function(){a(window).on("scroll load",function(){a(".fade-in").each(function(){var b=a(this).offset().top,c=a(window).scrollTop(),d=c+a(window).height();d>b+150&&a(this).addClass("meteorite-show").delay(1e3).queue(function(){a(this).removeClass("fade-in meteorite-show").dequeue()})}),a(".fade-in-left, .fade-in-right").each(function(){var b=a(this).offset().top,c=a(window).scrollTop(),d=c+a(window).height();d>b+150&&a(this).addClass("meteorite-show").delay(1e3).queue(function(){a(this).removeClass("fade-in-left fade-in-right meteorite-show").dequeue()})}),a(".fade-in-up").each(function(){var b=a(this).offset().top,c=a(window).scrollTop(),d=c+a(window).height();d>b+150&&a(this).addClass("meteorite-show").delay(1e3).queue(function(){a(this).removeClass("fade-in-up meteorite-show").dequeue()})}),a(".fade-in-single").each(function(){var b=a(this).offset().top,c=a(window).scrollTop(),d=c+a(window).height();a(this).hasClass("meteorite-text-with-icon")&&a(this).closest(".panel-row-style").find(".meteorite-item").each(function(b){a(this).css("animation-delay",100*b+"ms")}),d>b+150&&a(this).find(".meteorite-item").each(function(b){var c=a(this);setTimeout(function(){c.addClass("meteorite-show").delay(2e3).queue(function(){c.removeClass("meteorite-show").dequeue(),c.closest(".fade-in-single").removeClass("fade-in-single")})},100*b)})}),a(".fade-in-up-single").each(function(){var b=a(this).offset().top,c=a(window).scrollTop(),d=c+a(window).height();a(this).hasClass("meteorite-text-with-icon")&&a(this).closest(".panel-row-style").find(".meteorite-item").each(function(b){a(this).css("animation-delay",200*b+"ms")}),d>b+150&&a(this).find(".meteorite-item").each(function(b){var c=a(this);setTimeout(function(){c.addClass("meteorite-show").delay(4e3).queue(function(){c.removeClass("meteorite-show").dequeue(),c.closest(".fade-in-up-single").removeClass("fade-in-up-single")})},200*b)})})})},j=function(){a(window).on("load resize",function(){(matchMedia("only screen and (max-width: 1024px)").matches||a("body").hasClass("meteorite-no-animations"))&&(a(".fade-in").removeClass("fade-in"),a(".fade-in-up").removeClass("fade-in-up"),a(".fade-in-left").removeClass("fade-in-left"),a(".fade-in-right").removeClass("fade-in-right"),a(".fade-in-single").removeClass("fade-in-single"),a(".fade-in-up-single").removeClass("fade-in-up-single"))})},k=function(){a(".skill-bar").length&&a(".skill-bar").on("on-appear",function(){a(this).each(function(){var b=a(this).data("percent");a(this).find(".skill-bar-fill").animate({width:b+"%"},3e3),a(this).parent().find(".skill-perc").addClass("meteorite-show").animate({width:b+"%"},3e3)})})},l=function(){a(".meteorite-skill-circle").length&&a(".meteorite-skill-circle").on("on-appear",function(){var b=a(this).parent().data("fillcolor"),c=a(this).parent().data("unfillcolor"),d=a(this).parent().data("size"),e=a(this).parent().data("linewidth"),f=a(this).parent().data("speed");a(this).find(".meteorite-skill-circle-inner").each(function(){a(this).easyPieChart({barColor:b,scaleColor:!1,trackColor:c,size:d,lineWidth:e,animate:{duration:f,enabled:!0}})})})},m=function(){a(".panel-row-style").each(function(){if(a(this).data("hascolor")&&a(this).find("h1, h2, h3, h4, h5, h6, a, .fa, div, span").css("color","inherit"),a(this).data("hasbg")&&a(this).data("overlay")){a(this).append('<div class="overlay"></div>');var b=a(this).data("overlay-color");a(this).find(".overlay").css("background-color",b)}}),a(".panel-grid .panel-widget-style").each(function(){var b=a(this).data("title-color"),c=a(this).data("headings-color");"#444444"!=b&&a(this).find(".widget-title").css("color",b),"#444444"!=c&&a(this).find("h1, h2, h3:not(.widget-title), h4, h5, h6, h3 a").css("color",c)})},n=function(){a(".meteorite-testimonials").length&&a(".meteorite-testimonials").each(function(){var b=a(this);b.owlCarousel({navigation:!1,pagination:b.data("pagination"),responsive:!0,items:b.data("items-large"),itemsDesktopSmall:[1400,b.data("items-large")],itemsTablet:[992,b.data("items-medium")],itemsTabletSmall:[768,b.data("items-medium")],itemsMobile:[480,b.data("items-small")],touchDrag:!0,mouseDrag:!0,autoHeight:!0,stopOnHover:!0,autoPlay:b.data("autoplay")})})},o=function(){a(".meteorite-team").length&&a(".meteorite-team").each(function(){var b=a(this);b.owlCarousel({navigation:!1,pagination:b.data("pagination"),responsive:!0,items:b.data("items-large"),itemsDesktopSmall:[1400,b.data("items-large")],itemsTablet:[992,b.data("items-medium")],itemsTabletSmall:[768,b.data("items-medium")],itemsMobile:[480,b.data("items-small")],touchDrag:!0,mouseDrag:!0,autoHeight:!1,autoPlay:b.data("autoplay")})})},p=function(){a(".meteorite-latest-news-carousel").length&&a(".meteorite-latest-news-carousel").each(function(){var b=a(this);b.owlCarousel({navigation:!1,pagination:b.data("pagination"),responsive:!0,items:b.data("items-large"),itemsDesktopSmall:[1400,b.data("items-large")],itemsTablet:[992,b.data("items-medium")],itemsTabletSmall:[768,b.data("items-medium")],itemsMobile:[480,b.data("items-small")],touchDrag:!0,mouseDrag:!0,autoHeight:!1,autoPlay:b.data("autoplay")})})},q=function(){a(".meteorite-clients").length&&a(".meteorite-clients").each(function(){var b=a(this);b.owlCarousel({navigation:!1,pagination:b.data("pagination"),responsive:!0,items:b.data("items-large"),itemsDesktopSmall:[1400,b.data("items-large")],itemsTablet:[992,b.data("items-medium")],itemsTabletSmall:[768,b.data("items-medium")],itemsMobile:[480,b.data("items-small")],touchDrag:!0,mouseDrag:!0,stopOnHover:!0,autoHeight:!1,autoPlay:b.data("autoplay")})})},r=function(){a(".meteorite-projects-carousel").length&&a(".meteorite-projects-carousel").each(function(){var b=a(this);b.owlCarousel({navigation:!1,pagination:!1,responsive:!0,items:b.data("cols"),itemsDesktopSmall:[1400,b.data("cols")],itemsTablet:[992,3],itemsTabletSmall:[768,2],itemsMobile:[480,1],touchDrag:!0,mouseDrag:!0,autoHeight:!0,autoPlay:!1,afterInit:function(){setTimeout(function(){a(".owl-carousel").each(function(){a(this).data("owlCarousel").updateVars()})},0)}});var c=b;b.parent().find(".next").click(function(){c.trigger("owl.next")}),b.parent().find(".prev").click(function(){c.trigger("owl.prev")})})},s=function(){if(a(".terra-themes-header-slider").length){a(".terra-themes-header-slider").owlCarousel({navigation:a(".terra-themes-header-slider").data("navigation"),pagination:a(".terra-themes-header-slider").data("pagination"),responsive:!0,items:1,responsiveRefreshRate:1,touchDrag:!1,mouseDrag:!1,autoHeight:!1,addClassActive:!0,autoPlay:a(".terra-themes-header-slider").data("autoplay"),singleItem:!0,transitionStyle:a(".terra-themes-header-slider").data("transition"),stopOnHover:a(".terra-themes-header-slider").data("hoverstop"),afterInit:function(){setTimeout(function(){a(".owl-carousel").each(function(){a(this).data("owlCarousel").updateVars()})},0),a(".owl-item.active .header-image.do-animate").each(function(){a(this).addClass("meteorite-show")}),a(".parallax-text, .header-button-down").hide().delay(450).fadeIn(400)},beforeMove:function(){setTimeout(function(){a(".owl-item:not(.active) .header-image.do-animate").removeClass("meteorite-show"),a(".owl-item:not(.active) .header-video video")[0].pause()},500)},afterMove:function(){a(".owl-item.active .header-video video").length&&a(".owl-item.active .header-video video")[0].play(),a(".owl-item.active .header-image.do-animate").each(function(){a(this).addClass("meteorite-show")}),a(".parallax-text, .header-button-down").hide().delay(450).fadeIn(400)}});var b=a(".terra-themes-header-slider");a(".terra-themes-slider-controls .next").click(function(){b.trigger("owl.next")}),a(".terra-themes-slider-controls .prev").click(function(){b.trigger("owl.prev")})}},t=function(){a("body").fitVids()},u=function(){a(".meteorite-facts").length&&a(".meteorite-facts .fact-item.count-me").on("on-appear",function(){a(this).find(".fact-count").each(function(){var b=parseInt(a(this).attr("data-to")),c=parseInt(a(this).attr("data-speed"));a(this).countTo({to:b,speed:c})})})},v=function(){a(".social-menu-widget a").attr("target","_blank")},w=function(){a('[data-waypoint-active="yes"]').waypoint(function(){a(this).trigger("on-appear")},{offset:"90%",triggerOnce:!0}),a(window).on("load",function(){setTimeout(function(){a.waypoints("refresh")},100)})},x=function(){a(".meteorite-projects").length&&a(".meteorite-projects").each(function(){var b=a(this),c=b.find(".project-filter").find("a"),d=function(a){a.isotope({filter:"*",itemSelector:".project-item",percentPosition:!0,animationOptions:{duration:750,easing:"liniar",queue:!1}})};b.find(".isotope-container").imagesLoaded(function(){d(b.find(".isotope-container"))}),a(window).load(function(){d(b.find(".isotope-container"))}),c.click(function(){var d=a(this).attr("data-filter");return c.removeClass("active"),a(this).addClass("active"),b.find(".isotope-container").isotope({filter:d,animationOptions:{duration:750,easing:"liniar",queue:!1}}),!1})})},y=function(){a(".terra-themes-header-slider").length&&(a(window).on("load resize",function(){a(".terra-themes-header-slider .video-wrap").each(function(b){var c=992,d=1280,e=720,f=1280/720,g=a(this).closest(".terra-themes-header-slider").outerHeight(),h=a(this).closest(".terra-themes-header-slider").outerWidth();a(this).width(h);var i=a(this).closest(".terra-themes-header-slider").outerHeight();c=f*(i+20),a(this).height(i);var j=h/d,k=(i-g)/e,l=k;j>k&&(l=j),l*d<c&&(l=c/d),a(this).find("video, .mejs-overlay, .mejs-poster").width(Math.ceil(l*d+2)),a(this).find("video, .mejs-overlay, .mejs-poster").height(Math.ceil(l*e+2)),a(this).scrollLeft((a(this).find("video").width()-h)/2),a(this).find(".mejs-overlay, .mejs-poster").scrollTop((a(this).find("video").height()-i)/2),a(this).scrollTop((a(this).find("video").height()-i)/2)})}),a(".video-wrap .video").mediaelementplayer({videoWidth:-1,videoHeight:-1,enableKeyboard:!1,iPadUseNativeControls:!1,pauseOtherPlayers:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1}))},z=function(){a(".project-type-reveal-title").length&&a(".project-type-reveal-title .project-title-wrap").each(function(){var b=a(this).outerHeight();a(this).css({bottom:-b+"px"})})},A=function(){a(window).load(function(){a("#preloader").css("opacity",0),setTimeout(function(){a("#preloader").hide()},600)})};a(function(){matchMedia("only screen and (min-width: 1025px)").matches&&(g(),h(),i()),b(),c(),f(),d(),e(),j(),k(),l(),m(),n(),o(),p(),q(),r(),s(),t(),u(),v(),w(),x(),y(),z(),A()})}(jQuery);