var ex;
var allStretch;

//the main function, call to the effect object
function init(){

	var divs = document.getElementsByClassName("subtext");
	allStretch = new fx.MultiFadeSize(divs, {duration: 400});

	var items = document.getElementsByClassName("display");
	for (i = 0; i < items.length; i++){
		var h4 = items[i];
		div = h4.nextSibling;
		h4.title = h4.className.replace("display ", "");

		if (window.location.href.indexOf(h4.title) < 0) {
			allStretch.hide(div, 'height');
			if (ex != true) ex = false;
		}
		else ex = true;

		h4.onclick = function(){
			allStretch.showThisHideOpen(this.nextSibling, 100, 'height');
//			return false;
		}
	}
	if (ex == false) $('containercontent').childNodes[1].fs.toggle('height');
}

window.onload = function() {
	Element.cleanWhitespace('containercontent');
	init();
}

