var addthis_config = {
	ui_click: true,
	ui_offset_top: -17
};

function oggetto_addthis(username,classe)
{
	var share_titolo = null;
	var share_url = null;

	if ((classe === null)||(classe === undefined))
		classe = "addthis_button";

	$.getScript("http://s7.addthis.com/js/250/addthis_widget.js#domerady=1&username="+username, function() {
		$("."+classe).click(function(){
			var t;
			var u;

			if (share_titolo === null)
				t = document.title;
			else
				t = share_titolo;

			if (share_url === null)
				u = window.location.toString();
			else
				u = share_url;

			return addthis_open(this, "", u, t.replace(/[\001-\037]/g,""));
		}).css({cursor: "pointer"});
	});

	this.url = function(u) {
		if (u === undefined)
			return share_url;
		return share_url = u;
	};

	this.titolo = function(t) {
		if (t === undefined)
			return share_titolo;
		return share_titolo = t;
	};

	return this;

}
