$.fn.shareButtons = function (url, options) {
$(this).addClass("foo");
Das ist nicht nötig. this.addClass("foo") reicht aus, weil this hier auf das jQuery-Objekt zeigt.
this.each(function(i){
var elem = $(this);
Das ist nötig, weil this hier auf ein DOM-Element zeigt.
$(this).addClass("foo"); gilt ja für alle Elemente dieser Klasse, ohne dass man vorher mit each darüber loopt! Mhmm...
this.addClass() iteriert automatisch über alle Elemente, die im aktuellen jQuery-Objekt "verpackt" sind.
Ralf