export default (() => {
  const overlay = $('#overlay-menu')
  const html = $('html');
  const overlayPrimary = $('.overlay-primary-container');
  const overlaySecondary = $('.overlay-secondary-container');
  const logoInvert = $('.logo-invert');
  const logo = $('.logo');
  const hamburger = $('#overlay-menu-toggle')
  const header = $('.main-header')

  hamburger.on('click', function () {
    $(this).toggleClass('is-active');
    $('body').toggleClass('locked');
    overlayPrimary.toggleClass('active');
    overlaySecondary.toggleClass('active');
    html.toggleClass('locked');
    logoInvert.toggleClass('active');
    logo.toggleClass('active');
    overlay.toggleClass('active');
    header.toggleClass('active');
  });

  $('#overlay-menu .nav-primary ul li a').on('click', function () {
    hamburger.toggleClass('is-active');
    $('body').toggleClass('locked');
    overlayPrimary.toggleClass('active');
    overlaySecondary.toggleClass('active');
    html.toggleClass('locked');
    logoInvert.toggleClass('active');
    logo.toggleClass('active');
    overlay.toggleClass('active');
    header.toggleClass('active');
  });
})()