(function($){
	var defaults={
	};
	$.fn.getVnum = function(){
		
		var self = $(this);
		var time = 0;
		self.bind("click",function(){
            var kind = $("#kind").val();
			var telno = $("#new_login_name").val();
			var security_key = $("#security_key").val();
			var yztelno = $("#yztelno").val();
			if(time == 0)
			{
				
				//var partten = /^1[0-9]{10}$/;
	            var partten = /^13[0-9]{9}|17[0-9]{9}|15[012356789][0-9]{8}|18[012356789][0-9]{8}|147[0-9]{8}$/;//手机号码

				if(partten.test(telno))
				{
                    $("#new_login_error").parent().hide();
					$.post('http://user.house365.com/register/getyzm',{act:'getyzm',telno:telno,kind:kind,yztelno:yztelno,security_key:security_key},
						function(data){
							if(data == '1'){
								time = 60;
								var oTime = null;
								$("#getcode").val('重新获取('+time+')');
								$("#getcode").addClass("get_code_none");
								oTime = setInterval(function(){if(time>0){time--;$("#getcode").val('重新获取('+time+')');}else{clearInterval(oTime);$("#getcode").val('获取验证码');$("#getcode").removeClass("get_code_none");$('#sendingnote').hide();}} ,1000);
							}
						}
					);
				}
				else
				{
						$("#new_login_error").text("请正确填写手机号");
						errorCom("new_login_name");
				}
			}
		})
	}
})(jQuery);