var WEBSITE_BASE = '';$(document).ready(function() {	SetBestSize();		$("a.box").fancybox();		$("input.uniform, textarea.uniform, select.uniform, button.uniform").uniform();		$("ul.plante-visu a").click(function(){		$("#plante-zoom").attr("src", $(this).attr("rel"));		return false;	});	$("div.liste-plante a.onglet1").click(function(){		$("div.liste-plante ul.list1").show();		$("div.liste-plante ul.list2").hide();		$("div.liste-plante a.onglet1").removeClass("off");		$("div.liste-plante a.onglet2").addClass("off");		$("div.liste-plante div.onglet").addClass("type1").removeClass("type2");		return false;	});	$("div.liste-plante a.onglet2").click(function(){		$("div.liste-plante ul.list2").show();		$("div.liste-plante ul.list1").hide();		$("div.liste-plante a.onglet2").removeClass("off");		$("div.liste-plante a.onglet1").addClass("off");		$("div.liste-plante div.onglet").addClass("type2").removeClass("type1");		return false;	});		// Popup Homepage	$("#popup-global").hide();	$("ul.homepage a.popup").click(function(){		$("#popup-global").html($(this).attr("rel")).dialog({			width: 475,			height: 305,			modal: true,			resizable: false,			overlay: {backgroundColor: '#000', opacity: 0.6}		});		return false;	});		// Homepage Slideshow	$("ul.slideshow-homepage li div.texte").each(function(){		$(this).find("div.inner").css("marginLeft", ((812 - ($(this).find("div.inner").width()-110))/2) + "px");		$(this).hide();	});	$("ul.slideshow-homepage li a").mouseenter(function(){		$(this).find("div.texte").fadeIn("fast");	}).mouseleave(function(){		$(this).find("div.texte").fadeOut("fast");	});	$("ul.slideshow-homepage").after('<div class="slideshow-homepage-pager bloc_preview">').cycle({ fx:'scrollLeft', speed:600, timeout:5000, delay:0, pause: true, pauseOnPagerHover: true, pager: 'div.slideshow-homepage-pager', pagerAnchorBuilder: function(index, el){return '<a href="#"></a>';} });		// Over bloc-homepage	$("ul.bloc-homepage a").hover(		function(){			if ($(this).find("img").attr("over") != '') $(this).find("img").attr("src", $(this).find("img").attr("over"));		},		function(){			if ($(this).find("img").attr("over") != '') $(this).find("img").attr("src", $(this).find("img").attr("out"));		}	);		// Documentation	$("#doc-submit").click(function(){		$("#doc-result li").remove();		$.ajax({url:(WEBSITE_BASE ? WEBSITE_BASE : "")+"/product-doc-ajax.php", data:"pl="+$("#doc-plantes").val()+"&pr="+$("#doc-produit").val(), dataType:"xml", success:function(xml){			$(xml).find("prod").each(function(){				$("#doc-result").append('<li><a href="' + $(this).attr("url") + '">' + $(this).text() + '</li>');			});		}});		return false;	});});function SetBestSize() {	if ($("#content").height() < $("#content .col.left.product").height()) {		$("#content .inner.product").height(($("#content .col.left.product").height()+10)+"px");	}	if ($("#content").height() < $("#content .col.right").height()) {		$("#content .inner.product").height(($("#content .col.right").height()+10)+"px");	}}
