/**
 * Custom jQuery initializations
 */

// &lt;a class="ajax"&gt;&lt;/a&gt; support
$(function () {
    $("a.ajax").live("click", function (event) {
        $.get(this.href);

        $("#spinner").css({
            position: "absolute",
            left: event.pageX + 20,
            top: event.pageY + 20
        });

        return false;
    });

    $("#spinner").ajaxStart(function () {
        $(this).show();
    }).ajaxStop(function () {
        // fallback
        $(this).hide().css({
            position: "fixed",
            left: "50%",
            top: "50%"
        });
    });
});