Conditional retina pictures loading

using matchMedia()

logo

On non High Density screens, 300px logo should appear.
On HD screens, 600px logo should replace it.

Tested with window.matchMedia("(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)"