function default_get_info(){
    $.post("/main.php", {a:"user.info"}, function(s_data){
        var a_in = s_data.split(":");
        if (a_in.length != 4) {
            return;
        }
        if (a_in[0] != "0") {
            $("#update_messages").html("<i>(" + a_in[0] + ")</i>");
        } else {
            $("#update_messages").html("");
        }
        if (a_in[1] != "0") {
            $("#update_forum").html("<i>(" + a_in[1] + ")</i>");
        } else {
            $("#update_forum").html("");
        }
        if (a_in[2] != "0") {
            $("#update_friends").html("<i>(" + a_in[2] + ")</i> ");
        } else {
            $("#update_friends").html("");
        }
        if (a_in[3] != "0") {
            $(".update_comments").html("<i>(" + a_in[3] + ")</i> ");
        } else {
            $(".update_comments").html("");
        }
        setTimeout('default_get_info();', 30000);
    });
}

function set_email_verify(){
    $.post("/main.php?a=user.validate_email", {}, function(s_data){
        $("#home_validate_email").html("Confirmation mail has been sent. Please check your inbox.");
    });
}

function submit_forgot_password(){
    var s_email = $("#login_forgot_password").attr("value");
    if (s_email == "e-mail address") {
        return;
    }
    $("#loginform_retrieve").html('<div class="headertext">Processing...</div>');
    $.post("/main.php?a=user.forgotpassword", {email:s_email}, function(s_data){
        var s_html = '';
        switch (s_data) {
        case 'ok':
            s_html = "Your password has been e-mailed to you";
            break;
        default:
            s_html = "Your e-mail address is unknown";
            break;
        }
        $("#loginform_retrieve").html('<div class="headertext">' + s_html + ' - ' + s_link + '</div>');
    });
}
$(function(){
  if ($.browser.msie && $.browser.version.substr(0, 1) == 6) {
      $("ul.sf-menu").superfish({delay:100, animation:{opacity:'show'}, speed:'fast'});
  }
});
