title: jQuery UI autocomplete categories not displaying
body: <p>Any ideas why the Category is returning <code>undefined</code>?</p>
  
  <p>I am getting the items but not the category?</p>
  
  <pre><code>   $.widget( "custom.catcomplete", $.ui.autocomplete, {
          _renderMenu: function( ul, items ) {
              var that = this,
                  currentCategory = "";
              $.each( items, function( index, item ) {
                  if ( item.category != currentCategory ) {
                      ul.append( "&lt;li class='ui-autocomplete-category'&gt;" + item.category + "&lt;/li&gt;" );
                      currentCategory = item.category;
                  }
                  that._renderItemData( ul, item );
              });
          }
     });
  
      function split( val ) {
              return val.split( /,\s*/ );
          }
          function extractLast( term ) {
              return split( term ).pop();
          }
  
      $("#people_q:not(.ui-autocomplete-input)").live("keyup", function (event) {
          $(this).catcomplete({
              source: function (request, response) {
                  $.ajax({
                      url: "/json/people_search.asp",
                      dataType: "json",
                      data: {
                          q:extractLast( request.term )
                      },
                      success: function (data) {
                          response($.map(data.results.result, function (item) {
                              return {
                                  label: item.sresult,
                                  value: item.sresult
                              };
                          }));
                      }
                  });
              },
              minLength: 2,
              open: function () {
                  $(this).removeClass("ui-corner-all").addClass("ui-corner-top");
              },
              close: function () {
                  $(this).removeClass("ui-corner-top").addClass("ui-corner-all");
              },
                  focus: function() {
                      // prevent value inserted on focus
                      return false;
                  },
                  select: function( event, ui ) {
                      var terms = split( this.value );
                      // remove the current input
                      terms.pop();
                      // add the selected item
                      terms.push( ui.item.value );
                      // add placeholder to get the comma-and-space at the end
                      terms.push( "" );
                      this.value = terms.join( ", " );
                      return false;
                  }
          });
      });
  </code></pre>
  
  <p>Here is the checked valid Json I'm using to feed the autocomplete.</p>
  
  <pre><code>{
      "results": {
          "count": "8",
          "result": [
              {
                  "id": 0,
                  "sresult": "web development",
                  "category": "tag"
              },
              {
                  "id": 1,
                  "sresult": "entrepreneur",
                  "category": "tag"
              },
              {
                  "id": 2,
                  "sresult": "Talks / Presentations",
                  "category": "tag"
              },
              {
                  "id": 3,
                  "sresult": "music management",
                  "category": "tag"
              },
              {
                  "id": 4,
                  "sresult": "User Experience Design",
                  "category": "tag"
              },
              {
                  "id": 5,
                  "sresult": "English",
                  "category": "tag"
              },
              {
                  "id": 6,
                  "sresult": "French",
                  "category": "tag"
              },
              {
                  "id": 7,
                  "sresult": "entier Associates Ltd",
                  "category": "company"
              }
          ]
      }
  }
  </code></pre>