// 1. Toggle Button Responsive // ==============
$(document).ready(function() {
    $(".navbar-toggle").click(function() {
        $("#navbar7").toggle();
        $("#navbar7").css("z-index", "999");
    });
});

// 2. Fixed Scroll Menu // ==============
window.onscroll = function() {
    myFunction()
};
var header = document.getElementById("main-header");
var sticky = header.offsetTop;

function myFunction() {
    if (window.pageYOffset > sticky) {
        header.classList.add("sticky");
    } else {
        header.classList.remove("sticky");
    }
}

// 3. About Counter // ==============
$(document).ready(function() {
    $('.counter-value').each(function() {
        $(this).prop('Counter', 0).animate({
            Counter: $(this).text()
        }, {
            duration: 3500,
            easing: 'swing',
            step: function(now) {
                $(this).text(Math.ceil(now));
            }
        });
    });
});

// 4. OWL Customer Says // ==============
$(document).ready(function() {
    var owl = $('#testimonial-slider');
    owl.owlCarousel({
        margin: 10,
        nav: true,
        loop: true,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 2
            },
            1000: {
                items: 4
            }
        }
    })
})

// 5. OWL events // ==============
$(document).ready(function() {
    var owl = $('#events');
    owl.owlCarousel({
        margin: 10,
        nav: true,
        loop: true,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 2
            },
            1000: {
                items: 3
            }
        }
    })
})

// 6. OWL Experince Team // ==============
$(document).ready(function() {
    var owl = $('#team-profile');
    owl.owlCarousel({
        margin: 10,
        nav: true,
        loop: true,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 2
            },
            1000: {
                items: 4
            }
        }
    })
})

// 7. OWL Certificates // ==============
$(document).ready(function() {
    var owl = $('#certificates');
    owl.owlCarousel({
        margin: 20,
        nav: false,
        dots: false,
        loop: true,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 3
            },
            1000: {
                items: 6
            }
        }
    })
})

// 8. OWL Gallery // ==============
$(document).ready(function() {
    var owl = $('#galley-images');
    owl.owlCarousel({
        margin: 20,
        nav: false,
        dots: false,
        loop: true,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 1
            },
            1000: {
                items: 1
            }
        }
    })
})