// JavaScript Document

window.addEvent('domready', function () {
	init();
});

function init() {
	fullInfo();
}

function fullInfo() {
	//first hide the spans
	var extendedBlocks=$ES('span.fullInfo');
	extendedBlocks.each(function(x) {
		x.setStyle('display', 'none');	
	});
	//now set the links
	var extLinks=$$('a.link-expand');
	var allowExpand=true;
	extLinks.each(function(x) {
		x.addEvent('click', function () {
			var spanLink=x.getProperty('href');
			var finalSpan=spanLink.split('#')[1];
			if (allowExpand) {
			$(finalSpan).setStyle('display', 'inline');
			x.setText('Hide Info');

			allowExpand=false;
			} else {
				x.setText('More Info');

				allowExpand=true;
				$(finalSpan).setStyle('display', 'none');
			}
			});
	});
	
}


