waypoints min JavaScript