var phrase="Saisir vos mots clés";



$(document).ready(function (){
	if ($("#keyword").val()=="") $("#keyword").val(phrase);
	$("#keyword").click(function(){
		if ($("#keyword").val()==phrase) $("#keyword").val("");

	});
	
/*	$("#submit_login").click(function(){
		alert('recherche');
		if ($("#keyword").val()==phrase) $("#keyword").val("");

	});
*/

    var options = { 
        target:        '#liste_resultat',   // target element(s) to be updated with server response 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
	type: 'get' // un bug tres laid de IE6 oblige a forcer a GET car les champs ne sont pas transmis
        // other available options: 
        //url:       url         // override for form's 'action' attribute 
        //type:      type        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        //clearForm: true        // clear all form fields after successful submit 
        //resetForm: true        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
 
    // bind form using 'ajaxForm' 
	$('#form_recherche').submit(function() {
		if ($("#keyword").val()==phrase) $("#keyword").val("");
		$(this).ajaxSubmit(options);
		return false;
	});
    	
}); 
// pre-submit callback 
function showRequest(formData, jqForm, options) { 

/*$("#messagesearch").show();*/
tb_show(null,null,null);
    return true; 
} 
 
// post-submit callback 
function showResponse(responseText, statusText)  { 
tb_init('#zone_resultat a.thickbox,#zone_resultat area.thickbox,#zone_resultat input.thickbox');//pass where to apply thickbox
/*$("#messagesearch").hide();*/
tb_remove();
if ($("#keyword").val()=="") $("#keyword").val(phrase);
}





