
jQuery.fn.extend({sleep:function(time)
{var _this=$(this);_this.queue(function()
{setTimeout(function(){_this.dequeue();},time);});return this;}});jQuery.template=function(template_str,obj)
{var output_str=template_str;var regex;for(name in obj)
{regex=new RegExp("\{("+name+")\}","gi");output_str=output_str.replace(regex,obj[name]);}
return output_str;}