You should be able to do the following within your javascript (provided it is parsed by the template parser):
photos[<%row_num - 1%>]="<%att_url%>"
<%endloop%>
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Code:
<%loop link_attachments%> photos[<%row_num - 1%>]="<%att_url%>"
<%endloop%>
Ivan
-----
Iyengar Yoga Resources / GT Plugins