No one mention it but hover pseudo event accept in/out handler, so you could toggle class:
$("#foo").hover(function () {
$("#bar").toggleClass("hidden");
});
And as IDs must be unique on document context, no need to pass context, just target element with ID.