$(function(){
var path = location.pathname;
path = path.replace(/\/shop\/products\//, '/shop_products/');
path = path.replace(/\/guide\/order/, '/order');
$('#gnav_eminet li a').each(function(){
thref = $(this).attr('href')
if(!thref.match(/^http/)){
thref=getAbsolutePath(thref);
}
thref = thref.replace(/\/index\.html$/,'/');
thref = thref.replace(/\/shop\/products\/list\.html/, '/shop_products/');
thref = thref.replace(/\/shop\/products\/list\.php/,  '/shop_products/');
thref = thref.replace(/\/guide\/order/, '/order');
thref = thref.replace(/http.*?\/\/.*?\//, '');
thref = '/' + thref;
if(path.match(thref) != null){
$('img',$(this)).removeClass('imgover');
isrc = $('img',$(this)).attr('src');
//isrc = isrc.replace(/^([^.]+)\.(jpg|gif)$/, '$1_on\.$2');
isrc = isrc.replace(/^(.+)\.(jpg|gif)$/, '$1_on\.$2');
$('img', $(this)).attr({src: isrc});
}
});
});
function getAbsolutePath(orgPath){
if(!orgPath.match(/^http/)){
var e = document.createElement('span');
e.innerHTML = '<a href="' + orgPath + '" />';
return e.firstChild.href;
}
}

