jquery almost there; need to extend templates