;(function($){$.extend({path:{ignoreFiles:['index.htm','index.html','index.shtml','index.cgi','index.php'],strictQuery:true,ignore:function(){return new RegExp('('+$.path.ignoreFiles.join('|')+')','i')},window:function(){var _l=window.location;var _w=(_l.protocol+'//'+_l.hostname+_l.pathname+_l.hash).cleanPath($.path.ignore()).split('/');var _q=_l.search.substring(1).length>0?_l.search.substring(1).split('&'):[];if(!$.path.strictQuery){_q.sort()}return _w.concat(_q)},anchor:function(_this){var _org=_this.getAttribute('href',1);if(!_org||_this.nodeName!='A'){return false}var _l=window.location;var _href=_org.absUrl().cleanPath($.path.ignore());if(_href===(_l.protocol+'//'+_l.hostname).replace(/www\./,'').noSlash()){return false}var _s=_href.split("?");var _a=_s[0].noSlash().split('/');var _q=_s.length>1?_s[1].split('&'):[];if(!$.path.strictQuery){_q.sort()}return _a.concat(_q)},match:function(_this){var _a=$.path.anchor(_this);var _w=$.path.window();return _w.length<_a.length?false:_w.slice(0,_a.length).compare(_a)},current:function(_this){var _a=$.path.anchor(_this);var _w=$.path.window();return _w.length==_a.length?true:false}}});$.extend($.expr[":"],{path:'jQuery.path.match(a);'});$.extend($.expr[":"],{current:'jQuery.path.current(a);'});String.prototype.noSlash=function(){return this.lastIndexOf('/')===this.length-1?this.substr(0,this.length-1):this.toString()};String.prototype.absUrl=function(){var l=window.location,h,p,f,i;if(/^\w+:/.test(this)){return this.toString()}h=l.protocol+'//'+l.host;if(this.indexOf('/')===0){return h+this.toString()}p=l.pathname.replace(/\/[^\/]*$/,'');f=this.match(/\.\.\//g);if(f){var n=this.substring(f.length*3);for(i=f.length;i--;){p=p.substring(0,p.lastIndexOf('/'))}}else{n=this.toString()}return h+p+'/'+n};String.prototype.cleanPath=function(ignore){return this.replace(/www\./i,'').replace(ignore,'').toString()};Array.prototype.compare=function(t){if(this.length!=t.length){return false}for(var i=0;i<t.length;i++){if(this[i]!==t[i]){return false}}return true}})(jQuery);
