/* N.Sepsenwol 
 * noah@delaware.net
 * 2011-04-29
 * 
 * This script moves a list <UL> to a target div as the page loads
 * 1. The source list must have a consitant sourceListID
 * 2. The target div must have a consistant listTargetDiv
 * 3. If the source list does not exist or has no <LI> elements,
 *    the list is not displayer
 * 4. Requires jQuery.js
 */   

// set the ID of the source list to move
// the source list container style='display:none;'
var sourceListID="treePageDetailsPageList";

// set the ID of the target container
var listTargetDiv="joblistings";

$(document).ready(function() {
	// Test that the list exists and contains list elements
	if( $("#" + sourceListID ) && $("#" + sourceListID ).find("li") ){
		
		// append the list to the hidden div
		$( "#" + listTargetDiv ).append($( "#" + sourceListID ));
		
		// turn it on
		$("#" + listTargetDiv).css("display", "block");
		$("#" + sourceListID).css( "display", "block" );
	} else {
		$("#" + listTargetDiv).css("display", "none");
	}	
});

