(function(){var h={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return(h.Android()||h.BlackBerry()||h.iOS()||h.Opera()||h.Windows())}};var k=function(){$(document).click(function(o){var n=$("#gtco-offcanvas, .js-gtco-nav-toggle");if(!n.is(o.target)&&n.has(o.target).length===0){if($("body").hasClass("offcanvas")){$("body").removeClass("offcanvas");$(".js-gtco-nav-toggle").removeClass("active")}}})};var c=function(){if($(window).scrollTop()>50){$("body").addClass("scrolled");$(".js-gtco-nav-toggle").removeClass("gtco-nav-white")}else{$("body").removeClass("scrolled");$(".js-gtco-nav-toggle").addClass("gtco-nav-white")}$(window).scroll(function(){if($(window).scrollTop()>50){$("body").addClass("scrolled");$(".js-gtco-nav-toggle").removeClass("gtco-nav-white")}else{$("body").removeClass("scrolled");$(".js-gtco-nav-toggle").addClass("gtco-nav-white")}})};var j=function(){$("#page").prepend('
');$("#page").prepend('');var o=$(".menu-1 > ul").clone();$("#gtco-offcanvas").append(o);var n=$(".menu-2 > ul").clone();$("#gtco-offcanvas").append(n);$("#gtco-offcanvas .has-dropdown").addClass("offcanvas-has-dropdown");$("#gtco-offcanvas").find("li").removeClass("has-dropdown");$(".offcanvas-has-dropdown").mouseenter(function(){var p=$(this);p.addClass("active").find("ul").slideDown(500,"easeOutExpo")}).mouseleave(function(){var p=$(this);p.removeClass("active").find("ul").slideUp(500,"easeOutExpo")});$(window).resize(function(){if($("body").hasClass("offcanvas")){$("body").removeClass("offcanvas");$(".js-gtco-nav-toggle").removeClass("active")}})};var m=function(){$("body").on("click",".js-gtco-nav-toggle",function(n){var o=$(this);if($("body").hasClass("overflow offcanvas")){$("body").removeClass("overflow offcanvas")}else{$("body").addClass("overflow offcanvas")}o.toggleClass("active");n.preventDefault()})};var f=function(){var n=0;$(".animate-box").waypoint(function(o){if(o==="down"&&!$(this.element).hasClass("animated-fast")){n++;$(this.element).addClass("item-animate");setTimeout(function(){$("body .animate-box.item-animate").each(function(p){var q=$(this);setTimeout(function(){var r=q.data("animate-effect");if(r==="fadeIn"){q.addClass("fadeIn animated-fast")}else{if(r==="fadeInLeft"){q.addClass("fadeInLeft animated-fast")}else{if(r==="fadeInRight"){q.addClass("fadeInRight animated-fast")}else{q.addClass("fadeInUp animated-fast")}}}q.removeClass("item-animate")},p*50,"easeInOutExpo")})},100)}},{offset:"85%"})};var l=function(){$(".has-dropdown").mouseenter(function(){var n=$(this);n.find(".dropdown").css("display","block").addClass("animated-fast fadeInUpMenu")}).mouseleave(function(){var n=$(this);n.find(".dropdown").css("display","none").removeClass("animated-fast fadeInUpMenu")})};var g=function(){$(".js-gotop").on("click",function(n){n.preventDefault();$("html, body").animate({scrollTop:$("html").offset().top},500,"easeInOutExpo");return false});$(window).scroll(function(){var n=$(window);if(n.scrollTop()>200){$(".js-top").addClass("active")}else{$(".js-top").removeClass("active")}})};var e=function(){$(".gtco-loader").fadeOut("slow")};var a=function(){$(".js-counter").countTo({formatter:function(o,n){return o.toFixed(n.decimals)},})};var i=function(){if($("#gtco-counter").length>0){$("#gtco-counter").waypoint(function(n){if(n==="down"&&!$(this.element).hasClass("animated")){setTimeout(a,400);$(this.element).addClass("animated")}},{offset:"90%"})}};var d=function(){if(!h.any()){$(window).stellar()}};var b=function(){$("#main-hero .flexslider").flexslider({animation:"slide",easing:"swing",direction:"horizontal",slideshowSpeed:5000,directionNav:true,start:function(){setTimeout(function(){$(".slider-text").removeClass("animated fadeInUp");$(".flex-active-slide").find(".slider-text").addClass("animated fadeInUp")},500)},before:function(){setTimeout(function(){$(".slider-text").removeClass("animated fadeInUp");$(".flex-active-slide").find(".slider-text").addClass("animated fadeInUp")},500)}})};$(function(){f();g();e();i();d();b()})}());