Add js for cycling through thumbnails