﻿$(document).ready(function(){ for (var j = 0; j < $(".tab").length; j++){ var tabmonth = $(".tab").eq(j).attr('name'); if(tabmonth == calendar1){ $(".tab").eq(j).attr('id', 'calendarS-1');}else if(tabmonth == calendar2){ $(".tab").eq(j).attr('id', 'calendarS-2');}else if(tabmonth == calendar3){ $(".tab").eq(j).attr('id', 'calendarS-3');}else { $(".tab").eq(j).css("display","none");}
}
if(thisdate < 20) { $("#calendartab > ul > .third").css("display","none");}
var tab1 = thismonth + "月"; var tab2 = nextmonth + "月"; var tab3 = monthafternext + "月"; $("#calendartab > ul > .first > a").append(tab1); $("#calendartab > ul > .second > a").append(tab2); $("#calendartab > ul > .third > a").append(tab3);}); function seminarCalendar(youbi,Url,Class){ var Connum = $(youbi).length; for (var i = 0; i < Connum; i++){ var hiduke = $(youbi).eq(i).attr("name"); a = hiduke.split("/"); b = a[0]; c = a[1]; d = a[2]; var theday = b + c + d; var Parm = parseInt(c,10) + "&" + parseInt(d,10) + "&" + Class + "&" + youbi; if (youbi == ".Mon" || youbi == ".Tue" || youbi == ".Wed" || youbi == ".Thu"){ if(c ==7 || c ==8){ LinkClass = "color2";}else { LinkClass = "color";}
}else { LinkClass = "colorEve";}
if (theday >= today){ $(youbi).eq(i).addClass(Class); $(youbi).eq(i).html('<a href="' + Url + '?' + Parm + '"' + 'class="' + LinkClass + '">' + parseInt(d,10) + '</\a>');}
}
}
$(function(){ seminarCalendar(".Mon","/fair/pop/consult.html","consult"); seminarCalendar(".Tue","/fair/pop/consult.html","consult"); seminarCalendar(".Wed","/fair/pop/consult.html","consult"); seminarCalendar(".Thu","/fair/pop/consult.html","consult"); seminarCalendar(".Fri","/fair/pop/evening.html","evening"); $('#calendartab > ul').tabs(); $("html").append("<div id='rzlt' style='display:none;'></div>"); $(".color").colorbox({iframe:true, transition:"fade", opacity:"0.4", innerWidth:"630px", innerHeight:"360px"}); $(".color2").colorbox({iframe:true, transition:"fade", opacity:"0.4", innerWidth:"630px", innerHeight:"460px"}); $(".colorEve").colorbox({iframe:true, transition:"fade", opacity:"0.4", innerWidth:"630px", innerHeight:"360px"}); $(".colorL").colorbox({iframe:true, transition:"fade", opacity:"0.4", innerWidth:"840px", innerHeight:"600px"}); $("#est").colorbox({iframe:true, transition:"fade", opacity:"0.4", innerWidth:"630px", innerHeight:"600px"}); $(".colorInfo").colorbox({iframe:true, transition:"fade", opacity:"0.4", innerWidth:"840px", innerHeight:"600px"});}); 
