Всем привет! Вот реализовал смену картинок на javascript
<script type="text/javascript">
var a = 0;
var b=new Array();
b[0] ="{$smarty.const.LINK_IMAGES}photosmall/0011.jpg";
b[1] ="{$smarty.const.LINK_IMAGES}photosmall/0012.jpg";
b[2] ="{$smarty.const.LINK_IMAGES}photosmall/0013.jpg";
b[3] ="{$smarty.const.LINK_IMAGES}photosmall/0014.jpg";
b[4] ="{$smarty.const.LINK_IMAGES}photosmall/0015.jpg";
b[5] ="{$smarty.const.LINK_IMAGES}photosmall/0016.jpg";
b[6] ="{$smarty.const.LINK_IMAGES}photosmall/0017.jpg";
b[7] ="{$smarty.const.LINK_IMAGES}photosmall/0018.jpg";
b[8] ="{$smarty.const.LINK_IMAGES}photosmall/0019.jpg";
b[9] ="{$smarty.const.LINK_IMAGES}photosmall/0020.jpg";
b[10]="{$smarty.const.LINK_IMAGES}photosmall/0021.jpg";
b[11]="{$smarty.const.LINK_IMAGES}photosmall/0022.jpg";
b[12]="{$smarty.const.LINK_IMAGES}photosmall/0023.jpg";
b[13]="{$smarty.const.LINK_IMAGES}photosmall/0024.jpg";
b[14]="{$smarty.const.LINK_IMAGES}photosmall/0025.jpg";
b[15]="{$smarty.const.LINK_IMAGES}photosmall/0026.jpg";
b[16]="{$smarty.const.LINK_IMAGES}photosmall/0027.jpg";
b[17]="{$smarty.const.LINK_IMAGES}photosmall/0028.jpg";
b[18]="{$smarty.const.LINK_IMAGES}photosmall/0029.jpg";
b[19]="{$smarty.const.LINK_IMAGES}photosmall/0030.jpg";
b[20]="{$smarty.const.LINK_IMAGES}photosmall/0031.jpg";
b[21]="{$smarty.const.LINK_IMAGES}photosmall/0032.jpg";
b[22]="{$smarty.const.LINK_IMAGES}photosmall/0033.jpg";
b[23]="{$smarty.const.LINK_IMAGES}photosmall/0034.jpg";
function viewImages(){$l}
var a=Math.floor(Math.random()*b.length)
document.getElementById("img_main").src = b[a];
setTimeout("viewImages()", 1500);
//document.write( b[a] );
}
</script>
<div class="jquery">
<a id="next_big" rel="prettyPhoto[gallery]" href="{$smarty.const.LINK_IMAGES}photosmall/0034.jpg"><img src="" id="img_main">
<script> viewImages(); </script>
</div>
Скажите а как сделать чтобы они плавно сменялись?