Quick fix for gallery onclick event attachment on non existent element
Merge pull request #403 from defrag/fix/gallery-js-fatal-error-fix

Quick fix for gallery onclick event attachment on non existent element