var member={init:function(){$("#login_box>div").hide();if($.cookie(COOKIE_PRE+"auth")){$("#logined").show();var a=$.cookie(COOKIE_PRE+"username");a||(a=$.cookie(COOKIE_PRE+"rememberusername"));$("#username_show, span.username_show").html(a);return true}else $("#login_form").show()},login:function(){var a=$("#username").val(),b=$("#password").val();if(a==""){alert("\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a");return false}if(b==""){alert("\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a");return false}$("#member_login").submit()},
logout:function(){$.getJSON(APP_URL+"?app=member&controller=index&action=ajaxlogout&jsoncallback=?",function(a){if(a.state){$("#login_box>div").hide();$("#login_form").show()}else alert(a.error)})}};
