$(document).ready(function(){
	// Add classes to input pseudotypes
	$("input[type='text'], input[type='password']").addClass("text");
	$("input[type='text'], input[type='password']").focus(function(){	$(this).addClass("text-focus");	});
	$("input[type='text'], input[type='password']").blur(function(){	$(this).removeClass("text-focus");	});
	$("input[type='button'], input[type='submit'], input[type='checkbox'], input[type='image'], input[type='radio'], input[type='reset'], button").addClass("nontext");
	$("input[type='button'], input[type='submit'], input[type='reset'], button").addClass("button");
	
	// Buy Carbon Offsets
	$("div.stepTwo, div.stepThree").css("opacity",.2);
	$("a.thickbox").click(function () { 
		$("div.stepTwo").css("opacity",1.0);
		return false;
	});
	$("a.calculate").click(function () { 
		var carbonPounds = parseFloat( $("#pounds").val() );
		var offsetCost = ( carbonPounds / 2204.6 ) * 15;
		$("#amount").each(function(){
			$(this).val(offsetCost);
			$(this).val(parseFloat($(this).val()).toFixed(2));
			$("div.stepThree").css("opacity",1.0);
		});
		return false;
	});
});