Element Resizing Images

Element Resizing Images

Hiya,
I apologize if this has already been asked but I am having a trouble with a Gallery that I am building.
The idea is that there is a jCarousel under an Element known as largeImg, when a thumbnail is clicked in the carousel, largeImg changes to the original, larger photograph. 
My problem occurs when a thumbnail is clicked that is not of the same ratio as some of the others, this disproportions the image and makes it look stretched.
I was wondering if there is a way to resize the largeImg to wrap around the image correctly?

The code I am using is;

$(document).ready(function(){
$("h2").append('<em></em>')

$(".thumbs a").click(function(){
 var largePath = $(this).attr("href");
 var largeAlt = $(this).attr("title");
 $("#largeImg").attr({ src: largePath, alt: largeAlt });
 $("h2 em").html(" (" + largeAlt + ")"); return false;
});

I am very new to jQuery so sorry if that is horrendously messy or makes your brain/eyes hurt haha!

Many Thanks,
Jake