//サイト上の画像ディレクトリ(サイトルートで記述)
//記述例：siteDirOffice = '/works/img/';
siteDirOffice = '/profile/office/img/';

//////////////////////////////////////
/*
ロールオーバー
rolloverOffice('id名またはclass名','画像ファイル名');

画像置換のみ
repImgOffice('id名またはclass名','画像ファイル名');

altなし
repImgOffice('id名またはclass名','画像ファイル名','false');
*/


	repImgOffice('#osaka #title','osaka_title.gif');
	repImgOffice('#osaka #h2-1','osaka_h2_1.gif');
	repImgOffice('#osaka #h2-2','osaka_h2_2.gif');
	repImgOffice('#osaka #h2-3','osaka_h2_3.gif');
	repImgOffice('#map-osaka','map_osaka.gif');
	
	repImgOffice('#tokyo #title','tokyo_title.gif');
	repImgOffice('#tokyo #h2-1','tokyo_h2_1.gif');
	repImgOffice('#tokyo #h2-2','tokyo_h2_2.gif');
	repImgOffice('#tokyo #h2-3','tokyo_h2_3.gif');
	repImgOffice('#map-tokyo','map_tokyo.gif');

	repImgOffice('#okinawa #title','okinawa_title.gif');
	repImgOffice('#okinawa #h2-1','okinawa_h2_1.gif');
	repImgOffice('#okinawa #h2-2','okinawa_h2_2.gif');
	repImgOffice('#okinawa #h2-3','okinawa_h2_3.gif');
	repImgOffice('#map-okinawa','map_okinawa.gif');

	repImgOffice('#ishigaki #title','ishigaki_title.gif');
	repImgOffice('#ishigaki #h2-1','ishigaki_h2_1.gif');
	repImgOffice('#ishigaki #h2-2','ishigaki_h2_2.gif');
	repImgOffice('#ishigaki #h2-3','ishigaki_h2_3.gif');
	repImgOffice('#map-ishigaki','map_ishigaki.gif');

	repImgOffice('#miyakojima #title','miyakojima_title.gif');
	repImgOffice('#miyakojima #h2-1','miyakojima_h2_1.gif');
	repImgOffice('#miyakojima #h2-2','miyakojima_h2_2.gif');
	repImgOffice('#miyakojima #h2-3','miyakojima_h2_3.gif');
	repImgOffice('#map-miyakojima','map_miyakojima.gif');

	repImgOffice('#hawaii #title','hawaii_title.gif');
	repImgOffice('#hawaii #h2-1','hawaii_h2_1.gif');
	repImgOffice('#hawaii #h2-2','hawaii_h2_2.gif');
	repImgOffice('#hawaii #h2-3','hawaii_h2_3.gif');
	repImgOffice('#map-hawaii','map_hawaii.gif');

	repImgOffice('#guam #title','guam_title.gif');
	repImgOffice('#guam #h2-1','guam_h2_1.gif');
	repImgOffice('#guam #h2-2','guam_h2_2.gif');
	repImgOffice('#guam #h2-3','guam_h2_3.gif');
	repImgOffice('#map-guam','map_guam.gif');

	repImgOffice('#palau #title','palau_title.gif');
	repImgOffice('#palau #h2-1','palau_h2_1.gif');
	repImgOffice('#palau #h2-2','palau_h2_2.gif');
	repImgOffice('#palau #h2-3','palau_h2_3.gif');
	repImgOffice('#map-palau','map_palau.gif');

	repImgOffice('#bali #title','bali_title.gif');
	repImgOffice('#bali #h2-1','bali_h2_1.gif');
	repImgOffice('#bali #h2-2','bali_h2_2.gif');
	repImgOffice('#bali #h2-3','bali_h2_3.gif');
	repImgOffice('#map-bali','map_bali.gif');

	repImgOffice('#fukuoka #title','fukuoka_title.gif');
	repImgOffice('#fukuoka #h2-1','fukuoka_h2_1.gif');
	repImgOffice('#fukuoka #h2-2','fukuoka_h2_2.gif');
	repImgOffice('#fukuoka #h2-3','fukuoka_h2_3.gif');
	repImgOffice('#map-fukuoka','map_fukuoka.gif');

	repImgOffice('#kumamoto #title','kumamoto_title.gif');
	repImgOffice('#kumamoto #h2-1','kumamoto_h2_1.gif');
	repImgOffice('#kumamoto #h2-2','kumamoto_h2_2.gif');
	repImgOffice('#kumamoto #h2-3','kumamoto_h2_3.gif');
	repImgOffice('#map-kumamoto','map_kumamoto.gif');
	

document.write('<style type="text/css" media="screen,tty,tv,projection,handheld,print,braille,embossed,speech">');
document.write('#osaka #title,#osaka #h2-1,#osaka #h2-2,#osaka #h2-3,#map-osaka,#tokyo #title,#tokyo #h2-1,#tokyo #h2-2,#tokyo #h2-3,#map-tokyo,#okinawa #title,#okinawa #h2-1,#okinawa #h2-2,#okinawa #h2-3,#map-okinawa,#ishigaki #title,#ishigaki #h2-1,#ishigaki #h2-2,#ishigaki #h2-3,#map-ishigaki,#miyakojima #title,#miyakojima #h2-1,#miyakojima #h2-2,#miyakojima #h2-3,#map-miyakojima,#hawaii #title,#hawaii #h2-1,#hawaii #h2-2,#hawaii #h2-3,#map-hawaii,#guam #title,#guam #h2-1,#guam #h2-2,#guam #h2-3,#map-guam,#palau #title,#palau #h2-1,#palau #h2-2,#palau #h2-3,#map-palau,#bali #title,#bali #h2-1,#bali #h2-2,#bali #h2-3,#map-bali,#fukuoka #title,#fukuoka #h2-1,#fukuoka #h2-2,#fukuoka #h2-3,#map-fukuoka,#kumamoto #title,#kumamoto #h2-1,#kumamoto #h2-2,#kumamoto #h2-3,#map-kumamoto');
document.write('{display:block;text-indent: -9999px;}');
document.write('</style>');



/////////////////////////////////////

urlCom = document.URL;//urlを取得

if(siteDirComG != ""){
	imgDirOffice = "http://"+location.hostname+siteDirComG+siteDirOffice;
}
else if(urlCom.indexOf('http://') != -1 && urlCom.indexOf('wadax.ne.jp') != -1){
	imgDirOffice = WADAXDirCom+siteDirOffice;
}
else if(urlCom.indexOf('http://') != -1){
	imgDirOffice = "http://"+location.hostname+siteDirOffice;
}
else if(urlCom.indexOf('https://') != -1 && urlCom.indexOf('wadax.ne.jp') != -1){
	imgDirOffice = WADAXsslDirCom+siteDirOffice;
}
else if(urlCom.indexOf('https://') != -1){
	imgDirOffice = "https://"+location.hostname+siteDirOffice;
}
else{
	imgDirOffice = localDirCom+siteDirOffice;
}

/////////////////////////////////////

function rolloverOffice(idx,idImg){
/*
document.write('<style type="text/css" media="screen,tty,tv,projection,handheld,print,braille,embossed,speech">');
document.write(idx);
document.write('{display:block;text-indent: -9999px;}');
document.write('</style>');
*/

	$(function(){
		$(idx).replaceImg(imgDirOffice + idImg);
			$(idx+' img').each(function(){
				
		
				rolloverSrc = $(this).attr('src').replace(/(\.gif|\.jpg|\.png)$/, c.postfix+"$1");

				//イメージセット
				$(this).clone().insertAfter(this)
				.attr('src',rolloverSrc)
				.css('display','none');

				//ロールオーバー(マウスオン時)
				$(this).mouseover(function(){
				$(this).hide();
				$(this).next().show();
				});

				//ロールオーバー(マウスアウト時)
				$(this).next().mouseout(function(){
				$(this).hide();
				$(this).prev().show();
			});
		});
		$("style[media='screen,tty,tv,projection,handheld,print,braille,embossed,speech']").remove();
	});

}

/////////////////////////////////////

function repImgOffice(idx,idImg,idFalse){
/*
document.write('<style type="text/css" media="screen,tty,tv,projection,handheld,print,braille,embossed,speech">');
document.write(idx);
document.write('{display:block;text-indent: -9999px;}');
document.write('</style>');
*/

	$(function(){
		if(idFalse == false){
			$(idx).replaceImg(imgDirOffice + idImg,{
				imgTitle:false
			});
		}else{
			$(idx).replaceImg(imgDirOffice + idImg);
		}
		$("style[media='screen,tty,tv,projection,handheld,print,braille,embossed,speech']").remove();
	});
}












