function menu_load() {
  const btn = document.querySelector('#h-menu');
  const nav = document.querySelector('#h-nav');

  btn.addEventListener('click', (e) => {
    nav.classList.toggle('open-menu')
    btn.classList.toggle('h-menu')
    e.preventDefault();
  });
}

function navilink(link) {
  window.location.href = link
}


if (window.addEventListener) {
  window.addEventListener('load', menu_load, false);
} else {
  window.attachEvent("onload", menu_load);
}

document.addEventListener("DOMContentLoaded", () => {
  const title = document.querySelectorAll('.h-js-accordion-title');

  for (let i = 0; i < title.length; i++) {
    let titleEach = title[i];
    let content = titleEach.nextElementSibling;
    titleEach.addEventListener('click', () => {
      titleEach.classList.toggle('h-is-active');
      content.classList.toggle('h-is-open');
    });
  }

});