function productPages(catid,pageid,lang) {
	//$("#productcontent").html('<div class="dealercol"><strong>hier komen de producten</strong></div>');

	$.ajax({
		url: "modules/Products/ajax/getProductinfo.php",
		data:	"limit=0&catid="+catid+"&pageid="+pageid+"&lang"+lang,
		type: "POST",
		success: function(data) {
			$("#productcontent").html(data);
		}
	});
	

	return false;
}

function showFB() {
	alert('url');
}



function calcPages(limit,catid,pageid) {
	//$("#productcontent").html('<div class="dealercol"><strong>hier komen de producten</strong></div>');

	$.ajax({
		url: "modules/Products/ajax/getProductinfo.php",
		data: {
				"limit": limit,
				"pageid": pageid,
				"catid": catid
		},
		type: "POST",
		success: function(data) {
			$("#productcontent").html(data);
		}
	});
}

function closeOverlay() {
	$("#productLarge").fadeOut();
	$("#productbg").hide();
	return false;
}

$("#productbg").live("click", function() {
	closeOverlay();
});

function showLarge(pid) {
	$("#productbg").show();
	$("#productLarge").fadeIn(function() {
		
		$.ajax({
			url: "modules/Products/ajax/productdetail.php",
			data: {
					"pid": pid
			},
			type: "POST",
			success: function(data) {
				$("#productLarge").html(data);
			}
		});
	});
	return false;
}

function showZoom(pid) {
	document.getElementById('product_hover'+pid).style.visibility = 'visible';
	document.getElementById('product_hover'+pid).style.display = 'block';
}
function removeZoom(pid) {
	document.getElementById('product_hover'+pid).style.visibility = 'hidden';
	document.getElementById('product_hover'+pid).style.display = 'none';
}

//var showOnce = false;
function showSocial(pid,productcode) {
	//$('#socialmedia_'+pid).fadeIn(function() {
	//if(showOnce) {
		$.ajax({
			url: "modules/Products/ajax/social.php",
			data: {
					"pid": pid,
					"productcode": productcode,
					"show": 1
			},
			type: "POST",
			success: function(data) {
				$('#socialmedia_'+pid).html(data);
				$('#socialmedia_'+pid).show("slide", { direction: "left", distance: "25" });
			}
		});
	//}
	//$('#socialmedia_'+pid).onmouseout(hideSocial(pid));
	//});
}

function hideSocial(pid) {
	//showOnce = true;
	$.ajax({
		url: "modules/Products/ajax/social.php",
		data: {
				"pid": pid,
				"show": 0
		},
		type: "POST",
		success: function(data) {
			$('#socialmedia_'+pid).html(data);
			$('#socialmedia_'+pid).hide("slide", { direction: "left" });
		}
	});
	
}

