﻿/*$(document).ready(function () {
    $("#nav-one li").hover(
    function () {
        $("ul", this).fadeIn("fast");
    },
    function () {
        $("ul", this).fadeOut("fast");
    }
    );
});

$(document).ready(function () {
    $("#quienParent").hover(
    function () {
        $("#quienChild").fadeIn("fast");
    },
    function () {
        $("#quienChild").fadeOut("fast");
    });
});*/


function appear(parent,child) 
{
    $(parent).hover(
        function () {
            $(child).fadeIn("fast");
        },
        function () {
            $(child).fadeOut("fast");
        });
    } 
function disappear(parent,child, grandChild) 
{
    $(parent).hover(
        function () {
            $(child).fadeIn("fast");
        },
        function () {
            $(grandChild).fadeOut("fast");
            $(child).fadeOut("fast");
            
        });
    }    

function lowLevel(parent,child)
{
    $(parent).mouseover(function () {
       $(child).fadeIn("fast");
    });
}


$(document).ready(function () {
    appear("#quienParent", "#quienChild");
    appear("#redParent", "#redChild");
    appear("#recursosParent", "#recursosChild");
    appear("#novedadesParent", "#novedadesChild");
    appear("#apoyanosParent", "#apoyanosChild");
    disappear("#queParent", "#queChild", "#programChild");
    lowLevel("#programParent", "#programChild");

});
