$(document).ready(function() {
  // bepaal selectie op niveau 1
  var sel1 = 0;
  $('#mainmenu>a').each(function() {
    if ($(this).hasClass('selected')) {
      return false;
    }
    sel1++;
  });
  var sel2 = 0;
  $('#mainmenu>div:has(div)>a').each(function() {
    if ($(this).hasClass('selected')) {
      return false;
    }
    sel2++;
  });
  
  
  if (sel1 == 4) {
    $('#mainmenu').accordion({ autoHeight:false, header: 'a.header1', collapsible: true, active:-1 });
  } else {
    $('#mainmenu').accordion({ autoHeight:false, header: 'a.header1', collapsible: true, active:sel1 });
  }
  
  $('#mainmenu>div:has(div)').accordion({ autoHeight:false, header: 'a.header2', active:sel2 });

  $('#mainmenu>a').click(function() {
    return false;
  });
  
  $('#mainmenu div a.header2').click(function() {
    return false;
  });
  
  $('#sitemap a.header2').click(function() {
    return false;
  });

  // Alleen voor IE6 !!!
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
 		var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 		if (ieversion == 6) {
  			$('#mainmenu>div').each(function() {
     			var width = $(this).width();
     			var height = $(this).height();
      			var img = $('<img src="/gfx/wit.gif" class="trans" />').css({width:width, height:height});
      			$(this).prepend(img);
    		});
    		$('#mainmenu>a').each(function() {
      		var width = $(this).width();
      		var height = $(this).height();
      		var img = $('<img src="/gfx/wit.gif" class="trans" />').css({width:width, height:height});
      		$(this).prepend(img);
    		});
    		$('#mainmenu>a label').mouseover(function() {
      			$(this).addClass('hover').mouseout(function() {
        			$(this).removeClass('hover');
      			});
    		});
		} 
	}
	
	$('body.rozenbottel td.c4').wrapInner("<div></div>");

  $('body.rozenbottel tr').mouseover(function() {
    $('div strong', this).show();
  });
  
  $('body.rozenbottel tr').mouseout(function() {
    $('div strong', this).hide();
  });

});  



