add smart resize

taken from here - http://paulirish.com/2009/throttled-smartresize-jquery-event-handler/