function textboxHint(id, options) {
    var o = { selector: 'input:text[title]', blurClass:'blur' };
    $e = jQuery('#'+id);
    jQuery.extend(true, o, options || {});

    if ($e.is(':text')) {
      if (!$e.attr('title')) $e = null;
    } else {
      $e = $e.find(o.selector);
    }
    if ($e) {
      $e.each(function() {
      var $t = jQuery(this);
      if (jQuery.trim($t.val()).length == 0) { $t.val($t.attr('title')); }
      if ($t.val() == $t.attr('title')) {
	$t.addClass(o.blurClass);
      } else {
        $t.removeClass(o.blurClass);
      }

     $t.focus(function() {
	if (jQuery.trim($t.val()) == $t.attr('title')) {
	  $t.val('');
	  $t.removeClass(o.blurClass);
	}
	}).blur(function() {
	  var val = jQuery.trim($t.val());
	  if (val.length == 0 || val == $t.attr('title')) {
	    $t.val($t.attr('title'));
	    $t.addClass(o.blurClass);
	  }
	});

         // empty the text box on form submit
	jQuery(this.form).submit(function(){
	  if (jQuery.trim($t.val()) == $t.attr('title')) $t.val('');
	});
   });
 }
}

jQuery(document).ready(
	    function() {
	        textboxHint("searchFormContainer");
});
