$(document).ready(function(){
	$("#JQcaptchaRefresh").click(function(){
		var rand = Math.round(Math.random(0)*1000)+1;
    	$('#captcha').attr('src', captcha_path+'?'+rand);
    	return false;
    });
    
    $("#JQcaptchaElementRefresh").click(function(){
		var rand = Math.round(Math.random(0)*1000)+1;
    	$('#captchaElement').attr('src', captcha_path+'?'+rand);
    	return false;
    });
    
/* Name text input */
    $("#GuestbookentryWriter").focus(function(){
    	if($(this).val()=='Naam'){
    		$(this).val('');
    	}
    });
    
    $("#GuestbookentryWriter").blur(function(){
    	if($(this).val()==''){
    		$(this).val('Naam');
    	}
    });
/* Message text input */    
    $("#GuestbookentryMessage").focus(function(){
    	if($(this).val()=='Bericht'){
    		$(this).val('');
    	}
    });
    
    $("#GuestbookentryMessage").blur(function(){
    	if($(this).val()==''){
    		$(this).val('Bericht');
    	}
    });
/* Code text input */
    $("#GuestbookentryCode").focus(function(){
    	if($(this).val()=='Code'){
    		$(this).val('');
    	}
    });
    
    $("#GuestbookentryCode").blur(function(){
    	if($(this).val()==''){
    		$(this).val('Code');
    	}
    });
    
/* Code text input */
    $("#GuestbookentryEmailaddress").focus(function(){
    	if($(this).val()=='E-mailadres'){
    		$(this).val('');
    	}
    });
    
    $("#GuestbookentryEmailaddress").blur(function(){
    	if($(this).val()==''){
    		$(this).val('E-mailadres');
    	}
    });

});
