Handle thumbnail clicks