var lBannersbannersa = new Array(); lBannersbannersa.push(new Array('http://google.nl','http://2.bp.blogspot.com/_UqUwVPikChs/R-DDa3bATeI/AAAAAAAADAQ/wO39rUFB19g/s320/opensec-tux-mario-1732.png')); lBannersbannersa.push(new Array('http://google.nl','http://www.unixmen.com/images/stories/santang-rambo-tux-2036.png')); lBannersbannersa.push(new Array('http://nu.nl','http://valeriovalerio.org/images/rock_tux.png')); jQuery(document).ready(function() { var lAmountBannersbannersa = lBannersbannersa.length; var lAmountOfPlaceHoldersbannersa = jQuery('.bannersa').length; var lAmountPerBannerbannersa = Math.round(lAmountBannersbannersa / lAmountOfPlaceHoldersbannersa); var lCurrentBannerPosbannersa = 0; jQuery('.bannersa').each(function() { for (var ibannersa = lCurrentBannerPosbannersa; ibannersa < (lCurrentBannerPosbannersa + lAmountPerBannerbannersa); ibannersa++) { jQuery(this).append(''); } lCurrentBannerPosbannersa = ibannersa; }); });