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