
	function init()
	{
		cart_status();
                /* console.log('update'); */
	}

	function ajax_spinner()
	{
		return '<img src="'+app_assets_url+'template/images/ajax-loader.gif" />';
	}
		
/* cart */

	function show_response(msg)
	{
		$('#response').stop(true,true).html(msg).fadeIn().delay(3000).fadeOut();
	}

	function cart_status()
	{
		$('#cart').html(ajax_spinner());
		$.post(site_url+'shop/status',function(data){
			$('#cart').html(data);
		})
	}
	function clear_cart()
	{
		var n = you_sure();
		if(n)
			$.post(site_url+'shop/clear',function(data){
				$('#cart').html(data);
			});
		return false;
	}


/* you sure */

	function you_sure()
	{

		var check = confirm('Click OK to confirm');
		if(check)
		{
			return true;
		}
		else
		{
			return false;
		}

	}	


