$(document).ready(function(){
    /*nav*/
    $("#nav li:first-child").css("background", "none");
    $("#nav li:last-child").css("background", "none");
    
    $("#gameguide").mouseover(function(){
        $(this).css("background", "url(/user/img/navlihoverbg.gif) no-repeat");
        $("#subguide").css("display", "block");
    }).mouseout(function(){
        $(this).css("background", "url(/user/img/navlibg.gif) no-repeat");
        $("#subguide").css("display", "none");
    });
    
    $("#servicecenter").mouseover(function(){
        $(this).css("background", "url(/user/img/navlihoverbg.gif) no-repeat");
        $("#subservice").css("display", "block");
    }).mouseout(function(){
        $(this).css("background", "url(/user/img/navlibg.gif) no-repeat");
        $("#subservice").css("display", "none");
    });
    
    $("#playercenter").mouseover(function(){
        $(this).css("background", "url(/user/img/navlihoverbg.gif) no-repeat");
        $("#subplayer").css("display", "block");
    }).mouseout(function(){
        $(this).css("background", "url(/user/img/navlibg.gif) no-repeat");
        $("#subplayer").css("display", "none");
    });
    
    $(".subnav li:first-child").css({
        "background": "url(/user/img/subnavleftbg.gif) no-repeat",
        "width": "80px",
        "height": "35px"
    });
    $(".subnav li:last-child").css({
        "background": "url(/user/img/subnavrightbg.gif) no-repeat top left"
    });
    /*treasuretip*/
    $(".tips").mousemove(function(e){
        $("#tipbox").css("visibility", "visible");
        $("#tipbox").css("top", e.pageY + 15);
        $("#tipbox").css("left", e.pageX);
        var rr = this;
        if (rr.title) {
            rr.rain = rr.title;
            rr.title = "";
        }
        $("#tipbox").html(rr.rain);
    }).mouseout(function(){
        $("#tipbox").css("visibility", "hidden");
    });
    
    
    /*tab*/
    /* newsnoticetab*/
    $("#newstitle").mouseover(function(){
        $(this).css("background", "url(/user/img/columntitlehoverbg.jpg) no-repeat bottom center");
        $(this).css("color", "#e45314");
        $("#newsul").css("display","block");
        $("#noticeul").css("display", "none");
        $("#noticetitle").css("background", "url(/user/img/columntitlebg.jpg) no-repeat bottom center");
        $("#noticetitle").css("color", "#403000");
    });
    $("#noticetitle").mouseover(function(){
        $(this).css("background", "url(/user/img/columntitlehoverbg.jpg) no-repeat bottom center");
        $(this).css("color", "#e45314");
        $("#noticeul").css("display", "block");
        $("#newsul").css("display", "none");
        $("#newstitle").css("background", "url(/user/img/columntitlebg.jpg) no-repeat bottom center");
        $("#newstitle").css("color", "#403000");
    });
    /* s1 s0 tab*/

    /*tab*/
    
    $("#playertoptitle1").mouseover(function(){
        $(this).css({
            "background": "url(/user/img/columntitlehoverbg.jpg) no-repeat bottom center",
            "color": "#e45314"
        });
        $("#playertoptitle2").css({
            "background": "url(/user/img/columntitlebg.jpg) no-repeat bottom center",
            "color": "#403000"
        });
        $("#playertoptitle3").css({
            "background": "url(/user/img/columntitlebg.jpg) no-repeat bottom center",
            "color": "#403000"
        });
        $("#taste").css("display", "block");
        $("#communication").css("display", "none");
        $("#strategy").css("display", "none");
    });
    $("#playertoptitle2").mouseover(function(){
        $(this).css({
            "background": "url(/user/img/columntitlehoverbg.jpg) no-repeat bottom center",
            "color": "#e45314"
        });
        $("#playertoptitle1").css({
            "background": "url(/user/img/columntitlebg.jpg) no-repeat bottom center",
            "color": "#403000"
        });
        $("#playertoptitle3").css({
            "background": "url(/user/img/columntitlebg.jpg) no-repeat bottom center",
            "color": "#403000"
        });
        $("#taste").css("display", "none");
        $("#communication").css("display", "block");
        $("#strategy").css("display", "none");
    });
    $("#playertoptitle3").mouseover(function(){
        $(this).css({
            "background": "url(/user/img/columntitlehoverbg.jpg) no-repeat bottom center",
            "color": "#e45314"
        });
        $("#playertoptitle1").css({
            "background": "url(/user/img/columntitlebg.jpg) no-repeat bottom center",
            "color": "#403000"
        });
        $("#playertoptitle2").css({
            "background": "url(/user/img/columntitlebg.jpg) no-repeat bottom center",
            "color": "#403000"
        });
        $("#taste").css("display", "none");
        $("#communication").css("display", "none");
        $("#strategy").css("display", "block");
    });
    /*tab*/

});
