function share_share(id, url, title) {
	var form 		= $('share_form');
	var post_id 	= $('share_post_id');
	var url_email 	= $('share_url_email'); 
	var title_email = $('share_title_email');
	
	if (form.style.display == 'block' && post_id.value == id) {
		form.style.display = 'none';
		return;
	}
	
	var link = $('share_link_' + id);
	var offset = Position.cumulativeOffset(link);

	$("share_delicious").href = share_share_url("http://del.icio.us/post?url={url}&title={title}", url, title);
	$("share_digg").href = share_share_url("http://digg.com/submit?phase=2&url={url}&title={title}", url, title);
	$("share_furl").href = share_share_url("http://furl.net/storeIt.jsp?u={url}&t={title}", url, title);
	$("share_netscape").href = share_share_url(" http://www.netscape.com/submit/?U={url}&T={title}", url, title);
	$("share_yahoo_myweb").href = share_share_url("http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&t={title}", url, title);
	$("share_stumbleupon").href = share_share_url("http://www.stumbleupon.com/submit?url={url}&title={title}", url, title);
	$("share_google_bmarks").href = share_share_url("  http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}", url, title);
	$("share_technorati").href = share_share_url("http://www.technorati.com/faves?add={url}", url, title);
	$("share_blinklist").href = share_share_url("http://blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}", url, title);
	$("share_newsvine").href = share_share_url("http://www.newsvine.com/_wine/save?u={url}&h={title}", url, title);
	$("share_magnolia").href = share_share_url("http://ma.gnolia.com/bookmarklet/add?url={url}&title={title}", url, title);
	$("share_reddit").href = share_share_url("http://reddit.com/submit?url={url}&title={title}", url, title);
	$("share_windows_live").href = share_share_url("https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={url}&title={title}&top=1", url, title);
	$("share_tailrank").href = share_share_url("http://tailrank.com/share/?link_href={url}&title={title}", url, title);

	post_id.value 	  = id;
	url_email.value	  = url;
	title_email.value = title;
	form.style.left = offset[0] + 'px';
	form.style.top = (offset[1] + link.offsetHeight ) + 'px';
/*
	var ua = navigator.userAgent.toLowerCase();
	
	isIE = (ua.indexOf("msie") != -1 && ua.indexOf("opera") == -1 && ua.indexOf("webtv") == -1);
	
	isOpera = (ua.indexOf("opera") != -1);
	
	isGecko = (ua.indexOf("gecko") != -1);
	
	isSafari = (ua.indexOf("safari") != -1);
	
	isKonqueror = (ua.indexOf("konqueror") != -1);

	if(isIE){	
	form.style.left = offset[0] + 'px';
	form.style.top = (link.offsetTop + 170 + link.offsetHeight) + 'px';
	}else{
	form.style.left = offset[0] + 'px';
	form.style.top = (offset[1] + link.offsetHeight ) + 'px';

	} 
	*/
	form.style.display = 'block';
}

function share_share_url(base, url, title) {
	base = base.replace('{url}', url);
	return base.replace('{title}', title);
}

function share_share_tab(tab) {
	var tab1 = document.getElementById('share_tab1');
	var tab2 = document.getElementById('share_tab2');
	var body1 = document.getElementById('share_social');
	var body2 = document.getElementById('share_email');
	
	switch (tab) {
		case '1':
			tab2.className = '';
			tab1.className = 'selected';
			body2.style.display = 'none';
			body1.style.display = 'block';
			break;
		case '2':
			tab1.className = '';
			tab2.className = 'selected';
			body1.style.display = 'none';
			body2.style.display = 'block';
			break;
	}
}

function share_xy(id) {
	var element = $(id);
	var x = 0;
	var y = 0;
}
