Optimized nav.js