
document.addEventListener("DOMContentLoaded", function() {
    var books_library_togglerIconImg = document.querySelector(".toggler_icon img");
    var books_library_libraryTogglerBody = document.querySelector(".library_toggler_body");
    var books_library_closeButton = document.querySelector(".library_toggler_body .toggler_close");

    books_library_togglerIconImg.addEventListener("click", function() {
        if (books_library_libraryTogglerBody.style.display === "none" || !books_library_libraryTogglerBody.style.display) {
            books_library_libraryTogglerBody.style.display = "block";
            books_library_libraryTogglerBody.style.transition = "display 1s";
        } else {
            books_library_libraryTogglerBody.style.display = "none";
        }
    });

    books_library_closeButton.addEventListener("click", function() {
        books_library_libraryTogglerBody.style.display = "none";
    });
});

// swiper js
jQuery(document).ready(function () {
  var books_library_swiper_testimonials = new Swiper(".testimonial-swiper-slider.mySwiper", {
    slidesPerView: 3,
      spaceBetween: 15,
      speed: 1000,
      autoplay: {
        delay: 3000,
        disableOnInteraction: false,
      },
      navigation: {
        nextEl: ".testimonial-swiper-button-next",
        prevEl: ".testimonial-swiper-button-prev",
      },
      breakpoints: {
        0: {
          slidesPerView: 1,
        },
        767: {
          slidesPerView: 2,
        },
        1023: {
          slidesPerView: 3,
        }
      },
  })
});