// JavaScript Document

function switchPhotoSet(id, node)
{
	// hide other set	
	var photoSet = document.getElementById('photoSet').getElementsByTagName('div');
	for (i = 0; i < photoSet.length; i++)
	{
		if (photoSet[i].className == 'show')
			photoSet[i].className = 'hide';
	}
	// show other links
	var updateSet = document.getElementById('updates').getElementsByTagName('p');
	for (i = 0; i < updateSet.length; i++)
	{
		if (updateSet[i].className == 'photoLink hide')	
			updateSet[i].className = 'photoLink show';
	}
	var itemSet = document.getElementById('updates').getElementsByTagName('div');
	for (i = 0; i < itemSet.length; i++)
	{
		if (itemSet[i].className == 'news_item hl')	
			itemSet[i].className = 'news_item';
	}
	
	
	// show the set
	document.getElementById(id).className = 'show';
	node.className = 'photoLink hide';	
	node.parentNode.className = 'news_item hl';
	
	var po = $('div.hl').position();
	$('#photoSet').css('top', po.top-60);
}

$(document).ready(function() {
	$('.img_ht a').addClass('thickbox');
	$('.img_ht a').each(function() { 
		$(this).attr('rel', $(this).parent().parent().attr('id'));
		$(this).attr('title', $(this).siblings().text());
	});
	
});


