	
	var mooAccordion;
	var profileSeen = false;
	
	window.onload = function() {
		var mooTogs    = document.getElementsByClassName('stretchtoggle');
		var mooStretch = document.getElementsByClassName('stretcher');
		
		// toggle the togglers
		mooTogs.each(function(tog, i) {
			tog.onclick = function() {
				if(tog.className.indexOf('stretch_active') != -1) {
					tog.className = tog.className.replace('stretch_active', 'stretchtoggle');
					if(tog.getElementsByTagName('div')[0]) {
						if(tog.getElementsByTagName('div')[0].className == "close") {
							tog.getElementsByTagName('div')[0].innerHTML = "click to open";
						}
					}
				}
				else {
					tog.className = tog.className.replace('stretchtoggle', 'stretch_active');
					if(tog.getElementsByTagName('div')[0]) {
						if(tog.getElementsByTagName('div')[0].className == "close") {
							tog.getElementsByTagName('div')[0].innerHTML = "click to close";
						}
					}
				}
				
				if(tog.className.indexOf('profile') != -1) {
					tog.style.color = 'black';
					profileSeen = true;
				}
			};
		});
		
		mooAccordion = new fx.Accordion(mooTogs, mooStretch, {opacity:true, width:false, height:true});
	
		// Jamie (thelucid.com)
		mooAccordion.showThisHideOpen = function(toShow) {
		  this.elements.each(function(el, j) {
		    if (el == toShow)
		      this.clearAndToggle(toShow, j);
		  }.bind(this));
		}
		
		mooTogs[0].onclick();
/*		
		var mooTogsAbout    = document.getElementsByClassName('about');
		mooTogsAbout[0].onclick();
*/		

		var mooTogsNews    = document.getElementsByClassName('news');
		mooTogsNews[0].onclick();
	}
	
	function resizeImageDiv() {
		var maxHeight = document.getElementById('more').clientHeight+"px";
		document.getElementById('image').style.height = maxHeight;
	}

