$(function(){
var id,
	ignore = [
		"credit.orix.co.jp",
		"vip.orix.co.jp"
	];
if(id=window.location.search.match(/id=[^&]*/)){
id = '?' + id;
$('a').each(function(){
var href = $(this).attr('href');
if( href ===null || href === undefined || href === "" ) return;
if( href.match(/^http/) ){
	var flg = false;
	for( var i = 0, l=ignore.length; l > i; i++ ){
		var s = '/^http(|s):\\/\\/' + ignore[i] + '/';
		if( href.match( eval(s) ) ) {
			flg = true;
		}
	}
	if( !flg ) return;
}
if(!href.match(/^javascript/) && !href.match(/^#/)){
if(href.match(/\?/)) this.setAttribute('href', href.replace(/\?/,id+'&'));
else if(href.match(/\#/)) this.setAttribute('href', href.replace(/\#/,id+'#'));
else this.setAttribute('href', href+id);
}
});
}
});

