Site detail map

A series of bugfixes to make this work even with precompiled javascript.

https://www.pivotaltracker.com/story/show/60733436