onLoads.push( function() {  
  $$('.vcard').each( function(vcard) {
    new Draggable(vcard.id, {ghosting: true, handle: false, revert: true});
  })
  
  Droppables.add($('contact_recipient_row'),{ accept: 'vcard',
                                              hoverclass: 'hover',
                                              onDrop: function(e) {
                                                var mail = e.getElementsBySelector('.email').first().readAttribute('href').gsub('mailto:', '');
                                                $('contact_recipient').value = mail;
                                            }});
  new Autocompleter.Local(  'contact_recipient', 
                            'contact_recipient_list', 
                            $$('.vcard .email').collect(function(e) {
                              return e.readAttribute('href').gsub('mailto:','');
                            }),
                            {fullSearch: true});
});
