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