Retina support

This is something we have used for a few months now on http://mintthemes.com and it works really well. It detects whether the person is on a retina device or not and then sets a javascript cookie. The correct PHP function is then loaded based on the cookie to display images at x2 or at their normal size.