adjust jQuery resize for dialog in documents (closes #4045)