	//defer the instantiation of Lightbox. Call when the page has finished loading.
	init = function()
	{
		// creating a data source object
		lightBoxes = document.getElementsByName("lightBox");

		var dataSource = new Object();

		for ( i=0; i<lightBoxes.length; i++)
		{
			currentLightBox = lightBoxes[i];
			var image = new Object();
			image['url'] = currentLightBox.getAttribute('popup');
			image['title'] = currentLightBox.getAttribute('alt');
			dataSource[currentLightBox.getAttribute('id')] = image;
		}
		// Instantiate a Lightbox object
		var lightbox = new YAHOO.com.thecodecentral.Lightbox({
			imageBase:'/static/javascript/_assets/skins/sam',
			dataSource: dataSource
		});
	}
	YAHOO.util.Event.on(window, 'load', init);

