var $images = $(".oneproduct a img"), countImages = $images.length, countLoaded = 0;
$images.each(function(){
(function (imgOb, src, callback) {
imgObj.onload = function(){
imgObj = imgObj.onload = null;
callback();
};
imgObj.src = src;
})(new Image(), this.src, function(){
countLoaded++;
window.console.log(i);
if ( countLoaded === countImages ) {
$('#products').fadeTo("slow", 1);
}
});
});