
// drop-down menu helper for ie-win
// supports nested drop-down menus
quicklinks = function() {
	if (document.all&&document.getElementById) {
		var menus = document.getElementById("quicklinks").getElementsByTagName("ul");
		for (i = 0; menus[i]; i++) {
			menus[i].parentNode.onmouseover = function() {
			this.className += " over";
			//this.style.zIndex=90;
			}
			menus[i].parentNode.onmouseout = function() {
			//this.style.zIndex=80;
			this.className = this.className.replace(" over", "");
			}
		}
	}
}


// randomly choose an image to display
facts = function() {
	
	var factimages=new Array();
	factimages[0]="http://www.tweetsie.com/images/fact_hotdogs.jpg";
	factimages[1]="http://www.tweetsie.com/images/fact_elephants.jpg";
	factimages[2]="http://www.tweetsie.com/images/fact_moon.jpg";
	factimages[3]="http://www.tweetsie.com/images/fact_taters.jpg";
	factimages[4]="http://www.tweetsie.com/images/fact_tweet.jpg";
	
	var i=Math.floor(Math.random()*factimages.length);
	if($('random-fact')) {
		$('random-fact').setAttribute("src", factimages[i]);
	}
}


// setup for moo.fx
mooinit = function() {
	if($('email-form')) {
		toggleEmail = new fx.FadeSize('email-form', {duration: 400});
		toggleEmail.hide('height');
	}
	
	if($('subscribe-form')) {
		toggleSubscribe = new fx.FadeSize('subscribe-form', {duration: 400});
		toggleSubscribe.hide('height');
	}
}
