$(document).ready(function(){

	/* ENABLE SUBMENU */
    $("#menu ul li").hover(
		function(){
			i = $(this).children('ul:eq(0)');
			if(i.is(":hidden"))
				i.show();
		},
		function(){
			i = $(this).children('ul:eq(0)');
			if(i.is(":visible"))
				i.hide();
		}
    );

	$("#map").jmap("init", {
			language : "en",
			mapCenter : [0, 0],
			mapType : "map",
			mapDimensions : [300, 300],
			mapZoom : 12,
			mapControlSize : "small",
			mapEnableType : false,
			mapEnableOverview : false,
			mapEnableDragging : true,
			mapEnableInfoWindows : true,
			mapEnableDoubleClickZoom : false,
			mapEnableScrollZoom : false,
			mapEnableSmoothZoom : false,
			mapEnableGoogleBar : false,
			mapEnableScaleControl : false,
			mapShowMapifiesIcon : true,
			debugMode : false
	});
	
	$("#map").jmap("searchAddress",{address: $("#map").attr('title')}, function(options, point)
	{
			$("#map").jmap("addMarker",{pointLatLng:[point.y, point.x]});
			$("#map").jmap("moveTo",{mapCenter: [point.y, point.x]});
	}); 

});

function welkom()
{
	dag = new Date()
	hr = dag.getHours()
	if ((hr == 0)||(hr == 1)||(hr == 2)||(hr == 3)||(hr == 4)||(hr == 5))
	{
	var output = "Goedenacht";
	}
	else if ((hr == 6)||(hr == 7)||(hr == 8)||(hr == 9)||(hr == 10)||(hr == 11))
	{
	var output = "Goedemorgen";
	}
	else if ((hr == 12)||(hr == 13)||(hr == 14)||(hr == 15)||(hr == 16)||(hr == 17))
	{
	var output = "Goedemiddag";
	}
	else if ((hr == 18)||(hr == 19)||(hr == 20)||(hr == 21)||(hr == 22)||(hr == 23))
	{
	var output = "Goedenavond";
	}
	return output;
}

function clearText(thefield)
{
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
}
