1st attempt at improving things for High DPI devices
1st attempt at improving things for High DPI devices

Use $(window) and not $(document)
Restore missing window.devicePixelRatio for requesting the proper size preview
Resize images properly on High DPI devices

Relates to #52
(cherry picked from commit 8abc229)

tahaalibra/gallery,imjalpreet/gallery,owncloud/gallery,setnes/gallery,desaintmartin/gallery,setnes/gallery,owncloud/galleryplus,patman15/galleryplus,interfasys/galleryplus,setnes/galleryplus,owncloud/galleryplus,viraj96/gallery,tahaalibra/gallery,owncloud/gallery,setnes/galleryplus,imjalpreet/gallery,interfasys/galleryplus,patman15/galleryplus,IATkachenko/gallery,setnes/galleryplus,imjalpreet/gallery,viraj96/gallery,owncloud/gallery,leftees/galleryplus,leftees/galleryplus,efueger/galleryplus,tahaalibra/gallery,IATkachenko/gallery,efueger/galleryplus,viraj96/gallery,leftees/galleryplus,desaintmartin/gallery,owncloud/galleryplus,setnes/gallery,desaintmartin/gallery,patman15/galleryplus,interfasys/galleryplus,IATkachenko/gallery