(function ($) {
 "use strict";

    /*--------------------------
    preloader
    ---------------------------- */	
	$(window).on('load',function(){
		var pre_loader = $('#preloader')
	   pre_loader.fadeOut('slow',function(){$(this).remove();});
	});	

    /*--------------------------------------------
    Bootstrap Navwalker nav ul class replace
    --------------------------------------------*/
    $('header .navbar .dropdown-toggle').addClass('pagess');
    $('header .navbar .dropdown-menu').addClass('sub-menu');
    $('header .navbar, #dropdown').find('.dropdown-menu').removeClass('dropdown-menu');
    /*------------------------------------
     search option
    ------------------------------------- */ 
    $('.search-option').hide();
    $(".main-search").on('click', function(){
        $('.search-option').animate({
            height:'toggle',
        });
        return false;
    });
    /*---------------------
     TOP Menu Stick
    --------------------- */
    $('.custom-logo-link').addClass('navbar-brand page-scroll sticky-logo');

    var windows = $(window);
    var sticky = $('#sticker');

    windows.on('scroll', function() {
        var scroll = windows.scrollTop();
        if (scroll < 300) {
            sticky.removeClass('stick');
        }else{
            sticky.addClass('stick');
        }
    });
    /*----------------------------
     jQuery MeanMenu
    ------------------------------ */
        var mean_menu = $('nav#dropdown');
        mean_menu.meanmenu();
    /*--------------------------
     scrollUp
    ---------------------------- */
    $(window).scroll(function () {
        if ($(this).scrollTop() > 100) {
            $('#scrollUp').fadeIn();
        } else {
            $('#scrollUp').fadeOut();
        }
    });
    $('#scrollUp').click(function () {
        $('body,html').animate({
            scrollTop: 0
        }, 800);
        return false;
    });
    

})(jQuery); 