/* jQuery("#products .product").click(productClick);
jQuery("#products .product").click(function(){
	$(this).css("back...","");
});





function productClick(){
	alert("hej");
	
	$("#general .products .column A").click(function() {
	
} */

$(document).ready(function(){
  $(".link").click(function() {
		var link = $(this);
		$(".productDialog").remove();
        $("<div class=\"productDialog\"></div>")
            .load("lightbox.aspx", { file: link.attr("file"), title: link.attr("title"), content: link.attr("content") }, function() { 
				
                $(this).dialog({
                    modal: true,
                    overlay: {
                        opacity: 0.5,
                        background: "#000"
                    },
                    resizable: false,
                    draggable: false,
                    width: 423, /* 405+18 590 + 18 */
                    height: 588 /* 470 + 18 */,
                    title: null
                });
                prepareBackgroundPNG();
                
                if(link.is("[file$='.mov']")){
					$("#lightboxFile").flash({
						src: "files/Flash/moviePlayer.swf",
						width: 350,
						height: 350,
						flashvars: { movieURL: link.attr("file") },
						wmode: "transparent"
						}, 
						{ version: 9 }
					);
					
				}
				
				else if(link.is("[file$='.mp3']")){
					$("#lightboxFile").flash({
						src: "files/Flash/mp3Player.swf",
						width: 350,
						height: 10,
						flashvars: { movieURL: "files/Flash/" + link.attr("file") },
						wmode: "transparent"
						}, 
						{ version: 9 }
					);
					
				}
				
				else if(link.is("[file$='.jpg']"))
				{
					$("#lightboxFile").append("<img src=\"" + link.attr("file") + "\">");
				}
				
				else
				{
					$("#lightboxFile").append(link.attr("file"));
				}
                /*$(".close IMG", this).ifixpng();*/
            });
        return false;
    });
});

