$(document).ready(function() {
	$(".lightbox").lightbox();
	$.post('product_information.php', 
			{ productID : $('input[@id=productid]').val(),
			  productTAB : 'inf'},
			function(resposta){
				$("div[@id=tab-main]").html(resposta);
			}
		);
	$("a[@id=inf]").click(function(){
		$.post('product_information.php', 
				{ productID : $('input[@id=productid]').val(),
				  productTAB : 'inf'},
				function(resposta){
					$("div[@id=tab-main]").html(resposta);
				}
			);
	});
	$("a[@id=fea]").click(function(){
		$.post('product_information.php', 
				{ productID : $('input[@id=productid]').val(),
				  productTAB : 'fea'},
				function(resposta){
					$("div[@id=tab-main]").html(resposta);
				}
			);
	});
	$("a[@id=ben]").click(function(){
		$.post('product_information.php', 
				{ productID : $('input[@id=productid]').val(),
				  productTAB : 'ben'},
				function(resposta){
					$("div[@id=tab-main]").html(resposta);
				}
			);
	});
	$("a[@id=app]").click(function(){
		$.post('product_information.php', 
				{ productID : $('input[@id=productid]').val(),
				  productTAB : 'app'},
				function(resposta){
					$("div[@id=tab-main]").html(resposta);
				}
			);
	});
	$("a[@id=dow]").click(function(){
		$.post('product_information.php', 
				{ productID : $('input[@id=productid]').val(),
				  productTAB : 'dow'},
				function(resposta){
					$("div[@id=tab-main]").html(resposta);
				}
			);
	});
	
	$(".spanInfo").slideUp(0);
	$(".infoProduct").click(function() {
		$(this).next("span").slideToggle(0);
	});
	
	$(".imgBuy").click(function(){
		window.location.href = "?location=shoppingCart&productID="+this.id;
	});
});
