
/**
 * Class constructor function
 *
 * @param {object} obj Class methods
 *
 * @return {object} Returns Class
 */
window.Class = (function(obj) {
	var Class = typeof obj.__init__ == 'function' ? obj.__init__ : (function() {});

	if(typeof obj.__ext__ == 'function') {
		var _ext = function() {};
		_ext.prototype = obj.__ext__.prototype;
		_ext.prototype.__super__ = new _ext();
		_ext.prototype.__init__ = obj.__ext__;

		Class.prototype = new _ext();
	}

	for(i in obj) {
		switch(i) {
			case '__init__':
			case '__ext__':
				break;
			default:
				Class.prototype[i] = obj[i];
				break;
		}
	}

	return Class;
});


