Cufon.replace('h1', { fontFamily: 'Museo Sans 500' });
Cufon.replace('h2', { fontFamily: 'Museo Sans 500' }); 
Cufon.replace('h3', { fontFamily: 'Museo Sans 500' }); 
Cufon.replace('.h3-sub', { fontFamily: 'PMN Caecilia' });
Cufon.replace('h5', { fontFamily: 'Museo Sans 500' });
Cufon.replace('h4', { fontFamily: 'Museo Sans 500' });
//Cufon.replace('#tags', { fontFamily: 'PMN Caecilia' });

Cufon.replace('#top-navigation', { fontFamily: 'PMN Caecilia' });
Cufon.replace('#mid-breadcrump', { fontFamily: 'PMN Caecilia' });
Cufon.replace('#page-navigation .item', { fontFamily: 'PMN Caecilia', hover: 'true' });

//Cufon.replace('.content', { fontFamily: 'Museo Sans 500', hover: 'true' });

function showSubmenu(x) {
	var newHtml = $('#submenu' + x).html();
	
	var arrowPos = parseInt(x-1) * 26;
	$('#menu-arrow').css("padding-top", arrowPos+"px").show('slide');
	
	if($("#submenu").css('display') == "block") {
		$('#submenu-text').fadeOut(function() {
			$(this).html(newHtml);
			Cufon.refresh('h5');
			$(this).fadeIn();
		});
	}
	else {
		$('#submenu-text').hide();
		$('#submenu-text').html(newHtml);
		Cufon.refresh('h5');
		
		$('#submenu').show('slide', { direction: 'up' }, function() {
			$('#submenu-text').fadeIn();
		});
		
		$('#submenu').one('mouseleave', function() {
			$('#submenu').fadeOut();
			$('#menu-arrow').hide('slide');
		});
	}
}



$("#comments .comment-more a").live("click", function(){
	if ($(this).text() == 'Inhoud workshop') {
		$(this).parent().parent().removeClass("expandable");
		$(this).text("Inhoud inklappen");
	} else {
		$(this).parent().parent().addClass("expandable");
		$(this).text("Inhoud workshop");
	}
	return false;
});
function doZipcode(val){
	var newVal = "";
	var l = val.length;
	for(i=0;i<l;i++){
		var zipChar = val.charAt(i).toUpperCase();
		if(i<4){
			// Check number
			if(zipChar<'0' || zipChar>'9'){
				zipChar="";
			}
		}
		else if(i==4){
			if(zipChar!=' '){
				newVal += ' ';
			}
			else{
			}
		}
		else if(i==5 || i==6){
			if(zipChar<'A' || zipChar>'Z'){
				zipChar="";
			}
		}
		else{
			zipChar="";
		}
		newVal += zipChar;
	}
	return newVal;
}
///oude popup
//aan te passen
vanaf_links = 100;
vanaf_boven = 100;
grootste_breedte  = 887+20;//afmetingen van het grootste beeld +20
grootste_hoogte = 890+20;  //afmetingen van het grootste beeld +20
//hieronder niets wijzigen
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width=587,height=390,left='+vanaf_links+',top='+vanaf_boven;
var optIE='scrollbars=no,width=587,height=390,left='+vanaf_links+',top='+vanaf_boven;
function popBeeld(BeeldURL,BeeldTitel){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Bezig met inladen ...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function aanpassen_aan_beeldgrootte(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=587;');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["BeeldNaam"].width;');writeln('window.innerHeight=document.images["BeeldNaam"].height;}}');
writeln('function maak_titel(){document.title="'+BeeldTitel+'";}');writeln('</sc'+'ript>');
writeln('</head><body bgcolor=000000 scroll="no" onload="aanpassen_aan_beeldgrootte();maak_titel();self.focus()" onblur="self.close()">');
writeln('<a href="" onClick="window.close();"><img name="BeeldNaam" src='+BeeldURL+' style="display:block"></a></body></html>');
close(); 
}}
