// JavaScript Document


$(function(){
date = new Date();
year = date.getYear();
$('#obj_year').val(year)
$('#obj_month').val(date.getMonth() + 1)
$('#obj_day').val(date.getDate())

	
    $(".sub_room_thmbox img").hover(function(){
		$(this).css("filter","Alpha(Opacity=40,Style=0)");
	    },
	function(){
		$(this).css("filter","");
	    }
	);

	$(".sub_room_thmbox img").click(function(){
		$(this).parent().find('img').css("border","2px solid #E0E0E0");
		$(this).css("border","2px solid #333333");
		var thisno = $(this).attr('thisno');
		var bigimg = $(this).parent().parent().parent().find('.sub_roomsel');
		bigimg.hide();
		bigimg.html('<img src="images/room/'+thisno+'.jpg" alt="" width="530" height="307" />');
		bigimg.find('img').load(function() {
		bigimg.fadeIn(1000);
		});

//		alert($(this).parent().html());
	    }
	);
});

$(document).ready(function(){
//	$.ajax({
//	  type: "GET",
//	  url: "plans.cfm",
//	  dataType: "xml",
//	success: function(msg){
	for(var i=1; i<=5; i++){
$("#plan"+i+"d").hide();
//	$("#plan"+i+" img").attr("src",$(msg).find("plan"+i+" pimg").text());
//	$("#plan"+i+" img + div").text($(msg).find("plan"+i+" ptitle").text());

//		$("#planimg").attr("src",$(msg).find("plan1 pimg").text());
//		$("#plan_title").text($(msg).find("plan1 ptitle").text());
//		$("#plan_sentent").text($(msg).find("plan1 psentent").text());
//		$("#plan_url").attr("href",$(msg).find("plan1 purl").text());


    $("#plan"+i).hover(
      function () {
	var planno = $(this).attr("planno");
		$("#plans p").each(function(){
		$(this).removeClass("planover");
		$(this).addClass("planout");
		});

		$(this).removeClass("planout");
		$(this).addClass("planover");
//		$("#planimg").attr("src",$(msg).find("plan"+planno+" pimg").text());
//		$("#plan_title").text($(msg).find("plan"+planno+" ptitle").text());
//		$("#plan_sentent").text($(msg).find("plan"+planno+" psentent").text());
//		$("#plan_url").attr("href",$(msg).find("plan"+planno+" purl").text());
		for(var i=1; i<=5; i++){
		$("#plan"+i+"d").hide();
		}

		$("#plan"+planno+"d").show();
      }
    );
	
	}//for‚±‚±‚Ü‚Å
	
//	}
//	});	
		$("#plan1d").show();

});
