jquery - Open popup window and size, then size image inside and keep aspect ratio
<p>Im looking to open a popup window which will contain an image.</p>

<p>Im already using:</p>

<pre><code>$(document).height();
$(document).width();
</code></pre>

<p>To set the width and height of the pop-up window so it fills as much of the screen as possible. How can I then work out the best height and width of the image so that the image does not produce scrollbars in the popup window?</p>
