File: //proc/1526/task/1922/cwd/zaklada/html/lib/js/core/header.js
(function ($) {
  $(document).ready(function () {
    const mediaQueryMobile = window.matchMedia("(min-width: 992px)");
    // Headroom
    // grab an element
    const headerElement = document.querySelector(".site-header");
    // construct an instance of Headroom, passing the element
    const headroom = new Headroom(headerElement);
    // initialise
    headroom.init();
    $(".hamburger").click(function (e) {
      $(".site-header__wrap").toggleClass("open");
      $(this).toggleClass("active");
    });
    if (mediaQueryMobile.matches) {
      $(".site-header__item.dropdown").hover(function (e) {
        // window width is at least 992px
      });
    } else {
      $(".site-header__item.dropdown").click(function (e) {
        // window width is less than 992px
        $(this).find(".site-header__submenu").slideToggle();
      });
    }
  });
})(jQuery);