/*
***************************************************************
***************************************************************

Template Name  : Nova | One Page Multipurpose Template
Author         : Golam
Author URI     : http://golamnabi.com
File           : Active.js

***************************************************************
***************************************************************/

(function ($) {
    "use strict";
 
    
    // This Function is for Custom Function
    function customFunctions(){
        
        // Add Sticky Class with Header Area When Window is Scrolled
        $(window).on("scroll", function () {
            var heightFromTop = $(this).scrollTop();
            if (heightFromTop) {
                $('.header-area').addClass('sticky');
            } else {
                $('.header-area').removeClass('sticky');
            }
        });
        
        
        // Smooth Scroll Js
        var scroll = $('.scroll');
        scroll.on('click', function (e) {
            var $anchor = $(this);
            var headerHeight = 15; // Header height from top
            $('html, body').stop().animate({
                scrollTop: $($anchor.attr('href')).offset().top - headerHeight + "px"
            }, 1200, 'easeInOutExpo');

            e.preventDefault();
        });
        
        
        // Helper Js
        var body = $('body');
        body.scrollspy({
            target: '.navbar-collapse',
            offset: 95
        });
        
        // Accordion Js
        $(".collapse").on('shown.bs.collapse', function () {
            $(this).parent().find('.fa-plus').removeClass('fa-plus').addClass('fa-minus');
        }).on('hidden.bs.collapse', function () {
            $(this).parent().find('.fa-minus').removeClass('fa-minus').addClass('fa-plus');
        });


    }  
    
    
    
    // When Document is Ready
    $(document).ready(function () {
        
        customFunctions();      // Initialize Custom Function
        
    });
  
})(jQuery);/*
***************************************************************
***************************************************************

Template Name  : Nova | One Page Multipurpose Template
Author         : Golam
Author URI     : http://golamnabi.com
File           : Active.js

***************************************************************
***************************************************************/

(function ($) {
    "use strict";
    
    // This Function is for Preloader
    function preloaderArea(){
        $('.preloader-area').fadeOut(500, function(){
            $('.preloader').delay(500).fadeOut();
        });
        
    }
    
    // This Function is for Custom Function
    function customFunctions(){
        
        // Add Sticky Class with Header Area When Window is Scrolled
        $(window).on("scroll", function () {
            var heightFromTop = $(this).scrollTop();
            if (heightFromTop) {
                $('.header-area').addClass('sticky');
            } else {
                $('.header-area').removeClass('sticky');
            }
        });
        
        
        // Smooth Scroll Js
        var scroll = $('.scroll');
        scroll.on('click', function (e) {
            var $anchor = $(this);
            var headerHeight = 15; // Header height from top
            $('html, body').stop().animate({
                scrollTop: $($anchor.attr('href')).offset().top - headerHeight + "px"
            }, 1200, 'easeInOutExpo');

            e.preventDefault();
        });
        
        
        // Helper Js
        var body = $('body');
        body.scrollspy({
            target: '.navbar-collapse',
            offset: 95
        });
        
        // Accordion Js
        $(".collapse").on('shown.bs.collapse', function () {
            $(this).parent().find('.fa-plus').removeClass('fa-plus').addClass('fa-minus');
        }).on('hidden.bs.collapse', function () {
            $(this).parent().find('.fa-minus').removeClass('fa-minus').addClass('fa-plus');
        });

    }


    
    
    // When Document is Ready
    $(document).ready(function () {
        
        customFunctions();      // Initialize Custom Function
        
    });
  
})(jQuery);