$(document).ready(function() {
	
	// text要素の初期状態をCSSで指定してしまうと
	// jQueryに対応していないブラウザで問題となるので
	
	// text要素のうち
	$(".text")
		// newsとinfo内のtext要素を除いて
		.not("#news .first, #info .second")
		// 非表示に
		.hide();
	
	// newsのアコーディオン処理
	$("#news .name").click(function(){
		// クリックした次の要素をスライド動作
		$(this).next().slideToggle();
	});
	
	// infoのアコーディオン処理
	//$("#info .name").mouseover(function(){
	$("#info .name").click(function(){
		// info内のtext要素のうちクリックした次の要素を除いてスライドアップ
		$("#info .text").not($(this).next()).slideUp();
		// クリックした次の要素をスライド動作
		$(this).next().slideToggle();
	});
	
	// name要素にマウスオーバーしたら
	$(".name").hover(function(){
		// マウスカーソルの形をポインタに
		$(this).css("cursor","pointer");
	},function(){
		// name要素からマウスが離れたら元に戻す
		$(this).css("cursor","default");
	});
	
});
