(function($) {
        $.fn.FocusSingle = function(param) {
			$(this).focus(function() {
			if (this.value == param.defaut){ 
			$(this).css("text-align","left");
			$(this).css("letter-spacing","1px");
			this.value = '';
			}
			if(this.value != param.defaut){
			this.select();
			}
			});
		return this;
		};
		$.fn.BlurSingle = function(param) {
			$(this).blur(function() {
			if ($.trim(this.value) == ''){
			$(this).css("text-align","center");
			$(this).css("letter-spacing","7px");
			this.value = param.defaut;
			}
			});
			return this;
		};
})(jQuery);

$(document).ready(function() {
		
		$("#singleBirdRemote").val("rechercher");
		$("#singleBirdRemote").css("text-align","center");
		$("#singleBirdRemote").css("letter-spacing","7px");
		$("#singleBirdRemote").css("opacity","0.7");
		$("#singleBirdRemote").FocusSingle({ defaut: "rechercher"});

		$("#singleBirdRemote").BlurSingle({ defaut: "rechercher"});

			
/*On clique sur le bouton de validation (à faire si plusieurs champs de recherche)*/
   $("form").submit(function () { 
	
	var singleValues = $("#singleBirdRemote").val();
	var Formulaire = $('input[type=radio][name=etendue]:checked').attr('value');

		switch (Formulaire){
		case 'coredem' :
			$("input[name=recherche]").attr({value : singleValues});
			break;
		default :
		break;
		}
	return true;
    });
	

});
