$(document).ready(function() {
	
	$("#a1").bind('mouseover',function(e) {
		var	pos	= $("#a1").offset();
		var width = $("#a1").width();
		$("#PopUp").css( { "left": (pos.left + width) + "px", "top":pos.top + "px" });
		$("#PopUp").show();
	});

	$("#a2").bind('mouseover',function(e) {
		var	pos	= $("#a2").offset();
		var width = $("#a2").width();
		$("#PopUp").css( { "left": (pos.left + width) + "px", "top":pos.top + "px" });
		$("#PopUp").show();
	});

	$("#PopUp").bind('mouseover',function(e){
		$("#PopUp").show();
	});

	$("#PopUp").bind('mouseout',function(e){
		$("#PopUp").hide();
	});
		
	$("#twitter").click(function(){
		$("#PopUp").hide();
		window.open("http://twitter.com/home?status=" + top.location.href,"twitter");
	});
	   
	$("#delicious").click(function(){
		$("#PopUp").hide();
		window.open("http://del.icio.us/post?url=" + top.location.href + "&title=" + document.title,"delicious");
	});
	
	$("#digg").click(function(){
		$("#PopUp").hide();
		window.open("http://www.digg.com/submit?phase=2&url=" + top.location.href + "&title=" + document.title,"digg");
	});
	
	$("#buzzup").click(function(){
		$("#PopUp").hide();
		window.open("http://buzzup.com/us/buzzlink.php?id=" + top.location.href,"buzzup");
	});
	
	$("#tipd").click(function(){
		$("#PopUp").hide();
		window.open("http://tipd.com/login.php?return=/submit.php?url=" + top.location.href,"tipd");
	});
	
	$("#reddit").click(function(){
		$("#PopUp").hide();
		window.open("http://reddit.com/submit?url=" + top.location.href + "&title=" + document.title,"reddit");
	});
});

