(function(f){var j=document.createElement("div");window.taskList=function(g,e){g=f(g);var k=f(g[0].tBodies[0]);e||(e={});var m=f.trim(e.template||""),n=e.idPrefix||"task_",o=ct.func(e.rowReady)||function(){},h=ct.func(e.countRow)||function(){},d={},i=0,p=function(a){var b=m;for(var l in a)b=b.replace(RegExp("{"+l+"}","gm"),a[l]);j.innerHTML="<table><tbody>"+b+"</tbody></table>";var c=f(j.firstChild.rows[0]);b=c[0].id.substr(n.length);if(!(b in d)){c.hover(function(){c.addClass("over")},function(){c.removeClass("over")});
o(b,c,a);c.data("json",a);d[b]=c;k.append(c);h(++i);return c}};this.add=function(a){p(a)};this.remove=function(a){var b=d[a];if(b){b.remove();delete d[a];h(--i)}};this.clear=function(){for(var a in d){d[a].remove();delete d[a];h(--i)}};this.first=function(){return k.find("tr:first")}}})(jQuery);
