// jsearch - Module recherche - Affichage des 1ers resultats sous le champ de saisie
function formatSearch(row) {
	return row[2] + ' > ' + row[1];
}

function redirectSearch(event, data, formatted) {
	$('#search_query').val(data[1]);
	document.location.href = data[3];
}

$('document').ready(
	function() {$("#search_query").autocomplete('recherche', {
		minChars: 3,
		max:20,
		width:400,
		scroll: false,
		formatItem:formatSearch,
		extraParams:{ajaxSearch:1,id_lang:2}
	}).result(redirectSearch)}
);

