$(document).ready(function(){
	// Reset z-index for ul uls
	$("#header ul ul").css('z-index','100');

	// Set up multi-level nav
	$('#nav-wrapper li').hover(
		function(e) {
			$(this).children('ul').show();
		},
		function(e) {
			$(this).children('ul').hide();
		}
	);

/*
	$('#nav-wrapper').hover(
		function(e) {
			$('#header').css('z-index','-1');
		},
		function(e){
			$('#header').css('z-index','1');
		}
	);
*/

	// Now hide all the subnavs
	$('#header ul ul').hide();

	// Assign css width/height to specially classed elements
	$("div[class*='jq-width-']").each(function(){
		var dim_data = $(this).attr('class').match(/jq\-width\-(\d+)/);
		$(this).css('width',dim_data[1]+'px');
	});
	
	// Assign css width/height to specially classed elements
	$("div[class*='jq-height-']").each(function(){
		var dim_data = $(this).attr('class').match(/jq\-height\-(\d+)/);
		$(this).css('height',dim_data[1]+'px');
	});
	
	// Required input fields
	$('input.req').siblings('label').append(" <span style='color:red'>(required)</span>");

});