$(document).ready(function(){
	// landingpage
	
	$('#header ul.solutions li a').hover(
		function() {
			$(this).find("span").animate({
				top: "115px",
				opacity: 1
			})
		}, 
		function() {
			$(this).find("span").animate({
				top: "65px",
				opacity: 0
			})
		});
	
	
	
	var newsCounter = 0;
	var t;
	var ttw = 8000;
	$(".newsticker .news").not($(".newsticker .news").eq(0)).css({"display" : "none"});
	$(".newsticker .news").eq(newsCounter).fadeIn(500, function() {
		t = setTimeout("showNext("+newsCounter+", "+ ttw +", "+$(".newsticker .news").length+")", ttw);
	});
	
	
});


function showNext(i, ttw, length) {
	
	$(".newsticker .news").eq(i).fadeOut(500, function() {
		i=i+1;
		if (i == length) {
			i=0;
		}
		
		$(".newsticker .news").eq(i).fadeIn(500, function() {
			var t = setTimeout("showNext("+i+", "+ttw+", "+length+")", ttw);
		});
		
	});
}
