j = {largeSign: function(a) {
var b = $(#identity .scorecard"), c = 43, d = 105 - c, e = 800;
this.animation(b, d, c, e, a)
},animation: function (a, b, c, d, e) {
var f = this, g = 1e3, h, i = function() {
$(".sign", a).each(function(a, f) {
h = parseInt(e + $(this).text()), a > 2 && (d += 30), a === 0 || a === 3 ? $(this).animate({backgroundPosition: "0px " + (b * h + c) + "px"}, d * 1.6) : a === 1 || a === 4 ? $(this).animate({backgroundPosition: "0px " + (b * h + c) + "px"}, d * 1.8) : (a === 2 || a === 5) && $(this).animate({backgroundPosition: "0px " + (b * h - b + c) + "px"}, d * 2, function() {
$(this).delay(200).animate({backgroundPosition: "0px " + (b * parseInt(e + $(this).text()) + c) + "px"}, 1e3)
})
})
};
setTimeout(i, g)
}}
basically I’m trying to animate the background-position and have it stop on a value that’s been parsed within the div .sign.
Use .ready()
http://api.jquery.com/ready/