Re #359 - BUG: Images open up in a new browser tab and not in the lightbox

* re-ordered the addition of the lightbox links so that they occur earlier
  in the new content loading process.