Re-wrote menu JS - iPad support