﻿$(document).ready(function() {
    $(".li-header").each(function() {
        $(this).hover(function() {
            $(this).find("a:first").css("background", "url(../Images/m/fkmallbg.png)");
            $(this).find("a:first").css("background-repeat", "no-repeat");
//            $(this).find("a:first").css("color", "white");
            var obj = $(this).offset();
            $(".m-node", this).css("top", obj.top+66);
            $(".m-node", this).css("left", obj.left+3);

//            if ($(this).find(".m-node").length > 0) {
//                $(this).height(60);
//            }
//            else {
//                $(this).height(46);
//            }
            $(".m-node", this).show();
        },
        function() {
            $(".m-node", this).css("display", "");
//            $(this).find("a:first").css("color", "#daab44");
            $(this).find("a:first").css("background", "none");
            $(this).css("background-color", "#faf1d1");
//            $(this).height(46);
            $(".m-node", this).hide();
        }
        );
    });
    $(".m-node_content a").hover(function() {
        $(this).css("color", "#ec651a");
    },
    function() {
        $(this).css("color", "black");
    }
    );
        $("#divfmall").hover(function(){
        var offset=$(this).offset();
        var top=offset.top;
        var left=offset.left;
        $("#divmall").css("top",top+66);
        $("#divmall").css("left",left-566);
        $("#divmall").show();
        $(this).find("a").css("background","url(../CSS/maincss/images/fkmallbg.png) no-repeat");
    },
    function(){
    $("#divmall").hide();
    $("#divfmall").find("a").css("background","");
    });
$("#divmall").hover(function(){
       $(this).show();
        $("#divfmall").find("a").css("background","url(../CSS/maincss/images/fkmallbg.png) no-repeat");
    },
    function(){
    $(this).hide();
    $("#divfmall").find("a").css("background","");
    }
    );
});
