Fixed menu JavaScript and extrapolated into separate file
More updated JavaScript