Есть список элементов li,
<ul class="portfolio-slider">
<li>
<a class="portfolio-item"></a>
<a href="" class="portfolio-item"> </a>
</li>
<li>
<a class="portfolio-item"></a>
<a href="" class="portfolio-item"> </a>
</li>
...
</ul>
через jQuery нужно добавить к каждому первому свои свойства css, к каждому второму - другие, к каждому третьему - третьи.
$('.portfolio-slider li:nth-child(1n)').find('a').first().css({
'top': '-300px',
'left': '-300px'
});
$('.portfolio-slider li:nth-child(1n)').find('a').eq(1).css({
'top': '300px',
'left': '-300px'
});
$('.portfolio-slider li:nth-child(2n)').find('a').first().css({
'top': '-300px'
});
$('.portfolio-slider li:nth-child(2n)').find('a').eq(1).css({
'top': '300px'
});
$('.portfolio-slider li:nth-child(3n)').find('a').first().css({
'top': '-300px',
'right': '-300px'
});
$('.portfolio-slider li:nth-child(3n)').find('a').eq(1).css({
'top': '300px',
'right': '-300px'
});
но добавляются свойства только в первый, второй и третий элементы li, а не в каждый первый, второй и третий.
http://jsfiddle.net/7PS7s/1/
Как сделать так, чтобы работало как нужно?