$(function()
{
	$("div.side-area div#prof").hide();            //divクラスside-areaの子要素のdiv#profをhideイベントで非表示
	$("div.side-area p.koti").each(function(i)    //eachソッドでelementVal配列にdivクラスside-area、pクラスkoti直後に出てくるdiv#prof要素を格納。
	{
		var elementVal = $(this).next("div#prof");
		
		$(this).click(function()
		{
			elementVal.toggle("nomal");            //クリックされた時にpクラスkoti直後のdiv#profをtoggleイベントで表示・非表示を切り替え。イベントの引数をnomal、slow、fastにするとアニメーションのスピードが変更
		});
	});
});



$(function(){

//スクロール関数
	function Scroll(sp){
		$((navigator.userAgent.indexOf("Opera") != -1) ? document.compatMode == "BackCompat" ? "body" : "html" : "html,body").animate({scrollTop:sp},300);
	};

//クリックイベンント

	//ページのトップへ戻る場合
	$("a.pageTop").click(function(){
		Scroll(0);
		return false;
	});

	//それ以外のページ内リンクの場合
	$("a[href*=#]:not(.pageTop,a[href=#])").click(function(){
		var Id = this.href.substring(this.href.indexOf("#"),this.href.length),
		TargetOffset = $(Id).offset().top;
		Scroll(TargetOffset);
		return false;
	});

});




