Jade.V.type = 2;
$(function () {
    var isSub = false;
    $('.dologin').click(function (e) {
        if (!Jade.V.validForm(Easy.get("theForm"))) {
            return false;
        }
        var vs = {};
        vs.name = $('input[name=name]').val();
        vs.pwd = $('input[name=pwd]').val();
        $('.dologin').val("登录中...");
        if (isSub) return false;
        isSub = true;
        var url = "";
        Jade.ajax('User+', 'Login', vs, function (d) {
            isBool = true;
            $('.dologin').val("登录");
            isSub = false;
            if (d && !d.exception) {
                if (Easy.get("remMe")) {
                    if (Easy.get("remMe").checked) {
                        Jade.setCookie("username", vs.name);
                    }
                }
                back = Jade.request('back');
                if (back) {
                    url = decodeURI(back);
                } else {
                    url = "/infocontent/Index.aspx";
                }
                location = url;
            } else {
                Jade.V.make($("input[name='" + d.id + "']")[0], d.message);

            }
        });
        return false;
    });
    if (Jade.getCookie("username")) {
        $('input[name=name]').val(Jade.getCookie("username"));
        if (Easy.get("remMe")) {
            Easy.get("remMe").checked = true;
        }
    }
});