jQuery(document).ready(function() {
							
								
	showhideCheckoutInfo()							
								
});			


function showhideCheckoutInfo()
{
		
		jQuery("#wpsc_shopping_cart_container").css({"visibility":"hidden"});
		jQuery("#shippingmessage").show();
		jQuery("#wpsc_submit_zipcode").click(function(){//amend form value
			jQuery("#calculate").val("set");				
		});
	var strErrors;	
	var bolError = "false";
	jQuery(".validation-error").each(function(){
		strErrors = jQuery(this).html();
		if (strErrors.length>1)
		{
			bolError = "true";
		}
		
	});	
	if (jQuery("#calculate").val()=="set" || bolError == "true")
	
	{//they've selected a state, form shown by default as page reloads, so just disable country/state boxes in form. If user wants to reset, they must recalculate shipping price
		jQuery(".current_region").attr("disabled","disabled");
		jQuery("#shippingmessage").hide();
		jQuery("#wpsc_shopping_cart_container").css({"visibility":"visible"}).fadeIn();
	}	
	
}	
			