

$.timer({name:"test", interval: 5, end: 40}, function() {

  if(max_photo > num_photo) num_photo ++;
  else num_photo = 1;
  
  if(max_photo > next_photo) next_photo ++;
  else next_photo = 1;

  $("#preload").css({ backgroundImage:"url(photos/panorama-"+next_photo+".jpg)"});
  $("#container").css({ backgroundImage:"url(photos/panorama-"+num_photo+".jpg)"});

  
});

