Use jQuery to determine correct width and height.