window.wall = (function(){ var wall = function(opt){ this.id = opt.id this.room = opt.room this.rect = opt.rect this.mx = [] } 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 })()