div for lightbox this.container = new Element('div',{ 'id' : 'lightbox', 'load' : { onSuccess: this.loaded.bind(this), onFailure: this.failed.bind(this) } }); // Create transparent overlay for lightbox this.overlay = new Element('div',{ 'id' : 'overlay', 'styles': {'opacity':0.5}, 'events': {'click':this.close.bind(this)} }); // Add event to links $$('#primary a').each(function(a){ if (a.href == 'mailto:'+this.email) { a.addEvent('click',this.open.bindWithEvent(this)); } },this); },