YAHOO.util.Event.onDOMReady(function(){
	
	YAHOO.util.Event.on ( 'navitemOverOns', 'mouseover', function () { showSubnav('subNav'); } );
	YAHOO.util.Event.on ( 'navitemArbeidsVoorwaarden', 'mouseover', function () { showSubnav('subNav2'); } );
	YAHOO.util.Event.on ( 'navitemCollegas', 'mouseover', function () { showSubnav('subNav3'); } );
	YAHOO.util.Event.on ( 'navitemContact', 'mouseover', function () { showSubnav('subNav4'); } );
	YAHOO.util.Event.on ( 'navitemRoute', 'mouseover', function () { showSubnav('subNav5'); } );

	YAHOO.util.Event.on ( 'subNav', 'mouseover', function () { showSubnav('subNav'); } );
	YAHOO.util.Event.on ( 'subNav2', 'mouseover', function () { showSubnav('subNav2'); } );
	YAHOO.util.Event.on ( 'subNav3', 'mouseover', function () { showSubnav('subNav3'); } );
	YAHOO.util.Event.on ( 'subNav4', 'mouseover', function () { showSubnav('subNav4'); } );
	YAHOO.util.Event.on ( 'subNav5', 'mouseover', function () { showSubnav('subNav5'); } );
	
	YAHOO.util.Event.on ( 'subNav', 'mouseout', function () { hideSubnavs(); } );
	YAHOO.util.Event.on ( 'subNav2', 'mouseout', function () { hideSubnavs(); } );
	YAHOO.util.Event.on ( 'subNav3', 'mouseout', function () { hideSubnavs(); } );
	YAHOO.util.Event.on ( 'subNav4', 'mouseout', function () { hideSubnavs(); } );
	YAHOO.util.Event.on ( 'subNav5', 'mouseout', function () { hideSubnavs(); } );
    
	var sbnv1 = YAHOO.util.Dom.getElementsByClassName('sbnv1active');
	if( sbnv1.length > 0 ) {
		showSubnav('subNav');	
	}

	var sbnv2 = YAHOO.util.Dom.getElementsByClassName('sbnv2active');
	if( sbnv2.length > 0 ) {
		showSubnav('subNav2');	
	}

	var sbnv3 = YAHOO.util.Dom.getElementsByClassName('sbnv3active');
	if( sbnv3.length > 0 ) {
		showSubnav('subNav3');	
	}

	var sbnv4 = YAHOO.util.Dom.getElementsByClassName('sbnv4active');
	if( sbnv4.length > 0 ) {
		showSubnav('subNav4');	
	}

	var sbnv5 = YAHOO.util.Dom.getElementsByClassName('sbnv5active');
	if( sbnv5.length > 0 ) {
		showSubnav('subNav5');	
	}


}); 

var showSubnav = function (id) {
	hideSubnavs();
	var snv = document.getElementById( id );
	if( snv != null ) {
		snv.style.display = 'block';
	}
}
var hideSubnavs = function () {
	var nv1 = document.getElementById('subNav');
	var nv2 = document.getElementById('subNav2');
	var nv3 = document.getElementById('subNav3');
	var nv4 = document.getElementById('subNav4');
	var nv5 = document.getElementById('subNav5');
	
	hideSubnav ( nv1 );
	hideSubnav ( nv2 );
	hideSubnav ( nv3 );
	hideSubnav ( nv4 );
	hideSubnav ( nv5 );
}
var hideSubnav = function (elm) {
	
	if( elm != null ) {
		elm.style.display = 'none';
	}
}