function moveR() {
  var curLeft = parseInt($('#slideRoom ul').css("left"));
  var a = parseInt(0 - parseInt($('#slideRoom ul').css("width")));
  $('#slideRoom img').each(function(){
    var s = $(this).attr("src");
	if (s = '/images/fill.gif'){
	  $(this).attr("src",$(this).attr('original'))
	}
  })
  if ( a + move*2 <= curLeft ) {
    $('#slideRoom ul').animate({
      left: curLeft - move + "px"
    },
    300,
    function() {
      if (curLeft > 0) {
        $('#slideRoom ul').css("left", "0px")
      }
    })
  } else {
    $('#slideRoom ul').animate({
      left: "0px"
    },
    300)
  }
}

$(function() {
  var len = $('#slideRoom li').length;
  $('#slideRoom ul').css({
    "width": move * len + "px",
    "left":"0px"
  });
  var slideD = '';
  $('#slideRoom').hover(function(){
    clearInterval(slideD);
  }, function(){
    slideD = setInterval("moveR()",5000);
  }).mouseout();
  $('#slideBtnNext').click(function(){
    clearInterval(slideD);
    moveR();
  });
})