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