$(function() {
	var notBlank = new Array("propose-ring.jp");	// blankで開かないURLを配列で

	var n = "";
	for (var i = 0; i < notBlank.length; i ++) n += ":not([href*='" + notBlank[i] + "'])";

	$("a[rel='external'], a[href$='.pdf']").attr("target", "_blank");
	$("a[href^=http]"+n).attr("target", "_blank");

	if(!location.href.match(/^http/)){
		$("a[href$='/']").not("a[href^='http']").each( function(){
			$(this).attr('href', $(this).attr('href') + 'index.html');
		});
		$("a[href*='/#']").not("a[href^='http'],a[href$='.html']").each( function(){
			var n = $(this).attr('href').lastIndexOf("/#") + 1;
			$(this).attr('href', $(this).attr('href').substring(0, n) + 'index.html' + $(this).attr('href').substring(n));
		});
	}
});

