window.addEvent('domready', function(){
var szSmall = 41, szFull = 727;
var accordion = $$("#accordion .stretcher");
var fx = new Fx.Elements(accordion, {wait: false, duration: 500, transition: Fx.Transitions.Expo.easeInOut});
	accordion.each(function(stretcher, i) {
	stretcher.addEvent("click", function(event) {
		var o = {};
		o[i] = {width: [stretcher.getStyle("width").toInt(), szFull]}
		
		toglers = stretcher.getElementsByTagName("img");
		
		if (toglers[0].style.visibility == "hidden") {
			toglers[0].style.visibility = "visible";
			toglers[1].style.visibility = "hidden";
		} 
		accordion.each(function(other, j) {
			if(i != j) {
				var w = other.getStyle("width").toInt();
				if(w != szSmall) o[j] = {width: [w, szSmall]};
			toglers = other.getElementsByTagName("img");
			toglers[1].style.visibility = "visible";
			toglers[0].style.visibility = "hidden"; 
			}
		}
		);
		fx.start(o);
	});
});
});	
