If you have jQuery code like this:
if (condition) { $element.show(); } else { $element.hide(); }
... you can shorten this to:
$element.toggle(condition);