// JavaScript Document

function heightChange(e){
setTimeout(function(){
heightFooter();
heightTopTicket();
heightShiosaiTenpo01();
heightShiosaiTenpo02();
heightShiosaiTenpo03();
heightShiosaiTenpo04();
heightListBtn();
heightFlow();
heightEventScheduleTitle();
heightEventScheduleBox();
heightTopTxt(e);
},100);
}

function heightTopTicket(){
$(".ticketBox a").css("min-height", 0 +"px");
tallest = 0;
$(".ticketBox a").each(function() {
thisHeight = jQuery(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
$(".ticketBox a").css("min-height", tallest + "px");
}

function heightShiosaiTenpo01(){
$(".tenpoG01").css("min-height", 0 +"px");
tallest = 0;
$(".tenpoG01").each(function() {
thisHeight = jQuery(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
$(".tenpoG01").css("min-height", tallest + "px");
}

function heightShiosaiTenpo02(){
$(".tenpoG02").css("min-height", 0 +"px");
tallest = 0;
$(".tenpoG02").each(function() {
thisHeight = jQuery(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
$(".tenpoG02").css("min-height", tallest + "px");
}

function heightShiosaiTenpo03(){
$(".tenpoG03").css("min-height", 0 +"px");
tallest = 0;
$(".tenpoG03").each(function() {
thisHeight = jQuery(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
$(".tenpoG03").css("min-height", tallest + "px");
}

function heightShiosaiTenpo04(){
$(".tenpoG04").css("min-height", 0 +"px");
tallest = 0;
$(".tenpoG04").each(function() {
thisHeight = jQuery(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
$(".tenpoG04").css("min-height", tallest + "px");
}

function heightListBtn(){
if ($("div").children().hasClass("listBtnBox")){
h1 = $(".listBtnBox p").height();
h2 = $(".listBtnBox a").height();
h11 = h1/2;
h22 = h2/2;
h1122 = h22 - h11;
$(".listBtnBox p").css("top", h1122 +"px");
}
}

function heightFlow(){
if ($("div").children().hasClass("flowBoxTop")){
h1 = $(".flowBoxTop").height();
h2 = $(".flowBoxTop h4").height();
h11 = h1/2;
h22 = h2/2;
h1122 = h11 - h22;
$(".flowBoxTop h4").css("top", h1122 +"px");
}
}

function heightEventScheduleTitle(){
if ($("div").children().hasClass("monthThis")){
h1 = $(".monthThis").height();
h2 = $(".monthThis h3").height();
w1 = $(".monthThis").width();
w2 = $(".monthThis h3").width();
h11 = h1/2;
h22 = h2/2;
h1122 = h11 - h22;
w11 = w1/2;
w22 = w2/2;
w1122 = w11 - w22;
$(".monthThis h3").css("top", h1122 +"px");
$(".monthThis h3").css("left", w1122 +"px");
}
}

function heightEventScheduleBox(){
if ($("div").children().hasClass("eventScheduleBox")){
h1 = $(".dayBox").height();
h2 = $(".titleBox").height();
h11 = h1/2;
h22 = h2/2;
h1122 = h11 - h22;
$(".titleBox").css("padding-top", h1122 +"px");
}
}

function heightTopTxt(e){
if ($("div").children().hasClass("ticketBox")){
if(e == 1){
$(".info dt").css("width", 33 +"px");$(".info dd").css("width", 120 +"px");
$(".newsList dt").css("width", 115 +"px");$(".newsList dd").css("width", 515 +"px");
}
else if(e == 2){
$(".info dt").css("width", 36 +"px");$(".info dd").css("width", 117 +"px");
$(".newsList dt").css("width", 118 +"px");$(".newsList dd").css("width", 512 +"px");
}
else if(e == 3){
$(".info dt").css("width", 39 +"px");$(".info dd").css("width", 114 +"px");
$(".newsList dt").css("width", 121 +"px");$(".newsList dd").css("width", 509 +"px");
}
}
}

function heightFooter(){
$("#headBox01").css("min-height", 0 +"px");
$("#headBox02").css("min-height", 0 +"px");
$("#headBox03").css("min-height", 0 +"px");
$("#headBox04").css("min-height", 0 +"px");
h1 = $("#headBox01").height();
h2 = $("#headBox02").height();
h3 = $("#headBox03").height();
h4 = $("#headBox04").height();
var harray = [h1,h2,h3,h4];
hmax = Math.max.apply(null, harray);
$("#headBox01").css("min-height", hmax +"px");
$("#headBox02").css("min-height", hmax +"px");
$("#headBox03").css("min-height", hmax +"px");
$("#headBox04").css("min-height", hmax +"px");
}
