setting a hidden input value from Autocomplete

setting a hidden input value from Autocomplete

I have an Autocomplete for state and province names running.  I want to pass the state abbreviation to the next cascade of Autocomplete.  I created a hidden input and I want to set it to the abbreviation when the state name is selected, then I'll select it for use in the next tier Autocomplete.  I've tried several things, done a lot of Google searching and reading jQuery books, but I need some help. The stateProvince input box autocompletes and selects the full state name.  The hidden input does not get set with the abbreviation. The alert is empty. Here is the relevant code.

HTML:

<input type="text" id="stateProvince" name="stateProvince" size="50" maxlength="50" /><input type="hidden" id="hiddenState" name="hiddenState" />

Autocomplete source ajax;

        $("#stateProvince").autocomplete
        ({
            source: function( request, response )
            {                           
                //Pass the selected country to the php to limit the stateProvince selection to just that country  
                $.ajax(
                {
                    url: "getStateProvince.php",
                    data: {
                            term: request.term, 
                            country: $('input[name=country]:checked').val()    //Pass the selected country to php
                          },       
                    type: "POST", 
                    dataType: "json",
                    success: function( data )
                    {                                          
                        response( $.map( data, function( item )
                        {
                            return{                                   
                                    label: item.stateName,
                                    value: item.name,
                                    abbrev: item.stateAbbrev                                                                   
                                   }
                        }));
                    },
                    select: function( event,ui )
                    {
                    $(this).val(ui.item.value);
                    $("#hiddenState").$(this).val(ui.item.abbrev);
                    }
                });
                alert('|' + $("#hiddenState").val() + '|2nd');  //shows no content               
            },           
            minLength: 2
        });

JSON example returned from php:

[{"stateName":"Alabama","name":"Alabama","stateAbbrev":"AL"},{"stateName":"Alaska","name":"Alaska","stateAbbrev":"AK"}]