$(window).on('load', function () {

    initializeStatsAjax = function (requiredStats) {
        $.getScript('../js/jquery.query-object.js', function ()
        {
            $.ajax({
                type: "GET",
                url: settings.baseUrl + "/plateAuthorization/updateStatsAjax/" + $.query.copy() + "&requiredStat=" + requiredStats,
                success: function (html) {
                    var idToUpdate = '#' + html.split(":")[0].replace(" ", "_");
                    return $(idToUpdate).html(html);
                }
            });
        });
    };

    initializeStatsAjax("to_be_confirmed");
    initializeStatsAjax("enabled");
    initializeStatsAjax("disabled");
    initializeStatsAjax("total");
}
);