//Affiche les erreurs en Ajax dans Firebug
$(document).ajaxError(function(){
    if (window.console && window.console.error) {
        console.error(arguments);
    }
});

function setLang(LANG) {
	$.ajax({
		type: "POST",
		url: SITE_PATH+"content/ajax/Ajax_Lang.php",
		data: "lang="+LANG,
		success: function(data){
			//alert(data);
			document.location.reload(true);
		}
	});
}

$(document).ready(function() {
	$("rollover img").each(function() {
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.gif$/ig,"_over.gif");
		$("<img>").attr("src", rollON);
	});
	$(".rollover").mouseover(function(){
		imgsrc = $(this).children("img").attr("src");
		matches = imgsrc.match(/_active/);
		if (!matches) {
		imgsrcON = imgsrc.replace(/.gif$/ig,"_active.gif");
		$(this).children("img").attr("src", imgsrcON);
		}
	});
	$(".rollover").mouseout(function(){
		$(this).children("img").attr("src", imgsrc);
	});
	$(".filterDate").datePicker();
});
