function addtocart(productid) {
	$.ajax({
		url: base_url+index_page+"/cart/add",
		type: "POST",
		data: "id=" + productid,
		cache: false,
		success: function(html){
			if(html==1)
				jAlert('Item code: ' + productid + ' added to the cart','Your Cart');
			else
				jAlert('Problem adding item to cart','Your Cart');
        	$('#updatecart').load(base_url + index_page + '/place/yourcart');
		}
	});
}

$(document).ready(function() {
	/*
    $('#addtocart1').click(function(e) {
    	$.ajax("http://localhost/cb/index.php/cart/add",
	      { id:'100003' },
	
	      // when the Web server responds to the request
	      function(result) {
	        // if the result is TRUE write a message to the page
        	jAlert(result,'test');
	      }
	    );    	
    });

    function addtocart1(productid) {
    	$.ajax({
			url: "http://localhost/cb/index.php/cart/add",
			type: "POST",
			data: "id=" + productid,
			cache: false,
			success: function(html){
    			jAlert(html,'Your Cart');
			}
		});
    }
    */

});
