$(document).ready(
    function() {
        $('div.nav').each(
            function() {
                $(this).bind('mouseover', function(e) {
                    $(this).children('.subnav').bind('mouseout', 
                        function() { $(this).hide(); }).bind('mouseover', function(){ $(this).show(); }).show();
                    });
                }
        );
    }
);


