jQuery.url=function(){var d={};var b={};var c={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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var i=function(){str=decodeURI(c.url);var j=c.parser[c.strictMode?"strict":"loose"].exec(str);var e={};var g=14;while(g--){e[c.key[g]]=j[g]||""}e[c.q.name]={};e[c.key[12]].replace(c.q.parser,function(a,h,k){if(h){e[c.q.name][h]=k}});return e};var l=function(a){if(!b.length){f()}if(a=="base"){if(b.port!==null&&b.port!==""){return b.protocol+"://"+b.host+":"+b.port+"/"}else{return b.protocol+"://"+b.host+"/"}}return(b[a]==="")?null:b[a]};var m=function(a){if(!b.length){f()}return(b.queryKey[a]===null)?null:b.queryKey[a]};var f=function(){b=i();n()};var n=function(){var a=b.path;d=[];d=b.path.length==1?{}:(a.charAt(a.length-1)=="/"?a.substring(1,a.length-1):path=a.substring(1)).split("/")};return{setMode:function(a){strictMode=a=="strict"?true:false;return this},setUrl:function(a){c.url=a===undefined?window.location:a;f();return this},segment:function(a){if(!b.length){f()}if(a===undefined){return d.length}return(d[a]===""||d[a]===undefined)?null:d[a]},attr:l,param:m}}();
