var Wick = Wick || {};
Wick.Footer = (function(){
  let $accordion = $('.footer-menu__inner .accordion'),
      $accordionContent = $('.footer-menu__inner .accordion__content'),
      collapsedState = "accordion_collapsed"

  let init = function () {
    $accordion.click(function() {
      if ($(this).find($accordionContent).is(':visible')) {
        $accordionContent.hide()
        $accordion.not($(this)).removeClass(collapsedState)
        $(this).find($accordionContent).show()
      }
    });
  }

  init();
})();
