<commit_before>// JavaScript Document
//==========================================
//         ZHAOSTEPHEN ANIMATIONS 
//==========================================

// GLOBAL VARIABLES
var bHomeMenuVis = false,
	bMouseHoverMenuCircle = false,
	bClickedMenuCircle = false;

// Animation Options Def
var ANOPT_EASEOUT_800 = {duration: 800, easing: 'easeOutExpo', queue: false},
	ANOPT_EASEOUT_1000 = {duration: 1000, easing: 'easeOutExpo', queue: false},
	ANOPT_EASEOUT_1500 = {duration: 1500, easing: 'easeOutExpo', queue: false},
	ANOPT_EASEIN_1500 = {duration: 1500, easing: 'easeInExpo', queue: false};

var ANOPT_DEF = ANOPT_EASEOUT_800;

//ANIMATION FUNCTIONS DEF
var homeTransitionPanelPeek = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();
	
	switch (direction) {
		case 'top':
			$('#bg-img').animate({'top': '10%'},ANOPT_DEF);
			$('#bg-img').animate({'height': '90%'},ANOPT_DEF);
			$('#transitionPanel-'+direction).animate({'height': '10%'},ANOPT_DEF);
			break;
			
		case 'bottom':
			$('#bg-img').animate({'bottom': '10%'},ANOPT_DEF);
			$('#bg-img').animate({'height': '90%'},ANOPT_DEF);
			$('#transitionPanel-'+direction).animate({'height': '10%'},ANOPT_DEF);
			break;
	
		case 'left':
			$('#bg-img').animate({'left': '20%'},ANOPT_EASEOUT_1000);
			$('#bg-img').animate({'width': '80%'},ANOPT_EASEOUT_1000);
			$('#transitionPanel-'+direction).animate({'width': '20%'},ANOPT_EASEOUT_1000);
			break;
			
		case 'right':
			$('#bg-img').animate({'right': '20%'},ANOPT_EASEOUT_1000);
			$('#bg-img').animate({'width': '80%'},ANOPT_EASEOUT_1000);
			$('#transitionPanel-'+direction).animate({'width': '20%'},ANOPT_EASEOUT_1000);
			break;
		
		default:
			console.error('Animation error: Unknown direction');
	}
	$('#transitionPanel-'+direction).children('.transitionPanel-heading').stop().fadeIn(300);
}

var homeTransitionPanelShow = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();

	$('#transitionPanel-'+direction).children('.transitionPanel-bg').stop().fadeIn(300);
	$('#transitionPanel-'+direction).children('.transitionPanel-heading').stop().animate({
		'color': '#1B1B1B',
		'font-size': '6.4rem'},100);
	$('#bg-img').animate(JSON.parse('{"'+direction+'" : "100%"}'),ANOPT_EASEOUT_1500);
	
	switch (direction) {
		case 'top':
		case 'bottom':
			$('#bg-img').animate({'height': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'height': '100%'}, ANOPT_EASEOUT_1500);
			break;
	
		case 'left':
		case 'right':
			$('#bg-img').animate({'width': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'width': '100%'}, ANOPT_EASEOUT_1500);
			break;
		
		default:
			console.error('Animation error: Unknown direction');
	}
}

var homeTransitionPanelCont = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();

	$('#transitionPanel-'+direction).children('.transitionPanel-bg').stop().fadeIn(300);
	$('#transitionPanel-'+direction).children('.transitionPanel-heading').stop().animate({
		'color': '#1B1B1B',
		'font-size': '6.4rem'},100);
	$('#bg-img').animate(JSON.parse('{"'+direction+'" : "100%"}'),ANOPT_EASEOUT_1500);
	
	switch (direction) {
		case 'top':
		case 'bottom':
			$('#bg-img').animate({'height': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'height': '100%'}, ANOPT_EASEOUT_1500);
			break;
	
		case 'left':
		case 'right':
			$('#bg-img').animate({'width': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'width': '100%'}, ANOPT_EASEOUT_1500);
			break;
		
		default:
			console.error('Animation error: Unknown direction');
	}
}

var homeTransitionPanelRevert = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();
	
	$('#transitionPanel-'+direction).children().stop().fadeOut(500);
	
	switch (direction) {
		case 'top':
		case 'bottom':
			$('#bg-img').animate(JSON.parse('{"'+direction+'" : "0"}'),ANOPT_DEF);
			$('#bg-img').animate({'height': '100%'}, ANOPT_DEF);
			$('#transitionPanel-'+direction).animate({'height': '0'}, ANOPT_DEF);
			break;
		
		case 'left':
		case 'right':
			$('#bg-img').animate(JSON.parse('{"'+direction+'" : "0"}'),ANOPT_EASEOUT_1000);
			$('#bg-img').animate({'width': '100%'}, ANOPT_EASEOUT_1000);
			$('#transitionPanel-'+direction).animate({'width': '0'}, ANOPT_EASEOUT_1000);
			break;
		
		default:
			console.error('Animation err: Unknown direction');
	}
}

var homeMenuPeek = function(callback){
	$('.home-menucircle').stop();

	if (bHomeMenuVis == false){
		$('.home-menucircle').fadeIn(300);
	}
	$('div.home-bannerNameContainer').animate({
		'height':'70rem',
		'width':'70rem',
		'background-color':'rgba(0,0,0,0.1)'
		},ANOPT_DEF);
	$('.home-bannerNameContainer').animate({
		'-webkit-border-radius':'35rem',
		'border-radius':'35rem'
		}, ANOPT_DEF);
	
	callback();
}
var homeMenuRevert = function(callback){
	$('div.home-bannerNameContainer').animate({
		'height':'30rem',
		'width':'56rem',
		'background-color':'rgba(0,0,0,0)'
		}, ANOPT_DEF);
	$('.home-bannerNameContainer').animate({
		'-webkit-border-radius':'0rem',
		'border-radius':'0rem'
		}, ANOPT_DEF);
	
	$('.home-menucircle').stop();
	
	if (bHomeMenuVis){
		$('.home-menucircle').fadeOut(300);
	}
	
	callback();
}

// DOCUMENT READY FUNCTION<commit_msg>removed stop() on home-menucircle on hover<commit_after>// JavaScript Document
//==========================================
//         ZHAOSTEPHEN ANIMATIONS 
//==========================================

// GLOBAL VARIABLES
var bHomeMenuVis = false,
	bMouseHoverMenuCircle = false,
	bClickedMenuCircle = false;

// Animation Options Def
var ANOPT_EASEOUT_800 = {duration: 800, easing: 'easeOutExpo', queue: false},
	ANOPT_EASEOUT_1000 = {duration: 1000, easing: 'easeOutExpo', queue: false},
	ANOPT_EASEOUT_1500 = {duration: 1500, easing: 'easeOutExpo', queue: false},
	ANOPT_EASEIN_1500 = {duration: 1500, easing: 'easeInExpo', queue: false};

var ANOPT_DEF = ANOPT_EASEOUT_800;

//ANIMATION FUNCTIONS DEF
var homeTransitionPanelPeek = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();
	
	switch (direction) {
		case 'top':
			$('#bg-img').animate({'top': '10%'},ANOPT_DEF);
			$('#bg-img').animate({'height': '90%'},ANOPT_DEF);
			$('#transitionPanel-'+direction).animate({'height': '10%'},ANOPT_DEF);
			break;
			
		case 'bottom':
			$('#bg-img').animate({'bottom': '10%'},ANOPT_DEF);
			$('#bg-img').animate({'height': '90%'},ANOPT_DEF);
			$('#transitionPanel-'+direction).animate({'height': '10%'},ANOPT_DEF);
			break;
	
		case 'left':
			$('#bg-img').animate({'left': '20%'},ANOPT_EASEOUT_1000);
			$('#bg-img').animate({'width': '80%'},ANOPT_EASEOUT_1000);
			$('#transitionPanel-'+direction).animate({'width': '20%'},ANOPT_EASEOUT_1000);
			break;
			
		case 'right':
			$('#bg-img').animate({'right': '20%'},ANOPT_EASEOUT_1000);
			$('#bg-img').animate({'width': '80%'},ANOPT_EASEOUT_1000);
			$('#transitionPanel-'+direction).animate({'width': '20%'},ANOPT_EASEOUT_1000);
			break;
		
		default:
			console.error('Animation error: Unknown direction');
	}
	$('#transitionPanel-'+direction).children('.transitionPanel-heading').stop().fadeIn(300);
}

var homeTransitionPanelShow = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();

	$('#transitionPanel-'+direction).children('.transitionPanel-bg').stop().fadeIn(300);
	$('#transitionPanel-'+direction).children('.transitionPanel-heading').stop().animate({
		'color': '#1B1B1B',
		'font-size': '6.4rem'},100);
	$('#bg-img').animate(JSON.parse('{"'+direction+'" : "100%"}'),ANOPT_EASEOUT_1500);
	
	switch (direction) {
		case 'top':
		case 'bottom':
			$('#bg-img').animate({'height': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'height': '100%'}, ANOPT_EASEOUT_1500);
			break;
	
		case 'left':
		case 'right':
			$('#bg-img').animate({'width': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'width': '100%'}, ANOPT_EASEOUT_1500);
			break;
		
		default:
			console.error('Animation error: Unknown direction');
	}
}

var homeTransitionPanelCont = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();

	$('#transitionPanel-'+direction).children('.transitionPanel-bg').stop().fadeIn(300);
	$('#transitionPanel-'+direction).children('.transitionPanel-heading').stop().animate({
		'color': '#1B1B1B',
		'font-size': '6.4rem'},100);
	$('#bg-img').animate(JSON.parse('{"'+direction+'" : "100%"}'),ANOPT_EASEOUT_1500);
	
	switch (direction) {
		case 'top':
		case 'bottom':
			$('#bg-img').animate({'height': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'height': '100%'}, ANOPT_EASEOUT_1500);
			break;
	
		case 'left':
		case 'right':
			$('#bg-img').animate({'width': '0'}, ANOPT_EASEOUT_1500);
			$('#transitionPanel-'+direction).animate({'width': '100%'}, ANOPT_EASEOUT_1500);
			break;
		
		default:
			console.error('Animation error: Unknown direction');
	}
}

var homeTransitionPanelRevert = function(direction){
	// stop
	$('#bg-img').stop();
	$('#transitionPanel-'+direction).stop();
	
	$('#transitionPanel-'+direction).children().stop().fadeOut(500);
	
	switch (direction) {
		case 'top':
		case 'bottom':
			$('#bg-img').animate(JSON.parse('{"'+direction+'" : "0"}'),ANOPT_DEF);
			$('#bg-img').animate({'height': '100%'}, ANOPT_DEF);
			$('#transitionPanel-'+direction).animate({'height': '0'}, ANOPT_DEF);
			break;
		
		case 'left':
		case 'right':
			$('#bg-img').animate(JSON.parse('{"'+direction+'" : "0"}'),ANOPT_EASEOUT_1000);
			$('#bg-img').animate({'width': '100%'}, ANOPT_EASEOUT_1000);
			$('#transitionPanel-'+direction).animate({'width': '0'}, ANOPT_EASEOUT_1000);
			break;
		
		default:
			console.error('Animation err: Unknown direction');
	}
}

var homeMenuPeek = function(callback){
	//$('.home-menucircle').stop();

	if (bHomeMenuVis == false){
		$('.home-menucircle').fadeIn(300);
	}
	$('div.home-bannerNameContainer').animate({
		'height':'70rem',
		'width':'70rem',
		'background-color':'rgba(0,0,0,0.1)',
		'-webkit-border-radius':'35rem',
		'border-radius':'35rem'
		}, ANOPT_DEF);
	
	callback();
}
var homeMenuRevert = function(callback){
	$('div.home-bannerNameContainer').animate({
		'height':'30rem',
		'width':'56rem',
		'background-color':'rgba(0,0,0,0)',
		'-webkit-border-radius':'0rem',
		'border-radius':'0rem'
		}, ANOPT_DEF);
	
	//$('.home-menucircle').stop();
	
	if (bHomeMenuVis){
		$('.home-menucircle').fadeOut(300);
	}
	
	callback();
}

// DOCUMENT READY FUNCTION
{'fraction_non_alphanumeric': 0.25075159714393086, 'fraction_numerical': 0.04171364148816235, 'mean_word_length': 5.653125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5197193', 'n_tokens_mistral': 4392, 'n_tokens_neox': 3746, 'n_words': 532}