// JavaScript Document
	function recalc(){
		jQuery("[id^=total_item]").calc(
			// the equation to use for the calculation
			"qty * price",
			// define the variables used in the equation, these can be a jQuery object
			{
				qty: jQuery("input[name^=qty_item_]"),
				price: jQuery("[id^=price_item_]")
			},
			// define the formatting callback, the results of the calculation are passed to this function
			function (s){
				// return the number as a dollar amount
				return "$" + s.toFixed(2);
			},
			// define the finish callback, this runs after the calculation has been complete
			function ($this){
				// sum the total of the $("[id^=total_item]") selector
				var sum = $this.sum();
				
				jQuery("#grandTotal").val( "$" + sum.toFixed(2) );
			}
		);
		jQuery("input[name^=total_item]").sum("keyup", "#grandTotal");	
	};
	
	jQuery("document").ready(function() { 
		// bind the recalc function to the quantity fields
		jQuery("input[name^=qty_item_]").bind("keyup", recalc);

/*		jQuery("input[name=pict]").click(function(){
			if (jQuery("input[name=pict]").is(":checked")) {
				jQuery("input[name=qty_item_4]").val("1");
			}
			else {	   
				jQuery("input[name=qty_item_4]").val("0");
			}
			recalc();
		});	*/


//	Hide fake radio button, badge qty/label and extend width of "Can't Attend, but want badge(s)" field
		jQuery("input[id=no_shoot-3]").css("display","none");		//	Fake radio button for default selection
		jQuery("input[name=qty_item_5]").css("display","none");		//	Badge Qty
		jQuery("#label--4").css("display","none");					//	Badge Qty label
		jQuery("#label--32").find("span").css("width","200px");


		jQuery("input[id=no_shoot-1]").click(function(){
			if (jQuery("input[id=no_shoot-1]").is(":checked")) {
//alert("Attending");
				jQuery("input[name=qty_item_5]").css("display","none");		//	Badge Qty

				jQuery(".cf-fs2").css("display","block");	//	Camping
				jQuery(".cf-fs3").css("display","block");	//	Shoot Info
				jQuery(".cf-fs4").css("display","block");	//	Fees
				jQuery(".cf-fs5").css("display","block");	//	Donations
				jQuery("input[name=qty_item_5]").val("0");	//	Badge Qty
				jQuery("input[name=total_item_5]").val("");	//	Badge Total

				jQuery("#li--10").css("display","inline-block");		//	Field 10 - Class1
				jQuery("#li--15").css("display","inline-block");		//	Field 15 - Class2

//"$" + s.toFixed(2)
				jQuery("input[name=grandTotal]").val("0");
//				jQuery("#label--13").css("display","none");	//	Badge Qty label
				jQuery("#label--4").css("display","none");					//	Badge Qty label
			}
		});	

		jQuery("input[id=no_shoot-2]").click(function(){
			if (jQuery("input[id=no_shoot-2]").is(":checked")) {
//alert("Can't Attend");
				jQuery("input[name=qty_item_5]").css("display","inline-block");	//	Badge Qty
				jQuery("#label--4").css("display","inline-block");	//	Badge Qty label

				jQuery("#li--10").css("display","none");		//	Field 10 - Class1
				jQuery("#li--15").css("display","none");		//	Field 15 - Class2

				jQuery(".cf-fs2").css("display","none");	//	Camping
				jQuery(".cf-fs3").css("display","none");	//	Shoot Info
				jQuery(".cf-fs4").css("display","none");	//	Fees
				jQuery(".cf-fs5").css("display","none");	//	Donations
			}
		});				
	});	