Added javascript to add captions to images