// JavaScript Document

function CufonReplace() {
	Cufon.replace('h1', { fontFamily: 'TheMix', hover: true } );
	Cufon.replace('.arrangement-tekst .kop', { fontFamily: 'TheMix', hover: true } );
	Cufon.replace('#kalender-wrapper .kop', { fontFamily: 'TheMix', hover: true } );
	Cufon.replace('#hoofdmenu li a', { fontFamily: 'TheMix', hover: true } );
	Cufon.replace('#arrangementen-wrapper h2', { fontFamily: 'TheMix', hover: true } );
}
 
$(document).ready(function(){ 
							   
	$(".maxmin").click(function(event){ 
		$(this).toggleClass("maxmin2", "add");				
		$(this).parent().children(".resinfo-wrapper").toggle();
		$(this).parent().children(".pdf").toggle();
		event.preventDefault();
	});
	
	$(".minmax").click(function(event){ 
		$(this).toggleClass("minmax2", "add");				
		$(this).parent().next(".toggle-arrangementen").toggle();
		event.preventDefault();
	});
		
	$("#login").click(function(){
	  $("#loginform").toggle();	
	  return false;
	  
    });
	

	$("input[name='gebruikersnaam']").focus(function(){ 
		var gnaam = $(this).val();
		if(gnaam == 'Gebruikersnaam'){ 
			$(this).val(''); 
			$(this).css("font-style", "normal");
			$(this).css("color", "#676767");
			} 
	});
	
	$("input[name='gebruikersnaam']").blur(function(){ 
		var gnaam = $(this).val();
		if(gnaam == ''){ 
			$(this).val('Gebruikersnaam');
			$(this).css("font-style", "italic");
			$(this).css("color", "#b2b2b2");
			} 
	});
	
	$("input[name='wachtwoord2']").focus(function(){ 
		pwdFocus();										 
	});
	
	
	
	$("input[name='wachtwoord']").blur(function(){ 
			pwdBlur();
	});
	
	
	$("#langwrapper a").mouseover(function(){ 
		$(this).parent().css("background-position", "bottom");
	});
	$("#langwrapper a").mouseout(function(){ 
		$(this).parent().css("background-position", "top");
	});
	
	$(".innerlogo").css("width", "70px");
	
	var config = {    
     over: makeTall, // function = onMouseOver callback (REQUIRED)    
     timeout: 200, // number = milliseconds delay before onMouseOut    
     out: makeShort // function = onMouseOut callback (REQUIRED)    
	};
	function makeTall(){  $(this).animate({"width":268},1000, "swing");}
	function makeShort(){ $(this).animate({"width":70},1000, "swing");}
	$(".innerlogo").hoverIntent( config )


	$("#reserveren-meerinfo").click(function(){
	  $("#item-slider").animate({ 
        top: "+=200px"
      }, 500, "swing" );
	  
    });
	
	$("#reserveren-minderinfo").click(function(){
	  $("#item-slider").animate({ 
        top: "-=200px"
      }, 500, "swing" );
	  
    });

	$("#login-knop").live("click",function(){
		$("#frm-login").submit();  
		return false;
    });
	
	
	var config2 = {    
     over: makeTall2, // function = onMouseOver callback (REQUIRED)    
     timeout: 100, // number = milliseconds delay before onMouseOut    
     out: makeShort2 // function = onMouseOut callback (REQUIRED)    
	};
	function makeTall2(){  $(".overzicht").animate({"height":264},500, "swing");}
	function makeShort2(){ $(".overzicht").animate({"height":16},500, "swing");}
	$("#kalender-sub-wrapper").hoverIntent( config2 )
	
	
});

function pwdFocus() {
	$("input[name='wachtwoord2']").hide();
	$("input[name='wachtwoord']").show();
	$("input[name='wachtwoord']").focus(); 
}
function pwdBlur() { 
	if ($("input[name='wachtwoord']").attr('value') == '' || $("input[name='wachtwoord']").attr('value') == 'Wachtwoord') {
		$("input[name='wachtwoord']").hide();
		$("input[name='wachtwoord2']").show(); 
	}
}


