format images onload instead of document ready