var imgs = [
"url_1.jpg",
"url_2.jpg",
"url_3.jpg",
"url_4.jpg",
"url_5.jpg"
];
var counter = 0;
var length = imgs.length;
var $wrapper = $("#wrapper");
setInterval(function () {
counter++;
if (counter > length - 1) {
counter = 0;
}
$wrapper.css("backgroundImage", "url(" + imgs[counter] + ")");
}, 10000);