//アコーディオン
$(function(){
    $("#gnav dd:not(.page)").css({"width":"0px","opacity":"0"});
    $("#gnav dl dt").mouseover(function(){
        if($("+dd",this).css("width")=="0px"){
            $("dt:has(.selected):not(.page) +dd").stop(true, false).animate({"width":"0px","opacity":"0"},"slow")
            $("+dd:not(animated)",this).stop(true, false).animate({"width":"105px","opacity":"1"},"slow").show()
            $("dt  span").removeClass("selected");
            $("span",this).addClass("selected");
        }
    })
})


//歳時記自動月更新
$(function(){
	var theDate = new Date();	
	var thisMonthData = theDate.getMonth()+1	
	var nextMonthData = theDate.getMonth()+2
	var thisMonthUrl = "http://ranzan.sakura.ne.jp/event/" + thisMonthData + "/index.html"
	var thisMapUrl = "http://ranzan.sakura.ne.jp/event/" + thisMonthData + "/index.html#map"
	var nextMonthUrl = "http://ranzan.sakura.ne.jp/event/" + nextMonthData + "/index.html";
	$(".thismonth").attr("href",thisMonthUrl);
	$(".thismap").attr("href",thisMapUrl);
	$(".nextmonth").attr("href",nextMonthUrl);
})
