Ještě doplním, úplně korektně se to chová s css:
<style>
#menu {
width: 500px;
}
.menu_master:hover + .menu_master_show {
display: block;
}
.menu_master_show:hover {
display: block;
}
.menu_master:not(:hover) ~ .menu_slave_show {
display: block;
}
.menu_slave_show:hover {
display: block;
}
.menu_master_show:hover ~ .menu_slave_show {
display: none;
}
.menu_master {
background:green;
width: 100px;
float: left;
}
.menu_slave {
background: red;
width: 100px;
float:left;
}
.menu_master_show {
background:purple;
width: 300px;
float:left;
display: none;
}
.menu_slave_show {
background: yellow;
width: 300px;
float:left;
display: none;
}
</style>