//! Document Name: overview.js
//! Date of Creation: 16/11/21 (YY/MM/DD)
//! Author: Hashimori Iwato
$( document ).ready(function() {
console.log( "ready!" );
/***************************************************************************************
The Colorbox Welcome Light Box
***************************************************************************************/
var viewportWidth = $(window).width;
if ((performance.navigation.type === 0) && (viewportWidth > 360)) {
$.colorbox({opacity: '0.70', transition: 'elastic', speed: 700, width: 700, height: 'auto', scrolling: false, html:"
| Welcome to Grammar Captive's Weekly Podcasts! If these podcasts do not stimulate your understanding of English grammar and language in general, it is difficult to know what will. Roddy, Your host at Grammar Captive |
"
/* ,
onClosed: function() {
$("iframe.splash").colorbox({iframe: true, fastiframe: false, fixed: false, opacity: "0.65", open: true, rel: 'sweet', width: 700, height: 450, closeButton: true, href: function(){
var href = $(this).attr('src');
return href;
}
});
}
*/ });
}
/************************************************************
Initialize the center panel refresh variable.
*************************************************************/
var refresh = $('#main').html();
/***********************************************************************************************
The Main Panel Hidden Elements
***********************************************************************************************/
$("#hidden_podcast").hide();
/***********************************************************************************************
Adjustable Navigation Bar Height
***********************************************************************************************/
var column_height = $('aside').height();
$('nav#content').css('min-height', column_height);
// $('#chronology_div').css('min-height', column_height);
$('#main').css({'min-height': column_height,'max-height': column_height, 'overflow-y':'scroll'});
$('nav#content details').on('click', function() {
$('nav#content').css({'max-height': column_height, 'overflow-y':'scroll'});
});
/***********************************************************************************************
Freeman Control of Main Panel
***********************************************************************************************/
//Causes the border of the host image to change color and the cursor to become a pointer.
$("#freeman").mouseover(function() {
$(this).css({"cursor": "pointer", "border-color":"#ffffff"});
})
.mouseout(function() {
$(this).css("border", "2px solid #5a4149");
});
$("#freeman").mouseover(function() {
$(this).css("border","2px solid #ffffff");
})
.mouseout(function() {
$(this).css("border", "2px solid #5a4149");
});
//Causes the entire page to refresh to its original state.
$("#freeman").mouseover(function() {
$(this).css({"cursor": "pointer", "border-color":"#ffffff"});
})
.click(function() {
// $("#main").load("podcasts_thisweek_filler.html #podcasts_thisweek_div");
$("#main").html(refresh);
/* $("#main").load("podcasts_thisweek_filler.html #podcasts_thisweek_div");
var refresh = $("#main_div").html();
$("#main").html(refresh);
*/ })
.mouseup(function() {
$(this).css({"color": "#fadb9d","font-weight": "normal"});
$('body, html').animate({scrollTop: $('#main').offset().top},800);
});
/***********************************************************************************************
Selected Podcast Display
***********************************************************************************************/
//Causes the weight of the font to change when the mouse passes over the text.
$("#selected_podcast").mouseover(function() {
$(this).css({"cursor": "pointer", "font-weight":"800"});
})
.mouseout(function() {
$(this).css("font-weight", "normal");
});
//Causes the weight of the font to change, displays the hidden text to appear in the #main element, and brings about a change in color.
$("#selected_podcast").mouseover(function() {
$(this).css({"cursor": "pointer", "font-weight":"800"});
})
.click(function() {
var aboutContent = $("#podcast_insert").html();
$("#main").html(aboutContent);
})
.mouseup(function() {
$(this).css({"color": "#fadb9d","font-weight": "normal"});
$('body, html').animate({scrollTop: $('body').offset().top},1200);
});
});