Team:SSTi-SZGD/js/Notebook

/*custom Project Effect*/ $(function(){

$(".header .nav .mainnav").eq(1).hover(function(){ $(".header .nav .Project span").css("color","#FAEE0D"); },function(){ $(".header .nav .Project span").css("color","#FAEE0D"); });

});

/*Follow the height of the window size*/ $(function(){

var winHeight=$(window).outerHeight(); if(winHeight>=489){ $(".SSTi-SZGD").css("height",winHeight); } else{ $(".SSTi-SZGD").css("height","489px"); }

$(window).resize(function(){

winHeight=$(window).outerHeight(); if(winHeight>=489){ $(".SSTi-SZGD").css("height",winHeight); }else{ $(".SSTi-SZGD").css("height","489px"); }

});

});

/*Switch calendar*/ $(function(){

//March $(".March .icon_left").click(function(){

$(".Sth").css({"background":"#75B574","transition":"background 2s"}); $(".October").removeClass("a-fadeout"); $(".March").removeClass("a-fadein"); $(".March").addClass("a-fadeout"); $(".October").addClass("a-fadein"); $(".October").css("display","block"); setTimeout(function(){ $(".March").css("display","none"); },1000);

});

$(".March .icon_right").click(function(){

$(".Sth").css({"background":"#87589E","transition":"background 2s"}); $(".March").removeClass("a-fadein"); $(".April").removeClass("a-fadeout"); $(".March").addClass("a-fadeout"); $(".April").addClass("a-fadein"); $(".April").css("display","block"); setTimeout(function(){ $(".March").css("display","none"); },1000);

});

$(".March .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#5DA0CA"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#537BB6","color":"white"});

var Month="March"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});


//April $(".April .icon_left").click(function(){

$(".Sth").css({"background":"#5DA0CA","transition":"background 2s"}); $(".March").removeClass("a-fadeout"); $(".April").removeClass("a-fadein"); $(".April").addClass("a-fadeout"); $(".March").addClass("a-fadein"); $(".March").css("display","block"); setTimeout(function(){ $(".April").css("display","none"); },1000);

});

$(".April .icon_right").click(function(){

$(".Sth").css({"background":"#424D5F","transition":"background 2s"}); $(".May").removeClass("a-fadeout"); $(".April").removeClass("a-fadein"); $(".April").addClass("a-fadeout"); $(".May").addClass("a-fadein"); $(".May").css("display","block"); setTimeout(function(){ $(".April").css("display","none"); },1000);

});

$(".April .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#87589E"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#7F4599","color":"white"});

var Month="April"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});


//May $(".May .icon_left").click(function(){


$(".Sth").css({"background":"#87589E","transition":"background 2s"}); $(".April").removeClass("a-fadeout"); $(".May").removeClass("a-fadein"); $(".May").addClass("a-fadeout"); $(".April").addClass("a-fadein"); $(".April").css("display","block"); setTimeout(function(){ $(".May").css("display","none"); },1000);

});

$(".May .icon_right").click(function(){

$(".Sth").css({"background":"#E2C337","transition":"background 2s"}); $(".June").removeClass("a-fadeout"); $(".May").removeClass("a-fadein"); $(".May").addClass("a-fadeout"); $(".June").addClass("a-fadein"); $(".June").css("display","block"); setTimeout(function(){ $(".May").css("display","none"); },1000);

});

$(".May .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#424D5F"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#3C4352","color":"white"});

var Month="May"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});


//June $(".June .icon_left").click(function(){

$(".Sth").css({"background":"#424D5F","transition":"background 2s"}); $(".May").removeClass("a-fadeout"); $(".June").removeClass("a-fadein"); $(".June").addClass("a-fadeout"); $(".May").addClass("a-fadein"); $(".May").css("display","block"); setTimeout(function(){ $(".June").css("display","none"); },1000);

});

$(".June .icon_right").click(function(){

$(".Sth").css({"background":"#CD7F34","transition":"background 2s"}); $(".July").removeClass("a-fadeout"); $(".June").removeClass("a-fadein"); $(".June").addClass("a-fadeout"); $(".July").addClass("a-fadein"); $(".July").css("display","block"); setTimeout(function(){ $(".June").css("display","none"); },1000);

});

$(".June .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#E2C337"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#DB9A37","color":"white"});

var Month="June"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});


//July $(".July .icon_left").click(function(){

$(".Sth").css({"background":"#E2C337","transition":"background 2s"}); $(".June").removeClass("a-fadeout"); $(".July").removeClass("a-fadein"); $(".July").addClass("a-fadeout"); $(".June").addClass("a-fadein"); $(".June").css("display","block"); setTimeout(function(){ $(".July").css("display","none"); },1000);

});

$(".July .icon_right").click(function(){

$(".Sth").css({"background":"#C65340","transition":"background 2s"}); $(".August").removeClass("a-fadeout"); $(".July").removeClass("a-fadein"); $(".July").addClass("a-fadeout"); $(".August").addClass("a-fadein"); $(".August").css("display","block"); setTimeout(function(){ $(".July").css("display","none"); },1000);

});

$(".July .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".June .day_x:first li").css("color","#CD7F34"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#B9592E","color":"white"});

var Month="July"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});


//August $(".August .icon_left").click(function(){

$(".Sth").css({"background":"#CD7F34","transition":"background 2s"}); $(".July").removeClass("a-fadeout"); $(".August").removeClass("a-fadein"); $(".August").addClass("a-fadeout"); $(".July").addClass("a-fadein"); $(".July").css("display","block"); setTimeout(function(){ $(".August").css("display","none"); },1000);

});

$(".August .icon_right").click(function(){

$(".Sth").css({"background":"#87589E","transition":"background 2s"}); $(".July").removeClass("a-fadeout"); $(".September").removeClass("a-fadeout"); $(".August").removeClass("a-fadein"); $(".August").addClass("a-fadeout"); $(".September").addClass("a-fadein"); $(".September").css("display","block"); setTimeout(function(){ $(".August").css("display","none"); },1000);

});

$(".August .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".August .day_x:first li").css("color","#C65340"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#A34233","color":"white"});

var Month="August"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});


//September $(".September .icon_left").click(function(){

$(".Sth").css({"background":"#C65340","transition":"background 2s"}); $(".August").removeClass("a-fadeout"); $(".September").removeClass("a-fadein"); $(".September").addClass("a-fadeout"); $(".August").addClass("a-fadein"); $(".August").css("display","block"); setTimeout(function(){ $(".September").css("display","none"); },1000);

});

$(".September .icon_right").click(function(){

$(".Sth").css({"background":"#75B574","transition":"background 2s"}); $(".October").removeClass("a-fadeout"); $(".September").removeClass("a-fadein"); $(".September").addClass("a-fadeout"); $(".October").addClass("a-fadein"); $(".October").css("display","block"); setTimeout(function(){ $(".September").css("display","none"); },1000);

});

$(".September .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".September .day_x:first li").css("color","#87589E"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#764595","color":"white"});

var Month="September"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});


//October $(".October .icon_left").click(function(){

$(".Sth").css({"background":"#87589E","transition":"background 2s"}); $(".September").removeClass("a-fadeout"); $(".October").removeClass("a-fadein"); $(".October").addClass("a-fadeout"); $(".September").addClass("a-fadein"); $(".September").css("display","block"); setTimeout(function(){ $(".October").css("display","none"); },1000);

});

$(".October .icon_right").click(function(){

$(".Sth").css({"background":"#5DA0CA","transition":"background 2s"}); $(".March").removeClass("a-fadeout"); $(".October").removeClass("a-fadein"); $(".October").addClass("a-fadeout"); $(".March").addClass("a-fadein"); $(".March").css("display","block"); setTimeout(function(){ $(".October").css("display","none"); },1000);

});

$(".October .sth").click(function(){

$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".October .day_x:first li").css("color","#75B574"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#5FA768","color":"white"});

var Month="October"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);

});

});