<div id="menu-container-<?= $this -> menu['id'];?>">
  <?= \front\view\Menu::pages( $this -> menu['pages'], 0, $this -> current_page );?>
</div>
<? if ( $this -> menu['id'] == 1 ):?>
<script class="footer" type="text/javascript">
  var windowsize = $(window).width();

  $(window).resize(function() {
    windowsize = $(window).width();
  });
  
  $( 'body' ).on( click_event, '#mobile-menu-btn', function()
  {
    if ( windowsize <= 767 ) 
    {
      if ( $( this ).hasClass( 'active' ) )
      {
        $( this ).removeClass( 'active' );
        $( '#main-menu' ).removeClass( 'visible' );
        $( '#mobile-menu-btn i' ).addClass( 'fa-bars' ).removeClass( 'fa-times' );
      }
      else
      {
        $( this ).addClass( 'active' );
        $( '#main-menu' ).addClass( 'visible' );
        $( '#mobile-menu-btn i' ).removeClass( 'fa-bars' ).addClass( 'fa-times' );
      }
    }
  });
  
  $( 'body' ).on( click_event, '#menu-container-<?= $this -> menu['id'];?> > ul > li > a', function(e)
  {
    if ( windowsize <= 767 ) 
    {
      if ( $( this ).parent().hasClass( 'parent' ) )
        e.preventDefault();
      
      if ( !$( this ).parent().hasClass( 'active' ) )
      {
        $( '#menu-container-<?= $this -> menu['id'];?> > ul > li' ).removeClass( 'active' );
        $( this ).parent().addClass( 'active' );
      }
    }
  });
</script>
<? endif;?>