jQuery.noConflict();

jQuery(document).ready(function(){

	jQuery("a[rel*=lightbox]").fancybox();

/*
	ArticleInfo();

	jQuery(".Close").live("click",function(){
	
		jQuery(".PT_ArtikelInfo .Wrap").html("");
		jQuery(".PT_ArtikelInfo").hide();
	})
*/

});


ArticleInfo = function(){

	
	
	jQuery(".ArticleInfo").click(function(e){
	
		jQuery(".PT_ArtikelInfo .Wrap").html("");
	
		var x = jQuery(this).attr("id");
		thisId = new Array();
		thisId = x.split('_');
		var viewportWidth = jQuery(window).width();
		var viewportHeight = window.innerHeight ? window.innerHeight : jQuery(window).height();
		var artnr = jQuery("#Artnr_" + thisId[1] + ">a").html();
		jQuery(".PT_ArtikelInfo").css("top","210px");
		jQuery(".PT_ArtikelInfo").css("left",((viewportWidth-610)/2));
		jQuery(".PT_ArtikelInfo").show("fast");
		jQuery(".PT_ArtikelInfo").css("background","#ffffff url(/bilder/ibutik-a/loading.gif) no-repeat center center");
		jQuery(".PT_ArtikelInfo .Wrap").load("/cgi-bin/ibutik/AIR_ibutik.pl?funk=visa_artikel&Ajax=J&artnr=" + artnr,function(){			
			jQuery(".PT_ArtikelInfo").css("background-image","none");
			return false;
		});
		return false;	
	})
	
	

}


/* jQuery(".ArticleInfo").click(function(e){
	
	
/*jQuery.ajax({ type: "GET", url: "/cgi-bin/ibutik/API.pl?funk=artikelinfo_ny&retur=xml&Artnr=" + artnr,dataType: "xml", success: function(xml){
		
				jQuery(xml).find("artikel").each(function(){
				
					var beskr = jQuery("Beskr", this).text();
					var varum = jQuery("Varumarke", this).text();
					var pris =  jQuery("Pris", this).text();
					var bild = jQuery("Bild", this).text();
					var Text_Kort = jQuery("Text_Kort", this).text();					
					var Text = jQuery("Text", this).text();					
					var Merinfo = jQuery("Merinfo", this).text();
					
					var html = "<div class=\"Wrap\">";
					html += "<span class=\"Close\"></span>";
					html += "<div class=\"Image\"><img src=\"" + bild + "\" alt=\"" + beskr + "\"></div>";
					html += "<div class=\"Info\">";
					html += "<h2 class=\"VarumarkesFalt\">" + varum + "</h2>";
					html += "<h1 id=\"ArtikelnamnFalt\">" + beskr + "</h1>";
					html += "<span class=\"PrisBOLD\">" + pris + "</span>";
					html += "<hr>";
					html += Text_Kort;
					html += Text;
					html += Merinfo;
					html += "</div>";
					html += "<br style=\"clear:left\"></div>";
					jQuery(".PT_ArtikelInfo").html(html);
					jQuery(".PT_ArtikelInfo").css("top",e.pageY);
					jQuery(".PT_ArtikelInfo").css("left",e.pageX);
					jQuery(".PT_ArtikelInfo").show("fast");
*/
					
					
//				});
				
//			}
//		});
