window.addEvent('domready',function(){
	
	//show and hide the share layer
	$('btnShare').addEvent('click', function(){
	    $('shareLayer').style.display = ($('shareLayer').style.display == 'none') ? 'block' : 'none';
		return false;
	});
	
	//configure stumbleupon link
	$('stumbleupon').href = 'http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
	
	//configure digg link
	$('digg').href = 'http://digg.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);
	
	//configure delicious link
	$('delicious').addEvent('click', function(){
		window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550');
	});
		
});

//configure facebook link
function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}