$(function(){
    $("img.imgover").mouseover(function(){
    	if(!$(this).attr("src").match("_on"))
    	{
        $(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));
        }
    }).mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
    })
})

/* globalNavi用 */
$(function(){
    $("img.imgoverNavi").mouseover(function(){
    	if(!$(this).attr("src").match("_r"))
    	{
			/* アクティブページの場合 */
			if($(this).attr("src").match("_on"))
			{
				$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1_r$2"));
			}
			/* アクティブページでない場合 */
			else{
				$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"));
			}
        }
    }).mouseout(function(){
		/* アクティブページの場合 */
    	if($(this).attr("class").match("navi_a"))
    	{
				$(this).attr("src",$(this).attr("src").replace(/^(.+)_r(\.[a-z]+)$/, "$1_on$2"));
        }
		/* アクティブページでない場合 */
        else{
			$(this).attr("src",$(this).attr("src").replace(/^(.+)_r(\.[a-z]+)$/, "$1$2"));
		}
    })
})


/* contentsNavi用 */
$(function(){
    $("img.imgoverPNavi").mouseover(function(){
    	if(!$(this).attr("src").match("_on"))
    	{
        $(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));
        }
    }).mouseout(function(){
		/* アクティブページでない場合 */
    	if(!$(this).attr("class").match("navi_a"))
    	{
        	$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
        }
    })
})