// Name: CUFON
	
	Cufon.replace('.menu li a, h1, h2, h3, #twitterhome p, #bmtTable, .subTitle', {hover: true});

// --------------------------------------------------

// Name: Blur Anchors

	function blurAnchors(){
		if(document.getElementsByTagName) {
			var a = document.getElementsByTagName("a");
			//collect all anchors A
			for(var i = 0; i < a.length; i++){
				// mouse onfocus, blur anchors
				a[i].onfocus = function(){this.blur();};
			}
		}	
	}
	window.onload = blurAnchors; 
	
// --------------------------------------------------

// Name:  Validatie Reactieformulier

	$(document).ready(function(){
			$('#button').click(function(e){
				
				//stop the form from being submitted
				e.preventDefault();
				
				/* declare the variables, var error is the variable that we use on the end
				to determine if there was an error or not */
				var error = false;
				var naam = $('#naam').val();
				var email = $('#email').val();
				
				/* in the next section we do the checking by using VARIABLE.length
				where VARIABLE is the variable we are checking (like name, email),
				length is a javascript function to get the number of characters.
				And as you can see if the num of characters is 0 we set the error
				variable to true and show the name_error div with the fadeIn effect. 
				if it's not 0 then we fadeOut the div( that's if the div is shown and
				the error is fixed it fadesOut. 
				
				The only difference from these checks is the email checking, we have
				email.indexOf('@') which checks if there is @ in the email input field.
				This javascript function will return -1 if no occurence have been found.*/
				
				if(naam.length == 0){
					var error = true;
					$('#naam_error').fadeIn(500);
				}else{
					$('#naam_error').fadeOut(500);
				}

				if(email.length == 0 || email.indexOf('@') == '-1'){
					var error = true;
					$('#email_error').fadeIn(500);
				}else{
					$('#email_error').fadeOut(500);
				}
				
				//now when the validation is done we check if the error variable is false (no errors)
				if(error === false){
					
					//disable the submit button to avoid spamming
					//and change the button text to Sending...
					// $('#button').attr({'disabled' : 'true', 'value' : '' });
					
					/* using the jquery's post(ajax) function and a lifesaver
					function serialize() which gets all the data from the form
					we submit it to Formtools */
					
					$('#contact_form').submit(); 
					
				}
			});    
		});

// ------------------------------------------------
