//JS COMMUN//
//utf8 é//
function viderRecherche(){
	$('#header-recherche').find('input:hidden').val("");
}

function add_pub_clic(id){
	$.ajax({
		type: "GET",
		url: '/home.html',
		async: false,
		data: 'action=add_pub_clic&id='+id,
		success: function(msg){
		}
	});
}

$(function(){	
	/** TRANSPARENCE PNG IE6 **/
	/*if (nav[0]=='IE' && nav[1]==6){
		$(document).pngFix(); 
	}*/
	
	//autocomplete//
	$("#recherche").autocomplete("/home.html", {extraParams: {action: 'recherche'}, minChars:'3', selectFirst:'false'});
	$("#recherche").result(function(event, data, formatted) {
		if (data)
			//$(this).next().find("input").val(data[1]);
			$(this).next().val(data[1]);
			$(this).next().next().val(data[2]);
		
	}); 
	
	Shadowbox.path = '/js/shadowbox/';
	Shadowbox.init({
			players:    ["iframe","img"]
		}
	);
	
	//ImageFlow : gestion mouseenter / mouseout => on déclenche évènement click sur bouton play / pause//
	//Note : bouton masqué en css//
	if($('.imageflow').length>0){
		$('.imageflow').hover(
			function(){$(this).find('.pause').click();},
			function(){$(this).find('.play').click();}
		);
	}
});
