function PrintLink() {
	var url = document.location.href;  
	var newurl = url;
	if ( url.indexOf("?") > -1 ) newurl = newurl+'&typeP=1';
	else  newurl = newurl+'?typeP=1';
	
	window.open(newurl,'PrintPage','menubar=1,scrollbars=1,width=540,height=680');
}

jQuery(function($) {
	//$('body').textResize({
	//	plus: '#groot',		//Increase text size button
	//	minus: '#normaal',		//Decrease text size button
	//	reset: '#groter',			//Reset text size button {optionally}
	//	pace: 	2,								//How big the textsize jump will be (default 1px)
	//	original: 10,		//Original font-size in px
	//	limit: [8,12]
 	//});
 	
 	sitefunctions.textresize();
 	
 	jQuery("li.menuFold > ul").hide();
 	jQuery('li.menuFold > a.active').parent().find('ul').show();
 	
 	jQuery("li").not('.showit').mouseover(function(){
    jQuery("a.toggle",this).addClass("active2");
    	//$(this).addClass("show");
  });
  jQuery("li").not('.showit').mouseout(function(){ 
    jQuery("a.toggle",this).removeClass("active2");
	    //alert('tada');
	    //$(this).removeClass("show");
  });
 	
 	//$("li.menuFold > ul > li").mouseout(function(){ $('li.menuFold').removeClass("show"); });
 	
 	jQuery("li.menuFold > a").click(function(){
 		jQuery("li.menuFold > ul").hide();
 		jQuery(this).parent().find('ul').show();
	 		//$('li.showit').removeClass("showit");
	 		//$(this).find('ul').toggle();
	 		//$(this).parent().toggleClass("showit");
 		jQuery('ul > li > a.active').removeClass("active");
 		jQuery(this).toggleClass("active");
 	});
});


var sitefunctions = {
	textresize : function(){
		// show text resizing links
		jQuery(".aaa").show();
		var $cookie_name = "sitename-FontSize";
		var originalFontSize = '1em';
		// if exists load saved value, otherwise store it
		if(jQuery.cookie($cookie_name)) {
			var $getSize = jQuery.cookie($cookie_name);
			jQuery("html").css({fontSize : $getSize + ($getSize.indexOf("em")!=-1 ? "" : "em")}); // IE fix for double "pxpx" error
		} else {
			jQuery.cookie($cookie_name, originalFontSize);
		}
		
		// text decrease link // new now reset
		jQuery("#normaal").bind("click", function() {
			jQuery("html").css("font-size", originalFontSize);
			jQuery.cookie($cookie_name, originalFontSize);
			return false;	
		});
		
		// reset link
		jQuery("#groter").bind("click", function() {
			var newFontSize = '1.2em';
			jQuery("html").css("font-size", newFontSize);
			jQuery.cookie($cookie_name, newFontSize);
			return false;
		});
		
		// text increase link
		jQuery("#groot").bind("click", function() {
			var newFontSize = '1.3em';
			jQuery("html").css("font-size", newFontSize);
			jQuery.cookie($cookie_name, newFontSize);
			return false;	
		});
		
	}
}
