$.fn.load_defaults = function(){		$('.call_me a').toggle(	function(){$(".call_me_form_inner").animate({         top: "0"}, 500);		return false;	}, 	function(){$(".call_me_form_inner").animate({         top: "-110"}, 500);		return false;	});		$('.call_me_form input, .call_me_form textarea').each(function(){		var value = $(this).attr('value');		$(this).data("state",{ touched: 'no', defaulttext: value})				$(this).addClass('default');		$(this).click(function(){							$(this).removeClass('default');			if($(this).data("state").touched == 'no'){				$(this).attr('value', '');				$(this).data("state").touched = 'yes';			}else{}					}).select(function(){							$(this).removeClass('default');			if($(this).data("state").touched == 'no'){				$(this).attr('value', '');				$(this).data("state").touched = 'yes';			}else{}					}).blur(function(){			if($(this).attr('value') == ''){				$(this).attr('value', $(this).data("state").defaulttext)				$(this).addClass('default');				$(this).data("state").touched = 'no';			}					})	});	$('.required').change(function(){		$(this).removeClass("error");	})		check_fields = function (){		set_error = 0;		$('.required').each(function(){			$(this).removeClass("error");						if ((this.type == 'text') || (this.type == 'textarea')){				if ($(this).val() == ''){					$(this).addClass("error");					set_error = 1;				}else if($(this).data("state").touched == 'no'){					$(this).addClass("error");					set_error = 1;				}else{					$(this).removeClass("error");				}			}						if ( $(this).hasClass("mail") ){				if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($(this).val()))){					$(this).addClass("error");					set_error = 1;				}			}							});			if (set_error == 1){			$(".error_output").html("Alle rood gemarkeerde velden zijn verplicht");			return false;		}else{			return true;		}	}		var options = {         target	:	'.form_holder',        beforeSubmit: check_fields    };		$('#call_me_contact').ajaxForm(options); 	}
