function animatethis(targetElement, speed) {
targetElement.animate({width: "+=15px"}, speed).promise().done(function() {
$(this).animate({width: "-=40px"}, speed).promise().done(function() {
if ( !$(this).width() <= 0 )
animatethis(targetElement, speed);
});
});
}