/* This script by $criptMaster B — Duall © 2009 */
/* JQuery 1.3.2 needed */
/* www.duall.be */

$(document).ready(function() {
	LXproductsPopUp();
	LXpopUp();
});


function LXproductsPopUp() {
//	$("img.prodpic").wrap("<a></a>").parent("a").attr("href","#").addClass("prodtxtOpen");
	$("div.extrainfo h3").wrapInner("<a></a>").children("a").attr("href","#").addClass("prodtxtOpen");
	
	$("div.prodtxt").append("<a href='#' class='prodtxtClose'>&times;</a>");
	$("div.prodtxt").hide();
	$("div.prodtxt").prepend("<h4></h4>");
	
	$("a.prodtxtOpen").click(function(){
		scroll(0,0);
		var titel = $(this).parents("div.extrainfo").children("h3").text();
		$("div.prodtxt h4").text(titel);
		$("div.prodtxt:visible").hide();
		$(this).parents("div.extrainfo").children("div.prodtxt").show();
//		$(this).parents("div.extrainfo").children("div.prodtxt").fadeIn("fast");
		return false;
	});
	
	$("a.prodtxtClose").click(function(){
		$(this).parent().fadeOut();
		return false;
	});

}

function LXpopUp() {

	$("div.poptxt").hide();
	
	$("a.popUp").click(function(){
		scroll(0,0);
		$("div.poptxt:visible").fadeOut();
		$("div#popup_" + $(this).attr('rel')).fadeIn("fast");
		return false;
	});
	
	$("a.popClose").click(function(){
		$(this).parent().fadeOut();
		return false;
	});

}