Fix for thumbnail clicks not working in firefox