function swapImages() {
		var active = (jQuery('#banner-container .active').length > 0) 
		    ? jQuery('#banner-container .active') : jQuery('#banner-container img:first-child');
		var next = (jQuery('#banner-container .active').next('img').length > 0) 
			? jQuery('#banner-container .active').next() : jQuery('#banner-container img:first-child');
		active.fadeOut(2000, function() {
			active.removeClass('active');
			next.fadeIn(2000).addClass('active');
		});
}

function swapTweets() {
    var tweetBox = jQuery('#twitter-stream');
    var active = jQuery('#twitter-stream .active');
    var next = (jQuery('#twitter-stream .active').next('li').length > 0) 
        ? jQuery('#twitter-stream .active').next('li') : jQuery('#twitter-stream li:first-child');
    tweetBox.slideToggle(1000, function() {
        active.removeClass('active');
        next.addClass('active');
        tweetBox.slideToggle(500);
    });
}

function showBadge() {
    jQuery(this).stop();
    jQuery(this).animate({
            height: '82px'
        }, 200, 'swing');
}

function hideBadge() {
    jQuery(this).stop();
    jQuery(this).animate({
            height: '62px'
        }, 500, 'easeOutBounce');
}

jQuery(document).ready(function() {
    setTimeout('swapImages()', 1500);
	setInterval('swapImages()', 10000);
	setInterval('swapTweets()', 7000);
    jQuery('div.become-member-link a').hover(showBadge, hideBadge);

});


