$(function(){
	$('body').append('<div id="fader" />');
	$('#fader').css({opacity: .5});
	$('#popup').show();
});

function remove_popup(url) {
	$('#popup, #fader').hide('', function(){
		$('#fader').remove();
	});
	$('body').append('<img src="' + url + '" width="1" height="1" />');
}

$(document).ready(function(){
	$("#button").bind("click", function(e) {
		$("#bubble").css({
				left:$(this).offset().left-5,
				top:$(this).offset().top-$("#bubble").height()-35
			}).show();
		e.stopPropagation(); // Stops the following click function from being executed
		$(document).one("click", function(f) {
			$("#bubble").hide();
		});
	});
});
