



jQuery(document).ready(function () {


	$("#content img").each(function() {

           //Get the width of the image
           var width = $(this).width();

           //Max-width substitution (works for all browsers)
           if (width > 460) {
             $(this).css("width", "460px");
			 $(this).css("height", "100%");
           }
	});
		   
		   
    var openTopSlider = null;
    var opensubMenu = null;
    
    //preset open menu
    if(jQuery("#pShow")!=null && jQuery("#pShow").length > 0)
        opensubMenu = jQuery("#pShow");
		
	jQuery("#menu p").not("#pShow").hide();


	jQuery("#pulldown, #anderescholen").click(function () {
		
		if(jQuery("#anderescholen_items").is(":hidden"))
			jQuery("#anderescholen_items").slideDown("slow");
		else
			jQuery("#anderescholen_items").slideUp("slow");
	
	});

    //click event for the menu
    jQuery("#menu a").not('#menu p a').click(function () {

         var submenu = jQuery('p', this.parentNode);


        if(opensubMenu!=null){

           if(jQuery(submenu).is(":hidden"))
                openNew = true;
           else
                openNew = false;

           jQuery(opensubMenu).slideUp("slow", function(){

                if(openNew){

                        jQuery(submenu).slideDown("slow");
                        opensubMenu = submenu;
                }else{

                        opensubMenu = null;
                }
           });
        }else{
          
          if(submenu.length > 0){

                  submenu.slideDown("slow");
                  opensubMenu = submenu;
          }
        }
        

    });
   
});   
    



