function processTab( link ) {
	// keep only the part after the #
	var target = link.href.replace(/.*#/, '');
	//alert(link);
	// add showAndSelect onclick
	$('.tab-controller a.' + target).bind('click', function(){
		showAndSelect(target);
		// then don't follow the link's href
		return false;
	});
}

function showAndSelect( mod ) {
	// show the given box
	showTabBox(mod);
	// make the given tab selected
	selectTab(mod);
}
function showTabBox( mod ) {
	// hide each tab box
	$('.tab-box').hide();
	// show the given box
	$('.tab-box#' + mod).show();
	if( mod == 'map' ){
		getMapLoadVariables( 'myMoreInfoMap' );
		track();
	}
}
function selectTab( mod ) {
	// unselect all tabs
	$('.tab-controller a').removeClass('selected');
	// select the given tab
	$('.tab-controller a.' + mod).addClass('selected');
}
