// JavaScript Document
$(document).ready(function(){// This wrapper function is used to isolate all functions until the DOM is ready.
	var f = $("#cartForm")[0];
	var a = $("#action")[0];
	
	$("#cartBackButton").click(function(){
		history.back();
	 });
	
	$("#cartEmptyButton").click(function(){
		// document.location = "cart.actions.php?action=empty";
		a.value = "empty";
		f.submit();
	 });
	
	$("#cartUpdateButton").click(function(){
		a.value = "update";
		f.submit();
	 });
	
	$("#cartCheckoutButton").click(function(){
		a.value = "checkout";
		f.submit();
	 });

	$("#cartCheckoutButton_pre").click(function(){
		a.value = "pre_checkout";
		f.submit();
	 });

});