So I'm trying to integrate this with my site, and when I enabled gallery mode, I can no longer click to close, or hit the ESC key. Chrome's console seems to show a Uncaught RangeError: Maximum call stack size exceeded in jquery. Ideas?
Chrome should give you a stack trace for that. Look for patterns: in my experience, that generally shows up when there's a mutual unterminated recursion, e.g. "A calls B, B calls A, A calls B, ..." or "A calls B calls C calls A calls B calls C ...".
I'm using jQuery 1.9.1 and Twitter Bootstrap. On a whim, I looked at your example code and noticed you were using Zepto. I tried switching to Zepto, and this fixed the issue with your gallery, and it closed properly. However, it breaks Bootstrap.
Did you only test with Zepto? There might be an issue in jQuery, where you're selecting elements incorrectly, thus spawning too many events.