// JavaScript Document

function tabswitch(whichtab, whichcontent) {
	
	document.getElementById('cat_content_1').style.display = 'none';
	document.getElementById('cat_content_2').style.display = 'none';	
	document.getElementById(whichcontent).style.display = 'block';		

	document.getElementById('tab1').className = 'off';
	document.getElementById('tab2').className = 'off';
	document.getElementById(whichtab).className = 'on';		


}

$(function() {  
     $('.photo').fadeTo(0, 0.5);  
       
     $('.photo').hover(function(e) {  
         $(this).stop().fadeTo('medium', 1.0);  
     }, function(e) {  
         $(this).stop().fadeTo('medium', 0.5);  
     });  
});

function expand_nav(link)
{
	var ul = find_enclosing_ul(link)
	if (ul.style.display == 'none')
	{
		ul.style.display = 'block'
	}
	else
	{
		ul.style.display = 'none'
	}
	if (link.className == 'down')
	{
		link.className='down_open'
	}
	else
	{
		link.className='down'
	}
}
		
function find_enclosing_ul(link)
{
	var search_node = link
	while (true)
	{
		var node = search_node.nextSibling
		if (node && node.nodeName == 'UL')
		{
			break
		}
		else
		{
			search_node = node
		}
	}
	return node	
}





