when the image cycles it goes in to the border and continues at a slower rate. how can i have it reverese its scroll once it reaches the end of the image?

here is my code...

(function($) {

var x = 0;
var y = 0;
//cache a reference to the banner
var banner = $("#banner");

// set initial banner background position
banner.css('backgroundPosition', x + 'px' + ' ' + y + 'px');

// scroll up background position every 90 milliseconds
window.setInterval(function() {
banner.css("backgroundPosition", x + 'px' + ' ' + y + 'px');
y--;
x--;

//if you need to scroll image horizontally -
// uncomment x and comment y

}, 70);

})(jQuery);