Add margin dynamically to any found occurrence
<p>How can I make it more elegant and universal? It works but I would like to have the margin added +52px to every next .alert occurrence.</p>

<pre><code>var alerts = $(".alert");
if(alerts.is(":visible")) {
    if(alerts.length &gt; 1 ) {
        alerts.eq(1).css('margin-top', '52px');
        alerts.eq(2).css('margin-top', '104px');
        alerts.eq(3).css('margin-top', '156px');
    }
    alerts.delay(5000).slideUp("slow");
}
</code></pre>

<p>Any thoughts? </p>
