function closeHeadLayer(elem)
{
	jQuery('#'+elem).hide();
	jQuery('#overlay').unbind('click').hide();
}

function clearText(elem)
{
	elem.value="";
}

function showOverlay(layer){
$('#overlay').show();
		$('#overlay').css({'height':$(document).height()+'px','width':$(document).width()+'px'})
		$('#overlay').bind('click',function()
		{
			$('#overlay').hide();
			$(layer).hide();
		});
}

var xitiEnvId = null;
/**
 * Gets XITI Environment ID (for prod, pprod, ...)
 * @returns Xiti Env ID.
 */
function getXitiEnvId() {

	if (xitiEnvId != null) {
		return xitiEnvId;
	}

	currenthost = window.location.host;

	if (currenthost == "www.leroymerlin.fr") return xitiEnvId = "310424";
	else if (currenthost == "proxyecom" || currenthost == "proxyecom.fr.corp.leroymerlin.com") return xitiEnvId = "450171";
	else if (currenthost == "www-prep.leroymerlin.fr" || currenthost =="wwws-lmprep-fr.corp.leroymerlin.com") return xitiEnvId = "310424";

	return xitiEnvId = "292016";
}

$(document).ready(function()
{
	
//rollover Barre de navigation
// $('#onglets li h1 a').mouseover(function()
// {
// 
// 	newSrc = $(this).find('img').attr('src').replace('_OFF','_ON');
// 	$(this).find('img').attr('src',newSrc)
// 
// });
// $('#onglets li h1 a').mouseout(function()
// {
// 	newSrc = $(this).find('img').attr('src').replace('_ON','_OFF');
// 	$(this).find('img').attr('src',newSrc)
// 
// });
// rollover du menu
// $('#menu li a').hover(function()
// {
// 	$(this).closest('li').addClass('actif');
// },function()
// {
// 	$(this).closest('li').removeClass('actif');
// });


	
});
