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