/**---------------------------------
 * index.js
 *
 * ...
 * author	: takaaki koyama
 *
 ---------------------------------------*/
 ;(function($){
		$(function(){

				// ��������
				$(".recomend_item_list_raw").each(function(){
						var mh = 0;
						$(this).find(".info").each(function(){
								if(mh < $(this).height()){
									mh = $(this).height();
								}
						}).height(mh);
				})

		/**
		 * map
		 */

		$(".map_target").each(function(){
			var img = $("#img_map");
			var def_img = "/img/front/index/map.jpg";

			$(this).hover(
				function(){swapImg(img,$(this).attr('id'))},
				function(){resetImg(img,def_img);}
			);
		});


	});

	function preload(){
		var img = new Array();
		var file = ["map_bunkyo","map_taito","map_sumida","map_koto","map_cyuou","map_chiyoda"];
		var path = "/img/front/index/";
		for(i=0;i<file.length;i++){
			img[i] = new Image();
			img[i].src = path+file[i]+".jpg";
		}
	}

	function swapImg(t,id){
		$(t).attr("src","/img/front/index/"+id+".jpg");
	}

	function resetImg(t,img){
		t.attr("src",img);
	}

 })(jQuery);
