// onload
$(function() {
	$('#promotion-image').carousel( {nav: '#promo-nav', speed: 300} );
	$('#news-carousel').newscarousel();
	// start timer
	var timer = setInterval('updateNews()', 10000); // 10 secs
});

function updateNews() {
	var $carousel = $('#news-carousel');

	if ($carousel.data('busy') == true) {
		return;
	}

	// find currently active nav, and activate next one
	var current = parseInt($carousel.data('current'));
	var next = current + 1;

	if (next == 4) {
		next = 1
	}

	var $nav = $('#ni' + next).find('a');
	$nav.click();
}
