addIdsToYouTubeVideos

Adds in a unique id parameter to the YouTube iframes, so analytics can key off of that.

alert

Shows/hides alert based on cookie, also handles the alert closing and cookie setting functions. Get's attached to the .section--alert class

detectLoginState

Detects if the user is logged in and adds the appropriate body class

Returns [type] [description]

detectRegistrationState

Detects if the user is registered and adds the appropriate body class

Returns [type] [description]

enableFancybox

Sets up custom fancybox settings and enables it on the appropriate elements. Exposes custom settings into a global scoe

enableMasonryBoard

Enables the dynamic stacking of rectangles.

Returns [type] Container that includes all rectangles

fixBrowserQuirks

Fixes browser specific issues that deviate from the standard.

Parameters

logOut

Deletes logged in and basket cookie on logout

signUp

Handles Sign Up form submissions, gets called directly on a set of form objects

Parameters

tab

Sets up tab functionality. Needs to be called on the container.

teamraiserLoginAnalytics

Invokes the user analytics call on the appropriate Teamrasier pages.

updateBasket

Updates the basket item count based on cookie, the inner html layout of the item is expected to be as follows: <span class="menu__basket-items" id="menu__basket-items">4</span><a class="menu__link--basket" href="#">My Basket</a></li>

Parameters

addToggleLinkToParent

Adds a <span class="menu__toggle" /> to each list item, when it has children

Parameters

adjustToggleSpansHeight

Sets the height with JS on main menu toggles, to esure they looks elegant on screens where the text wraps

Parameters

closeOpenItems

Finds all items in a menus which are open and removes the class, closing them.

disableButtonOnSubmit

Disables buttons or inputs on submit

Parameters

disableButton

disables a button after checking form's validity

getButtonTargetContainer

Get the mobile container element that lives withing the target from the data-target-container attribute. This is needed to create proper scrolling effect for multiple menus

Parameters

getButtonTarget

Get mobile outmost container from data-target attribute of the button

inputToLowerCase

converts input to lower case on blur, when user leaves input box

Modifies links that point to YouTube, adds parameters that enable analytics to track video progress

moveElement

Repositions element to the mobile or desktop container based on button visibility, which is set in CSS

Parameters

moveOneSource

Gets the mobile & deskop positions for each $source (in this case menu or search box) & attaches an on-resize hander

Parameters

moveSources

Repositions each element in sources to $mobileContainer if $button is visibile; visibility is set set with CSS.

Parameters

replaceCheckRadio

Surrounds radio buttons and checkboxes with spans, hides inputs Must be envoked on a list of checkboxes & radio inputs

setTabContainerHeight

Sets height of the container to the height of the tallest tab

Parameters

signUpSurveySubmission

processed the Luminate API results, checks if the user is logged in

Parameters

smartEvent

Throttles/debounces/delays an event to prevent excessive firing

Parameters

smoothScroll

IE fix, shut down smooth scrolling, due to IE11 issues with fixed background rendering

Returns [type] [description]

$buoop

displays browser update message in outdated browsers

Checks if the current page is the same as where the link leads or if the current link is just a hash. And then gently scrolls to the section of the link's target.

Parameters

Returns String Anchor where the user is taken to

maintainSession

Every 14 minutes updates the PixelServer image in the <div class="footer__irs" /> to make sure session is maintained

rewriteBase

Rewrites <base> of pagebuilder pages to the PageNavigator format This allows for more elegant URLs in vue apps and prevents breakages when PageNavigator changes to Pageserver Also updates the JS paths as it was causing some issues with the native scripts on PB pages.

addPictureFill

adds picture fill for browsers that don't support out of the box

addURLParam

Apeends the param to the URL

Parameters

getMenus

grabs menu jQuery object from the menuSources array

Parameters

getUrlVars

Get variables from URL

Parameters

Returns any array or string - array of all parameters or a string value of a set parameter

handleSubmenuToggleClick

[handleSubmenuToggleClick description]

Parameters

hideSources

Hides the menus & search box when any other element within the header or nav__container are clicked. Function is disabled on menu & search boxes themselves

Parameters

isBrowser

Returns boolean if browser matches the type asked

Parameters

Returns Boolean true if userAgent has the browser keyword

setToggleSpanHeight

Adjusts a height of each individual toggle span in a main menu, based on the height of the link

Parameters

signUpSubmitHandler

Handles sign up form submission

Parameters

submitPixelToCheetahMail

Send a subscription pixel to cheetah main

Parameters

trackSocialMediaAnalytics

Triggers the analtyics to track social media action. Triggers a social_share or social_follow in Analytics, after setting properties

Parameters