jQuery().ready(function () {

	// 会社概要 - 地図
	$("a:first", "#onClickMap").click(function(){
		Corp.animateMap();
		this.blur();
		if($("#onClickMap").hasClass("open")){
			$("#onClickMap").removeClass("open");
		}else{
			$("#onClickMap").addClass("open");
		}
		return false;
	}).dblclick(function(){
		return false;
	});

	// サイト内検索ボックス - 全角を半角に変換する
	$("#searchForm").submit(function(){
		$s = $("#s")[0].value;
		if(!$s){
			alert("キーワードを入力してください");
			return false;
		}else{
			$s = $s.replace(/　/g," ");
			$("#s")[0].value = $s;
		}
		return true;
	});

	// サイト内検索ボックス - ボタン
	$("#searchSubmit").hover(function(){
		$(this).addClass("hover");
	}, function(){
		$(this).removeClass("hover");
	}).focus(function(){
		$(this).addClass("hover");
	}).blur(function(){
		$(this).removeClass("hover");
	});


	$(".hasMidd", "#innerWpp").hover(function(){
		$(".none:first", $(this).parent()).removeClass("none");
		$(this).parent().addClass("active");
	}, function(){
		$(".midd:first", $(this).parent()).addClass("none");
		$(this).parent().removeClass("active");
	});
	
	$(".midd", "#innerWpp").hover(function(){
		$(this).removeClass("none");
		$(this).parent().addClass("active");
	}, function(){
		$(this).addClass("none");
		$(this).parent().removeClass("active");
	});



});
var Corp = new Object();

Corp.animateMap = function(){
	$("#animateMap").toggle("slow");

}
