!function(){var e={prefix:"jugl",namespaceURI:null,loadTemplate:function(e){o(e.url,(function(t){var n,o;if(!t.status||t.status>=200&&t.status<300){try{n=t.responseXML,o=new r(n.documentElement)}catch(e){(n=document.createElement("div")).innerHTML=t.responseText,o=new r(n.firstChild)}e.callback&&e.callback.call(e.scope,o)}else e.failure&&e.failure.call(e.scope,t)}))}},t=function(e,t){for(var n in e=e||{},t=t||{})e[n]=t[n];return e},n=function(e,t){var n,o,i,r,s;if("string"==typeof e){if(!(n=document.getElementById(e)))throw Error("Element id not found: "+e);e=n}if("string"==typeof t){if(!(n=document.getElementById(t)))throw Error("Element id not found: "+t);t=n}if(t.namespaceURI&&t.xml)for((o=document.createElement("div")).innerHTML=t.xml,r=0,s=(i=o.childNodes).length;r