JS template manager based on jQuery