$(document).ready(function(){
    $("#nav .sub").hide();
    $("#nav .sub").css("position", "absolute");
    $("#nav .sub li").css("background-color", "#E8CECF");
    $("#nav ul li").mouseover(function(a){
        if ($(this).children("ul") != null && $(this).children("ul") != []) {
            $("#nav .sub").hide();
            var position = $(this).position();
            var left = position.left + $(this).outerWidth();
            var top = position.top;
            $(this).children("ul").css("top", parseFloat(top));
            $(this).children("ul").css("left", parseFloat(left));
            $(this).children("ul").show();
        }
    });
    $("#nav .sub").mouseout(function(){
        $("#nav .sub").hide();
    });
    $("#nav .sub").blur(function(){
        $("#nav .sub").hide();
    });
    
    
    /*
     $("#nav li a:not(a:link").hover(function(){
     $(this).addClass("navHover");
     }, function(){
     $(this).removeClass("navHover");
     });
     */
});
