
// JavaScript Document

function init(initPos){
	var stretchers = $S('.stretcher'); //div that stretches
	var toggles = $S('.display'); //h3s where I click on
	
	//accordion effect
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: true, duration: 400}
	);

	//anchors
	function checkHash(){
		var found = false;
		$S('.display a').each(function(link, i){
			if (window.location.hash == link.hash || i == initPos){
				myAccordion.showThisHideOpen(i);
				found = true;
			}
		});
		return found;
	}
	
	if (!checkHash()) myAccordion.showThisHideOpen(0);
}

Window.onDomReady(function(){

 });
