Fix problems with menu toggling and sub menus.

This fixes the following issues:
- menu vanishing when returning to wide screen after toggle
- submenus not appearing on narrow screen menu
- narrow menu not visible when JavaScript is disabled