/*
    This file handle custom fuctions for the template.
    @version - 1.0
*/
$(window).scroll(function () { 

    console.log($(window).scrollTop());

    if ($(window).scrollTop() > 630) {
      $('#navbarstatic').addClass('.navbar-static');
    }

    if ($(window).scrollTop() < 629) {
      $('#navbarstatic').removeClass('.navbar-static');
    }
  });

(function($) {
    "use strict";

     //* counterUp JS
    function counterUp(){
        if ( $('.counter').length ){ 
            $('.counter').counterUp({
                delay: 10,
                time: 900,
            });
        } 
    }; 
    
    //* Testimonial Carosel
    function testimonialsCarosel(){
        if ( $('.testimonial_carosel').length ){
            $('.testimonial_carosel').owlCarousel({
                loop:($('.testimonial_carosel').children().length)==1 ? false:true,
                items:1,
                autoplay:false,
            });
        };
    };
    //* Partners Carosel
    function partnersCarosel(){
        if ( $('.partners').length ){
            $('.partners').owlCarousel({
                loop:($('.partners').children().length)==1 ? false:true,
                items:5,
                margin:110,
                autoplay:true,
                response:true,
                responsive:{
                    300:{
                        items:1, 
                        margin:0,
                    },
                    500:{
                        items:3, 
                    },
                    700:{
                        items:3, 
                    },
                    800:{
                        items:4,
                        margin:40,
                    },
                    1000:{
                        items:5,
                    },  
                }
            });
        };
    };
    
   
    
     //* counterUp 2 JS
    function counterUp2(){
        if ( $('.counter2').length ){ 
            $('.counter2').counterUp({
                delay: 10,
                time: 200,
            });
        } 
    }; 

    
    /*Function Calls*/
    new WOW().init();   
     partnersCarosel ();
    testimonialsCarosel ();
    counterUp ();  
    ourSkrill ();
    counterUp2 ();   
})(jQuery);


