Secondary nav fixes

Fixed some javascript issues related to the secondary navigation.