runOnLoadImage = ($target)->
d = new $.Deferred()
loaded = 0
max = $target.length
$target.each ->
targetObj = new Image()
$(targetObj).on 'load', ->
loaded++
d.resolve() if loaded is max
targetObj.src = this.src
d.promise()