function paddToggle(classname,value) { jQuery(classname).focus(function() { if (value == jQuery(classname).val()) { jQuery(this).val(''); } }); jQuery(classname).blur(function() { if ('' == jQuery(classname).val()) { jQuery(this).val(value); } }); } jQuery(document).ready(function() { paddToggle("input#recherche", "Buscar"); jQuery("div.search form").click(function () { jQuery("input#recherche").focus(); }); });