

$(function() {   
	
	function hiLiteAnchor() {
		var hash = location.hash;
		$(hash).addClass('sp_current');
		var hash_stripped = hash.replace('#','');
		$('#t_'+hash_stripped).addClass('t_current');
	}
	
	hiLiteAnchor();
	
	$('#t_modules ul li').click(
		function(){
			// add class to current sub nav item
			$(this).addClass('t_current');
			// remove class from all other sub nav items
			$('#t_modules ul li').not($(this)).removeClass();
			// add class to current staff profile
			var clicked = $(this).attr('id');
			var clicked_stripped = clicked.replace('t_','');
			$('#'+clicked_stripped).addClass('sp_current');
			// remove class from all other staff profiles
			$('#main_col div').not('#'+clicked_stripped).removeClass();
			
			$.scrollTo( '#'+clicked_stripped, 500 );
    		return false;

		}
	);
	
});