Id like the background image to resize proportionally as you can see the link below (this I know how to do), but then stop resizing if the user squishes the window to be much longer than it is wide(this is what I'm try to accomplish).

Here's an example:

http://www.jdda.com/#/home

Does anyone have any ideas how this is done?