WIP toward #5508

This makes lightbox more configurable, but I'm still not sure where the JS error is coming from on the theme preview. Works fine for embed.