function generateGUID(){do var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0,t="x"==e?n:3&n|8;return t.toString(16)});while(GUIDList.indexOf(e)>-1);return e}function toFunc(e){if("function"==typeof e)return e;if("string"==typeof e){if(void 0!=window[e]&&"function"==typeof window[e])return window[e];try{return new Function(e)}catch(n){}}return function(){return e}}function Obj(){this._parent=null,this._handlers=[],this._onceHandlers=[],this._elements=$(),this.guid=generateGUID(),this.on=function(e,n){"function"==typeof e&&void 0===n&&(n=e,e="all"),e=e.toLowerCase().split(" ");for(var t=0;t-1&&this._handlers.splice(t--,1)}else{e=e.toLowerCase().split(" ");for(var t=0;t-1&&this._handlers[t].handler==n&&this._handlers.splice(t--,1)}return this},this.offOnce=function(e,n){if(void 0===n&&"function"==typeof e)for(var n=e,t=0;t-1&&this._onceHandlers.splice(t--,1)}else{e=e.toLowerCase().split(" ");for(var t=0;t-1&&this._onceHandlers[t].handler==n&&this._onceHandlers.splice(t--,1)}return this},this.trigger=function(e,n){e=e.toLowerCase().split(" ");for(var t=0;t-1||"all"==this._handlers[t].event)&&toFunc(this._handlers[t].handler).call(this,this._handlers[t].event,n);for(var t=0;t-1||"all"==this._handlers[t].event)&&(toFunc(this._onceHandlers[t].handler).call(this,this._onceHandlers[t].event,n),this._onceHandlers.splice(t--,1));return this},this.renderer=function(){return $("")},this.refresher=function(e){return this.renderer.apply(this)},this.destroyer=function(e){},this.render=function(e,n){var t=this;if(void 0===e)var e="body";if(void 0===n)var n="replace";else n=n.toLowerCase();var i=[].slice.call(arguments,2),r=this;return $(e).each(function(e,s){s=$(s);var h=$(t.renderer.apply(t,i));h.attr("guid",t.guid),t._elements=t._elements.add(h),"append"==n?s.append(h):"prepend"==n?s.prepend(h):"after"==n?s.after(h):"before"==n?s.before(h):"return"==n?r=h:"none"==n||(s.after(h),s.remove())}),this.trigger("render"),r},this.refresh=function(){for(var e=$(),n=0;n