<script type="text/javascript">$(document).ready(function(){ var countComPages = $('a.swchItem1').size(), bestRating = 0, divComRating = 0, ci, cpage; $(".commRating").each(function(i){divComRating++; if(parseInt($(this).html())>bestRating){bestRating = $(this).html(); $(".bestCom").html($(this).parent().closest('div.commOuter').html());} }); for(ci=0;ci<$('a.swchItem1').size();ci++){ cpage = $('a.swchItem1').eq(ci).attr('onclick').toString().split("('")[1].split("')")[0]; $.get("/load/$CID$-"+cpage+"-0-$ID$-0", function(data){ $(".commRating", data).each(function(i){ divComRating++; if(parseInt($(this).html())>bestRating){ bestRating = $(this).html(); $(".bestCom").html($(this).parent().closest('div.commOuter').html()); } }); }); }});</script>
commRating
$COMMENT_RATING$
<span class="commRating">$COMMENT_RATING$</span>
<div class="commOuter">
</div>
<?if($COM_NUM_ENTRIES$>3)?><b>Лучший комментарий:</b><div class="bestCom"></div><?endif?>