//底部二手房分站显示
$(function(){
	$("#show_fen_sell").bind("mouseover",function(){
		$("#fen_sell_tc").show();
	}).bind("mouseout",function(){
		$("#fen_sell_tc").hide();
	});
	$("#fen_sell_tc").bind("mouseover",function(){
		$(this).show();
	}).bind("mouseout",function(){
		$(this).hide();
	});
	$("#show_fen_rent").bind("mouseover",function(){
		$("#fen_rent_tc").show();
	}).bind("mouseout",function(){
		$("#fen_rent_tc").hide();
	});
	$("#fen_rent_tc").bind("mouseover",function(){
		$(this).show();
	}).bind("mouseout",function(){
		$(this).hide();
	});

}); 




$(function(){

		$(".jsTextInput").focus(function(){
			$(this).prev(".labelT").hide()
		}).blur(function(){
			if($(this).val() == "")
				$(this).prev(".labelT").show();
		});
		
		
		
		
         var query = $("#area_add").serialize();        
		 $("#jsFindForm").validate({
			 
			 						errorPlacement:function(error,element)
									{
											error.appendTo(element.parents(".divP").siblings(".textFgErroy"));
											
									},
										
									submitHandler: function(form){
			 							var tel = $('.tel').html();
										$(form).ajaxSubmit({											
												type: 'get',
												url: '/ajax/find_pasword/',
												data: query,
												dataType: 'html',
												success: function(msg) {
													if (msg == 1) {
														$("#text_message").css("color","red").text("您的资料中没有填写手机号，请和365客服人员联系。租售宝用户拨打"+tel);
													} else if (msg == 2) {
														$("#text_message").css("color","red").text("您的联系电话与资料中的手机号码不符或没留下正确的手机号码，请和365客服人员联系。租售宝用户拨打"+tel);
													} else if (msg == 3) {
														$("#text_message").css("color","red").text("每天最多能获得3次验证码，未收到短信，请和365客服人员联系。租售宝用户拨打"+tel);
													} else if (msg ==4){
														location.href = '/login/findpw_code/';
													}
												}											
                   
                                        });
                                             
                                    },  
									rules: {
										
											 loginAccount: {
														required: true
											 },
											 mobilePhone: {
												 		digits:true,
														required: true,
														minlength: 11,
														maxlength: 11
													
											 }
									},
									messages: {
											
											 loginAccount: {
														required: "请输入登录账号"
											 },
											 mobilePhone: {
														required: "请输入手机号码",
														minlength: "手机号码最少11位",
														maxlength: "手机号码最多11位",
														digits: "请正确填写手机号码"
											 }
								 }
			});
			
			
			
			 $("#jsFindForm02").validate({
			 
			 						errorPlacement:function(error,element)
									{
											error.appendTo(element.parents(".divP").siblings(".textFgErroy"))
									},
									rules: {
										
											 code: {
														required: true
											 }
									},
									messages: {
											
											 code: {
														required: "请输入验证码"
											 }
								 }
			});


})

