<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1 @@
-var xui;(function(){var xui=function(q){q=q||document;return this.find(q)};xui.extend=function(obj){var original=this.prototype;var extended=obj;for(var key in (extended||{})){original[key]=extended[key]}return original};xui.prototype={elements:[],find:function(q){var ele=[];var qlen=q.length;var list,size;var i,j;for(i=0;i&lt;qlen;i++){if(typeof q[i]==&quot;string&quot;){list=document.querySelectorAll(q[i]);size=list.length;for(j=0;j&lt;size;j++){ele.push(list[j])}}else{if(q[i] instanceof Array){for(var x=0;x&lt;q[i].length;x++){list=document.querySelectorAll(q[i][x]);size=list.length;for(j=0;j&lt;size;j++){ele.push(list[j])}}}else{ele.push(q[i])}}}this.elements=this.elements.concat(this.reduce(ele));return this},reduce:function(el,b){var a=[],i,l=el.length;for(i=0;i&lt;l;i++){if(a.indexOf(el[i],0,b)&lt;0){a.push(el[i])}}return a},removex:function(array,from,to){var rest=array.slice((to||from)+1||array.length);array.length=from&lt;0?array.length+from:from;return array.push.apply(array,rest)},has:function(q){var t=[];this.each(function(el){x$(q).each(function(hel){if(hel==el){t.push(el)}})});this.elements=t;return this},not:function(q){var list=this.elements;for(var i=0;i&lt;list.length;i++){x$(q).each(function(hel){if(list[i]==hel){this.elements=this.removex(list,list.indexOf(list[i]))}})}return this},add:function(q){this.find([q]);this.elements=this.reduce(this.elements);return this},first:function(){return this.get(0)},get:function(index){return this.elements[index]},eq:function(idx1,idx2){var idx2=idx2?idx2+1:idx1+1;this.elements=this.elements.slice(idx1,idx2);return this},size:function(){return this.elements.length},each:function(fn){for(var i=0,len=this.elements.length;i&lt;len;++i){if(fn.call(this,this.elements[i])===false){break}}return this}};var libs=[];var Dom={inner:function(html){return this.html(&quot;inner&quot;,html)},outer:function(html){return this.html(&quot;outer&quot;,html)},top:function(html){return this.html(&quot;top&quot;,html)},bottom:function(html){return this.html(&quot;bottom&quot;,html)},remove:function(){return this.html(&quot;remove&quot;)},before:function(html){return this.html(&quot;before&quot;,html)},after:function(html){return this.html(&quot;after&quot;,html)},html:function(location,html){var getTag=function(el){if(el.firstChild===null){switch(el.tagName){case&quot;UL&quot;:return&quot;LI&quot;;case&quot;DL&quot;:return&quot;DT&quot;;case&quot;TR&quot;:return&quot;TD&quot;;default:return el.tagName}}return el.firstChild.tagName};var wrap=function(xhtml,tag){var attributes={};var re=/^&lt;([A-Z][A-Z0-9]*)([^&gt;]*)&gt;(.*)&lt;\/\1&gt;/i;if(re.test(xhtml)){result=re.exec(xhtml);tag=result[1];if(result[2]!==&quot;&quot;){var attrList=result[2].split(/([A-Z]*\s*=\s*['|&quot;][A-Z0-9:;#\s]*['|&quot;])/i);for(var i=0;i&lt;attrList.length;i++){var attr=attrList[i].replace(/^\s*|\s*$/g,&quot;&quot;);if(attr!==&quot;&quot;&amp;&amp;attr!==&quot; &quot;){var node=attr.split(&quot;=&quot;);attributes[node[0]]=node[1].replace(/([&quot;']?)/g,&quot;&quot;)}}}xhtml=result[3]}var element=document.createElement(tag);for(var x in attributes){var a=document.createAttribute(x);a.nodeValue=attributes[x];element.setAttributeNode(a)}element.innerHTML=xhtml;return element};this.clean();if(arguments.length==0){return this.elements[0].innerHTML}if(arguments.length==1&amp;&amp;arguments[0]!=&quot;remove&quot;){html=location;location=&quot;inner&quot;}this.each(function(el){switch(location){case&quot;inner&quot;:if(typeof html==&quot;string&quot;){el.innerHTML=html;var list=el.getElementsByTagName(&quot;SCRIPT&quot;);var len=list.length;for(var i=0;i&lt;len;i++){eval(list[i].text)}}else{el.innerHTML=&quot;&quot;;el.appendChild(html)}break;case&quot;outer&quot;:if(typeof html==&quot;string&quot;){html=wrap(html,getTag(el))}el.parentNode.replaceChild(html,el);break;case&quot;top&quot;:if(typeof html==&quot;string&quot;){html=wrap(html,getTag(el))}el.insertBefore(html,el.firstChild);break;case&quot;bottom&quot;:if(typeof html==&quot;string&quot;){html=wrap(html,getTag(el))}el.insertBefore(html,null);break;case&quot;remove&quot;:var parent=el.parentNode;parent.removeChild(el);break;case&quot;before&quot;:var parent=el.parentNode;if(typeof html==&quot;string&quot;){html=wrap(html,getTag(parent))}parent.insertBefore(html,el);break;case&quot;after&quot;:var parent=el.parentNode;if(typeof html==&quot;string&quot;){html=wrap(html,getTag(parent))}parent.insertBefore(html,el.nextSibling);break}});return this},clean:function(){var ns=/\S/;this.each(function(el){var d=el,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&amp;&amp;!ns.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}});return this},attr:function(attribute,val){if(arguments.length==2){this.each(function(el){el.setAttribute(attribute,val)});return this}else{var attrs=[];this.each(function(el){if(el.getAttribute(attribute)!=null){attrs.push(el.getAttribute(attribute))}});return attrs}}};libs.push(Dom);var Event={click:function(fn){return this.on(&quot;click&quot;,fn)},load:function(fn){return this.on(&quot;load&quot;,fn)},touchstart:function(fn){return this.on(&quot;touchstart&quot;,fn)},touchmove:function(fn){return this.on(&quot;touchmove&quot;,fn)},touchend:function(fn){return this.on(&quot;touchend&quot;,fn)},touchcancel:function(fn){return this.on(&quot;touchcancel&quot;,fn)},gesturestart:function(fn){return this.on(&quot;gesturestart&quot;,fn)},gesturechange:function(fn){return this.on(&quot;gesturechange&quot;,fn)},gestureend:function(fn){return this.on(&quot;gestureend&quot;,fn)},orientationchange:function(fn){return this.on(&quot;orientationchange&quot;,fn)},on:function(type,fn){var listen=function(el){if(window.addEventListener){el.addEventListener(type,fn,false)}};this.each(function(el){listen(el)});return this}};libs.push(Event);var Style={setStyle:function(prop,val){this.each(function(el){el.style[prop]=val});return this},getStyle:function(prop,callback){var gs=function(el,p){return document.defaultView.getComputedStyle(el,&quot;&quot;).getPropertyValue(p)};if(callback===undefined){return gs(this.first(),prop)}this.each(function(el){callback(gs(el,prop))});return this},addClass:function(className){var that=this;var hasClass=function(el,className){var re=that.getClassRegEx(className);return re.test(el.className)};this.each(function(el){if(hasClass(el,className)===false){el.className+=&quot; &quot;+className}});return this},hasClass:function(className,callback){var that=this;if(callback===undefined&amp;&amp;this.elements.length==1){var re=this.getClassRegEx(className);return re.test(that.first().className)}this.each(function(el){var re=that.getClassRegEx(className);if(re.test(el.className)==true){callback(el)}});return this},removeClass:function(className){if(className===undefined){this.each(function(el){el.className=&quot;&quot;})}else{var re=this.getClassRegEx(className);this.each(function(el){el.className=el.className.replace(re,&quot; &quot;)})}return this},css:function(o){var that=this;this.each(function(el){for(var prop in o){that.setStyle(prop,o[prop])}});return this||that},reClassNameCache:{},getClassRegEx:function(className){var re=this.reClassNameCache[className];if(!re){re=new RegExp(&quot;(?:^|\\s+)&quot;+className+&quot;(?:\\s+|$)&quot;);this.reClassNameCache[className]=re}return re}};libs.push(Style);var Fx={tween:function(options,callback){this.animationStack=[];if(options instanceof Array){for(var i=0;i&lt;options.length;i++){this.animationStack.push(options[i])}}else{if(options instanceof Object){this.animationStack.push(options)}}this.start(callback);return this},animationStack:[],start:function(callback){var t=0;var len=this.animationStack.length;for(var i=0;i&lt;this.animationStack.length;i++){var options=this.animationStack[i];var duration=options.duration===undefined?0.5:options.duration;setTimeout(function(s,o,i){s.animate(o);if((i==len-1)&amp;&amp;callback&amp;&amp;typeof (callback)==&quot;function&quot;){callback()}},t*1000*duration,this,options);t+=duration}return this},animate:function(options){var that=this;var opt_after=options.after;var easing=(options.easing===undefined)?&quot;ease-in&quot;:options.easing;var before=(options.before===undefined)?function(){}:options.before;var after=(opt_after===undefined)?function(){}:function(){opt_after.apply(that)};var duration=(options.duration===undefined)?0.5:options.duration;var translate=options.by;var rotate=options.rotate;options.easing=options.rotate=options.by=options.before=options.after=options.duration=undefined;before.apply(before.arguments);this.setStyle(&quot;-webkit-transition&quot;,&quot;all &quot;+duration+&quot;s &quot;+easing);this.each(function(el){for(var prop in options){that.setStyle(prop,options[prop])}if(translate){that.setStyle(&quot;-webkit-transform&quot;,that.translateOp(translate[0],translate[1]))}if(rotate){that.setStyle(&quot;-webkit-transform&quot;,that.rotateOp(rotate[0],rotate[1]))}});setTimeout(function(){that.setStyle(&quot;-webkit-transition&quot;,&quot;none&quot;)},duration*1000);setTimeout(function(){that.setStyle(&quot;-webkit-transform&quot;,&quot;none&quot;)},duration*1000);setTimeout(after,duration*1000);return this||that},translateOp:function(xPixels,yPixels){return&quot;translate(&quot;+xPixels+&quot;px, &quot;+yPixels+&quot;px)&quot;},rotateOp:function(axis,degree){return&quot;rotate&quot;+axis.toUpperCase()+&quot;(&quot;+degree+&quot;deg)&quot;}};libs.push(Fx);var Xhr={xhr:function(url,options){var o=options;if(typeof options==&quot;function&quot;){o={};o.callback=options}if(options===undefined){o={}}var that=this;var req=new XMLHttpRequest();var method=o.method||&quot;get&quot;;var async=o.async||false;var params=o.data||null;if(o.headers){for(var i=0;i&lt;o.headers.length;i++){req.setRequestHeader(o.headers[i].name,o.headers[i].value)}}req.open(method,url,async);req.onload=(o.callback!=null)?o.callback:function(){that.html(this.responseText)};req.send(params);return this},xhrjson:function(url,options){if(options===undefined){return this}var that=this;var cb=options.callback;if(typeof cb!=&quot;function&quot;){cb=function(x){return x}}var callback=function(){var o=eval(&quot;(&quot;+this.responseText+&quot;)&quot;);for(var prop in o){x$(options.map[prop]).html(cb(o[prop]))}};options.callback=callback;this.xhr(url,options);return this}};libs.push(Xhr);for(var i=0,size=libs.length;i&lt;size;i++){xui.extend(libs[i])}window.x$=function(){return new xui(arguments)}})();
\ No newline at end of file
+var xui;(function(){var xui=function(q){q=q||document;return this.find(q)};xui.extend=function(obj){var original=this.prototype;var extended=obj;for(var key in (extended||{})){original[key]=extended[key]}return original};xui.prototype={elements:[],find:function(q){var ele=[];var qlen=q.length;var list,size;var i,j;for(i=0;i&lt;qlen;i++){if(typeof q[i]==&quot;string&quot;){list=document.querySelectorAll(q[i]);size=list.length;for(j=0;j&lt;size;j++){ele.push(list[j])}}else{if(q[i] instanceof Array){for(var x=0;x&lt;q[i].length;x++){list=document.querySelectorAll(q[i][x]);size=list.length;for(j=0;j&lt;size;j++){ele.push(list[j])}}}else{ele.push(q[i])}}}this.elements=this.elements.concat(this.reduce(ele));return this},reduce:function(el,b){var a=[],i,l=el.length;for(i=0;i&lt;l;i++){if(a.indexOf(el[i],0,b)&lt;0){a.push(el[i])}}return a},removex:function(array,from,to){var rest=array.slice((to||from)+1||array.length);array.length=from&lt;0?array.length+from:from;return array.push.apply(array,rest)},has:function(q){var t=[];this.each(function(el){x$(q).each(function(hel){if(hel==el){t.push(el)}})});this.elements=t;return this},not:function(q){var list=this.elements;for(var i=0;i&lt;list.length;i++){x$(q).each(function(hel){if(list[i]==hel){this.elements=this.removex(list,list.indexOf(list[i]))}})}return this},add:function(q){this.find([q]);this.elements=this.reduce(this.elements);return this},first:function(){return this.get(0)},get:function(index){return this.elements[index]},eq:function(idx1,idx2){var idx2=idx2?idx2+1:idx1+1;this.elements=this.elements.slice(idx1,idx2);return this},size:function(){return this.elements.length},each:function(fn){for(var i=0,len=this.elements.length;i&lt;len;++i){if(fn.call(this,this.elements[i])===false){break}}return this}};var libs=[];var Dom={inner:function(html){return this.html(&quot;inner&quot;,html)},outer:function(html){return this.html(&quot;outer&quot;,html)},top:function(html){return this.html(&quot;top&quot;,html)},bottom:function(html){return this.html(&quot;bottom&quot;,html)},remove:function(){return this.html(&quot;remove&quot;)},before:function(html){return this.html(&quot;before&quot;,html)},after:function(html){return this.html(&quot;after&quot;,html)},html:function(location,html){var getTag=function(el){if(el.firstChild===null){switch(el.tagName){case&quot;UL&quot;:return&quot;LI&quot;;case&quot;DL&quot;:return&quot;DT&quot;;case&quot;TR&quot;:return&quot;TD&quot;;default:return el.tagName}}return el.firstChild.tagName};var wrap=function(xhtml,tag){var attributes={};var re=/^&lt;([A-Z][A-Z0-9]*)([^&gt;]*)&gt;(.*)&lt;\/\1&gt;/i;if(re.test(xhtml)){result=re.exec(xhtml);tag=result[1];if(result[2]!==&quot;&quot;){var attrList=result[2].split(/([A-Z]*\s*=\s*['|&quot;][A-Z0-9:;#\s]*['|&quot;])/i);for(var i=0;i&lt;attrList.length;i++){var attr=attrList[i].replace(/^\s*|\s*$/g,&quot;&quot;);if(attr!==&quot;&quot;&amp;&amp;attr!==&quot; &quot;){var node=attr.split(&quot;=&quot;);attributes[node[0]]=node[1].replace(/([&quot;']?)/g,&quot;&quot;)}}}xhtml=result[3]}var element=document.createElement(tag);for(var x in attributes){var a=document.createAttribute(x);a.nodeValue=attributes[x];element.setAttributeNode(a)}element.innerHTML=xhtml;return element};this.clean();if(arguments.length==0){return this.elements[0].innerHTML}if(arguments.length==1&amp;&amp;arguments[0]!=&quot;remove&quot;){html=location;location=&quot;inner&quot;}this.each(function(el){switch(location){case&quot;inner&quot;:if(typeof html==&quot;string&quot;){el.innerHTML=html;var list=el.getElementsByTagName(&quot;SCRIPT&quot;);var len=list.length;for(var i=0;i&lt;len;i++){eval(list[i].text)}}else{el.innerHTML=&quot;&quot;;el.appendChild(html)}break;case&quot;outer&quot;:if(typeof html==&quot;string&quot;){html=wrap(html,getTag(el))}el.parentNode.replaceChild(html,el);break;case&quot;top&quot;:if(typeof html==&quot;string&quot;){html=wrap(html,getTag(el))}el.insertBefore(html,el.firstChild);break;case&quot;bottom&quot;:if(typeof html==&quot;string&quot;){html=wrap(html,getTag(el))}el.insertBefore(html,null);break;case&quot;remove&quot;:var parent=el.parentNode;parent.removeChild(el);break;case&quot;before&quot;:var parent=el.parentNode;if(typeof html==&quot;string&quot;){html=wrap(html,getTag(parent))}parent.insertBefore(html,el);break;case&quot;after&quot;:var parent=el.parentNode;if(typeof html==&quot;string&quot;){html=wrap(html,getTag(parent))}parent.insertBefore(html,el.nextSibling);break}});return this},clean:function(){var ns=/\S/;this.each(function(el){var d=el,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&amp;&amp;!ns.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}});return this},attr:function(attribute,val){if(arguments.length==2){this.each(function(el){el.setAttribute(attribute,val)});return this}else{var attrs=[];this.each(function(el){if(el.getAttribute(attribute)!=null){attrs.push(el.getAttribute(attribute))}});return attrs}}};libs.push(Dom);var Event={click:function(fn){return this.on(&quot;click&quot;,fn)},load:function(fn){return this.on(&quot;load&quot;,fn)},touchstart:function(fn){return this.on(&quot;touchstart&quot;,fn)},touchmove:function(fn){return this.on(&quot;touchmove&quot;,fn)},touchend:function(fn){return this.on(&quot;touchend&quot;,fn)},touchcancel:function(fn){return this.on(&quot;touchcancel&quot;,fn)},gesturestart:function(fn){return this.on(&quot;gesturestart&quot;,fn)},gesturechange:function(fn){return this.on(&quot;gesturechange&quot;,fn)},gestureend:function(fn){return this.on(&quot;gestureend&quot;,fn)},orientationchange:function(fn){return this.on(&quot;orientationchange&quot;,fn)},on:function(type,fn){var listen=function(el){if(window.addEventListener){el.addEventListener(type,fn,false)}};this.each(function(el){listen(el)});return this}};libs.push(Event);var Style={setStyle:function(prop,val){this.each(function(el){el.style[prop]=val});return this},getStyle:function(prop,callback){var gs=function(el,p){return document.defaultView.getComputedStyle(el,&quot;&quot;).getPropertyValue(p)};if(callback===undefined){return gs(this.first(),prop)}this.each(function(el){callback(gs(el,prop))});return this},addClass:function(className){var that=this;var hasClass=function(el,className){var re=that.getClassRegEx(className);return re.test(el.className)};this.each(function(el){if(hasClass(el,className)===false){el.className+=&quot; &quot;+className}});return this},hasClass:function(className,callback){var that=this;if(callback===undefined&amp;&amp;this.elements.length==1){var re=this.getClassRegEx(className);return re.test(that.first().className)}this.each(function(el){var re=that.getClassRegEx(className);if(re.test(el.className)==true){callback(el)}});return this},removeClass:function(className){if(className===undefined){this.each(function(el){el.className=&quot;&quot;})}else{var re=this.getClassRegEx(className);this.each(function(el){el.className=el.className.replace(re,&quot; &quot;)})}return this},css:function(o){var that=this;this.each(function(el){for(var prop in o){that.setStyle(prop,o[prop])}});return this||that},reClassNameCache:{},getClassRegEx:function(className){var re=this.reClassNameCache[className];if(!re){re=new RegExp(&quot;(?:^|\\s+)&quot;+className+&quot;(?:\\s+|$)&quot;);this.reClassNameCache[className]=re}return re}};libs.push(Style);var Fx={tween:function(options,callback){this.animationStack=[];if(options instanceof Array){for(var i=0;i&lt;options.length;i++){this.animationStack.push(options[i])}}else{if(options instanceof Object){this.animationStack.push(options)}}this.start(callback);return this},animationStack:[],start:function(callback){var t=0;var len=this.animationStack.length;for(var i=0;i&lt;this.animationStack.length;i++){var options=this.animationStack[i];var duration=options.duration===undefined?0.5:options.duration;setTimeout(function(s,o,i){s.animate(o);if((i==len-1)&amp;&amp;callback&amp;&amp;typeof (callback)==&quot;function&quot;){callback()}},t*1000*duration,this,options);t+=duration}return this},animate:function(options){var that=this;var opt_after=options.after;var easing=(options.easing===undefined)?&quot;ease-in&quot;:options.easing;var before=(options.before===undefined)?function(){}:options.before;var after=(opt_after===undefined)?function(){}:function(){opt_after.apply(that)};var duration=(options.duration===undefined)?0.5:options.duration;var translate=options.by;var rotate=options.rotate;options.easing=options.rotate=options.by=options.before=options.after=options.duration=undefined;before.apply(before.arguments);this.setStyle(&quot;-webkit-transition&quot;,&quot;all &quot;+duration+&quot;s &quot;+easing);this.each(function(el){for(var prop in options){that.setStyle(prop,options[prop])}if(translate){that.setStyle(&quot;-webkit-transform&quot;,that.translateOp(translate[0],translate[1]))}if(rotate){that.setStyle(&quot;-webkit-transform&quot;,that.rotateOp(rotate[0],rotate[1]))}});setTimeout(function(){that.setStyle(&quot;-webkit-transition&quot;,&quot;none&quot;)},duration*1000);setTimeout(function(){that.setStyle(&quot;-webkit-transform&quot;,&quot;none&quot;)},duration*1000);setTimeout(after,duration*1000);return this||that},translateOp:function(xPixels,yPixels){return&quot;translate(&quot;+xPixels+&quot;px, &quot;+yPixels+&quot;px)&quot;},rotateOp:function(axis,degree){return&quot;rotate&quot;+axis.toUpperCase()+&quot;(&quot;+degree+&quot;deg)&quot;}};libs.push(Fx);var Xhr={xhr:function(url,options){if(options==undefined){var options={}}var that=this;var req=new XMLHttpRequest();var method=options.method||&quot;get&quot;;var async=options.async||false;var params=options.data||null;req.open(method,url,async);req.onload=(options.callback!=null)?options.callback:function(){that.html(this.responseText)};if(method===&quot;post&quot;){req.setRequestHeader(&quot;Content-type&quot;,&quot;application/x-www-form-urlencoded&quot;);req.send(params)}else{req.send(params)}return this},xhrjson:function(url,options){if(options===undefined){return this}var that=this;var cb=options.callback;if(typeof cb!=&quot;function&quot;){cb=function(x){return x}}var callback=function(){var o=eval(&quot;(&quot;+this.responseText+&quot;)&quot;);for(var prop in o){x$(options.map[prop]).html(cb(o[prop]))}};options.callback=callback;this.xhr(url,options);return this}};libs.push(Xhr);for(var i=0,size=libs.length;i&lt;size;i++){xui.extend(libs[i])}window.x$=function(){return new xui(arguments)}})();
\ No newline at end of file</diff>
      <filename>lib/xui-min.js</filename>
    </modified>
    <modified>
      <diff>@@ -1022,36 +1022,26 @@ var Xhr = {
 	 *		x$('#left-panel).xhr('/panel', function(){ alert(this.responseText) });    // New Callback Syntax
 	 */
     xhr:function(url,options) {
-        var o = options;
-
-        if (typeof options == &quot;function&quot;) {
-            o = {};
-            o.callback = options;
-        }
-
-        if (options === undefined) {
-            o = {};
-        }
-
-        var that   = this;
-        var req    = new XMLHttpRequest();
-        var method = o.method || 'get';
-        var async  = o.async || false;
-        var params = o.data || null;
-
-        if (o.headers) {
-            for (var i=0; i&lt;o.headers.length; i++) {
-              req.setRequestHeader(o.headers[i].name, o.headers[i].value);
-            }
-        }
-
-
-        req.open(method,url,async);
-        req.onload = (o.callback != null) ? o.callback : function() { that.html(this.responseText); };
-        req.send(params);
-
-    	return this;
-    },
+        if (options == undefined) var options = {};
+
+         var that   = this;
+         var req    = new XMLHttpRequest();
+         var method = options.method || 'get';
+         var async  = options.async || false ;
+         var params = options.data || null;
+
+         req.open(method,url,async);
+         req.onload = (options.callback != null) ? options.callback : function() { that.html(this.responseText); }
+
+         if (method === 'post') {
+            req.setRequestHeader(&quot;Content-type&quot;, &quot;application/x-www-form-urlencoded&quot;);
+            req.send(params);
+         } else {
+            req.send(params);
+         }
+
+         return this;
+     },
 
 	/**
 	 *</diff>
      <filename>lib/xui.js</filename>
    </modified>
    <modified>
      <diff>@@ -49,37 +49,27 @@ var Xhr = {
 	 *
 	 *		x$('#left-panel).xhr('/panel', function(){ alert(this.responseText) });    // New Callback Syntax
 	 */
-    xhr:function(url,options) {   
-        var o = options;
-        
-        if (typeof options == &quot;function&quot;) {
-            o = {};
-            o.callback = options;
-        }
-        
-        if (options === undefined) {
-            o = {};
-        }
+    xhr:function(url,options) {
+        if (options == undefined) var options = {};
 
-        var that   = this;
-        var req    = new XMLHttpRequest();
-        var method = o.method || 'get';
-        var async  = o.async || false;            
-        var params = o.data || null;
+         var that   = this;
+         var req    = new XMLHttpRequest();
+         var method = options.method || 'get';
+         var async  = options.async || false ;
+         var params = options.data || null;
 
-        if (o.headers) {
-            for (var i=0; i&lt;o.headers.length; i++) {
-              req.setRequestHeader(o.headers[i].name, o.headers[i].value);
-            }
-        }
-    
-    
-        req.open(method,url,async);
-        req.onload = (o.callback != null) ? o.callback : function() { that.html(this.responseText); };
-        req.send(params);
-  	
-    	return this;
-    },
+         req.open(method,url,async);
+         req.onload = (options.callback != null) ? options.callback : function() { that.html(this.responseText); }
+                                             
+         if (method === 'post') {
+            req.setRequestHeader(&quot;Content-type&quot;, &quot;application/x-www-form-urlencoded&quot;);
+            req.send(params);
+         } else {
+            req.send(params);
+         }
+
+         return this;
+     },
 
 	/**
 	 * 
@@ -129,4 +119,4 @@ var Xhr = {
 //---
 };
 
-libs.push(Xhr);
\ No newline at end of file
+libs.push(Xhr);</diff>
      <filename>src/js/lib/xhr.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>80bf86d159b366dbfed77b78aada4345108823bc</id>
    </parent>
  </parents>
  <author>
    <name>Brian LeRoux</name>
    <email>brian@westcoastlogic.com</email>
  </author>
  <url>http://github.com/brianleroux/xui/commit/be239192774fda202a54efe2367252c291fddb85</url>
  <id>be239192774fda202a54efe2367252c291fddb85</id>
  <committed-date>2009-11-06T01:20:10-08:00</committed-date>
  <authored-date>2009-11-06T01:20:10-08:00</authored-date>
  <message>fix for xhr</message>
  <tree>62da5f3b77704f10d144651f6212b814e277035b</tree>
  <committer>
    <name>Brian LeRoux</name>
    <email>brian@westcoastlogic.com</email>
  </committer>
</commit>
