// JavaScript Document
$(function(){
	form_file_name="send.php";
	default_position=150;
	back_duration=24000;
	back_easing="linear";
	
	var tp_phase=0;
	//tp_phase=0;
	//change(0);
	//mobile_form
	$("#mobile_form").load(form_file_name+" #mobile_form");
	$("#mailmagazine_form").load(form_file_name+"?type=mailmagazine #mailmagazine_form");
	$(".btn_send").live("click",function(){
			//lert("test");
			
			//$("#mobile_form").load(form_file_name+"?mode=send",{"address":address});
			type=$(this).parent().attr("id").replace("_form","");
			address=$("#"+type+"_form #address").val()+"@"+$("#"+type+"_form #domain").val();
			//alert(address);
			$(this).parent().load(form_file_name+"?mode=send&type="+type,{"address":address});
	});
	
	//ボタンのエフェクト
	$("#costume_btn img,#ore_ism_btn img").hover(
		function(){
			//alert("test");
			$(this).attr("width",200);
		},
		function(){
			$(this).attr("width",180);
		}
	);	
	
	//教頭ボタンのエフェクト
	$("#kyoutou_main").hover(
		function(){
			//alert("test");
			$(this).css("background-image","url('../top/side/kyoutou_back_over.png')");
		},
		function(){
			$(this).css("background-image","url('../top/side/kyoutou_back.png')");	
		}
	);
	
	
	//マップのズーム処理
	$("#map_image").hover(
		 function(){
			//alert("test");
			$("#map_zoom_btn").fadeIn();
		 },
		 function(){
			$("#map_zoom_btn").hide(); 
		 }
	);
	
	zoomwindow_option=new Object({offset_x:0,offset_y:100,id:"map_zoom"});
	$("#map_zoom_btn").zoomwindow(zoomwindow_option);
	
	
	function appear(){
		$(this).fadeIn();
	}
	
	zoom_movie_option=new Object({offset_x:600,offset_y:200,id:"movie_zoom",player_path:"../image_play/movie/player.swf"});
	$("a.movie_btn").zoomMovie(zoom_movie_option);
	
	//------------------//
	//トピックス用
	//------------------//
	$("#tp_inner_event").load("/event/topics_event.html");
	$("#tp_inner_newface").load("/top/topics_newface.php");
	$("#tp_inner_info").load("/event/topics_info.html");
	$('#topics').tabs({ fx: { opacity: 'toggle' }}).tabs('rotate', 3000,true);

	
	
});
