

function startAnimation(element) {
	
	var random = Math.floor(Math.random()*801);
	var direction = Math.floor(Math.random()*2);
	if (direction == 0)
		direction = -1;
	
	element.css('background-position', random+'px 8px');
	element.everyTime(1, function(step){
		var bg = (random+(direction*step*5))+'px 8px';
		$(this).css('background-position', bg);
	});
}


$(function () {
	$(".hr").each(function(){
		startAnimation($(this));
	});
});

