write main-nav display and hide functions