jQuery(document).ready(function(){
	jQuery("#banner").flash(
		{
			src: '/Static/Sites/S2/Flash/header_winter.swf',
			width: 1280,
			height: 220,
			wmode: 'transparent'
		},
		{
			version: 6,
			update: false
		}
	);
});

jQuery(document).ready(function(){
	jQuery("div#navigation ul").superfish();
});

jQuery(document).ready(function(){ 
	if( jQuery.cookie( "fontSize" ) != null )
		jQuery( "body" ).css( "fontSize", parseInt( jQuery.cookie( "fontSize" ) ) );
	
	var intFontSize = parseInt( $("body").css( "fontSize" ) );
	
    jQuery( "a.setFontBigger" ).click(function(){  
        intFontSize++;  
		jQuery( "body" ).css( "fontSize", intFontSize );
		
		jQuery.cookie( "fontSize", intFontSize );
    });
	
    jQuery( "a.setFontSmaller" ).click(function(){  
        intFontSize--;  
		jQuery( "body" ).css( "fontSize", intFontSize );
		
		jQuery.cookie( "fontSize", intFontSize );
    });
});

function checkPostcodeForm(form) {
	if (!validatePostcode(form.postcode.value)) {
		alert("Vul een geldige Nederlandse postcode in.\n(voorbeeld: 7500 AA)");
		form.postcode.focus();
		return false;
	} else if (form.huisnummer.value=="") {
		alert("Vul een huisnummer in.");
		form.huisnummer.focus();
		return false;
	} else {
		return true;
	}
}
function validatePostcode(strPC) {
  return typeof strPC=='string' ? strPC.match(/[1-9][0-9]{3} ?[a-zA-Z]{2}/)==strPC : false;
}
