////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// expandElement(elemType, elemClass, triggerClass)
//
//
function expandElement(elemType, elemClass, triggerClass, toggleStyle) {
	var targetElems = $$(elemType + '.' + elemClass);
	hideElems(targetElems);

	var triggers = $$('a.' + triggerClass);
	for(var i=0; i < triggers.length; i++) {
		var t = triggers[i];
		t.destination = t.getAttribute('href').split('#')[1];

		t.onclick = function() {
			new Effect.toggle(this.destination, toggleStyle);			
			return false;
		}
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// hideElems()
//
//
function hideElems(collection) {
	for(var i=0; i < collection.length; i++) {
		collection[i].style.display = 'none';
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// addLoadEvent()
//
//
function addLoadEvent(func) {
	var oldonload = window.onload;
	if(typeof window.onload != 'function') {
		window.onload = func;
	}else{
		window.onload = function() {
			oldonload();
			func();
		}
	}
}
addLoadEvent(function(){
	expandElement('div', 'contentDetails', 'contentBot', 'blind');
})