adjust script to loop through each subnav photo