[Bug 841161] Fix lightbox links.

Tobbi's crash report linker caused the dom to be rebuilt when the regex
replaced content. This was breaking click event bindings on any element.
I couldn't think of an easy way to do the crash better, so I moved the
binding for the lightbox trigger a little farther up the dom. At
@rdalal's prompting, I also switched it to the more modern jQuery .on()
function instead of .delegate().