var Class = { create:function() { return function() { this.initialize.apply(this, arguments); }; } } var Tool = Class.create(); Tool.prototype = { initialize: function($container){ this.val = 32; }, getVal:function(){ return this.val; }, setVal:function(_val){ this.val = _val; } }