function initMenu() {
	pathname = window.location.pathname+window.location.hash;
	$('li.expand ul').hide();
	$('li.expand span').toggle(
		function() {
			$(this).next().slideToggle('normal');
			if ($(this).css("background-image").indexOf('icon_arrow_grey_small_down') == -1) {
				$(this).css("background-image", "url(/images/external/icon_arrow_grey_small_down.png)");	
			} else {
				$(this).css("background-image", "url(/images/external/icon_arrow_grey_small_up.png)");	
			}
		},
		function() {
			$(this).next().slideToggle('normal');
			if ($(this).css("background-image").indexOf('icon_arrow_grey_small_down') == -1) {
				$(this).css("background-image", "url(/images/external/icon_arrow_grey_small_down.png)");	
			} else {
				$(this).css("background-image", "url(/images/external/icon_arrow_grey_small_up.png)");	
			}

		}
	);
	// Select and open the selected nav
	selected_nav = $('li.expand ul li a[href="'+pathname+'"]');
	selected_nav.parent('li').addClass("selected");
	selected_nav.parents('li.expand').children('span').css("background-image", "url(/images/external/icon_arrow_grey_small_up.png)").next().show();
	// Open any navs that are supposed to be open
	$('li.expand.start_open span').css("background-image", "url(/images/external/icon_arrow_grey_small_up.png)").next().show();
}

function highlightSelection(pathname) {
	// Unselect previous nav if there was one
	previous_nav = $('li.expand ul li a[href="'+window.location.pathname+window.location.hash+'"]');
	previous_nav.parent('li').removeClass("selected");
	// Select the selected nav
	selected_nav = $('li.expand ul li a[href="'+pathname+'"]');
	selected_nav.parent('li').addClass("selected");	
}
