// Mainmenu

var timeout       = 500;
var closetimer    = 0;
var ddmenuitem    = 0;

function jsddm_open()
{	jsddm_canceltimer();
	jsddm_close();
	ddmenuitem = $(this).find('ul').eq(0).css('visibility', 'visible');
}

function jsddm_close()
{	
if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');
}

function jsddm_timer()
{	
closetimer = window.setTimeout(jsddm_close, timeout);
}

function jsddm_canceltimer()
{	
if(closetimer)
	{	window.clearTimeout(closetimer);
		closetimer = null;
	}
}

$(document).ready(function()
{	
	$('#mainnav > li').bind('mouseover', jsddm_open);
	$('#mainnav > li').bind('mouseout',  jsddm_timer);
}
);

document.onclick = jsddm_close;

// jumpMenu Select

function MM_jumpMenu(targ,selObj,restore){ // Snelkeuze menu script tbv ActiveMonitor's functies
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 
if (restore) selObj.selectedIndex=0; 
} 

function MM_jumpMenuNew(targ,selObj,restore){ // Snelkeuze menu script tbv ActiveMonitor's functies
window.open ( selObj.options[selObj.selectedIndex].value ); 
if (restore) selObj.selectedIndex=0; 
} 

function popUp (strLink)
{
	window.open ( strLink );
}


/*

//This hides the inline content if JavaScript is supported.
document.write("<style type='text/css'>.hidden{display:none;}<\/style>");

$(document).ready(function(){
//Examples of Global Changes
$.fn.colorbox.settings.bgOpacity = "0.9";

//Examples of how to assign the ColorBox event to elements.
$("a[rel='test']").colorbox({transition:"fade"});
$("a[rel='gallery']").colorbox({transition:"elastic", contentCurrent:"{current} / {total}"});
$(".colorbox").colorbox({transition:"none", fixedWidth:"75%",fixedHeight:"75%", initialWidth:"75%", initialHeight:"75%"});
$("a.single").colorbox({}, function(){
	alert('Howdy, this is an example callback.');
});
$("a[title='Homer Defined']").colorbox();
$("#flash").colorbox({href:"../content/flash.html"});
$("a[href='http://google.com']").colorbox({fixedWidth:"80%", fixedHeight:550, iframe:true});
$("#inline").colorbox({fixedWidth:"50%", inline:true, href:"#inline_example"});

//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){ 
	$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
});
});

*/
