$(function(){
	$('#team1').teamBox('Team_1_Cur');
	$('#team2').teamBox('Team_2_Cur');
	$('#team3').teamBox('Team_3_Cur');
	
	
	//When page loads...
	$(".tab_container > div").hide(); //Hide all content
	$(".tabNavigation li:first").addClass("selected").show(); //Activate first tab
	$(".tab_container > div:first").show(); //Show first tab content

	//On Click Event
	$(".tabNavigation li").click(function() {
		$(".tabNavigation li").removeClass("selected"); //Remove any "selected" class
		$(this).addClass("selected"); //Add "selected" class to selected tab
		$(".tab_container > div").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

      //News Ticker
	var speed = 300;
    var first = '';
    var pause = 5000;
	setInterval(tick, pause);
    function tick() {
        first = $('.news-scroller-wrapper ul li:first').html();
        $('.news-scroller-wrapper ul li:first').animate({opacity: 0},speed).fadeOut('medium', function () {
            $(this).remove();
            last = '<li>' + first + '</li>';
            $('.news-scroller-wrapper ul').append(last);
        });
    }
});
