$(document).ready(function(){
	$("#refreshimg").click(function(){
		$.post(s_domain + 'captcha/captcha.php');
		var timeStamp = Math.round(new Date().getTime()/1000);
		$("#captchasrc").attr('src', s_domain + 'captcha/images/image.php?' + timeStamp);
		return false;
	});

	$("#contactform").validate({
		rules: {
			captcha: {
				required: true,
				remote: s_domain + 'captcha/process.php'
			}
		},
		messages: {
			captcha: captcha_error	
		},
		success: function(label) {
			label.addClass("valid").text(captcha_valid)
		},
		onkeyup: false
	});
});
