$(function() {  
	$(".removelink").click(function() {
		var sizeid = $(this).attr("name");
		var dataString = "sizeid=" + sizeid;
		//alert(dataString);
	  	 $.ajax({
		      type: "POST",
		      url: "bin/process_removefrombasket.php",
		      dataType: 'json',
		      data: dataString,
		      success: function(data) {
		      	$.each(data, function(key, value) {
		      		//alert("key is " + key + " and value is " + value);
		      		if (key == "grandtotal") {
		      			$('#grandtotal').html(value);
		      		} else if (key == "cartcount"){
		      			$('#cart').html("<a href='cart.php'>My Cart: ("+jQuery.trim(value)+")</a>");
      				}
		      	});
		      	$("#"+sizeid).remove();
		      }
     	});
	});
     return false;
 	
});


