var defaultOption={onError:function(o,n,e){},onLoaded:function(o,n,e){},onCompleted:function(o,n){}},RawImageLoaded=function(o,n){"function"==typeof n&&(n={onCompleted:n});for(var e=$.extend(defaultOption,n),t=[],r=[],u=[],s=0;s<o.length;s++)if(o[s]){var a=new Image;a.onload=function(){t.push(this.src),e.onLoaded(this.src,t,r)},a.onerror=function(){r.push(this.src),e.onError(this.src,t,r)},a.src=o[s],u.push(a)}else r.push(o[s]),u.push(null),e.onError(o[s],t,r);var d=function(){t.length+r.length>=u.length?e.onCompleted(t,r):setTimeout(d,10)};d()};module.exports=RawImageLoaded;