This is awesome! Thanks! So, I'm not very savvy with Javascript, but I tried inserting this based on your instructions and its saying "Script Disabled" on the code block. I have a slideshow gallery block with thumbnails enabled.
It's also cutting off everything on the page below the code block.