$(function(){ 
  if ($.browser.msie) {
    // Because Microsoft's box model is dumb...
    $('#headerASearch').css("top","-2px");
    $('#headerSearchGo').css("top","0px");
  }
  $('#headerSearchText').hint();
})

jQuery.fn.hint = function () {
  return this.each(function (){
    var t = jQuery(this); 
    var title = t.attr('title'); 
    if (title) { 
      // on blur, set value to title attr if text is blank
      t.blur(function (){
        if (t.val() == '') {
          t.val(title);
          t.addClass('blur');
        }
      });
      // on focus, set value to blank if current value 
      // matches title attr
      t.focus(function (){
        if (t.val() == title) {
          t.val('');
          t.removeClass('blur');
        }
      });

      // clear the pre-defined text when form is submitted
      t.parents('form:first()').submit(function(){
          if (t.val() == title) {
              t.val('');
              t.removeClass('blur');
          }
      });

      // now change all inputs to title
      t.blur();
    }
  });
}

function makeFormRequest(url) {
  var data = new Object();
  $('#ajaxForm :input').each(function() {
      data[$(this).attr('name')]=$(this).attr('value');
    });
  makeRequest(url, data);
}