There's a lot of duplicated code here. This means the 2 makso are not very robust to change. When changing one, you always have to remember to change the other.

Isn't there a way to use partials in makos? (especially the zoomify viewer...)