function map(data) {
	var self = this;

	this.src = data.src;
	this.width = data.width;
	this.height = data.height;
	this.loaded = false;
	this.callbacks = new Array();
	this.img = null;

	this.load = function (callback) {
		if (callback != null) this.callbacks.push(callback);
		if (this.img != null) return;
		
		this.img = $('<img>').load(function () {
			self.loaded = true;
			for(i in self.callbacks) self.callbacks[i].call(this, self);
		}).attr("src", this.src);
	}

	this.cancel = function () {
		this.img.remove();
	}
}
