function initJS() {
    $('tr > td > div > a.is_published').bind('click', function(ev) {
        var jAId = '#'+this.id;

        $.ajax({
            type: "GET",
            data: { id: this.id.substr(3) },
            url: MySettings.toggleStatusURL,
            dataType: "html",
            beforeSend: function() {
                $(jAId).html('<img alt="Ajax load" src="/images/majax-loader.gif" width="16" height="16">');
            },
            success: function (data, textStatus) {
                $(jAId).html(data);
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                $(jAId).html('!error!');
                if (errorThrown) {
                    alert('Error msg: ' + errorThrown);
                } else {
                    alert('Status msg: ' + textStatus);
                }
            }
        });

        ev.preventDefault();
    });
}
