//preloader v1.0
var imagePreloader = Class.create();

imagePreloader.prototype = {	
	initialize: function (lImg) {
		this.loadImages = new Array();
		this.loadedImages = new Array();
		
		if(lImg.length > 0) {
			this.loadImages = lImg;
		}
	},
	
	addImage: function (imgPath) {
		this.loadImages.push(imgPath);
	},
	
	preload: function() {
		if(this.loadImages.length > 0) {
			for(x = 0; x < this.loadImages.length; ++x) {
				this.loadedImages[x] = new Image();
				this.loadedImages[x].src = this.loadImages[x];
			}
		}
	}
}