new function(e){var b=e.separator||"&";var d=e.spaces===false?false:true;var a=e.suffix===false?"":"[]";var g=e.prefix===false?false:true;var c=g?e.hash===true?"#":"?":"";var f=e.numbers===false?false:true;jQuery.query=new function(){var h=function(m,l){return m!=undefined&&m!==null&&(!!l?m.constructor==l:true)};var j=function(q){var l,p=/\[([^[]*)\]/g,n=/^([^[]+)(\[.*\])?$/.exec(q),o=n[1],r=[];while(l=p.exec(n[2])){r.push(l[1])}return[o,r]};var k=function(t,s,q){var r,p=s.shift();if(typeof t!="object"){t=null}if(p===""){if(!t){t=[]}if(h(t,Array)){t.push(s.length==0?q:k(null,s.slice(0),q))}else{if(h(t,Object)){var n=0;while(t[n++]!=null){}t[--n]=s.length==0?q:k(t[n],s.slice(0),q)}else{t=[];t.push(s.length==0?q:k(null,s.slice(0),q))}}}else{if(p&&p.match(/^\s*[0-9]+\s*$/)){var m=parseInt(p,10);if(!t){t=[]}t[m]=s.length==0?q:k(t[m],s.slice(0),q)}else{if(p){var m=p.replace(/^\s*|\s*$/g,"");if(!t){t={}}if(h(t,Array)){var l={};for(var n=0;n<t.length;++n){l[n]=t[n]}t=l}t[m]=s.length==0?q:k(t[m],s.slice(0),q)}else{return q}}}return t};var i=function(l){var m=this;m.keys={};if(l.queryObject){jQuery.each(l.get(),function(n,o){m.SET(n,o)})}else{jQuery.each(arguments,function(){var n=""+this;n=n.replace(/^[?#]/,"");n=n.replace(/[;&]$/,"");if(d){n=n.replace(/[+]/g," ")}jQuery.each(n.split(/[&;]/),function(){var o=decodeURIComponent(this.split("=")[0]||"");var p=decodeURIComponent(this.split("=")[1]||"");if(!o){return}if(f){if(/^[+-]?[0-9]+\.[0-9]*$/.test(p)){p=parseFloat(p)}else{if(/^[+-]?[0-9]+$/.test(p)){p=parseInt(p,10)}}}p=(!p&&p!==0)?true:p;if(p!==false&&p!==true&&typeof p!="number"){p=p}m.SET(o,p)})})}return m};i.prototype={queryObject:true,has:function(l,m){var n=this.get(l);return h(n,m)},GET:function(l){if(!h(l)){return this.keys}var m=j(l),n=m[0],p=m[1];var o=this.keys[n];while(o!=null&&p.length!=0){o=o[p.shift()]}return typeof o=="number"?o:o||""},get:function(l){var m=this.GET(l);if(h(m,Object)){return jQuery.extend(true,{},m)}else{if(h(m,Array)){return m.slice(0)}}return m},SET:function(l,p){var o=!h(p)?null:p;var m=j(l),n=m[0],r=m[1];var q=this.keys[n];this.keys[n]=k(q,r.slice(0),o);return this},set:function(l,m){return this.copy().SET(l,m)},REMOVE:function(l){return this.SET(l,null).COMPACT()},remove:function(l){return this.copy().REMOVE(l)},EMPTY:function(){var l=this;jQuery.each(l.keys,function(m,n){delete l.keys[m]});return l},load:function(m){var n=m.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1");var l=m.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");return new i(m.length==l.length?"":l,m.length==n.length?"":n)},empty:function(){return this.copy().EMPTY()},copy:function(){return new i(this)},COMPACT:function(){function l(o){var n=typeof o=="object"?h(o,Array)?[]:{}:o;if(typeof o=="object"){function m(r,p,q){if(h(r,Array)){r.push(q)}else{r[p]=q}}jQuery.each(o,function(p,q){if(!h(q)){return true}m(n,p,l(q))})}return n}this.keys=l(this.keys);return this},compact:function(){return this.copy().COMPACT()},toString:function(){var n=0,q=[],p=[],m=this;var l=function(s){s=s+"";if(d){s=s.replace(/ /g,"+")}return encodeURIComponent(s)};var o=function(s,t,u){if(!h(u)||u===false){return}var v=[l(t)];if(u!==true){v.push("=");v.push(l(u))}s.push(v.join(""))};var r=function(t,s){var u=function(v){return !s||s==""?[v].join(""):[s,"[",v,"]"].join("")};jQuery.each(t,function(v,w){if(typeof w=="object"){r(w,u(v))}else{o(p,u(v),w)}})};r(this.keys);if(p.length>0){q.push(c)}q.push(p.join(b));return q.join("")}};return new i(location.search,location.hash)}}(jQuery.query||{});
