$(document).ready(function() {
    $("#airport_name")
            .autocomplete('/airport_list', {
        dataType: "json",
        minChars: 0,
        max: 20,
        autoFill: true,
        mustMatch: false,
        matchContains: false,
        delay: 500,
        scrollHeight: 220,
        formatItem: function(row, i, max) {
            return row;
        },
        parse: function(data) {
            return $.map(data, function(row) {
                return {
                    data: row.title,
                    value: row.title,
                    result: row.title
                };
            });
        }
    });
    $(".airport_information_link").live("click", function() {
        $('#processing h3').text("We are retrieving all informations for " + $(this).text() + " airport");
        $('#processing').show();
    });
});