lokesh/lightbox2 — pull request #147 by zahanm (2013-12-24 07:00:23+00:00)
Title: Fix image container resizing

When an image is resized to fit in the viewport, it lost the original image aspect ratio.
This is because once it is resized, the wrong width and height was being passed to `@sizeContainer(..)`.

Namely, in `@changeImage`, the final width / height passed to `@sizeContainer` was pulled from `$image.width()` and `$image.height()`.
jQuery is oversmart (why is it used at all?), it calculates the real image size that is going to displayed on screen, not the one that we just set using `$image.width(..)` two lines earlier, and the real image size is set by the container size.. that we are about to resize.
So no resizing of the compressed dimension takes place and the image is distorted.

Before patch:
![before](https://f.cloud.github.com/assets/341374/1804845/95c7341e-6c68-11e3-81af-f100eb37cace.png)

After patch:
![after](https://f.cloud.github.com/assets/341374/1804851/dde10f0e-6c68-11e3-8721-2db3048fb7a9.png)