fixing issue with turbolinks

Magnific-popup is not working with turbolinks. Here is the fix for the issue.