<img id="thisImg" alt="img" src="images/img0.png"/>
<script type="text/javascript">
$(function(){
//prepare Your data array with img urls
var dataArray=new Array();
dataArray[0]="images/img1.png";
dataArray[1]="images/img2.png";
dataArray[2]="images/img3.png";
dataArray[3]="images/img0.png";
//start with id=0 after 5 seconds
var thisId=0;
window.setInterval(function(){
$('#thisImg').attr('src',dataArray[thisId]);
thisId++; //increment data array id
if (thisId==3) thisId=0; //repeat from start
},5000);
});
</script>