Jquery mobile photoswipe on rubyonrails

Jquery mobile photoswipe on rubyonrails

I am setting up a photoswipe with jquery mobile on the rubyonrails server, for some reason, the photoswipe only start after refresh the page, but when I put the script of the page to normal website, it will working fine.

Anyone can tell me what way I can make it work without refreshing please:

site add: http://prod.computersforpeople.info/users/262/properties/47198

when you click on the photo, it will link to the photoswipe page, but it won't start until you refresh the page.