window.Wall = (function(){ var Wall = function(opt){ this.id = opt.id this.room = opt.room this.rect = opt.rect this.mx = [] this.els = [] } Wall.prototype.toString = function(){ return this.rect.toString() } Wall.prototype.reset = function(){ } Wall.prototype.bind = function(){ this.$walls.bind({ mouseover: function(){ }, mousemove: function(e){ }, mousedown: function(){ $(this).css("background-color", choice(window.palettes.colors)) } }) } return Wall })()