function shareIt(siteKey) {
	eventTracker._trackEvent('Page sharing','shares',siteKey);
	switch(siteKey) {
		case "digg" :
			openExternal("http://digg.com/submit?phase=2&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title), 940, 600, true);
			return false;
			break;
		case "facebook" :
			openExternal("http://www.facebook.com/sharer.php?src=bm&v=4&i=1237827981&u="+encodeURIComponent(document.location.href)+"&t="+encodeURIComponent(document.title), 626, 436, true);
			return false;
			break;
		case "google" :
			openExternal("http://www.google.com/bookmarks/mark?op=edit&bkmk="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title), 840, 640, true);
			return false;
			break;
		case "delicious" :
			openExternal("http://del.icio.us/post?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title), 840, 640, true);
			return false;
			break;
		case "mixx" :
			openExternal("http://www.mixx.com/submit?page_url="+encodeURIComponent(location.href), 940, 640, true);
			return false;
			break;
		case "twitter" :
			openExternal("http://twitter.com/home/?status="+encodeURIComponent(document.title)+"%20"+encodeURIComponent(location.href), 840, 640, true);
			return false;
			break;
		case "linkedin" :
			openExternal("http://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title), 840, 640, true);
			return false;
			break;
		case "stumbleupon" :
			openExternal("http://www.stumbleupon.com/submit?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title), 840, 640, true);
			return false;
			break;
		case "reddit" :
			openExternal("http://reddit.com/submit?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title), 840, 640, true);
			return false;
			break;
		case "furl" :
			openExternal("http://furl.net/storeIt.jsp?u="+encodeURIComponent(location.href)+"&t="+encodeURIComponent(document.title), 940, 640, true)
			return false;
			break;
		case "slashdot" :
			openExternal("http://slashdot.org/slashdot-it.pl?op=basic&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title), 840, 640, true);
			return false;
			break;
		default:
			return true;
	}
}

function emailFriend() {
	openExternal("http://www.novell.com/info/sendemail.php?url="+encodeURIComponent(location.href),535,810,true,"_blank",true);
}

/* The following functions are added just for backward compatibility with old links
************************************ */

function diggThis() {
	shareIt('digg');
}

function bookmarkDelicious() {
	shareIt('delicious');
}

function slashdotThis() {
	shareIt('slashdot');
}

function redditThis() {
	shareIt('reddit');
}

function mixxThis() {
	shareIt('mixx');
}

function bookmarkGoogle() {
	shareIt('google');
}

$(document).ready(function(){
	$("#share").hover(function(){
		$("#share").addClass("sfhover");
	}, function(){
		$("#share").removeClass("sfhover");
	});
});
