//友情链接
	function url_jump(obj){
		location.href = obj.value;
	}
$(document).ready(function(){
	jQuery("a[rel*=facebox]").facebox();
		
	//登录检测
	$("#login input[type=radio]").click(function(){
		if($(this).attr("id") == "radio1"){
			$("#login_teacher").hide();
			$("#login_student").show();
		}else if($(this).attr("id") == "radio2"){
			$("#login_student").hide();
			$("#login_teacher").show();
		}
	});
	$("#myform").submit(function(){
		var stu_username = $("#stu_username").val();
		var stu_password = $("#stu_password").val();
		var tea_username = $("#tea_username").val();
		var tea_password = $("#tea_password").val();
		if($("#radio1").attr("checked") == true){
			if(!stu_username || !stu_password){
				alert("学号和密码不能为空！");
				return (false);
			}
			var reg = /^\d+(\.\d+)?$/;
			if(!reg.test(stu_username)){
				alert("学号只能是数字组！");
				return false;
			}else if(stu_username.length != 14){
				alert("学号只能是14位！");
				return false;
			}
		}else if($("#radio2").attr("checked") == true){
			if(!tea_username || !tea_password){
				alert("帐号和密码不能为空！");
				return (false);
			}
		}
	});
	//////////////end//////////////////
	
	
});
