adds js captions for images