title: JQuery Autocomplete select undefined error
body: <p>I've been ripping my hair out for a few hours now and can't seem to find out why i've got an error. </p>
  
  <p>When i call the following code :</p>
  
  <pre><code> $(document).ready(function () {
          $("#searchBox").autocomplete({
              select: function (event, ui) {
                  $("#searchBox").attr("readonly", true);
  
                  //this is where if i call alert(ui.long) I get undefiend
  
                  $("#CoorLong").val(ui.long);
                  $("CoorLat").val(ui.lat);
                  print_r(ui);
              },
              source: function (request, response) {
                  $.ajax({
                      url: "http://dev.virtualearth.net/REST/v1/Locations",
                      dataType: "jsonp",
                      data: {
                          key: "bingKey",
                          q: request.term
                      },
                      jsonp: "jsonp",
                      success: function (data) {
                          var result = data.resourceSets[0];
                          if (result) {
                              if (result.estimatedTotal &gt; 0) {
                                  response($.map(result.resources, function (item) {
                                      return {
                                          data: item,
                                          label: item.name + '[' + item.point.coordinates[0] + ' ' + item.point.coordinates[1] + ']' + ' (' + item.address.countryRegion + ')',
                                          value: item.name,
                                          long: item.point.coordinates[0],
                                          lat: item.point.coordinates[1]
                                      }
                                  }));
                              }
                          }
                      }
                  });
              },
              minLength: 1
          });
      });
  </code></pre>
  
  <p>As I said in the selec: function(event, ui) when i call ui.item or ui.value or ui.long I always get undefined</p>
  
  <p>I implemented a print_r() to check the content and I do get this :</p>
  
  <p><li>[item] =&gt;object</li><ul><li>[data] =&gt;object</li><ul><li>[__type] =&gt;Location:http://schemas.microsoft.com/search/local/ws/rest/v1</li><li>[bbox] =&gt;object</li><ul><li>[0] =&gt;48.83231728242932</li><li>[1] =&gt;2.2598159619433122</li><li>[2] =&gt;48.840042717570675</li><li>[3] =&gt;2.275464038056688</li></ul></ul><li>[name] =&gt;Quai d'Issy-les-Moulineaux, 75015 Paris</li><li>[point] =&gt;object</li><ul><li>[type] =&gt;Point</li><li>[coordinates] =&gt;object</li><ul><li>[0] =&gt;48.83618</li><li>[1] =&gt;2.26764</li></ul></ul></ul><li>[address] =&gt;object</li><ul><li>[addressLine] =&gt;Quai d'Issy-les-Moulineaux</li><li>[adminDistrict] =&gt;IdF</li><li>[adminDistrict2] =&gt;Paris</li><li>[countryRegion] =&gt;France</li><li>[formattedAddress] =&gt;Quai d'Issy-les-Moulineaux, 75015 Paris</li><li>[locality] =&gt;Paris</li><li>[postalCode] =&gt;75015</li></ul><li>[confidence] =&gt;Medium</li><li>[entityType] =&gt;RoadBlock</li><li>[label] =&gt;Quai d'Issy-les-Moulineaux, 75015 Paris[48.83618 2.26764] (France)</li><li>[value] =&gt;Quai d'Issy-les-Moulineaux, 75015 Paris</li><li>[long] =&gt;48.83618</li><li>[lat] =&gt;2.26764</li></p>
  
  <p>So i don't understand why it's undefined.</p>
  
  <p>Thank you :)</p>