

$(document).ready(function(){
	$('div.location').bind('mouseover', function(){
		if ($('div', this).is(':visible')) return;
		tooltip.close('div.location div');
		tooltip.open('div', this);
	});
	
	$('a.close').bind('click', function(){
		var parent = $(this).closest('div');
		tooltip.close(parent);
	});
	
});

var tooltip = {
	open:function(element, selector){
		$(element, selector).fadeIn(200);
	},
	close:function(selector){
		$(selector).fadeOut(200);
	}
};

