	
if (!document.FIN)
{ 	
	var aShowHideItems;
	
	window.addEvent('load', function()
	{		
			showHideCommonItems();
			if (this.aShowHideItems[0].btn) 				this.aShowHideItems[0].btn.fireEvent('click');
			initOverLabels();	
			eBookLink();
	});
		
	function showHideCommonItems()
	{	
		
		// find the btns and the content we want
		aShowHideItems										= [{btn: $('dyn_ln'),			container:	$('news-updates')},
															   {btn: $('dyn_pc'), 			container:	$('popular-content')}];		
		// 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;
				});		
			}
		}
		
		if (this.aShowHideItems[0].btn && this.aShowHideItems[1].btn)
		{		
			this.aShowHideItems[0].btn.addEvent('click', function(event)
			{
				$('btn_all-news').setStyle('display', 'block');
			});			
			this.aShowHideItems[1].btn.addEvent('click', function(event)
			{
				$('btn_all-news').setStyle('display', 'none');
			});
		}
	}
	
	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');		
			}
		}
	}
	
	function eBookLink()
	{
		var strLink = $('ebooklink');
		if(strLink)	
		{
			strLink.addEvent('click', function(event)
			{
				window.open('/z_core/z_ebook/flash.html');
				//return false;
			});		
		}
	}
}
		
