added js version with retina support