function ekls_share(id, url, title) {
	var form = $('ekls_form');
	var post_id = $('ekls_post_id');
	
	if (form.style.display == 'block' && post_id.value == id) {
		form.style.display = 'none';
		return;
	}
	
	var link = $('ekls_link_' + id);
	var offset = Position.cumulativeOffset(link);

	$("ekls_linkibol").href = ekls_share_url("http://www.linkibol.com/Add.aspx?t={title}&u={url}", url, title);
	$("ekls_bagcik").href = ekls_share_url("http://www.bagcik.com/bagkur?title={title}&url={url}", url, title);
	$("ekls_yumiyum").href = ekls_share_url("http://www.yumiyum.org/imekle.php?iadres={url}&ibaslik={title}", url, title);
	$("ekls_oyyla").href = ekls_share_url("http://www.oyyla.com/gonder?url={url}", url, title);
	$("ekls_tusul").href = ekls_share_url("http://www.tusul.com/submit.php?url={url}&title={title}", url, title);
	$("ekls_100puan").href = ekls_share_url("http://www.100puan.com/submit.php?url={url}", url, title);
	$("ekls_delicious").href = ekls_share_url("http://del.icio.us/post?url={url}&title={title}", url, title);
	$("ekls_digg").href = ekls_share_url("http://digg.com/submit?phase=2&url={url}&title={title}", url, title);
	$("ekls_furl").href = ekls_share_url("http://furl.net/storeIt.jsp?u={url}&t={title}", url, title);
	$("ekls_netscape").href = ekls_share_url(" http://www.netscape.com/submit/?U={url}&T={title}", url, title);
	$("ekls_yahoo_myweb").href = ekls_share_url("http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&t={title}", url, title);
	$("ekls_stumbleupon").href = ekls_share_url("http://www.stumbleupon.com/submit?url={url}&title={title}", url, title);
	$("ekls_google_bmarks").href = ekls_share_url("  http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}", url, title);
	$("ekls_technorati").href = ekls_share_url("http://www.technorati.com/faves?add={url}", url, title);
	$("ekls_blinklist").href = ekls_share_url("http://blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}", url, title);
	$("ekls_newsvine").href = ekls_share_url("http://www.newsvine.com/_wine/save?u={url}&h={title}", url, title);
	$("ekls_magnolia").href = ekls_share_url("http://ma.gnolia.com/bookmarklet/add?url={url}&title={title}", url, title);
	$("ekls_reddit").href = ekls_share_url("http://reddit.com/submit?url={url}&title={title}", url, title);
	$("ekls_windows_live").href = ekls_share_url("https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={url}&title={title}&top=1", url, title);
	$("ekls_tailrank").href = ekls_share_url("http://tailrank.com/share/?link_href={url}&title={title}", url, title);
	$("ekls_blogmarks").href = ekls_share_url("http://blogmarks.net/my/new.php?mini=1&url={url}&title={title}", url, title);
	$("ekls_favoriting").href = ekls_share_url("http://www.favoriting.com/nuevoFavorito.asp?qs_origen=3&qs_url={url}&qs_title={title}", url, title);

	post_id.value = id;

	form.style.left = offset[0] + 'px';
	form.style.top = (offset[1] + link.offsetHeight + 3) + 'px';
	form.style.display = 'block';
}

function ekls_share_url(base, url, title) {
	base = base.replace('{url}', url);
	return base.replace('{title}', title);
}

function ekls_share_tab(tab) {
	var tab1 = document.getElementById('ekls_tab1');
	var tab2 = document.getElementById('ekls_tab2');
	var body1 = document.getElementById('ekls_social');
	var body2 = document.getElementById('ekls_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 ekls_xy(id) {
	var element = $(id);
	var x = 0;
	var y = 0;
}
