$(document).ready(function() {
	setupIndexAnimation();
});

function setupIndexAnimation() {
	$(".animation ul").cycle({
		cleartype: true,
		timeout: 6000,
		nowrap: 1,
		after: function(cur, next) {
			var texts = $(next).find("#AnimationText div");
			
			$(texts[0]).fadeIn(800);
			setTimeout(function() {
				$(texts[1]).fadeIn(800);
				setTimeout(function() {
					$(texts[2]).fadeIn(800);
				}, 1000);
			}, 1000);
		},
		before: function(cur, next) {
			$(next).find("#AnimationText div").hide();
		}
	});
}

