function initResponsiveNav() {
   var $resp_menu = $('[data-sections-responsive]');

   $resp_menu.on('click', '.toggle-sub', function() {
      $resp_menu.addClass('has-child-selection');
      $(this)
         .closest('.nav-item.active')
         .removeClass('active')
         .addClass('active-parent');
      $(this)
         .closest('.nav-item')
         .addClass('active');
   });

   $resp_menu.on('click', '.toggle-back', function() {
      $(this)
         .closest('.nav-item')
         .removeClass('active');
      $(this)
         .closest('.active-parent')
         .removeClass('active-parent')
         .addClass('active');

      if (
         !$(this)
            .closest('.nav-item')
            .closest('.sub-nav').length
      ) {
         $resp_menu.removeClass('has-child-selection');
      }
   });
}

initResponsiveNav();

$('body').on('click', '[data-toggle="burger"]', function() {
   $('[data-sections-responsive]').toggleClass('active');
   $('body').toggleClass('scroll-disable');

   return false;
});

