This will take 'sub-menu' items and put them in the #outersidebar. If there is no 'sub-menu' items it will hide the #outersidebar (no CSS styling)
<script>
$(window).bind("load", function(){
$( "#menu .parent.current ul" ).clone().prependTo( "#outerSidebar" );
//if length > 0 it means that element is on the page
if($("#outerSidebar li").length < 1){
$("#outerSidebar").hide();
}
});
</script>