Cufon.replace('h2', { fontFamily: 'Gothic' });
Cufon.replace('h3', { fontFamily: 'Gothic' });

function faqShowHide(name){
	if(document.getElementById){
		if(document.getElementById(name+'-container').className == 'faq-q'){
			document.getElementById(name+'-container').className = 'faq-q-active';
			document.getElementById(name+'-faqs').style.display = '';
		}else{
			document.getElementById(name+'-container').className = 'faq-q';
			document.getElementById(name+'-faqs').style.display = 'none';
		}
	}
}

$(document).ready(function() {
	
	$(function() {
	
	swapValues = [];
	
	$("#frm .textfield").css("color", "#AAAAAA");
	$("#frm .textfield").each(function(i){
	swapValues[i] = $(this).val();

	$(this).focus(function(){
	$(this).css("color", "#525252");
	if ($(this).val() == swapValues[i]) {
		$(this).val("");
	}
	}).blur(function(){
	if ($.trim($(this).val()) == "") {
	$(this).val(swapValues[i]);
	$(this).css("color", "#AAAAAA");
		}
			});
		});
	}); 

	$(function() 
	{
		swapValues = [];
		var words = $("#frm .textfield, .watermark").val();

		if (words != null)
		{
			words = words.split(" ");

			if (words.length==3)
			{
				if (words[0]=="Maximaal" && words[2]=="woorden.")
				{
					$("#frm .textfield, .watermark").css("color", "#AAAAAA");
				}
			}
		
			$("#frm .textfield, .watermark").each(function(i)
			{
				swapValues[i] = $(this).val();

				$(this).focus(function()
				{
					$(this).css("color", "#525252");

					if (words[0]=="Maximaal" && words[2]=="woorden." && $(this).val() == swapValues[i]) 
					{
						$(this).val("");
					}
				}).blur(function()
				{
					var words = swapValues[i].split(" ");

					if ($.trim($(this).val()) == "" && words.length==3)
					{
						if (words[0]=="Maximaal" && words[2]=="woorden.")
						{
							$(this).val(swapValues[i]);
							$(this).css("color", "#AAAAAA");
						}
					}
				});
			});
		}
	}); 
	
	/* form slide on focus first field */
	$(".slidefields").hide();
	$(".relationnumber").focus(function(){
		$(".slidefields").slideDown();
	});
	
	var timer;
	
	/* delay submenu dissapearance */
/*	$("#nav-main").mouseout( function() {
		//timer = setTimeout(function(){ 
			$("#nav-main ul li ul").css("display","none");
		//}, 8000); 
	});
*/	
	$("#nav-main ul li").mouseover( function() {
		$("#nav-main ul li").children("ul").css("display","none");									 
        $(this).children("ul").css("display","block");
		//clearTimeout(timer);
	});
	
	/* Cufon fonts 
	Cufon.now(); 
	*/

});


