css like this

#header{
        background:url(/img/bg-clouds.png)  scroll 0px -40px;
}

javascript code:
$( function($) {
        var current = 0;
setInterval(function(){
       if(current==-2240) {current=0;}
       current -=224;
       $('#header').animate({backgroundPosition:current+"px -40px"},2500);
    },2500);
})