load image via javascript and use $(document).width() to determine the proper side of the image to be returned