$(document).ready(function(){var brandsWidth=0;$('.topbrand_right a').each(function(i){brandsWidth+=$(this).width()+10});$('.topbrand_right .brands').width(brandsWidth);var brandsDeficit=(brandsWidth/2)-130;loopBrands(brandsDeficit)}) function loopBrands(brandsDeficit){$('.topbrand_right .brands').animate({left:0},0).animate({left:(brandsDeficit*-1)},60000,"linear",function(){loopBrands(brandsDeficit)})};