(function($){"use strict";$(window).on('load',function(){$('body').addClass('loaded');});$(document).ready(function(){function responsiveClasses(){var body=$('body');if($(window).width()<992){body.removeClass('viewport-lg');body.addClass('viewport-sm');}else{body.removeClass('viewport-sm');body.addClass('viewport-lg');}}
$(window).on("resize",function(){responsiveClasses();}).resize();if($('body').hasClass('viewport-lg')){var primaryHeader=$('.navigation-wrapper'),headerClone=primaryHeader.clone();$('header.header-wrapper').after('<div class="sticky-header"></div>');$('.sticky-header').html(headerClone);var headerSelector=$(".sticky-header");var triggerPoint=$('header.header-wrapper').height();var yOffset=0;$(window).on('scroll',function(){yOffset=$(window).scrollTop();if(yOffset>=triggerPoint){headerSelector.addClass('sticky-fixed-top');}else{headerSelector.removeClass('sticky-fixed-top');}});}
function mobileMenu(){$("header.header-wrapper").after('<div class="mobile-navigation-menu"><button id="mobile-menu-close"><i class="la la-close"></i></button></div>');var menuWrapper=$("header .navigation-menu .main-menu").clone();$('.mobile-navigation-menu #mobile-menu-close').after(menuWrapper);$("#mobile-menu-close, .mobile-menu-icon").on("click",function(){$(".mobile-menu-icon").toggleClass("menu-open");$(".mobile-navigation-menu").toggleClass("open-mobile-menu");});$(".mobile-navigation-menu ul li:has(ul)").each(function(){$(this).append('<span class="dropdown-plus"></span>');$(this).addClass("dropdown_menu");});$(".mobile-navigation-menu .dropdown-plus").on("click",function(){$(this).prev("ul").slideToggle(300);$(this).toggleClass("dropdown-open");$(".mobile-navigation-menu ul li:has(ul)").toggleClass("dropdown-open");});$(".mobile-navigation-menu .dropdown_menu a").append("<span></span>");}
mobileMenu();function popupSearchBox(){$("#popup-search-box").removeClass("toggled");$("body").removeClass("open-search-box");$(".dl-search-icon").on("click",function(e){e.stopPropagation();$("body").toggleClass("open-search-box");$("#popup-search").focus();});$("#popup-search-box input").on("click",function(e){e.stopPropagation();});$(document).on("click",".search-close, #searchbox-overlay",function(e){e.preventDefault();$("body.open-search-box").removeClass("open-search-box");});}
popupSearchBox();function sideBox(){$("body").removeClass("open-sidebox");$(document).on("click",".sidebar-trigger",function(e){e.preventDefault();$("body").toggleClass("open-sidebox");});$(document).on("click",".sidebox-close, #sidebox-overlay",function(e){e.preventDefault();$("body.open-sidebox").removeClass("open-sidebox");});}
sideBox();function doAnimations(elements){var animationEndEvents='webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';elements.each(function(){var $this=$(this);var $animationDelay=$this.data('delay');var $animationDuration=$this.data('duration');var $animationType='animated '+$this.data('animation');$this.css({'animation-delay':$animationDelay,'-webkit-animation-delay':$animationDelay,'animation-duration':$animationDuration});$this.addClass($animationType).one(animationEndEvents,function(){$this.removeClass($animationType);});});}
var sliderOptions={slidesPerView:1,spaceBetween:0,speed:1000,autoplay:true,parallax:false,mousewheel:false,loop:true,effect:'fade',pagination:{el:'.main-slider .swiper-pagination',clickable:true,},navigation:{nextEl:'.main-slider .slider-button-next',prevEl:'.main-slider .slider-button-prev'}};sliderOptions.on={slideChangeTransitionStart:function(){var swiper=this;var animatingElements=$(swiper.slides[swiper.activeIndex]).find('[data-animation]');doAnimations(animatingElements);},resize:function(){this.update();}};var mainSlider=new Swiper('.main-slider',sliderOptions);$('.counter-content').waypoint(function(){var odo=$(".counter-content .odometer");odo.each(function(){var countNumber=$(this).attr("data-count");$(this).html(countNumber);});},{offset:"80%",triggerOnce:true});$('.about-counter').waypoint(function(){var odo=$(".about-counter .odometer");odo.each(function(){var countNumber=$(this).attr("data-count");$(this).html(countNumber);});},{offset:"80%",triggerOnce:true});var swiperProject=new Swiper(".project-carousel",{slidesPerView:3,spaceBetween:30,slidesPerGroup:1,loop:true,autoplay:true,speed:400,pagination:{el:".project-carousel-wraper .carousel-pagination",clickable:true,},navigation:{nextEl:'.carousel-button-next',prevEl:'.carousel-button-prev'},breakpoints:{320:{slidesPerView:1,spaceBetween:25},767:{slidesPerView:2,spaceBetween:30},1024:{slidesPerView:3}}});var swiperProject2=new Swiper(".project-carousel-2",{slidesPerView:1,spaceBetween:30,slidesPerGroup:1,loop:true,autoplay:true,speed:400,pagination:{el:".project-carousel-wraper .carousel-pagination",clickable:true,},navigation:false,});var swiperTestimonial=new Swiper(".testimonial-carousel",{slidesPerView:1,spaceBetween:30,slidesPerGroup:1,loop:true,autoplay:false,speed:400,pagination:{el:".testimonial-carousel-wrapper .carousel-pagination",clickable:true,},navigation:false,});var swiperTestimonial2=new Swiper(".testimonial-carousel-2",{slidesPerView:3,spaceBetween:20,slidesPerGroup:1,loop:true,autoplay:false,speed:400,pagination:false,navigation:{nextEl:'.carousel-button-next',prevEl:'.carousel-button-prev'},breakpoints:{320:{slidesPerView:1,slidesPerGroup:1,spaceBetween:25},767:{slidesPerView:2,slidesPerGroup:2,spaceBetween:30},1024:{slidesPerView:3,slidesPerGroup:1}}});var swiperSponsor=new Swiper(".sponsor-carousel",{slidesPerView:"5",spaceBetween:30,slidesPerGroup:1,loop:true,autoplay:true,speed:700,pagination:{el:".sponsor-carousel .swiper-pagination",clickable:true,},breakpoints:{320:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},767:{slidesPerView:3,slidesPerGroup:1,spaceBetween:0},1024:{slidesPerView:5,slidesPerGroup:1}}});var swiperFeed=new Swiper(".feed-carousel",{slidesPerView:6,spaceBetween:30,slidesPerGroup:1,loop:true,autoplay:true,speed:700,pagination:false,breakpoints:{320:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},767:{slidesPerView:4,slidesPerGroup:1,spaceBetween:10},1024:{slidesPerView:6,slidesPerGroup:1}}});new VenoBox({selector:'.dl-video-popup, .dl-img-popup',bgcolor:'transparent',numeration:true,infinigall:true,spinner:'plane',});$('.piechart').waypoint(function(){$('.piechart').easyPieChart({scaleColor:"transparent",lineWidth:3,lineCap:'round',trackColor:"#ddd",size:150,rotate:0,animate:1000,onStep:function(value){this.$el.find('span').text(Math.round(value));},onStop:function(value,to){this.$el.find('span').text(Math.round(to));}});},{offset:"80%",triggerOnce:true});var currentYear=new Date().getFullYear();$('#currentYear').append(currentYear);var scrollTop=$("#scroll-top");$(window).on('scroll',function(){var topPos=$(this).scrollTop();if(topPos>100){$('#scrollup').removeClass('hide');$('#scrollup').addClass('show');}else{$('#scrollup').removeClass('show');$('#scrollup').addClass('hide');}});$(scrollTop).on("click",function(){$('html, body').animate({scrollTop:0},0);return false;});new WOW().init();

});})(jQuery);