ACMS.Dispatch.Linkmatchlocation._getHref=function(elm){if($(elm).is("a"))var href=elm.href;else{var $a=$("a",elm);if(!$a.size())return false;var href=$a[0].href}return href};
ACMS.Dispatch.Linkmatchlocation._linkmatchlocation=function(elm,aryPath,className){var href=this._getHref(elm);if(!href)return false;var re=new RegExp("https?://"+document.location.hostname+"/");if(!re.test(href))return false;var root="/";if("string"==typeof ACMS.Config.offset)$.each(ACMS.Config.offset.split("/"),function(){if(""==this)return true;root+=this+"/"});var path=root+aryPath.join("/");var pathname=decodeURI(href.replace(/https?:\/\/[^/]*/,"").replace(/\/$/,""));if(path.length<=pathname.length&&
0<=pathname.indexOf(path))$(elm).addClass(className)};ACMS.Dispatch.Linkmatchlocation.part=function(elm){var href=ACMS.Dispatch.Linkmatchlocation._getHref(elm);if(0||0===document.location.href.indexOf(href)||0===encodeURI(document.location.href).indexOf(href))$(elm).addClass(ACMS.Config.linkMatchLocationClass);return true};
ACMS.Dispatch.Linkmatchlocation.full=function(elm){var href=ACMS.Dispatch.Linkmatchlocation._getHref(elm);if(0||href===document.location.href||href===encodeURI(document.location.href))$(elm).addClass(ACMS.Config.linkMatchLocationFullClass);return true};ACMS.Dispatch.Linkmatchlocation.blog=function(elm){var aryPath=[];if(ACMS.Config.bcd)aryPath.push(ACMS.Config.bcd);ACMS.Dispatch.Linkmatchlocation._linkmatchlocation(elm,aryPath,ACMS.Config.linkMatchLocationBlogClass)};
ACMS.Dispatch.Linkmatchlocation.category=function(elm){var aryPath=[];if(ACMS.Config.bcd)aryPath.push(ACMS.Config.bcd);if(ACMS.Config.ccd)aryPath.push(ACMS.Config.ccd);else return true;ACMS.Dispatch.Linkmatchlocation._linkmatchlocation(elm,aryPath,ACMS.Config.linkMatchLocationCategoryClass)};
ACMS.Dispatch.Linkmatchlocation.entry=function(elm){var aryPath=[];if(ACMS.Config.bcd)aryPath.push(ACMS.Config.bcd);if(ACMS.Config.ccd)aryPath.push(ACMS.Config.ccd);if(ACMS.Config.ecd)aryPath.push(ACMS.Config.ecd);ACMS.Dispatch.Linkmatchlocation._linkmatchlocation(elm,aryPath,ACMS.Config.linkMatchLocationEntryClass)};
