jQuery(document).ready(function(){
	jQuery("#sitemap_content").hide();
	jQuery("div.sitemap_grabber a").click(function () {
		jQuery("#sitemap_content_wrapper").toggle(function(){
			jQuery.scrollTo("#sitemap",{duration:1000,onAfter:function(){
				jQuery("#sitemap_content").slideToggle("slow");
				jQuery("div.sitemap_grabber").toggle();
			}});
		});
		return false;
	});
	jQuery(".homepage_itemblock_title").fadeTo("slow",0.8);
	jQuery(".homepage_textblock_container").hover(function(){
		jQuery(".homepage_itemblock_title",this).fadeTo("slow",1);
	},function(){
		jQuery(".homepage_itemblock_title",this).fadeTo("slow",0.8);
	})


jQuery('#s4') 
.before('<div id="nav">') 
.cycle({ 
    fx:     'fade', 
    speed:   500, 
    timeout: 3000, 
    pager:  '#nav' 
});

var parents = jQuery(".current_page_item").parents("#left_menu_content ul");
var children = jQuery(".current_page_item").children("#left_menu_content ul");
jQuery("#left_menu_content ul").not( parents ).not( children ).hide();

});

	jQuery(document).ready(function() {
		
		// Preload all rollovers
		jQuery("#page_content #onze_mensen img").each(function() {
			// Set the original src
			rollsrc = jQuery(this).attr("src");
			rollON = rollsrc.replace(/.jpg$/ig,"_on.jpg");
			jQuery("<img>").attr("src", rollON);
		});
		
		// Navigation rollovers
		jQuery("#page_content a").mouseover(function(){
			imgsrc = jQuery(this).children("img").attr("src");
			if(imgsrc!=undefined)
			{
				matches = imgsrc.match(/_on/);
				// don't do the rollover if state is already ON
				if (!matches) {
					imgsrcON = imgsrc.replace(/.jpg$/ig,"_on.jpg"); // strip off extension
					jQuery(this).children("img").attr("src", imgsrcON);
				}
			}
			
		});
		jQuery("#page_content a").mouseout(function(){
			if(imgsrc!=undefined)
				jQuery(this).children("img").attr("src", imgsrc);
		});
		
	
	});


