Could you please help me on how to remove the spinner/loading image if the autocomplete goes for the error/failure cases?

If i get the error "Due to unexpected errors we were unable to load data" i see the loading images and i want to remove that images.

Below is the snippet

```
  $("Autotxt").autocomplete({
    source: function (request, response) {
        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "Webservice.asmx/GetNames",
            data: "{'prefixText':'" + request.term + "'}",
            dataType: "json",  
            success: function (data) {
                response($.map(data.d, function (item) {

                    return {
                        label: item.split('|')[0],
                        val: item.split('|')[1]
                    }
                }))
            },

            error: function (result) {

                alert("Due to unexpected errors we were unable to load data");
                ServiceFailed(result);
            },
            failure: function (response) {
                alert("Due to unexpected errors we were unable to load data");

            }
        });
    },
    select: function (event, ui) {
        txtSoID(ui.item.val);
    },
    minLength: 4
});

function txtID(val)
{
alert(val)
}

```