function hideNavigation_and_Content(slide,subslide,subslideMax) {
	var i=1;
	var top_space = 0;
	for (i=1;i<=subslideMax;i++) {
		$("#slide"+slide+" #button"+i).removeClass("current");
	}

	var i=0;
	for (i=0;i<=subslideMax;i++) {
		$("#slide"+slide+" #slide"+slide+"_"+i).stop(true).animate( {
			left: '-275', top: top_space
		}, 1000, function() { });
	}
	
	$("#slide"+slide+" #slide"+slide+"_"+subslide).show();
	$("#slide"+slide+" #slide"+slide+"_"+subslide).stop(true).animate({
		left: '0', top:'0'
	}, 1000, function() { });
	$("#slide"+slide+" #button"+subslide).addClass("current");
			
	$("#slide"+slide+" #slide"+slide+"_"+subslide+" a").click(function() {
		hideNavigation_and_Content(slide,0,subslideMax);
	});			
}

function showPopUpBox(popUpBox) { $('#' + popUpBox).fadeIn('150'); }
function hidePopUpBox(popUpBox) { $('#' + popUpBox).fadeOut('150'); }
function toggleAnswer(answer) { $('#' + answer).fadeToggle('150'); }

$(document).ready(function() {

	$("#tabNavigation #button1").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button1").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '0'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button2").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button2").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-410'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button3").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button3").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-820'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button4").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button4").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-1230'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button5").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button5").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-1640'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button6").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button6").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-2050'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button7").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button7").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-2460'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button8").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button8").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-2870'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button9").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button9").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-3280'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	$("#tabNavigation #button10").click(function(event) {
		hideAllCurrentButtons();
		$("#tabNavigation #button10").addClass("current");
		$(".slidesV").stop(true).animate({
			top: '-3690'
			}, 1000, 'easeOutBack', function() {
				// end function
		});
	});
	
	function hideAllCurrentButtons() {
		$("#tabNavigation #button1").removeClass("current");
		$("#tabNavigation #button2").removeClass("current");
		$("#tabNavigation #button3").removeClass("current");
		$("#tabNavigation #button4").removeClass("current");
		$("#tabNavigation #button5").removeClass("current");
		$("#tabNavigation #button6").removeClass("current");
		$("#tabNavigation #button7").removeClass("current");
		$("#tabNavigation #button8").removeClass("current");
		$("#tabNavigation #button9").removeClass("current");
		$("#tabNavigation #button10").removeClass("current");
	}
});