// Equal height

if (!window.baseurl) {
	window.baseurl = '';
}

function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	if (tallest > 0) {
	  group.height(tallest);
	}
}

$(document).ready(function(){
	equalHeight($(".equal1"));
	equalHeight($(".equal2"));
});





$(document).ready(function(){

	// Fix heights of columns to match
	
	// Homepage template
	if (($(".match1a").height() + 190) < $(".match1b").height()) {
		$(".match1a").css("height", ($(".match1b").height() - 190));
	}
	
	// Internal page template
	if (($(".match2a").height() + 66) < $(".match2b").height()) {
		$(".match2a").css("height", ($(".match2b").height() - 66));
	}
	


	// Subnav
						   
	$(".nav dd").hover(
		function () {
			$("ul",this).show();
		}, 
		function () {
			$("ul",this).hide();
		}
	);


	//Assign default value to form fields
	$(".qs1 .form-text").attr("value","");
	$(".qs1 .form-text").DefaultValue("Keywords");
	
	
	
	// Skin slect boxes
  jQuery(".qs1 select").select_skin();
	
	
});
