//the main function, call to the effect object
function init(){
	var stretchers = document.getElementsByClassName('stretcher'); //div that stretches
	var toggles = document.getElementsByClassName('display'); //h3s where I click on

	//accordion effect
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: true, duration: 400}
	);

	//hash function
	
	function checkHash(){
		var found = false;
		toggles.each(function(h3, i){
			if (window.location.href.indexOf(h3.title) > 0) {
				myAccordion.showThisHideOpen(stretchers[i]);
				found = true;
			}
		});
		return found;
	}
	
	if (!checkHash()) myAccordion.showThisHideOpen(stretchers[0]);
	
	//
	//
	//
	//
	//
	
	var folios = document.getElementsByClassName('folio'); //div that stretches
	var smallicons = document.getElementsByClassName('smallicon'); //h3s where I click on

	//accordion effect
	var myFolios = new fx.Accordion(
		smallicons, folios, {opacity: true, duration: 300}
	);
	
	//myFolios.showThisHideOpen(folios[0]);
	
	//hash function
	
	function checkHash2(){
		var found = false;
		smallicons.each(function(h3, i){
			if (window.location.href.indexOf(h3.title) > 0) {
				myFolios.showThisHideOpen(folios[i]);
				found = true;
			}
		});
		return found;
	}
	
	//if (!checkHash2()) myFolios.showThisHideOpen(folios[0]);
	
}
