move nav.js to global.js