updated templates to use media data
updated js to use media data
minor tweak in image class