может так ?
(function (el) {
var img = ["a1", "a2", "a3"],
l = img.length,
eff = ["fadeIn", "fadeOut"],
i = Math.round(Math.random() * (l - 1)),
m = 0;
el[1].css("background", "url(./img/" + img[i] + ".jpg) center bottom no-repeat");
(function () {
i++;
if (i > l - 1) i = 0;
el[m].css("background", "url(./img/" + img[i] + ".jpg) center bottom no-repeat")[eff[0]](2E3);
m = m == 1 ? 0 : 1;el[m][eff[1]](2E3);setTimeout(arguments.callee, 3E3)
})()
})([$("#auto1"), $("#auto2")]);