(function($){"use strict";$(window).on('load',function(event){$('.js-preloader').delay(500).fadeOut(500);});$('.user-menu').on('click',function(){$(this).toggleClass('open');});$('.user-login span').on('click',function(){$('.user-login ul').toggleClass('open');});$(".language-option").each(function(){var each=$(this)
each.find(".lang-name").html(each.find(".language-dropdown-menu a:nth-child(1)").text());var allOptions=$(".language-dropdown-menu").children('a');each.find(".language-dropdown-menu").on("click","a",function(){allOptions.removeClass('selected');$(this).addClass('selected');$(this).closest(".language-option").find(".lang-name").html($(this).text());});})
$(".odometer").appear(function(e){var odo=$(".odometer");odo.each(function(){var countNumber=$(this).attr("data-count");$(this).html(countNumber);});});$('.hero-wrap.style2').mousemove(function(e){var wx=$(window).width();var wy=$(window).height();var x=e.pageX-this.offsetLeft;var y=e.pageY-this.offsetTop;var newx=x-wx/2;var newy=y-wy/2;$('.hero-shape').each(function(){var speed=$(this).attr('data-speed');if($(this).attr('data-revert'))speed*=-.4;TweenMax.to($(this),1,{x:(1-newx*speed),y:(1-newy*speed)});});});$('.hero-wrap').mousemove(function(e){var wx=$(window).width();var wy=$(window).height();var x=e.pageX-this.offsetLeft;var y=e.pageY-this.offsetTop;var newx=x-wx/2;var newy=y-wy/2;$('.hero-content').each(function(){var speed=$(this).attr('data-speed');if($(this).attr('data-revert'))speed*=-.4;TweenMax.to($(this),1,{x:(1-newx*speed),y:(1-newy*speed)});});});$(".hero-slider-one").owlCarousel({nav:true,dots:false,loop:true,margin:20,items:1,navText:['<i class="flaticon-left-arrow"></i>','<i class="flaticon-right-arrow"></i>'],thumbs:false,smartSpeed:1300,autoplay:false,autoplayTimeout:4000,autoplayHoverPause:false,responsiveClass:true,autoHeight:true,});$(".feature-slider-one").owlCarousel({nav:false,dots:true,loop:true,margin:25,items:1,thumbs:false,smartSpeed:1300,autoplay:false,autoplayTimeout:4000,autoplayHoverPause:false,responsiveClass:true,autoHeight:true,responsive:{0:{items:1,},768:{items:2,},1200:{items:3,}}});$(".testimonial-slider-one").owlCarousel({nav:false,dots:true,loop:true,margin:20,items:1,thumbs:false,smartSpeed:1300,autoplay:false,autoplayTimeout:4000,autoplayHoverPause:false,responsiveClass:true,autoHeight:true,responsive:{0:{items:1,},768:{items:2,},1200:{items:3,}}});$(".testimonial-slider-two").owlCarousel({nav:false,dots:true,loop:true,margin:25,items:1,thumbs:false,smartSpeed:1300,autoplay:false,autoplayTimeout:4000,autoplayHoverPause:false,responsiveClass:true,autoHeight:true,responsive:{0:{items:1,},768:{items:2,},1200:{items:2,}}});$(".partner-slider").owlCarousel({nav:false,dots:false,loop:true,margin:22,items:1,thumbs:false,smartSpeed:1300,autoplay:true,autoplayTimeout:4000,autoplayHoverPause:false,responsiveClass:true,autoHeight:true,responsive:{0:{items:3,},576:{items:3,},768:{items:4,},992:{items:5,},1200:{items:6,}}});var wind=$(window);var sticky=$('.header-wrap');wind.on('scroll',function(){var scroll=wind.scrollTop();if(scroll<100){sticky.removeClass('sticky');}else{sticky.addClass('sticky');}});$(window).on('resize',function(){if($(window).width()<=1199){$('.collapse.navbar-collapse').removeClass('collapse');}else{$('.navbar-collapse').addClass('collapse');}});$('.mobile-menu a').on('click',function(){$('.main-menu-wrap').addClass('open');$('.collapse.navbar-collapse').removeClass('collapse');});$('.mobile_menu a').on('click',function(){$(this).parent().toggleClass('open');$('.main-menu-wrap').toggleClass('open');});$('.menu-close').on('click',function(){$('.main-menu-wrap').removeClass('open')});$('.mobile-top-bar').on('click',function(){$('.header-top').addClass('open')});$('.close-header-top button').on('click',function(){$('.header-top').removeClass('open')});var $offcanvasNav=$('.navbar-nav'),$offcanvasNavSubMenu=$offcanvasNav.find('.dropdown-menu');$offcanvasNavSubMenu.parent().prepend('<span class="menu-expand"><i class="ri-arrow-down-s-line"></i></span>');$offcanvasNavSubMenu.slideUp();$offcanvasNav.on('click','li a, li .menu-expand',function(e){var $this=$(this);if(($this.attr('href')==='#'||$this.hasClass('menu-expand'))){e.preventDefault();if($this.siblings('ul:visible').length){$this.siblings('ul').slideUp('slow');}else{$this.closest('li').siblings('li').find('ul:visible').slideUp('slow');$this.siblings('ul').slideDown('slow');}}
if($this.is('a')||$this.is('span')||$this.attr('class').match(/\b(menu-expand)\b/)){$this.parent().toggleClass('menu-open');}else if($this.is('li')&&$this.attr('class').match(/\b('dropdown-menu')\b/)){$this.toggleClass('menu-open');}});AOS.init();function BackToTop(){$('.back-to-top').on('click',function(){$('html, body').animate({scrollTop:0},100);return false;});$(document).scroll(function(){var y=$(this).scrollTop();if(y>600){$('.back-to-top').fadeIn();$('.back-to-top').addClass('open');}else{$('.back-to-top').fadeOut();$('.back-to-top').removeClass('open');}});}
BackToTop();})(jQuery);function setTheme(themeName){localStorage.setItem('cuex_theme',themeName);document.documentElement.className=themeName;}
function toggleTheme(){if(localStorage.getItem('cuex_theme')==='theme-dark'){setTheme('theme-light');}else{setTheme('theme-dark');}}
(function(){if(localStorage.getItem('cuex_theme')==='theme-dark'){setTheme('theme-dark');document.getElementById('slider').checked=false;}else{setTheme('theme-light');document.getElementById('slider').checked=true;}})();