function start_scroll()
{
	++scroll_idx;
	if(scroll_idx >= 4)
		scroll_idx = 0;

	$('#banner-text').hide();

	scroll_partial = 161;
	scroll_animate();
}

function scroll_animate()
{
	scroll_partial -= 3;

	var offset = 1 - 161 * scroll_idx + scroll_partial;
	var bk_pos = '0px ' + offset + 'px';
	$('#banner').css('backgroundPosition', bk_pos);

	if(scroll_partial > 0) {
		setTimeout(scroll_animate, 20);
	} else {
		$('#banner-text-h1').text(messages[scroll_idx]['text']);
		$('#banner-text').show();
		$('#banner-link').hide();
		setTimeout(end_scroll, 1000);
	}
}

function end_scroll()
{
	$('#banner-link').attr('href', messages[scroll_idx]['link']);
	$('#banner-link').show();
	setTimeout(start_scroll, 10000);
}

