jQuery(document).ready(function($){
    
    var slider_auto, slider_loop, slider_control, slider_pager;
    /** Variables from Customizer for Slider settings */
    if( excel_business_data.auto == '1' ){
        slider_auto = true;
    }else{
        slider_auto = false;
    }
    
    if( excel_business_data.loop == '1' ){
        slider_loop = true;
    }else{
        slider_loop = false;
    }
    
    if( excel_business_data.control == '1' ){
        slider_control = true;
    }else{
        slider_control = false;
    }
    
    if( excel_business_data.pager == '1' ){
        slider_pager = true;
    }else{
        slider_pager = false;
    }
    
    // banner slider
    $('#banner-slider').owlCarousel({
        loop       : slider_loop,
        autoplay   : slider_auto,
        margin     : 0,
        nav        : slider_control,
        animateOut : excel_business_data.animation,
        dots       : slider_pager,
        lazyLoad   : true,
        responsive :{
            0:{
                items:1
            }
        }
    });
    
     //testimonial slider
    $('#testimonial-slider').owlCarousel({
        loop    : false,
        margin  : 0,
        nav     : true,
        dots    : false,
        responsive:{
            0:{
                items:1
            }
        }
    });
    
    /** Search Form */
    $('html').click(function() {
        $('.form-holder').slideUp(); 
    });

    $('.btn-search').click(function(event){
        event.stopPropagation();
    });
    
    $(".fa-search").click(function(){
	   $(".form-holder").slideToggle();
	   return false; 
    });   
    
    /* Responsive Menu */
    $('#responsive-menu-button').sidr({
        name:   'sidr-main',
        source: '#site-navigation',
        side:   'right' 
    });
    
    //custom scroll js
    $(window).on("load",function(){
        $(".team .team-holder .text-holder").mCustomScrollbar();
        $(".portfolio .grid .element-item .img-holder .text-holder").mCustomScrollbar();
    });
    
});
