(function(){var URL='http://xdrajax.appspot.com/xdr?';window._=function(q){var each=function(o,f){if(!o||!f)return;if(o[0])for(var i=0,l=o.length;i<l;)f.call(o[i],i++);else for(var i in o)o.hasOwnProperty&&o.hasOwnProperty(i)&&typeof o[i]!='function'&&f.call(o[i],i,o[i])},walk=function(n,f){var r=[];f.call(n,n)&&r.push(n);n=n.firstChild;while(n){walk(n,f);n=n.nextSibling}return r},grep=function(o,f){var r=[];each(o,function(k,v){f.call(this,k,v)&&r.push(this)});return r},map=function(o,f){var r=[];each(o,function(k,v){r.push(f.call(this,k,v))});return r},body=function(){return document.getElementsByTagName('body')[0]},bind=function(t,f,n){var a='on'+t+'s';n[a]=n[a]||[];n[a].push(f);n['on'+t]=function(e){e=e||window.event||{};each(n[a],function(k){n[a][k].call(n,e)})}},unbind=function(t,n){n['on'+t+'s']=[]},remove=function(n,c){return n.removeChild(c)},append=function(n,c){if(typeof c==='string')typeof n.innerHTML!=='undefined'&&(n.innerHTML+=c);else n.appendChild(c)},find=function(s){var t=typeof s!=='string',p=!t&&s.substr(0,1);each(t?(s[0]?s:[s]):p==='#'?[document.getElementById(s.substr(1))]:p==='.'?walk(body(),function(n){}):document.getElementsByTagName(s.toUpperCase()),function(){_.push(this)});return _},html=function(n,t){if(typeof n.innerHTML==='undefined')return;if(!t)return n.innerHTML;n.innerHTML=t},urlize=function(u,i,d,ur){i['\u0073\x72\x63']=u+(u.indexOf('?')===-1?'\077':'')+escape(((ur?ur+'?':'')+(d?map(d,function(k,v){return k+'.01'+v}).join('.02'):'')).replace(/ /g,'%20')).replace('.01','=').replace('.02','&amp;')},_=[];_.extend=function(o){for(var i in o)_[i]=o[i]};_.extend({xdr:function(a){var i=_.create('script'),u=(new Date).getTime().toString(),d=function(){i.onload=i.onreadystatechange=i.onerror=null;remove(body(),i)};i.onload=i.onreadystatechange=function(e){var s=this.readyState;if(!(!s||s=="loaded"||s=="complete"))return;var k=escape(unescape('xdr2:'+i.src.split('q=')[1]+':'+u)),r=unescape(window[k]||''),g=a.success;if(a.type)r=eval(r);g&&g.call(i,r);window[k]='';d()};bind('error',function(){a.fail&&a.fail.call(i,unescape(i.src));d()},i);urlize(URL+'u='+u+'&q=',i,a.data,a.url);append(body(),i)},xdrfast:function(a){var i=_.create('\x69\x6d\x67');i.onload=i.onerror=function(){a.done&&a.done.call(i);remove(body(),i)};i.style.display='none';urlize(a.url,i,a.data);append(body(),i)},ajax:function(a){var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest(),rsc=function(){if(xhr&&xhr.readyState==4&&!done){done=1;if(ival){clearInterval(ival);ival=null}if((xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223)a.success&&a.success(xhr.responseText);else a.error&&a.error(xhr.responseText);xhr=null}},done=0,ival=setInterval(rsc,14),k='';xhr.open(a.type||'get',a.url);xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.serial=[];for(k in a.data){a.serial.push(k+'='+a.data[k])}xhr.send(a.serial.join('&'))},each:function(f){each(_,f);return _},map:function(f){map(_,f);return _},grep:function(f){var r=[];each(_,function(i){r.push(_[i]);delete _[i]});each(grep(r,f),function(i){_.push(this)});if(_.length){while(!_.shift()){}}return _},body:function(f){return find(body())},unbind:function(t,f){each(_,function(){unbind(t,this)});return _},bind:function(t,f){each(_,function(){bind(t,f,this)});return _},invoke:function(c){each(_,function(){this['on'+c]&&this['on'+c].call(this)});return _},val:function(v){if(!v)return _[0].value;each(_,function(){this.value=v});return _},attr:function(k,v){if(!v)return _[0].getAttribute(k);each(_,function(){this.setAttribute(k,v)});return _},html:function(t){each(_,function(){var r=html(this,t);if(r)return r});return _},create:function(t){return document.createElement(t)},prepend:function(c){each(_,function(){this.parentNode.insertBefore(c,this)});return _},remove:function(c){each(_,function(){remove(this.parentNode,c)});return _},append:function(c){each(_,function(){append(this,c)});return _}});return find(q||'')}})();