/* global-animation.js =================== This file is included in inc-htmlbottom.php if animations are enabled. Please only place animations that are to be site wide in this file, otherwise please place Remember that animations are theme specific, meaning this file only effects the current theme that you are animating, and not every theme across the TemplateOTS platform. See detailed documentation here:- https://docs.google.com/document/d/1n5sWQ8SIr-zjOpTv8YnOTHJapO8WdedjDfbeo-lkqMM/edit#heading=h.lmxb59mpcpe2 */ (function () { /* On Document Loaded ================== Called by Jquery event handler when the document is ready (When content has been loaded) */ $( document ).ready( function() { // Call the fade website in animation to fade the website in! fFadeWebsiteIn(); // Try and store the header wrapper var oHeaderWrapper = $("#header-wrapper"); // If the header wrapper exists if( oHeaderWrapper.length ) { // Call the animate function fAnimateHeader(oHeaderWrapper); } }); /* fFadeWebsiteIn() ================ This function is called when the website first loads, it simply fades the header container in */ function fFadeWebsiteIn() { // Fade the body in TweenMax.to("body", 0.5, { opacity : 1, ease : Power2.easeIn } ); } /* fAnimateHeader() ================ Animate the header wrapper */ function fAnimateHeader( oHeaderWrapper ) { // Try to store the header inner wrapper var oHeaderInnerWrapper = $(".header-row"); // If the header inner wrapper exists if( oHeaderInnerWrapper.length ) { // Fade the inner header wrapper in TweenMax.to(oHeaderInnerWrapper, 1, { opacity : 1, ease : Power2.easeIn } ); } // Set the top position of the header wrapper TweenMax.set(oHeaderWrapper, { top : 0, } ); } }());