Changed click on picture to include the nearest method.