switched to naturalHeight and naturalWidth, eliminated problem with hidden div scrollbars