Поэтому я просто сделал, как пишут авторы colorbox'a:
<script> $(document).ready(function(){ $(".group1").colorbox({rel:'group1'}); $(".group2").colorbox({rel:'group2'}); }); </script> <a class="group1" href="/images/group1/1.jpg"><img src="/images/group1/thumbs/1.png" alt="" /></a> <a class="group1" href="/images/group1/2.jpg"><img src="/images/group1/thumbs/2.png" alt="" /></a> <a class="group1" href="/images/group1/3.jpg"><img src="/images/group1/thumbs/3.png" alt="" /></a> <a class="group2" href="/images/group2/1.jpg"><img src="/images/group2/thumbs/1.png" alt="" /></a> <a class="group2" href="/images/group2/2.jpg"><img src="/images/group2/thumbs/2.png" alt="" /></a> <a class="group2" href="/images/group2/3.jpg"><img src="/images/group2/thumbs/3.png" alt="" /></a>