added hover and click functions on thumbnails