Im trying to do something that I think is very easy but I dont know jQuery very well and Im not sure where to start

What I am trying to do is have it so that on a page I display an image in a div that is 700px wide - then if the image is taller than the browser window it is scaled down in size so that it is viewable - this means the user will always see the whole picture on page load.

Hopefully that makes sense and is easily achievable in jQuery?

Thanks all