// rollover menu
jQuery(document).ready(function() {

    
    jQuery.preloadImages(
    "/pivot/templates/marieke/images/menu_nieuws_a.gif",
	"/pivot/templates/marieke/images/menu_projecten_a.gif",
	"/pivot/templates/marieke/images/menu_profiel_a.gif",
	"/pivot/templates/marieke/images/menu_foto_a.gif"

    );
   

	// active geeft image met _a


 jQuery(".active img").attr('src', "/pivot/templates/marieke/images/menu_"+jQuery(".active").attr('rel')+"_a.gif");
    
    // rollover over
    jQuery('#menu a:not(.active)').bind('mouseover', function() {
       jQuery(this).find('img').attr('src', "/pivot/templates/marieke/images/menu_"+jQuery(this).attr('rel')+"_a.gif");
       
       
    });	
    
    // rollover out
    jQuery('#menu a:not(.active)').bind('mouseout', function() {
       jQuery(this).find('img').attr('src', "/pivot/templates/marieke/images/menu_"+jQuery(this).attr('rel')+".gif");
    });
    
})


jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}
