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