;(function($){ "use strict"; /*------------------------------------------------------------------------------- Navbar -------------------------------------------------------------------------------*/ //* Navbar Fixed function navbarFixed(){ if ( $('.header_area').length ){ $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll){ $(".header_area").addClass("navbar_fixed"); } else { $(".header_area").removeClass("navbar_fixed"); } }); }; }; navbarFixed(); function offcanvasActivator(){ if ( $('.bar_menu').length ){ $('.bar_menu').on('click', function(){ $('#menu').toggleClass('show-menu') }); $('.close_icon').on('click',function(){ $('#menu').removeClass('show-menu') }) } } offcanvasActivator(); $('.offcanfas_menu .dropdown').on('show.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slideDown(400); }); $('.offcanfas_menu .dropdown').on('hide.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slideUp(500); }); $(window).on("load",function(){ if($('.mega_menu_two .scroll').length){ $(".mega_menu_two .scroll").mCustomScrollbar({ mouseWheelPixels: 50, scrollInertia: 0, }); } }); /*--------- WOW js-----------*/ function wowAnimation(){ new WOW({ offset: 100, mobile: true }).init() } wowAnimation() if($('.selectpickers').length > 0){ $('.selectpickers').niceSelect(); } /* ===== Parallax Effect===== */ function parallaxEffect() { if($('.parallax-effect').length){ $('.parallax-effect').parallax(); }; } parallaxEffect(); /* Counter Js */ function counterUp(){ if ( $('.counter').length ){ $('.counter').counterUp({ delay: 1, time: 500 }); }; }; counterUp(); /*===== progress-bar =====*/ function circle_progress(){ if( $('.circle').length ){ $(".circle").each(function() { $(".circle").appear(function() { $('.circle').circleProgress({ startAngle:-14.1, size: 200, duration: 9000, easing: "circleProgressEase", emptyFill: '#f1f1fa ', lineCap: 'round', thickness:10, }) }, { triggerOnce: true, offset: 'bottom-in-view' }) }) } } circle_progress(); /*------------- preloader js --------------*/ function loader(){ $(window).on('load', function() { $('#ctn-preloader').addClass('loaded'); // Una vez haya terminado el preloader aparezca el scroll if ($('#ctn-preloader').hasClass('loaded')) { // Es para que una vez que se haya ido el preloader se elimine toda la seccion preloader $('#preloader').delay(900).queue(function () { $(this).remove(); }); } }); } loader(); if($('[data-toggle="tooltip"]').length){ $('[data-toggle="tooltip"]').tooltip() } })(jQuery)