/*
MooT.fx.js , effects for the MooT.fx Movable Type plugin
by Brett DeWoody (http://www.brettdewoody.com) MIT-style LICENSE
for more info visit (http://www.brettdewoody.com/projects/movabletype/moot/).
v 1.0
*/

// Accordian Effect

function init(){
		
		var stretchers = document.getElementsByClassName('MooT-stretcher'); //div that stretches
		var toggles = document.getElementsByClassName('MooT-header'); //h3s where I click on

		//accordion effect
		var myAccordion = new fx.Accordion(
			toggles, stretchers, {opacity: true, duration: 400}
		);

		//hash functions
		var found = false;
		toggles.each(function(div, i){
			var div = Element.find(div, 'nextSibling'); //element.find is located in prototype.lite
			if (window.location.href.indexOf(div.title) > 0) {
				myAccordion.showThisHideOpen(div);
				found = true;
			}
		});
		if (!found) myAccordion.showThisHideOpen(stretchers[0]);
	}


