jQuery.url=function(){var c={},a={},b={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},f=function(){str=decodeURI(b.url);var d=b.parser[b.strictMode?"strict":"loose"].exec(str),a={},c=14;while(c--)a[b.key[c]]=d[c]||"";a[b.q.name]={};a[b.key[12]].replace(b.q.parser,function(e,c,d){if(c)a[b.q.name][c]=d});return a},h=function(b){!a.length&&d();if(b=="base")if(a.port!==null&&a.port!=="")return a.protocol+"://"+a.host+":"+a.port+"/";else return a.protocol+"://"+a.host+"/";return a[b]===""?null:a[b]},g=function(b){!a.length&&d();return a.queryKey[b]===null?null:a.queryKey[b]},d=function(){a=f();e()},e=function(){var b=a.path;c=[];c=a.path.length==1?{}:(b.charAt(b.length-1)=="/"?b.substring(1,b.length-1):(path=b.substring(1))).split("/")};return {setMode:function(a){strictMode=a=="strict"?true:false;return this},setUrl:function(a){b.url=a===undefined?window.location:a;d();return this},segment:function(b){!a.length&&d();if(b===undefined)return c.length;return c[b]===""||c[b]===undefined?null:c[b]},attr:h,param:g}}();