Embedded all required variables in related-posts.js script itself.