$(document).ready(function () {
    let currentSlide = 0;
    const slides = document.querySelectorAll('.slide');

    function showSlide(index) {
        slides.forEach(slide => slide.classList.remove('active'));

        slides[index].classList.add('active');
    }

    function nextSlide() {
        currentSlide = (currentSlide + 1) % slides.length;
        showSlide(currentSlide);
    }

    setInterval(nextSlide, 5000);

    $("#nav_open").click(function () {
        $(".navlinks").css({ "animation": "nav_open 0.3s ease", "top": "0px" });
    });

    $("#nav_close").click(function () {
        $(".navlinks").css({ "animation": "nav_close 0.3s ease", "top": "-300px" });
    });

});