$(function(){
  $("p.search input").each(function(){
    function inputDefault(str){
      return function(e){
        e.value = str;
        e.style.color = "#999";
        e.onblur = function(){
          if (this.value == ''){
            this.value = str;
            this.style.color = "#999";
          }
        };
        e.onfocus = function(){
          if (this.value == str){
            this.value = '';
            this.style.color = "#000";
          }
        }
      }
    }
    var func = inputDefault('社名・キーワード名・制度名');
    if ($(this).attr('type') == 'text'){
      func(this);
    }
  });
});
