function Selector(options){ this.init(options) } Selector.prototype = { init: function(options){ var self = this; options.onSelect = function(a,b){ self.showMenu(a,b); }; options.onStart = function(){ self.hideMenu() }; this.lasso = new Lasso(options); }, hideMenu: function(){ if( this.menu ) this.menu.remove(); }, showMenu: function( selectedEls, pos ){ if( pos == null || selectedEls.length == 0 ) return; var self = this; this.menu = $("