Salve ho un problemino, come faccio ad aggiungere tramite jquery un attributo id ad un href?

esempio:

codice HTML
codice:
...[*]archivio[*]contatti
...
codice jQuery
codice:
$(document).ready(function(){
        $('a.contatti').click(function(){
		$(this).attr('id','attivo');
	});
});
ma non va!!!