$(document).ready(function(){

	$(".footerNav").each(function(){
		$(this).find(".sep:last").remove();	  
	});
	
	
	// map interaction
	$("#map a").hover(
		function(){
			
			// create map tooltip if not existing
			if ( $("#mapTooltip").length==0 ) {
				$("#map").append('<div id="mapTooltip" />');
			}
			
			$("#mapTooltip").show();
			
			var text  = $(this).text().split('|');
			var title = text[0];
			var items = text[1].split(',');
			
			$("#mapTooltip").html('<h3>'+title+'</h3><ul></ul><div id="mapTip"></div>');			
			$.each(items, function(i, value){
				$("#map ul").append('<li>'+value+'</li>');
			});
			
			$("#mapTooltip").css({
				left: parseInt($(this).css('left')) + 36 + 'px',
				top: parseInt($(this).css('top')) - 85 + 'px'
			});
			
		},
		function(){
			$("#mapTooltip").hide();
		}
	);


	$("a[rel='gallery']").colorbox();
	
});
