/***
 * Javascript code to support http://www.zeromtn.com
 * Last updated: 19 Jan, 2010
 * Coded by: Randy Watts
 * Contact Info:
 *      E-mail randywatts@zeromtn.com
 *      Phone 479.646.7757
 ***/	
$(document).ready(function(){	
	
	$("#wrapper").corner("top bottom");
	$("#wrapperWhite #middle-nav").corner("top");
	$(".subhead1").corner("top 8px");
	//$("#google").load("google.html");
	//-------------------------------------------------------
	// PORTAL JS	
	//-------------------------------------------------------
	$(".questions h3:first").addClass("active");
	$(".questions div:not(:first)").hide();
	
	$(".questions h3").click(function(){
		$(this).next("div").slideToggle("slow")
		.siblings("div:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});
	
	$('input:submit').attr('disabled', false);
	
	$inputPOST = $("input[class^='web_input required']");
			
	$inputPOST.each(function(){}).blur(function(){
		var curr = $(this);
		var sib = curr.siblings('.errorlabel');
			
		if(curr.val().length == 0){ 
			sib.text("This is a Required field!");
			curr.addClass("error");
			return false;
		}else if(curr.val().length < 2 ){
			sib.text("Requires more than 2 letters!");
			curr.addClass("error");
			return false;
		}else{
			curr.removeClass("error");
			sib.text("");
			return false;
		}
	})
		
	function clearForm() {
		$("#portalform")[0].reset();
	};


});