        $().ready(function() {
            var months = new Array("Januari",
                                   "Februari",
                                   "Maart",
                                   "April",
                                   "Mei",
                                   "Juni",
                                   "Juli",
                                   "Augustus",
                                   "September",
                                   "Oktober",
                                   "November",
                                   "December");

            function findValueCallback(event, data, formatted) {
                $("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result");
            }

            function formatItem(row) {
                return row[0] + " (<strong>id: " + row[1] + "</strong>)";
            }
            function formatResult(row) {
                return row[0].replace(/(<.+?>)/gi, '');
            }

            $("#suggest1").autocomplete('includes/ajax/jquery.search.user.php', {
                width: 300,
                highlight: false,
                multiple: true,
                multipleSeparator: "; ",
                scroll: true,
                scrollHeight: 300
          });
            $("#month").autocomplete(months, {
                minChars: 0,
                max: 12,
                autoFill: true,
                mustMatch: true,
                matchContains: false,
                scrollHeight: 220,
                formatItem: function(data, i, total) {
                    // don't show the current month in the list of values (for whatever reason)
                    if ( data[0] == months[new Date().getMonth()] )
                        return false;
                    return data[0];
                }
            });
            $("#suggest13").autocomplete(months, {
                minChars: 0,
                width: 310,
                matchContains: true,
                autoFill: false,
                formatItem: function(row, i, max) {
                    return i + "/" + max + ": \"" + row.name + "\" [" + row.to + "]";
                },
                formatMatch: function(row, i, max) {
                    return row.name + " " + row.to;
                },
                formatResult: function(row) {
                    return row.to;
                }
            });
            $("#singleBirdRemote").autocomplete("search.php", {
                width: 260,
                selectFirst: false
            });
            $("#suggest14").autocomplete(months, {
                matchContains: true,
                minChars: 0
            });
            $("#suggest3").autocomplete(months, {
                multiple: true,
                mustMatch: true,
                autoFill: true
            });
            $("#suggest4").autocomplete('search.php', {
                width: 300,
                multiple: true,
                matchContains: true,
                formatItem: formatItem,
                formatResult: formatResult
            });
            $("#imageSearch").autocomplete("images.php", {
                width: 320,
                max: 4,
                highlight: false,
                scroll: true,
                scrollHeight: 300,
                formatItem: function(data, i, n, value) {
                    return "<img src='images/" + value + "'/> " + value.split(".")[0];
                },
                formatResult: function(data, value) {
                    return value.split(".")[0];
                }
            });
        
            $(":text, textarea").result(findValueCallback).next().click(function() {
                $(this).prev().search();
            });
            $("#clear").click(function() {
                $(":input").unautocomplete();
            });
        });