$("#Adicionar").click(function(){
	SERIAL = $(this).attr("name");
	car_atual = $("#carrinho_atual",window.parent.document).attr("name");
	car_atual++;
	$("#carrinho_atual",window.parent.document).attr("name",car_atual);
	$.post("http://www.bellbusca.com.br/ajax/venda_produto/",{ gravar:1,PRO_SERIAL:SERIAL });
		car_atual = "<label>"+car_atual+"</label><img src='http://www.bellbusca.com.br/img/carrinho.gif' name='meucarrinho' alt='carrinho' />";
	$("#carrinho_atual",window.parent.document).html(car_atual);
	window.location = "http://www.bellbusca.com.br/venda_produto/";
});

$(".pesAdicionar").click(function(){
	SERIAL = $(this).attr("name");
	car_atual = $("#carrinho_atual",window.parent.document).attr("name");
	car_atual++;
	$("#carrinho_atual",window.parent.document).attr("name",car_atual);
	$.post("http://www.bellbusca.com.br/ajax/venda_produto/",{ gravar:1,PRO_SERIAL:SERIAL });
		car_atual = "<label>"+car_atual+"</label><img src='http://www.bellbusca.com.br/img/carrinho.gif' name='meucarrinho' alt='carrinho' />";
	$("#carrinho_atual",window.parent.document).html(car_atual);
});
	
	$(".excluir").click(function(){
		SERIAL = $(this).attr("name");
		$.post("http://www.bellbusca.com.br/ajax/venda_produto/",{ gravar:2, PRO_SERIAL:SERIAL },function(data){
			$("#esquerdocar").html(data);
		});
		return false;
	});
	
	$("#fechar").click(function(){
		$("#resultado").hide();
	});
	
	$(".quantidade").click(function(){
		return false;								
	})

	$(".quantidade").blur(function(){
		PANID = $(this).attr("name");
		$.post("http://www.bellbusca.com.br/ajax/venda_produto/",{ gravar:1,PAN_ID: PANID,QTDE:$(this).val() },function(data){
			$("#esquerdocar").html(data);
		});								
	})
	
	$("#recalcular").click(function(){
		window.location = "http://www.bellbusca.com.br/venda_produto/";							
	});
	
	$("#finalizar").click(function(){
		window.location = "http://www.bellbusca.com.br/login/"
	});
