Added JavaScript to Navigation

Please review my stupid code.