Event.observe(window, "load", function() {
	if (document.getElementById("box-afspraak"))
		createLinkBlock(document.getElementById("box-afspraak"))
});

function createLinkBlock(elm) {
	Event.observe(elm, "mouseover", function() {
		Element.addClassName(elm, "hovered");
	});
	Event.observe(elm, "mouseout", function() {
		Element.removeClassName(elm, "hovered");
	});
	
	// add onclick
	var link = elm.getElementsByTagName("a")[0];
	Event.observe(elm, "click", function() {
		//alert(link);
		document.location = link;
		return false;
	})
}
