;
var enetsaJcropImageHandler = {
	'images' : {},
	'settings' : {},
	'currentView' : {},
	'initImage' : function(id, settings) {
		if((this.images[id])) {
			this.refreshImage(id);
		} else {
			this.images[id] = $.Jcrop('#previewImage_' + id, settings);
			this.settings[id] = settings;
		}
	},
	'destroyImage' : function(id) {
		if (this.images[id]) {
			this.images[id].destroy();
			this.images[id] = false;
			this.currentView[id] = false;
		}
	},
	'refreshImage' : function(id) {
		this.destroyImage(id);
		this.initImage(id, this.settings[id]);
	},
	'getImage' : function(id) {
		return this.images[id];
	},
	'setCurrentView' : function(id, currentView) {
		this.currentView[id] = currentView;
	},
	'getCurrentView' : function(id) {
		return this.currentView[id];
	}
};


