Update accordionNav.js

Refactored some elements for simplicity and performance.