	var aShowHideItems;
		
	window.addEvent('domready', function()
	{			
		showHideCommonItems();
	});
	
	function showHideCommonItems()
	{	
		
		// find the btns and the content we want
		aShowHideItems										= [{btn: $('dyn_events'),			container:	$('events')},
															   {btn: $('dyn_news'), 			container:	$('news')}];		
		// cycle through our items
		for (var i = 0; i < aShowHideItems.length; i++)
		{
			// if both the btn and container exist 
			if (aShowHideItems[i].btn && aShowHideItems[i].container)
			{
				aShowHideItems[i].btn.set('inx', i);				
				aShowHideItems[i].btn.addEvent('click', function(event)
				{
					// hide everything else in the menu except the current btn
					hideAll(this.get('inx'));
					// define our content
					var objLanContainer							= aShowHideItems[this.get('inx')].container;	
					var objLanBtn								= aShowHideItems[this.get('inx')].btn;					
					
					// set the relevent classes 
					if (objLanBtn.hasClass('inactive'))			objLanBtn.removeClass('inactive').addClass('active');			
					//else 										objLanBtn.removeClass('active').addClass('inactive');
					if (objLanContainer.hasClass('inactive'))	objLanContainer.removeClass('inactive').addClass('active');			
					//else 										objLanContainer.removeClass('active').addClass('inactive');					
					
					return false;
				});		
			}
		}
	}
	
	function hideAll(param_execption)
	{
		// cycle through our common items
		for (var x = 0; x < aShowHideItems.length; x++)
		{
			// as long as it isn't the caller/execption & both the btn and container exist 
			if (x != param_execption && aShowHideItems[x].container && aShowHideItems[x].btn)
			{
				// hide it
				aShowHideItems[x].container.removeClass('active').addClass('inactive');
				aShowHideItems[x].btn.removeClass('active').addClass('inactive');		
			}
		}
	}
		