function addToBasket(){
	// Get variables
	var productsize = $('#buy_size').val();
	var quantity = $('#buy_quantity').val();
		
	// Make AJAX call, passing the resulting HTML and the relevant productsize to the callback function
	var url = '/ajax/basket.php?productsize='+productsize+'&quantity='+quantity;
	$.get(url, function(data){ updateBasket(data, productsize) });
	
	// Don't proceed with form submit
	return false;
}

function updateBasket(innerhtml, productsize){
	// Get HTML for entire basket and display it
	$('#mini_basket_contents').html(innerhtml);

	// Now hide and then gracefully slide in the product we have just updated
	$('#productsize_id\\:'+productsize).hide().fadeIn(2000);
}

function emptyBasket(){
	// Make AJAX call, and then reload the page
	var url = '/ajax/basket.php?action=empty';
	$.get(url, function(data){ location.reload() });
}