var $ = jQuery.noConflict(); $(document).ready(function() { $("#s").each(function() { $(this).attr("value","Search"); }); $.fn.autoClear = function () { $(this).each(function() { $(this).data("autoclear", $(this).attr("value")); }); $(this) .bind('focus', function() { if ($(this).attr("value") == $(this).data("autoclear")) { $(this).attr("value", "").addClass('autoclear-normalcolor'); } }) .bind('blur', function() { if ($(this).attr("value") == "") { $(this).attr("value", $(this).data("autoclear")).removeClass('autoclear-normalcolor'); } }); return $(this); } if ($('#s').length){$('#s').autoClear()} //$('.full_post:odd').addClass('another_post'); });