Cleaned and fixed menu navigation javascript