(function(){
var initializing = false;
this.Class = function(){};
Class.extend = function(prop) {
var _super = this.prototype;
initializing = true;
var prototype = new this();
initializing = false;
prototype.parent = _super.init;
for (var name in prop) {
if(typeof prop[name] == "function" && typeof _super[name] == "function"){
prototype.parent[name] = _super[name]; // subclass call parent method like this this.parent.methoe.call(this, parm1,parm2)
}
prototype[name] = prop[name];
}
function Class() {
if ( !initializing && this.init )   
this.init.apply(this, arguments);
}
Class.prototype = prototype;
Class.constructor = Class;
Class.extend = arguments.callee;
return Class;
};
})();