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