moved js code out of post.jade