Playing with image load and javascripts