Слейп,
<script src="http://code.jquery.com/jquery-latest.js"></script>
<a class="root-item-selected" href="1">1</a>
<a class="root-item-selected" href="2">2</a>
<a class="root-item-selected" href="3">3</a>
<a class="root-item-selected" href="4">4</a>
<script>
$(document).ready(function(){
var ArrBgColor=['FF0000','0000FF','008000','FFFF00']
$('a.root-item-selected').each(function(i){
$(this).css({'background-color':'#'+ArrBgColor[i]})
});
});
</script>