text: !function(a){"use strict";a(window).load(function(){a("#loader").fadeOut("slow",function(){a("#preloader").delay(300).fadeOut("slow")})}),setTimeout(function(){a("#intro h1").fitText(1,{minFontSize:"42px",maxFontSize:"84px"})},100),a(".fluid-video-wrapper").fitVids(),a("#owl-slider").owlCarousel({navigation:!1,pagination:!0,itemsCustom:[[0,1],[700,2],[960,3]],navigationText:!1}),a(".alert-box").on("click",".close",function(){a(this).parent().fadeOut(500)});var e=a("#stats"),n=a(".stat-count");e.waypoint({handler:function(e){"down"===e&&n.each(function(){var n=a(this);a({Counter:0}).animate({Counter:n.text()},{duration:4e3,easing:"swing",step:function(e){n.text(Math.ceil(e))}})}),this.destroy()},offset:"90%"});var t=a("#folio-wrapper");t.imagesLoaded(function(){t.masonry({itemSelector:".folio-item",resize:!0})}),a(".item-wrap a").magnificPopup({type:"inline",fixedContentPos:!1,removalDelay:300,showCloseBtn:!1,mainClass:"mfp-fade"}),a(document).on("click",".popup-modal-dismiss",function(e){e.preventDefault(),a.magnificPopup.close()});var i=a(".menu-toggle"),o=a(".main-navigation");i.on("click",function(e){e.preventDefault(),i.toggleClass("is-clicked"),o.slideToggle()}),o.find("li a").on("click",function(){i.toggleClass("is-clicked"),o.fadeOut()});var s=a("section"),r=a("#main-nav-wrap li a");s.waypoint({handler:function(e){var n;n=a("section#"+this.element.id),"up"===e&&(n=n.prev());var t=a('#main-nav-wrap a[href="#'+n.attr("id")+'"]');r.parent().removeClass("current"),t.parent().addClass("current")},offset:"25%"}),a(".smoothscroll").on("click",function(e){e.preventDefault();var n=this.hash,t=a(n);a("html, body").stop().animate({scrollTop:t.offset().top},800,"swing",function(){window.location.hash=n})}),a("input, textarea, select").placeholder(),a("#contactForm").validate({submitHandler:function(e){var n=a("#submit-loader");a.ajax({type:"POST",url:"inc/sendEmail.php",data:a(e).serialize(),beforeSend:function(){n.fadeIn()},success:function(e){"OK"==e?(n.fadeOut(),a("#message-warning").hide(),a("#contactForm").fadeOut(),a("#message-success").fadeIn()):(n.fadeOut(),a("#message-warning").html(e),a("#message-warning").fadeIn())},error:function(){n.fadeOut(),a("#message-warning").html("Something went wrong. Please try again."),a("#message-warning").fadeIn()}})}});jQuery(window).scroll(function(){a("#header-search").hasClass("is-visible")||(300<=jQuery(window).scrollTop()?jQuery("#go-top").fadeIn(400):jQuery("#go-top").fadeOut(400))})}(jQuery);