if("undefined"==typeof OGX)var OGX=function(){};OGX.Templater=function(){},OGX.Templater.templatize=function(__obj,__template){"use strict";function evalOp(__op){var reg=new RegExp("\\@","g");return __op=__op.replace(reg,"__obj."),eval(__op),!0}function extractOps(){var op,e,html,prop,temp,ver,reg=new RegExp("\\$\\(loop ([^(]*)\\)","gi"),match=reg.exec(__template);if(match&&(op=match[1].substr(1).split(" "),prop=op.shift(),temp=op.join(" "),ver=eval("__obj."+prop))){html="";for(var i=0;i<ver.length;i++)html+=temp.replace(".$.","["+i+"].");__template=__template.replace(match[0],html)}if(reg=new RegExp("\\$\\([^(]*\\)","g"),match=__template.match(reg))for(var i=0;i<match.length;i++)e=match[i].substr(1),__template=__template.replace(match[i],""),evalOp(e)}function replaceVals(){for(var reg=new RegExp('["\\>]{1}\\$([^"\\<\\> ]*)["\\<]{1}',"g"),match=__template.match(reg),m,val,pre,post,i=0;i<match.length;i++)pre=match[i].substring(0,1),post=match[i].substr(match[i].length-1,1),m=match[i].substr(1),m=m.substr(0,m.length-1),val=eval(m.replace("$","__obj.")),__template=__template.replace(match[i],pre+val+post)}return extractOps(),replaceVals(),__template};
@@ -343,17 +343,8 @@
 tch=
-reg.exec(
 __te
@@ -353,20 +353,62 @@
 late
-);if(match&&
+.match(reg);if(match)for(var j=0;j%3Cmatch.length;j++)if
 (op=
@@ -413,17 +413,17 @@
 p=match%5B
-1
+j
 %5D.substr
@@ -437,16 +437,27 @@
 it(%22 %22),
+op.shift(),
 prop=op.
@@ -463,16 +463,26 @@
 .shift()
+.substr(1)
 ,temp=op
@@ -492,16 +492,53 @@
 in(%22 %22),
+temp=temp.substring(0,temp.length-1),
 ver=eval
@@ -553,17 +553,16 @@
 %22+prop))
-)
 %7Bhtml=%22%22
@@ -664,17 +664,17 @@
 e(match%5B
-0
+j
 %5D,html)%7D
@@ -869,16 +869,49 @@
 eVals()%7B
+console.log(%22is now%22,__template);
 for(var 

Fix multiple operations