function headerActief() {
    //Look through all the links in the sidebar
   $("div#navigatie li a").filter(function() {
   //Take the current URL and split it into chunks at each slash
   var currentURL = window.location.toString().split("/");
   //return true if the bit after the last slash is the current page name
   return $(this).attr("href") == currentURL[currentURL.length-1];
   //when the filter function is done, you're left with the links that match.
   }).parent().addClass("actief");
   //Afterwards, look back through the links. If none of them were marked,
   //mark your default one.
   if($("div#navigatie li").hasClass("actief") == false) {
      $("div#navigatie li:nth-child(1)").addClass("actief");
    }
}
function tabSelect() {
	$('.tabmenu div.tab').hide();
	$('.tabmenu').each(
		function() {
			$(this).find('div.tab:first').show();
		}
	);
	$('.tabmenu li.tabknop:first').addClass('actief');
	$('li.tabknop > a').click(
		function() {
			$(this).parent().parent().find("li.tabknop").removeClass('actief');
			$(this).parent().addClass('actief');
			var currentTab = $(this).attr('href');
			$(this).parent().parent().parent().find('div.tab').hide();
			$(currentTab).show();
			return false;
		}
	);
}
$(function() {
	headerActief();
	tabSelect();
}
)