
function rotation(elem, delay) {
	delay = delay * 1;
	$(function() {
		var activeRotationNode = $(elem);

		if (0 != activeRotationNode.next().length) {
			activeRotationNode.fadeOut("fast").next().fadeIn("slow");
			setTimeout(
					function() {
						rotation(activeRotationNode.next(), delay);
					},
					delay
			);
		} else {
			activeRotationNode.fadeOut("fast")
			$(firstNode).fadeIn("slow");
			setTimeout(
					function() {
						rotation($(firstNode), delay);
					},
					delay
			);

		}
	});
}


$(function() {
	firstNode = $(".reports div:first");
	var delay = 30000;
	setTimeout(
			function() {
				rotation(firstNode, delay);
			},
			delay
	);
});

$(function() {
	$("#slider").anythingSlider({
		width          : 902,
		height         : 320,
		buildArrows         : true,      // If true, builds the forwards and backwards buttons
		buildNavigation     : true,      // If true, buildsa list of anchor links to link to each panel
		autoPlay: true,
		delay: 10000,
	})
	
	$(".slider").append($("<div class='cover'></div>"));
});


$(function() {
	$("a.back").click(function() {
		history.back()
	})
});

$(function() {
	$("#publisherList").anythingSlider({
		width          : 902,
		height         : 100,
		buildArrows         : false,      // If true, builds the forwards and backwards buttons
		buildNavigation     : false,      // If true, buildsa list of anchor links to link to each panel
		autoPlay: true,
		delay: 10000,
	})
});

