var Button; Button = (function() { function Button(node, path, options) { this.node = $(node); this.path = path; this.options = options || {}; this.draw(); } Button.prototype.draw = function() { var icon, paper; paper = Raphael(this.node.get(0)); icon = paper.path(this.path).attr({ fill: this.options.fill || '#000', stroke: this.options.stroke || '#fff', 'stroke-width': this.options['stroke-width'] || 0.3, opacity: this.options.opacity || 0.6, scale: this.options.scale || 0.85, translation: this.options.translation || '' }); return this.node.hover(function() { return icon.animate({ opacity: 1.0 }, 200); }, function() { return icon.animate({ opacity: 0.6 }, 200); }); }; return Button; })();