window.hbs = function (templateName, data, jQueryParse) {
	var template;

	// Try complied first
	if (Handlebars.templates && Handlebars.templates.hasOwnProperty(templateName)) {
		template = Handlebars.templates[templateName];

		// Load un-compile version from HTML element
	} else {
		template = Handlebars.compile(document.getElementById(templateName).innerHTML);
	}

	var compiled = template(data).trim();
	return typeof jQueryParse === 'undefined' || jQueryParse ? jQuery(jQuery.parseHTML(compiled)) : compiled;
};
