Changed the JS polyfill to use JSON data and span

Changed the JS polyfill to use JSON data and a span instead of the real
picture > source elements