Putting marker and post templates in JS.