$(document).ready(function(){
	
	function hideAllTabs(){
		//hide all tabs
		$("#overview-tab-1").hide();
		$("#overview-tab-2").hide();
		$("#overview-tab-2-2").hide();
		$("#overview-tab-2-3").hide();
		$("#overview-tab-2-4").hide();
		$("#overview-tab-2-5").hide();
		$("#overview-tab-2-6").hide();
		$("#overview-tab-2-7").hide();
		$("#overview-tab-3").hide();
		$("#overview-tab-4").hide();
		$("#contactformulier").hide();
		$("#contactformuliergelukt").hide();
		$("#contactformulier2").hide();
		$("#contactformuliergelukt2").hide();
		$("#filmpje").hide();
		$("#vacature1").hide();
		$("#vacature2").hide();
		$("#vacature3").hide();
		$("#folders").hide();
	}
	
	function makeAllRed() {
		$(".overview-menu1").css('background', '#AD111D');
		$(".overview-menu2").css('background', '#AD111D');
		$(".overview-menu3").css('background', '#AD111D');
		$(".overview-menu4").css('background', '#AD111D');
	}
	
	$(".overview-menu-1").click(function(){
		hideAllTabs();
		makeAllRed();
		//show chosen tab
		$("#overview-tab-1").show();
		$(".overview-menu1").css('background', '#004687');
		$("#pad").text('Dossier bouwinnovatie 2012');
	});
	$(".overview-menu-2").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-2").show();
		$(".overview-menu2").css('background', '#004687');
		$("#pad").text('Profiel aanpassen');
	});
	$(".overview-menu-2-2").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-2-2").show();
		$(".overview-menu2").css('background', '#004687');
		$("#pad").text('Profiel aanpassen');
	});
	$(".overview-menu-2-3").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-2-3").show();
		$(".overview-menu2").css('background', '#004687');
		$("#pad").text('Profiel aanpassen');
	});
	$(".overview-menu-2-4").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-2-4").show();
		$(".overview-menu2").css('background', '#004687');
		$("#pad").text('Profiel aanpassen');
	});
	$(".overview-menu-2-5").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-2-5").show();
		$(".overview-menu2").css('background', '#004687');
		$("#pad").text('Profiel aanpassen');
	});
	$(".overview-menu-2-6").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-2-6").show();
		$(".overview-menu2").css('background', '#004687');
		$("#pad").text('Profiel aanpassen');
	});
	$(".overview-menu-2-7").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-2-7").show();
		$(".overview-menu2").css('background', '#004687');
		$("#pad").text('Profiel aanpassen');
	});
	$(".overview-menu-3").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-3").show();
		$(".overview-menu3").css('background', '#004687');
		$("#pad").text('Profiel overzicht');
	});
	$(".overview-menu-4").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#overview-tab-4").show();
		$(".overview-menu4").css('background', '#004687');
		$("#pad").text('Adverteren op deze website');
	});
	$(".contactformulier-link").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#contactformulier").show();	
		$(".overview-menu4").css('background', '#004687');
		$("#pad").text('Adverteren op deze website > Contactformulier');
	});
        //terug naar adverteren op deze website tab
        $(".back-to-ads").click(function(){
            hideAllTabs();
            $("#overview-tab-4").show();
        });


	$(".contactformulier2-link").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#contactformulier2").show();	
		$(".overview-menu1").css('background', '#004687');
		$("#pad").text('Dossier bouwinnovatie 2012 > Contactformulier');
	});

        $(".back-to-dossier").click(function(){
            hideAllTabs();
            $("#overview-tab-1").show();
        });

	$(".bekijk-filmpje").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#filmpje").show();
		$(".overview-menu3").css('background', '#004687');
		$("#pad").text('Profiel overzicht > Promofilmpje');
	});
	$(".bekijk-vacature1").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#vacature1").show();
		$(".overview-menu3").css('background', '#004687');
		$("#pad").text('Profiel overzicht > Vacature 1');
	});
	$(".bekijk-vacature2").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#vacature2").show();
		$(".overview-menu3").css('background', '#004687');
		$("#pad").text('Profiel overzicht > Vacature 2');
	});
	$(".bekijk-vacature3").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#vacature3").show();
		$(".overview-menu3").css('background', '#004687');
		$("#pad").text('Profiel overzicht > Vacature 3');
	});
	$(".bekijk-folders").click(function(){
		hideAllTabs();
		makeAllRed();
		// show chosen tab
		$("#folders").show();
		$(".overview-menu3").css('background', '#004687');
		$("#pad").text('Profiel overzicht > Bedrijfsbrochures');
	});
});

$(document).ready(function(){
	$(".radio").dgStyle();
	$(".checkbox").dgStyle();
});
