// JavaScript Document

/* This function will add a rel='lightbox[images]' to
any link within a div of class='photos' */
function addLightbox() {
	var photoSet = document.getElementsByTagName('div');
	for(i=0; i<photoSet.length; i++)
	{
		//using .className instead of .getAttribute('class') because IE doesn't like it
		if(photoSet[i].className == "photos") 
		{
			photoSetLinks = photoSet[i].getElementsByTagName('a');
			for(j=0; j<photoSetLinks.length; j++)
			{			
				photoSetLinks[j].setAttribute('rel', 'lightbox[images]');
				//alert('rel: ' + photoSetLinks[j].getAttribute('rel'));
			}
		}
	}
}