function setHeight() {
	if (document.location.href != "http://www.efe.nl/") {
		//var mainHeight = $(".main-col .box:first").height();
		var mainHeight = 0;
		$(".main-col .box-wh").each(function() {
			mainHeight += $(this).height();
		});
		
		var sideHeight = $(".side-col").height();
		if (sideHeight > mainHeight) {
			$(".main-col").height(sideHeight);
		}
		else {
			$(".main-col").height(mainHeight);
		}
	}
}

$(document).ready(function() {
	/* hoogte balanceren */
	setHeight();
	
	/* Set active main menuitem */
	$(".menuIn li").each(function() {
		if ($(this).hasClass("act")) {
			var link = $(this).find("a:first").attr("href");
			$(this).html("<span>" + $(this).text() + "</span>");
			$(this).click(function() {
				window.location = link;
			});
			$(this).find("span:first").css("cursor", "pointer");
		}
	});
	
	/* Set active tab */
	$(".row-tabs li").each(function() {
		if ($(this).hasClass("act")) {
			var link = $(this).find("a:first").attr("href");
			if (link) { 
				$(this).html("<span><span>" + $(this).text() + "</span></span>");
				$(this).click(function() {
					window.location = link;
				});
				$(this).find("span:first").css("cursor", "pointer");
			}
		}
	});
	
	/* Carousel */
	$(".fade").innerfade({
		animationtype: 'slide',
		speed: 'slow',
		timeout: 5000,
		type: 'sequence',
		containerheight: '70px'
	});
	
	// Doorsturen
	$("#btn-doorsturen").toggle(function() {
		$("#pageForward").slideDown();
	},
	function() {
		$("#pageForward").slideUp();
	});
});