function shiftRight() {
	loadingSlide = 1;
	jQuery("a.currentHeadline").removeClass("currentHeadline");
	jQuery("a.calloutNavDot:eq("+currentHeadline+")").addClass("currentHeadline");
	jQuery("h1.headlineMiddle").animate({marginTop: "-58px"}, 500, function() {
		jQuery("h1.headlineMiddle").remove();
		jQuery("h1.headlineBottom").addClass("headlineMiddle");
		jQuery("h1.headlineMiddle").removeClass("headlineBottom");
		jQuery("h1.headlineMiddle").after("\n<h1 class=\"headlineBottom\"></h1>");
		loadingSlide = 0;
	});
}
function shiftLeft() {
	loadingSlide = 1;
	jQuery("h1.headlineBottom").remove();
	jQuery("a.currentHeadline").removeClass("currentHeadline");
	jQuery("a.calloutNavDot:eq("+currentHeadline+")").addClass("currentHeadline");
	jQuery("h1.headlineTop").animate({marginTop: "0px"}, 500, function() {
		jQuery("h1.headlineMiddle").remove();
		jQuery("h1.headlineTop").addClass("headlineMiddle");
		jQuery("h1.headlineTop").removeClass("headlineTop");
		jQuery("h1.headlineMiddle").before("\n<h1 class=\"headlineTop\"></h1>");
		jQuery("h1.headlineMiddle").after("\n<h1 class=\"headlineBottom\"></h1>");
		loadingSlide = 0;
	});
}
function generateTab(tab) {
	headline = '<a href="'+headlines[tab]['link']+'">'+headlines[tab]['title']+'</a>';
}
function clickArrowRight() {
	if (loadingSlide == 1) { return false; }
	currentHeadline = currentHeadline + 1;
	if(currentHeadline == headlines.length) { currentHeadline = 0; }
	generateTab(currentHeadline);
	jQuery("h1.headlineTop").html(headline);
	shiftLeft();
}
function clickArrowLeft() {
	if (loadingSlide == 1) { return false; }
	currentHeadline = currentHeadline - 1;
	if(currentHeadline < 0) { currentHeadline = headlines.length - 1; }
	generateTab(currentHeadline);
	jQuery("h1.headlineBottom").html(headline);
	shiftRight();
}