function fontSize(size){
cssPath="css/"+size+".css"; //書き換えるファイルのパス
cssurl=dirPath+cssPath; //CSSフォルダへのパス
$('#fontSizeControl').attr({href:cssurl}); //IDでjs切り替えを指定
$.cookie('fsize',cssPath,{expires:30,path:'/'}); //クッキー用パス
}


/*
font.js 仕様
jqueryで動作するフォント切り替えスクリプト
必要なファイル/リンクタグは下記。
タグ、クラス名等は手順削減のため、下記固定で使用。
*/

//各HTMLHEADへ記述
/*-------------------------------------------------------------------------------------
<link href="/css/medium.css" rel="stylesheet" type="text/css" id="fontSizeControl" />
<script type="text/javascript">
<!--
dirPath="/";
//-->
</script>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/js/font.js"></script>
-------------------------------------------------------------------------------------*/

//切り替えソース
/*-------------------------------------------------------------------------------------
<ul id="font_serect">
<li class="link_01"><a href="javascript:fontSize('small');">Small</a></li>
<li class="link_02"><a href="javascript:fontSize('medium');">Middle</a></li>
<li class="link_03"><a href="javascript:fontSize('large');">Large</a></li>
</ul>
-------------------------------------------------------------------------------------*/


//レイアウト用CSS
/*-------------------------------------------------------------------------------------
#font_serect {
	display: block;
	width: 83px;
	float: left;
	height: 26px;
	list-style-type: none;
}

#font_serect li{
	float: left;
	margin-right: 3px;
}
-------------------------------------------------------------------------------------*/

//下記を各CSSファイルとして用意

//フォントサイズ小CSS [small.css]
/*-------------------------------------------------------------------------------------
body {
	font-size: 10px;
}
#font_serect li.link_01 a:link,
#font_serect li.link_01 a:visited {
	background-repeat: no-repeat;
	background-position: 0px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_01 a:hover {
	background-repeat: no-repeat;
	background-position: 0px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_02 a:link,
#font_serect li.link_02 a:visited {
	background-image: url(/img/common/font_serect.gif);
	background-repeat: no-repeat;
	background-position: -27px 0px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
}
#font_serect li.link_02 a:hover {
	background-image: url(/img/common/font_serect.gif);
	background-repeat: no-repeat;
	background-position: -27px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
}
#font_serect li.link_03 a:link,
#font_serect li.link_03 a:visited {
	background-repeat: no-repeat;
	background-position: -54px 0px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_03 a:hover {
	background-repeat: no-repeat;
	background-position: -54px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
-------------------------------------------------------------------------------------*/


//フォントサイズ中CSS [medium.css]
/*-------------------------------------------------------------------------------------
body {
	font-size: 12px;
}
#font_serect li.link_01 a:link,
#font_serect li.link_01 a:visited {
	background-repeat: no-repeat;
	background-position: 0px 0px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_01 a:hover {
	background-repeat: no-repeat;
	background-position: 0px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_02 a:link,
#font_serect li.link_02 a:visited {
	background-image: url(/img/common/font_serect.gif);
	background-repeat: no-repeat;
	background-position: -27px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
}
#font_serect li.link_02 a:hover {
	background-image: url(/img/common/font_serect.gif);
	background-repeat: no-repeat;
	background-position: -27px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
}
#font_serect li.link_03 a:link,
#font_serect li.link_03 a:visited {
	background-repeat: no-repeat;
	background-position: -54px 0px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_03 a:hover {
	background-repeat: no-repeat;
	background-position: -54px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
-------------------------------------------------------------------------------------*/


//フォントサイズ大CSS [large.css]
/*-------------------------------------------------------------------------------------
body {
	font-size: 14px;
}
#font_serect li.link_01 a:link,
#font_serect li.link_01 a:visited {
	background-repeat: no-repeat;
	background-position: 0px 0px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_01 a:hover {
	background-repeat: no-repeat;
	background-position: 0px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_02 a:link,
#font_serect li.link_02 a:visited {
	background-image: url(/img/common/font_serect.gif);
	background-repeat: no-repeat;
	background-position: -27px 0px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
}
#font_serect li.link_02 a:hover {
	background-image: url(/img/common/font_serect.gif);
	background-repeat: no-repeat;
	background-position: -27px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
}
#font_serect li.link_03 a:link,
#font_serect li.link_03 a:visited {
	background-repeat: no-repeat;
	background-position: -54px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
#font_serect li.link_03 a:hover {
	background-repeat: no-repeat;
	background-position: -54px -24px;
	display: block;
	height: 24px;
	width: 24px;
	text-indent: -9999px;
	background-image: url(/img/common/font_serect.gif);
}
-------------------------------------------------------------------------------------*/


