Moves mouse img overlapping check in animation back into day.js