function buy_gif_avatar() {
    var token = $('#token').val();
    NProgress.start();
    $.ajax({
        type: "POST",
        url: "../modules_extra/gif_avatar/ajax/actions.php",
        data: "phpaction=1&user_buy_gif=1&token=" + token,
        dataType: "json",
        success: function (result) {
            if (result.status == 1) {
                NProgress.done();
                setTimeout(show_ok, 500);
                alert(result.data);
   				location.reload();
            } else {
                NProgress.done();
                setTimeout(show_error, 500);
                if (result.data != '' || result.data != undefined) {
                    alert(result.data);
                }
            }
        }
    });
}