﻿/**
 * Controls which menu is displayed
 * @author Chris Keeley <chris@dnaadvertising.co.uk>
 * @version 0.1 10/03/09
 */
var MenuController = {
	//The ID of the menu item to show 
	showingMenuID: null,
	//Initiate the menu
	init: function(){$('li.subparent').each(function(index,elem){if(elem.id===MenuController.showingMenuID){$(elem).addClass('showing');}else{$(elem).addClass('notshowing');}});},
	// set the id of the menu to display
	setDisplayMenuID: function(menuID){this.showingMenuID = menuID;}
}
//Ensure the DOM has fully loaded before we do our thing
$(document).ready(function(){try{MenuController.init();}catch(e){alert('Error: '+e);}});
