jQuery(document).ready(function($) {
	var $twitter_update = jQuery('#twitter-update');
	var lastLink = twitter_updates.length - 1;
	var currentLink = 0;
	scrollLinks = function() {
		if (currentLink > lastLink) {
			currentLink = 0;
		}
		$twitter_update.text(twitter_updates[currentLink].title).attr('href', twitter_updates[currentLink].link);
		currentLink ++;
	}
	scrollLinks();
	var scroll = setInterval(scrollLinks, 8000);

	$twitter_update.bind('mouseenter',function(){
		clearInterval(scroll);
	})
	.bind('mouseleave',function(){
		scroll = setInterval(scrollLinks, 3000);
	});
});
var initHeight = 0;
var slidedown_direction = 1;
var slidedownContentBox = false;

var slidedownActive = false;
var contentHeight = false;
var slidedownSpeed = 50;
var slidedownTimer = 3;
function slidedown_showHide()
{
	if(initHeight==0)slidedown_direction=slidedownSpeed; else slidedown_direction = slidedownSpeed*-1;
	if(!slidedownContentBox){
		slidedownContentBox = document.getElementById('emailsubscribebox');
		contentHeight = 100;
	}
	slidedownContentBox.style.visibility='visible';
	slidedownActive = true;
	slidedown_showHide_start();
}
function slidedown_showHide_start()
{
	if(!slidedownActive)return;
	initHeight = initHeight/1 + slidedown_direction;
	if(initHeight <= 0){
		slidedownActive = false;
		slidedownContentBox.style.visibility='hidden';
		initHeight = 0;
	}
	if(initHeight>contentHeight){
		slidedownActive = false;
	}
	slidedownContentBox.style.height = initHeight + 'px';
	setTimeout('slidedown_showHide_start()',slidedownTimer);
}
function setSlideDownSpeed(newSpeed)
{
	slidedownSpeed = newSpeed;
}