Link gend thumbnails to pages instead of images.