Move navigation javascript to external file