text:     var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";(bdlf.options={basepath:"/bdl/",form:{addModClassName:!0},gridType:null,hasTouch:!1,log:{enabled:!1},modsForInit:{},modsInPage:{},overlayActive:!1,tapOrClickEvent:"click",timings:{resizeDebounce:50,scrollDebounce:15,debounce:250},windowHeight:$(window).height(),windowWidth:window.innerWidth||$(window).width(),}),(bdlf.controller=(function(){function init(){var hasQueryString=top.location.href.indexOf("?")!==-1;if(hasQueryString){var urlQueryString=top.location.href.split("?")[1];"log"===urlQueryString&&((bdlf.options.log.enabled=!0),bdlf.log.init())}
      bdlf.log.information("[bdlf.controller.init]"),bdlf.options.form.addModClassName&&bdlf.form.addModClassName(),(bdlf.options.gridType=$.isWhichGridType(bdlf.options.windowWidth)),(bdlf.options.previousGridType=bdlf.options.gridType),checkTouchEvents(),modsInPageInit(),bdlf.inview.init(),initialzeOffPageModules()}
      function checkTouchEvents(){(bdlf.options.hasTouch=$.support.touch="ontouchend" in document),bdlf.log.information("[bdlf.controller.checkTouchEvents]: supports touch? "+bdlf.options.hasTouch),bdlf.options.hasTouch&&($("BODY").addClass("has-touch"),(bdlf.options.tapOrClickEvent="tap"))}
      function modsInPageInit(){(bdlf.options.modsInPage=getModsInPage({attribute:"class",expression:"\\bmod-",})),bdlf.options.modsInPage.each(function(index,element){for(var matches=element.className.match(/mod-(\S+)/g),i=0;i<=matches.length-1;i++){var modName=matches[i].replace("mod-","");bdlf.options.modsForInit.hasOwnProperty(modName)||bdlf.log.information("[bdlf.controller.init]: the following module type exists in the page: "+modName),(bdlf.options.modsForInit[modName]=!1)}});for(var mod in bdlf.options.modsForInit)
          try{bdlf[mod].init()}catch(error){bdlf.log.warning("[bdlf.controller.modsInPageInit]: error initializing bdlf."+mod+".init(), error description: "+error)}}
      function initialzeOffPageModules(){bdlf.log.information("[bdlf.core.initialzeOffPageModules]");var modObj,modType,notInView=getModsNonInView();notInView.each(function(){(modObj=$(this)),(modType=getModType(modObj.attr("class")));try{bdlf.dispatcher.moduleInitialize({elementObj:modObj,modType:modType,})}catch(error){bdlf.log.error("[bdl.core.initialzeOffPageModules]: error trying to initialize module ("+modType+"): error="+error)}})}
      function getModsInPage(obj){return $(":regex("+obj.attribute+","+obj.expression+")")}
      function getModsNonInView(){return $(':hasClassStartingWith("mod-")').filter(function(index){return!$(this).hasAttr("data-inview")})}
      function getModsInView(){return $(':hasClassStartingWith("mod-")').filter(function(index){return $(this).hasAttr("data-inview")})}
      function getModType(modClassName){return modClassName.match(/mod-(\S+)/g)[0].replace("mod-","")}
      function initialPageLoad(){bdlf.options.hasTouch&&(bdlf.log.information("[bdlf.controller.initialPageLoad]: change data-touch-types for gesture devices"),$("INPUT[data-touch-type]").convertTouchType())}
      return{getModsInPage:getModsInPage,getModsInView:getModsInView,getModType:getModType,init:init,initialPageLoad:initialPageLoad,}})()),$(document).ready(bdlf.controller.init)})(bdlf,jQuery),($.expr[":"].regex=function(element,index,match){"use strict";var matchParams=match[3].split(","),validLabels=/^(data|css):/,attr={method:matchParams[0].match(validLabels)?matchParams[0].split(":")[0]:"attr",property:matchParams.shift().replace(validLabels,""),},regexFlags="ig",regex=new RegExp(matchParams.join("").replace(/^s+|s+$/g,""),regexFlags);return regex.test($(element)[attr.method](attr.property))}),($.expr[":"].hasClassStartingWith=function(element,index,selector){"use strict";var expression=new RegExp("\\b"+selector[3]);return expression.test(element.className)}),($.expr[":"].focusableElements=function(element){"use strict";var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return((/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"===nodeName||"area"===nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"===nodeName?"parents":"closest"](":hidden").length)}),$.extend({logJSONObj:function(obj){"use strict";var i,debugJSON="";for(i in obj)
          obj.hasOwnProperty(i)&&(debugJSON+=i+"="+obj[i]+", ");return debugJSON.length>0?debugJSON.substr(0,debugJSON.length-2):"[empty parameter object]"},isNumberBetween:function(obj){"use strict";return obj.input>=obj.minimum&&obj.input<=obj.maximum},isWhichGridType:function(input){"use strict";var gridType,isMobile=$.isNumberBetween({input:input,minimum:bdlf.utilities.configuration.breakpoints.xs.min,maximum:bdlf.utilities.configuration.breakpoints.xs.max,});isMobile&&(gridType="mobile");var isTabletPortrait=$.isNumberBetween({input:input,minimum:bdlf.utilities.configuration.breakpoints.sm.min,maximum:bdlf.utilities.configuration.breakpoints.sm.max,});isTabletPortrait&&(gridType="tablet-portrait");var isTabletLandscape=$.isNumberBetween({input:input,minimum:bdlf.utilities.configuration.breakpoints.md.min,maximum:bdlf.utilities.configuration.breakpoints.md.max,});isTabletLandscape&&(gridType="tablet-landscape");var isDesktop=$.isNumberBetween({input:input,minimum:bdlf.utilities.configuration.breakpoints.lg.min,maximum:bdlf.utilities.configuration.breakpoints.lg.max,});return isDesktop&&(gridType="desktop"),gridType},generateUID:function(){"use strict";for(var lookup=[],i=0;i<256;i++)
          lookup[i]=(i<16?"0":"")+i.toString(16);var d0=(4294967295*Math.random())|0,d1=(4294967295*Math.random())|0,d2=(4294967295*Math.random())|0,d3=(4294967295*Math.random())|0;return(lookup[255&d0]+lookup[(d0>>8)&255]+lookup[(d0>>16)&255]+lookup[(d0>>24)&255]+"-"+lookup[255&d1]+lookup[(d1>>8)&255]+"-"+lookup[((d1>>16)&15)|64]+lookup[(d1>>24)&255]+"-"+lookup[(63&d2)|128]+lookup[(d2>>8)&255]+"-"+lookup[(d2>>16)&255]+lookup[(d2>>24)&255]+lookup[255&d3]+lookup[(d3>>8)&255]+lookup[(d3>>16)&255]+lookup[(d3>>24)&255])},debounce:function(fn,timeout,invokeAsap,context){"use strict";3===arguments.length&&"boolean"!=typeof invokeAsap&&((context=invokeAsap),(invokeAsap=!1));var timer;return function(){var args=arguments;(context=context||this),invokeAsap&&!timer&&fn.apply(context,args),clearTimeout(timer),(timer=setTimeout(function(){!invokeAsap&&fn.apply(context,args),(timer=null)},timeout))}},}),$(window).on({load:function(){"use strict";bdlf.controller.initialPageLoad()},}),$(window).resize($.debounce(function(){"use strict";bdlf.log.information("Resize debounce"),bdlf.on.handle.resizeStop()},bdlf.options.timings.debounce));var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.dispatcher=(function(){function execute(){bdlf.log.information("[bdlf.dispatcher.execute]: queue length="+bdlf.options.inview.sequenceQueue.length),bdlf.options.inview.sequenceQueue.length>0?moduleInitialize(bdlf.options.inview.sequenceQueue[0]):bdlf.log.information("[bdlf.dispatcher.execute]: queue is empty")}
      function moduleInitialize(obj){bdlf.log.information("[bdlf.dispatcher.moduleInitialize]: "+$.logJSONObj(obj));var options={functionToRun:"update"};void 0!==obj.queueId&&(options.queueId=obj.queueId),void 0!==obj.functionToRun&&(options.functionToRun=obj.functionToRun);var routeOptions=$.extend(options,{elementObj:obj.elementObj,modType:obj.modType,});route(routeOptions)}
      function route(obj){bdlf.log.information("[bdlf.dispatcher.route]: "+$.logJSONObj(obj));try{bdlf[obj.modType][obj.functionToRun].call(obj.elementObj,obj),obj.elementObj.attr("data-inview-initialized",!0)}catch(error){bdlf.log.warning("[bdlf.dispatcher.route]: error trying to initialize plugin: "+$.logJSONObj(obj)+", error="+error),void 0!==obj.queueId&&bdlf.dispatcher.initializeComplete({queueId:obj.queueId})}}
      function initializeComplete(obj){bdlf.log.information("[bdlf.dispatcher.initializeComplete]: "+$.logJSONObj(obj));for(var matchedSequencePosition,loadSequence=bdlf.options.inview.sequenceQueue,i=0;i<loadSequence.length;i++)
          loadSequence[i].queueId===obj.queueId&&((matchedSequencePosition=i),bdlf.options.inview.sequenceQueue.splice(matchedSequencePosition,1),execute());}
      return{execute:execute,initializeComplete:initializeComplete,moduleInitialize:moduleInitialize,}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.form=(function(){function init(){bdlf.log.information("[bdlf.form.init]"),$.extend(bdlf.options,{}),eventsInit()}
      function eventsInit(){bdlf.log.information("[bdlf.form.eventsInit]")}
      function addModClassName(){bdlf.log.information("[bdlf.form.addModClassName]"),$("FORM").filter(function(){return!$(this).hasParent("#log")}).addClass("mod-form")}
      return{addModClassName:addModClassName,init:init}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.inview=(function(){function init(){bdlf.log.information("[bdlf.inview.init]"),$.extend(bdlf.options,{inview:{isWindowScroll:!0,modsCurrentlyInView:[],scrollElementObj:$(window),sequenceQueue:[],yAxisBounds:{bottom:null,top:null},},}),(bdlf.on.scrollStop.inview=refresh),(bdlf.on.resizeStop.inview=refresh),refresh()}
      function updateYAxisBounds(){(bdlf.options.inview.yAxisBounds.top=bdlf.options.inview.scrollElementObj.scrollTop()),(bdlf.options.inview.yAxisBounds.bottom=bdlf.options.inview.scrollElementObj.scrollTop()+bdlf.options.inview.scrollElementObj.height()),bdlf.log.information("[bdlf.inview.updateYAxisBounds]: top="+bdlf.options.inview.yAxisBounds.top+", bottom="+bdlf.options.inview.yAxisBounds.bottom)}
      function refresh(){bdlf.log.information("[bdlf.inview.refresh]"),updateYAxisBounds(),refreshElementsInView()}
      function refreshElementsInView(){bdlf.log.information("[bdlf.inview.refreshElementsInView]"),(bdlf.options.inview.modsCurrentlyInView.length=0);var matchedDomObj,selector=bdlf.controller.getModsInView();selector.each(function(){(matchedDomObj=$(this)),matchedDomObj.inView()&&!matchedDomObj.hasAttr("data-inview-initialized")&&bdlf.options.inview.modsCurrentlyInView.push(matchedDomObj)});var logicToExecute,subLogicToExecute,logicToExecuteArr=[];(bdlf.options.inview.sequenceQueue.length=0),$.each(bdlf.options.inview.modsCurrentlyInView,function(index,obj){if(obj.hasAttr("data-inview")){(logicToExecute=obj.attr("data-inview")),(logicToExecuteArr.length=0),logicToExecute.indexOf("|")!==-1?(logicToExecuteArr=logicToExecute.split("|")):(logicToExecuteArr[0]=logicToExecute);for(var i=0;i<=logicToExecuteArr.length-1;i++)(subLogicToExecute=logicToExecuteArr[i].split(".")),bdlf.options.inview.sequenceQueue.push({elementObj:obj,functionToRun:subLogicToExecute[1],modType:subLogicToExecute[0],queueId:$.generateUID(),})}});try{bdlf.dispatcher.execute()}catch(error){bdlf.log.error("[bdlf.inview.refreshElementsInView]: error trying to run bdlf.dispatcher.execute(): error="+error)}}
      return{init:init}})();var inViewPlugin={init:function(){var elementTopPosition=bdlf.options.inview.isWindowScroll?$(this).offset().top:$(this).offsetRelativeTo(bdlf.options.inview.scrollElementObj),elementBottomPosition=elementTopPosition+$(this).actual("outerHeight");return!(elementBottomPosition<bdlf.options.inview.yAxisBounds.top||elementTopPosition>bdlf.options.inview.yAxisBounds.bottom)},};$.fn.inView=function(obj){return inViewPlugin[obj]?inViewPlugin[obj].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof obj&&obj?void 0:inViewPlugin.init.apply(this,arguments)};var offsetRelativeToPlugin={init:function(elementObj){var offset1=this.offset(),offset2=elementObj.offset();offset1.top-=offset2.top-elementObj.scrollTop();var elementYOffset=Math.round(offset1.top);return elementYOffset},};$.fn.offsetRelativeTo=function(obj){return offsetRelativeToPlugin[obj]?offsetRelativeToPlugin[obj].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof obj&&obj?void 0:offsetRelativeToPlugin.init.apply(this,arguments)}})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.log=(function(){function init(){}
      function information(message){logger({message:message,type:"information"})}
      function warning(message){logger({message:message,type:"warning"})}
      function error(message){logger({message:message,type:"error"})}
      function override(message){logger({message:message,type:"override"})}
      function logger(obj){if(bdlf.options.log.enabled)
          switch(obj.type){case "override":console.info(obj.message);break;case "warning":console.warn(obj.message);break;case "error":console.error(obj.message);break;default:console.log(obj.message)}}
      return{error:error,information:information,init:init,override:override,warning:warning,}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.on=(function(){var resizeStop={},scrollStop={},handle={resizeStart:function(){return(!!bdlf.utilities.isVerifiedResizeEvent()&&(bdlf.log.information("[bdlf.on.handle.resizeStart]"),void($("BODY").hasClass("processing")||$("BODY").addClass("processing"))))},resizeStop:function(e){bdlf.log.information("[bdlf.on.handle.resizeStop]"),$("BODY").removeClass("processing"),(bdlf.options.gridType=$.isWhichGridType($(window).width()));for(var i in bdlf.on.resizeStop)
          bdlf.options[i].resetOnHeightResize?bdlf.on.resizeStop[i](e):(bdlf.utilities.isNotSameViewPort()&&bdlf.on.resizeStop[i](e),"dynamic"===i&&bdlf.on.resizeStop[i](e));bdlf.options.previousGridType=bdlf.options.gridType},scrollStop:function(e){for(var i in bdlf.on.scrollStop)bdlf.on.scrollStop[i](e);},};return{handle:handle,resizeStop:resizeStop,scrollStop:scrollStop}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.utilities=(function(){function isVerifiedResizeEvent(){var windowCurrentHeight=$(window).height(),windowCurrentWidth=$(window).width(),isVerified=!1;return((windowCurrentHeight===bdlf.options.windowHeight&&windowCurrentWidth===bdlf.options.windowWidth)||((bdlf.options.windowHeight=windowCurrentHeight),(bdlf.options.windowWidth=windowCurrentWidth),(isVerified=!0)),bdlf.log.information("[bdlf.utilities.isVerifiedResizeEvent]: isVerified="+isVerified),isVerified)}
      function isNotSameViewPort(){var presentGridType=bdlf.options.gridType,viewport=!1;return(null!==bdlf.options.previousGridType&&presentGridType!==bdlf.options.previousGridType&&(viewport=!0),viewport)}
      function overlay(flag,overlayDom,id){if(("hide"===flag&&$(".overlay-light-box").remove(),"show"===flag&&0===$("#"+id).length)){var overlayEle=$("<div>").attr({id:id,class:"overlay-light-box"}).css("height",$("body").height());$(overlayDom).before(overlayEle)}}
      var configuration={breakpoints:{xs:{min:1,max:767},sm:{min:768,max:1023},md:{min:1024,max:1439},lg:{min:1440,max:99999},},},keycode={uparrow:38,downarrow:40,leftarrow:37,rightarrow:39,backspace:8,comma:188,esc:27,numeric:[48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105,],period:190,rtn:13,shift:16,tab:9,space:32,};return{configuration:configuration,keycode:keycode,isVerifiedResizeEvent:isVerifiedResizeEvent,isNotSameViewPort:isNotSameViewPort,overlay:overlay,}})()})(bdlf,jQuery),$.fn.extend({hasParent:function(parentSelector){"use strict";return $(this).parents(parentSelector).length},hasAttr:function(name){"use strict";return void 0!==this.attr(name)},convertTouchType:function(){"use strict";var hasInputDataType,newDataType,originalDataType,formElementObj;return this.each(function(){(formElementObj=$(this)),(hasInputDataType=formElementObj.hasAttr("data-input-type")),(newDataType=formElementObj.attr("data-touch-type")),(originalDataType=formElementObj.attr("type")),formElementObj.attr("type",newDataType)})},});var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.accordion=(function(){function init(){bdlf.log.information("[bdlf.accordion.init]"),$.extend(bdlf.options,{accordion:{selector:{}}}),(bdlf.options.accordion.selector.tab=">H4"),(bdlf.options.accordion.selector.tabSelector=">H4 A"),(bdlf.options.accordion.selector.modSelector=".mod-accordion >H4 A"),(bdlf.on.resizeStop.accordion=reset),eventsInit(),domInit($(".mod-accordion"))}
      function eventsInit(){function accordionEvents(accordionItem,tabSelector){var modAccordionObj=accordionItem.parents(".mod-accordion"),selfObj=accordionItem,accordionIndex=$(tabSelector,modAccordionObj).index(selfObj);if(selfObj.parent().hasClass("active"))
          selfObj.parent().attr("aria-expanded","false").removeClass("active").siblings(".content").attr("aria-hidden","true").hide();else{var activeContent=$(".content:eq("+accordionIndex+")",modAccordionObj),activeTab=selfObj.parent();modAccordionObj.removeAttr("data-collapse-all"),modAccordionObj.attr("data-active-accordion",accordionIndex),activeTab.attr({class:"active","aria-expanded":"true"}),activeTab.siblings().attr("aria-expanded","false").removeClass("active"),activeContent.show().attr("aria-hidden","false").siblings(".content").attr("aria-hidden","true").hide(),$("SELECT",modAccordionObj).prop("selectedIndex",accordionIndex+1)}}
          bdlf.log.information("[bdlf.accordion.eventsInit]"),$("BODY").on("click",bdlf.options.accordion.selector.modSelector,function(event){event.preventDefault(),accordionEvents($(this),bdlf.options.accordion.selector.tabSelector)}).on("focus blur",bdlf.options.accordion.selector.modSelector,function(event){var accordianItem=$(this).parent();"focusin"===event.type?accordianItem.attr("aria-selected","true"):"focusout"===event.type&&accordianItem.attr("aria-selected","false")}).on("keydown",bdlf.options.accordion.selector.modSelector,function(event){var accordions=$(bdlf.options.accordion.selector.modSelector),accordionIndex=accordions.index($(this));if((/(40|39|38|37|36|35|32|9)/.test(event.keyCode)&&event.preventDefault(),/(40|39)/.test(event.keyCode)))
              accordionIndex<accordions.length-1?accordions.eq(accordionIndex+1).focus():accordions.first().focus();else if(/(38|37)/.test(event.keyCode))
              0===accordionIndex?accordions.last().focus():accordions.eq(accordionIndex-1).focus();else if(36===event.keyCode)accordions.first().focus().click();else if(35===event.keyCode)accordions.last().focus().click();else if(9===event.keyCode){var tabables=$("a, input, button");event.shiftKey?tabables.eq(tabables.index(accordions.first())-1).focus():tabables.eq(tabables.index(accordions.last())+1).focus()}else 32===event.keyCode&&this.click()}).on("change",".mod-accordion>span>SELECT",function(event){var selector,modAccordionObj=$(this).parents(".mod-accordion"),selectedIndex=$(this)[0].selectedIndex;(selector=bdlf.options.accordion.selector.tab+":eq("+(selectedIndex-1)+") A"),$(selector,modAccordionObj).click()})}
      function reset(){$(".mod-accordion").each(function(){var accordionItem=$(this);displayAccordionVarient(accordionItem,bdlf.options.accordion.selector.tab,!1)})}
      function domInit(selector){bdlf.log.information("[bdlf.accordion.domInit]: "+selector);var accordionItem,defaultActiveAccordion;selector.each(function(){(accordionItem=$(this)),accordionItem.attr("data-total-accordions",$(bdlf.options.accordion.selector.tab,accordionItem).size()),accordionItem.hasAttr("data-active-accordion")?(defaultActiveAccordion=parseInt(accordionItem.attr("data-active-accordion"),10)):(accordionItem.attr("data-active-accordion","0"),(defaultActiveAccordion=0)),dropdown.call(accordionItem,defaultActiveAccordion,!0),displayAccordionVarient(accordionItem,bdlf.options.accordion.selector.tab,!0)})}
      function displayAccordionVarient(accordionItem,tab,once){function triggerAccordionTab(){$(tab+":eq("+activeAccordion+") A",accordionItem).click()}
          var breakLength=accordionItem.attr("data-accordion-break-at"),actualLength=$(tab,accordionItem).length,activeAccordion=parseInt(accordionItem.attr("data-active-accordion"),10);accordionItem.hasAttr("data-accordion-break-at")?breakLength<actualLength?(("desktop"!==bdlf.options.gridType&&"tablet-landscape"!==bdlf.options.gridType)||$(">.select-field",accordionItem).hide(),("mobile"!==bdlf.options.gridType&&"tablet-portrait"!==bdlf.options.gridType)||$(">.select-field",accordionItem).show()):($(">.select-field",accordionItem).hide(),$(tab+":eq("+activeAccordion+")",accordionItem).next().show(),$(tab,accordionItem).show()):("desktop"===bdlf.options.gridType&&"tablet-landscape"===bdlf.options.gridType)||$(tab,accordionItem).hasClass("active")||accordionItem.hasAttr("data-collapse-all")||triggerAccordionTab(),("desktop"!==bdlf.options.gridType&&"tablet-landscape"!==bdlf.options.gridType)||accordionItem.attr("data-collapse-all")||$(tab,accordionItem).hasClass("active")||triggerAccordionTab(),accordionItem.hasAttr("data-collapse-all")&&($(".content",accordionItem).hide(),("mobile"!==bdlf.options.gridType&&"tablet-portrait"!==bdlf.options.gridType)||(breakLength<actualLength&&(triggerAccordionTab(),$(tab+":eq("+activeAccordion+")",accordionItem).next().show()),accordionItem.hasAttr("data-accordion-break-at")||(triggerAccordionTab(),$(".content",accordionItem).show())),$(tab,accordionItem).hasClass("active")&&$(tab+":eq("+activeAccordion+") ",accordionItem).removeClass("active")),!accordionItem.hasAttr("data-collapse-all")&&once&&($(tab,accordionItem).hasClass("active")||triggerAccordionTab(),$(".mod-accordion > .content").hide(),$(".mod-accordion > .content").eq(0).show())}
      function dropdown(defaultActiveAccordion,once){bdlf.log.information("[bdlf.accordion.dropdown]: defaultActiveAccordion="+defaultActiveAccordion);var modAccordionObj=$(this),accordionsTotal=parseInt(modAccordionObj.attr("data-total-accordions"),10);modAccordionObj.prepend(function(){var selectObj=$("<span />").append($("<select />")).append($("<span />")).attr("class","select-field");$("SELECT",selectObj).append($("<option />").prop("selected","selected").text("Please select..."));for(var i=0;i<=accordionsTotal-1;i++)
          $("SELECT",selectObj).append($("<option />").html($(">H4:eq("+i+") A",modAccordionObj).text().replace("Load accordion:","")));return(once&&selectObj.find("option").eq(1).prop("selected","selected"),selectObj)})}
      return{dropdown:dropdown,reset:reset,init:init}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.cookieprompt=(function(){function init(){bdlf.log.information("[bdlf.cookieprompt.init]"),eventsInit()}
      function eventsInit(){bdlf.log.information("[bdlf.cookieprompt.eventsInit]");var prompt=$(".mod-cookieprompt");prompt.find(".btn").click(function(){event.preventDefault(),prompt.addClass("prompt-close"),setTimeout(function(){prompt.remove()},500)})}
      return{init:init}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){bdlf.globalheader=(function(){function getViewportElement(){var parallax=$(".parallax-viewport");return parallax.length?parallax:$(window)}
      function init(){size(),updateState(),changeState(state),onScrollChangeState(),onScrollSegmentBar(),resize(),getUtilities(),$("body").addClass("segment-visible"),setTimeout(function(){$(".global-header .segment").addClass("segment-transition")},250)}
      function appendAriaDescription(){for(var key in options.ariaDescribedby){var descriptionItem=$("<p>").attr({class:"access","aria-hidden":"true",id:key}).text(options.ariaDescribedby[key]);$(".global-header").append(descriptionItem)}}
      function changeState(toState){$("header").removeClass().removeAttr("class").addClass("global-header js-globalheader "+toState),$(".main-nav").find(".active").removeClass("active"),resetStateEvents(),initialiseState(toState),updateBodyClasses()}
      function resetStateEvents(){$(".global-header, .global-header *").unbind()}
      function initialiseState(toState){switch(toState){case "minimised":minimised();break;case "tablet-portrait":tabletPortrait();break;case "tablet-portrait-nav":tabletPortraitNav();break;case "tablet-portrait-sub-nav":tabletPortraitSubNav();break;case "mobile":mobile();break;case "mobile-nav":mobileNav();break;case "mobile-sub-nav":mobileSubNav();break;case "mobile-sub-nav-l3":mobileSubNavL3();break;case "desktop":desktop();break;default:desktop()}}
      function overlay(flag,overlayDom,id){if(("hide"===flag&&$(".overlay-light-box").remove(),"show"===flag&&0===$("#"+id).length)){var overlayEle=$("<div>").attr({id:id,class:"overlay-light-box"}).css("height",$("body").height());$(overlayDom).before(overlayEle),$(overlayEle).on("click",function(){overlay("hide")})}}
      function desktop(){var isSegmentExist=$("div.segment").length;var isHeaderNavExist=$("header div.header-nav").length; if(!isSegmentExist&&!isHeaderNavExist){$("body").css("padding-top",72+"px");headerHeight=72}        else if(!isSegmentExist&&isHeaderNavExist){$('body').removeClass('segment-visible');$("body").css("padding-top",126+"px");headerHeight=126}
          else if(isSegmentExist&&!isHeaderNavExist){$("body").addClass("no-nav-menu");$("body").css("padding-top",108+"px");headerHeight=108}if(state="desktop",$(".global-header").outerHeight()>126){var openItem=$(".global-header").find(".nav-l2.selected"),openItemHeight=openItem.outerHeight()}
          $(".global-header").css("height",headerHeight+"px"),resetStyles(),$(".global-header .nav-l2 > ul > li > a").attr("role","heading"),$(".global-header .header-nav").removeAttr("style"),$(".utilities a span").removeClass("access"),more(),navigation(),searchBar()}
      function minimised(){if(((state="minimised"),resetStyles(),calcWidthMinimised(),(headerHeight=54),$(".global-header").outerHeight()>54)){var openItem=$(".global-header").find(".nav-l2.selected"),openItemHeight=openItem.outerHeight();headerHeight+=openItemHeight}
          $(".global-header").css("height",headerHeight+"px"),$(".global-header .header-nav .main-nav").hide().show(function(){more(),navigation(),searchBar(),$(".global-header .header-nav .main-nav").addClass("visible")});$(".global-header .search-bar input").on({keydown:function(event){/9/.test(event.which)&&event.shiftKey&&(event.preventDefault(),closeSearch(),$(".global-header .branch-finder a").focus())},})}
      function isScrollPosNearStateChange(scrollPos){var buffer=25;return(scrollPos>lastStateChange-buffer&&scrollPos<lastStateChange+buffer)}
      function onScrollChangeState(){var isSegmentExist=$("div.segment").length;var isHeaderNavExist=$("header div.header-nav").length;$(".global-header").on("keydown",function(event){options.currentEvent=event.which}),32!==options.currentEvent&&(overlay("hide"),getViewportElement().scroll($.debounce(function(event){ var isMoreOpen=$(".global-header .header-nav .main-nav li.more").hasClass("open");isMoreOpen||"desktop"!==state&&"minimised"!==state||"desktop"===state&&$(".global-header .header-nav .main-nav").show(),st=$(this).scrollTop();var bottom=$("body").height()-$(window).height();
      if(st>50&&st>lastScrollTop&&!isScrollPosNearStateChange(st)){ $("body").removeClass("segment-visible"),"desktop"===state&&($(".global-header .header-nav .main-nav").removeClass("main-nav-hide"), state="minimised",changeState(state),overlay("hide"));var h=heights.header[state.split("-")[0]];mainHeaderHeight = $(".header-main").outerHeight(true);s=heights.segment[state.split("-")[0]];$(".global-header").css("height",h+"px"),lastStateChange=st}else if(st<bottom&&st<lastScrollTop&&!isScrollPosNearStateChange(st)){ $("body").addClass("segment-visible"),"minimised"===state&&($(".global-header .header-nav .main-nav").show().removeClass("visible"),state="desktop",changeState(state),overlay("hide"));var h=heights.header[state.split("-")[0]],s=heights.segment[state.split("-")[0]];if(!isSegmentExist&&!isHeaderNavExist){$(".global-header").css("height",mainHeaderHeight+"px"),lastStateChange=st}else if(!isSegmentExist&&isHeaderNavExist){$(".global-header").css("height",h+"px"),lastStateChange=st}else if(isSegmentExist&&!isHeaderNavExist){$(".global-header").css("height",mainHeaderHeight+s+"px"),lastStateChange=st}else if(isSegmentExist&&isHeaderNavExist){$(".global-header").css("height",h+s+"px"),lastStateChange=st}}lastScrollTop=st},100)))}
      function onScrollSegmentBar(){$(".global-header .segment-body").on("scroll",function(event){event.target.scrollLeft+event.target.clientWidth===event.target.scrollWidth?$(this).addClass("segment-body-scrollend"):$(this).removeClass("segment-body-scrollend")})}
      function onScrollNav(){$(".nav-l2").on("scroll",function(event){event.target.scrollTop+event.target.clientHeight===event.target.scrollHeight?$(this).addClass("nav-l2-scrollend"):$(this).removeClass("nav-l2-scrollend")})}
      function navigation(){function menuOverlay(){$(".overlay-light-box").hasClass("visible")||(overlayDelay=setTimeout(function(){overlay("show",".global-header"),$(".overlay-light-box").show().addClass("visible")},250))}
      function focusMenu(){dom.focus()}
      function displayNav(navItem){var navHeight;navItem.find(".nav-l2").css("display","block"),(navHeight=navItem.find(".nav-l2").outerHeight());var moreOpen=$(".global-header .header-more").hasClass("open"),moreHeight=54;"minimised"===state?(headerHeight=moreOpen?54+moreHeight:54):"desktop"===state&&(headerHeight=moreOpen?126+moreHeight:126),$(".global-header").css("height",headerHeight+navHeight+"px"),navItem.find(".nav-l2").addClass("selected"),$mainNav.attr("data-menustate","opened"),navItem.find(".nav-l2,.nav-l3").attr("aria-hidden","false"),navItem.find(">a").attr("aria-expanded","true")}
      function hideNav(overlayState){"opened"===$mainNav.attr("data-menustate")&&("keepOverlay"!==overlayState&&overlay("hide"),$secondaryNav.hide(),$mainNav.find(">ul>li>a").attr("aria-expanded","false"),$header.find(".nav-l2,.nav-l3").attr("aria-hidden","true"),$header.find(".nav-l2").removeClass("selected"),$mainNav.attr("data-menustate","closed"),"minimised"===state?(headerHeight=54):"desktop"===state&&(headerHeight=126),$header.css("height",headerHeight+"px"))}
          var dom,$header=$(".global-header"),$mainNav=$header.find(".main-nav"),$primaryNav=$mainNav.find(" > ul > li"),$secondaryNav=$mainNav.find(".nav-l2"),$teritaryNav=$secondaryNav.find(".nav-l3 li");$header.attr("data-interaction","mouse"),$header.on({mouseenter:function(){var moreOpen=$(".more",this).hasClass("open");moreOpen||($header.attr("data-interaction","mouse"),$header.removeClass("keyboard"))},keydown:function(event){/(38|40)/.test(event.which)&&event.preventDefault()},keyup:function(){$header.attr("data-interaction","keyboard"),$header.addClass("keyboard")},}),$header.find(".header-main .header-container").on({focusin:function(){hideNav()},}),$mainNav.attr("data-menustate","closed"),$mainNav.on({mouseleave:function(){$(this).find(".nav-l2").hide()},}).find("a").on("click",function(event){"#"===$(this).attr("href")&&event.preventDefault()}),$primaryNav.not(".more").on({mouseenter:function(){"mouse"===$header.attr("data-interaction")&&(displayNav($(this)),options.hasTouch||menuOverlay()),$(".global-header").removeClass("search-open"),closeSearch()},mouseleave:function(){hideNav("keepOverlay"),clearTimeout(overlayDelay)},click:function(event){"keyboard"===$header.attr("data-interaction")&&("closed"===$mainNav.attr("data-menustate")?(displayNav($(this)),menuOverlay()):hideNav()),"mouse"===$header.attr("data-interaction")&&(hideNav("keepOverlay"),displayNav($(this)),$(".overlay-light-box").hasClass("visible")||menuOverlay()),1===$(this).children().length&&($(this).addClass("active").siblings().removeClass("active"),$(this).siblings().find("li").removeClass("active"))},keyup:function(event){if((event.stopPropagation(),$header.hasClass(".search-open")&&$header.find(".search-close").trigger("click"),"open"===$mainNav.attr("data-menustate")&&$header.find(".nav-l2,.nav-l3").attr("aria-hidden","false"),$secondaryNav.find(">ul>li").attr("aria-haspopup","false"),/32/.test(event.which)&&(event.preventDefault(),$(this).trigger("click")),/27/.test(event.which)&&hideNav(),/9/.test(event.which))){(dom=$(this).find(">a")),focusMenu(),hideNav();var inMainNav=$(this).closest(".header-nav"),isMore=$(this).hasClass("more");inMainNav.length&&!isMore&&hideMoreNavigation()}
           /40/.test(event.which)&&(dom=$(this).find(".nav-l2 > ul > li:first-child >a").focus()),/39/.test(event.which)&&1===$(this).next().length&&((dom=$(this).next().find(">a")),focusMenu(),hideNav()),/37/.test(event.which)&&(event.stopPropagation(),1===$(this).prev().length&&((dom=$(this).prev().find(">a")),focusMenu(),hideNav())),/38/.test(event.which)&&event.preventDefault(),$(".global-header").hasClass("search-open")&&closeSearch()},focusout:function(){clearTimeout(overlayDelay)},});var overlayDelay;$(".global-header .main-nav > ul").on({mouseleave:function(){overlay("hide")},}),$secondaryNav.find("li").on("keyup",function(event){var isNavl3Present=$(event.target).next().hasClass("nav-l3"),activePrimaryNav=$(event.target).closest(".nav-l2").parent(),closesetNavL3=$(event.target).closest(".nav-l3"),nextMenuItem=$(event.target).parent().next(),closesetNavL2=$(event.target).closest(".nav-l2 > ul > li"),relatedPrimaryNav=$(event.target).offsetParent().parent();if((event.stopPropagation(),event.preventDefault(),/27/.test(event.which)&&(hideNav(),activePrimaryNav.find(">a").focus()),/40/.test(event.which)))
          isNavl3Present?(dom=$(event.target).next().find("li:first-child a")):1===nextMenuItem.length?(dom=nextMenuItem.find("a")):0===nextMenuItem.length&&(0===closesetNavL2.next().length?((dom=$(event.target).closest(".nav-l2").parent().next().find(">a")),hideNav()):(dom=closesetNavL2.next().find(">a")));else if(/38/.test(event.which)){var prevMenuItem=$(event.target).parent().prev();isNavl3Present?(dom=0===$(event.target).parent().prev().length?relatedPrimaryNav.find("> a"):$(event.target).parent().prev().find(" li:last-child a")):1===prevMenuItem.length?(dom=prevMenuItem.find("a")):0===prevMenuItem.length&&(dom=closesetNavL3.prev())}else dom=$(event.target);/39/.test(event.which)&&(dom=0===closesetNavL2.next().length?relatedPrimaryNav.find("> a"):closesetNavL2.next().find(">a")),/37/.test(event.which)&&(dom=0===closesetNavL2.prev().length?relatedPrimaryNav.find("> a"):closesetNavL2.prev().find(">a")),27!==event.which&&dom.focus()}),$secondaryNav.find("> ul > li > a").on("click",function(event){event.preventDefault()}),$teritaryNav.on({click:function(event){var activePrimaryNav=$(event.target).closest(".nav-l2").parent();$header.find(".header-nav .main-nav > ul > li:not(.more-item)").removeClass("active"),$header.find(".header-nav .main-nav > ul > li:not(.more-item) .nav-l3 li").removeClass("active"),$header.find(".header-more .main-nav li").removeClass("active"),$(this).closest("li").addClass("active"),$(this).closest(".nav-l3").closest("li").addClass("active"),$(this).offsetParent().parent().addClass("active"),hideNav(),activePrimaryNav.find(">a").focus()},keydown:function(event){var activePrimaryNav=$(event.target).closest(".nav-l2").parent(),closesetNavL3=$(event.target).closest(".nav-l3"),nextPrimaryNav=activePrimaryNav.next();if(/9/.test(event.which)&&0===nextPrimaryNav.length){var nextSetofmenu=closesetNavL3.parent();1===nextSetofmenu.length&&0===nextSetofmenu.next().length&&hideNav()}},})}
      function tabletPortrait(){var isSegmentExist=$("div.segment").length; var isHeaderNavExist=$("header div.header-nav").length;var headerHeight; var mainHeaderHeight = $(".header-main").outerHeight(true); if(!isSegmentExist&&!isHeaderNavExist){$("body").css("padding-top",mainHeaderHeight+"px")} else{if(!isSegmentExist){$('body').removeClass('segment-visible');$(".global-header").css("height",mainHeaderHeight+"px"),$("body").css("padding-top",mainHeaderHeight+"px")} if(!isHeaderNavExist){$("body").addClass("no-nav-menu");$("body").css("padding-top",102+"px"); }} state="tablet-portrait",headerHeight=heights.header.tablet+heights.segment.tablet,$(".global-header .main-nav li").removeClass("open"),$(".utilities a span").removeClass("access"),resetStyles(),$(".global-header .close span").text("Menu"),swapClass("close","hamburger"),addMenuButtonEvent(),hasTouch(),searchBarMobile()}
      function tabletPortraitNav(){var windowHeight=getViewportElement().height();(state="tablet-portrait-nav"),$("html").css("overflow","hidden"),$(".global-header .main-nav li").removeClass("open"),$(".global-header .hamburger span").text("Close"),swapClass("hamburger","close"),addCloseButtonEvent();$(".global-header .header-nav .main-nav a:first"),$(".global-header .header-nav .main-nav li.active"),$(".global-header .header-nav .main-nav a").closest("li").hasClass("active");$(".global-header .header-nav").css("min-height",windowHeight);var invSegmentHeight=$("body").hasClass("segment-visible")?0:heights.segment.tablet;$(".global-header .nav-l2").css("height",windowHeight-headerHeight+invSegmentHeight+50),$(".global-header .header-nav .main-nav li").removeClass("active open"),$(".global-header .header-nav .main-nav > ul > li > a").on("click",function(event){$(".global-header .header-nav .main-nav li a").attr("aria-expanded","false"),$(this).attr("aria-expanded","true"),changeMainNavFormat($(this)),$(".global-header .header-nav .main-nav li").removeClass("open");var href=$(this).attr("href");("#"!==href&&void 0!==href)||(setActiveOpen(this,"active open"),event.preventDefault())}),onScrollNav(),$(".global-header .header-nav .main-nav .nav-l3 li").on("click",function(event){$(".global-header").find(".nav-l3 li").removeClass("active"),$(this).addClass("active"),$(this).parent().parent().parent().addClass("active").siblings().removeClass("active"),$(this).offsetParent().parent().addClass("active").siblings().removeClass("active"),changeState("tablet-portrait")}),hasTouch(),searchBarMobile()}
      function tabletPortraitSubNav(){(state="tablet-portrait-sub-nav"),addCloseButtonEvent(),hasTouch()}
      function mobile(){var isSegmentExist=$("div.segment").length;var isHeaderNavExist=$("header div.header-nav").length;if(!isSegmentExist){headerHeight=54;$("body").css("padding-top",headerHeight+"px")}else if(isSegmentExist&&!isHeaderNavExist){headerHeight=110}else if(isSegmentExist&&isHeaderNavExist){headerHeight=110}else{headerHeight=heights.header.mobile+heights.segment.mobile}
          state="mobile",$(".global-header").css("height",headerHeight+"px"),$(".global-header .header-nav .main-nav li").removeClass("open"),$(".global-header .header-nav .main-nav .nav-l2").attr("aria-hidden","true"),$(".global-header .header-nav .main-nav .nav-l3").attr("aria-hidden","true"),resetStyles(),$(".global-header .close span").text("Menu"),swapClass("close","hamburger"),addMenuButtonEvent(),hasTouch(),searchBarMobile()}
      function mobileNav(){(state="mobile-nav"),setHeight(".header-nav",48),$("html").css("overflow","hidden"),$(".global-header .header-nav .main-nav li").removeClass("open"),$(".global-header .header-nav .main-nav .nav-l2").attr("aria-hidden","true"),$(".global-header .header-nav .main-nav .nav-l3").attr("aria-hidden","true"),$(".global-header .hamburger span").text("Close"),swapClass("hamburger","close"),addCloseButtonEvent(),$(".global-header .header-nav .main-nav a").on("click",function(event){toggleAriaExpanded($(this));var href=$(this).attr("href");("#"!==href&&void 0!==href)||(changeState("mobile-sub-nav"),setActiveOpen(this,"active open"),setAriaStates($(this)),event.preventDefault())}),hasTouch(),searchBarMobile()}
      function mobileSubNav(){(state="mobile-sub-nav"),addCloseButtonEvent(),addBackButtonEvent("mobile-nav"),$(".global-header .header-nav .main-nav .nav-l2 li").removeClass("open"),$(".global-header .header-nav .main-nav a").on("click",function(event){toggleAriaExpanded($(this));var isBackLink="MenuItemLevel1"===$(this).parent().attr("data-component-type"),href=$(this).attr("href"),header=$(this).parent("li").hasClass("open");isBackLink?(event.preventDefault(),changeState("mobile-nav"),$(".global-header .main-nav .nav-l3, .global-header .main-nav .nav-l2").attr("aria-hidden","true")):header?event.preventDefault():("#"!==href&&void 0!==href)||(changeState("mobile-sub-nav-l3"),setActiveOpen(this,"active open"),setAriaStates($(this)),event.preventDefault())}),hasTouch()}
      function mobileSubNavL3(){(state="mobile-sub-nav-l3"),addCloseButtonEvent(),addBackButtonEvent("mobile-sub-nav"),$(".global-header .header-nav .main-nav a").on("click",function(event){toggleAriaExpanded($(this));var isBackLink="MenuItemLevel2"===$(this).parent().attr("data-component-type"),header=$(this).parent("li").hasClass("open");isBackLink?(event.preventDefault(),changeState("mobile-sub-nav"),$(".global-header .main-nav .nav-l3, .global-header .main-nav .nav-l2").attr("aria-hidden","true")):header?event.preventDefault():(setActiveOpen(this,"active"),setAriaStates($(this)),changeState("mobile"))}),hasTouch()}
      function addMenuButtonEvent(){$(".global-header .hamburger a").on("click",function(event){changeState("tablet-portrait"===state?"tablet-portrait-nav":"mobile-nav"),event.preventDefault()})}
      function addCloseButtonEvent(){$(".global-header .close a").on("click",function(event){changeState("tablet-portrait-nav"===state||"tablet-portrait-sub-nav"===state?"tablet-portrait":"mobile"),$("html").css("overflow",""),event.preventDefault()})}
      function addBackButtonEvent(backToState){$(".global-header a.back").on("click",function(event){changeState(backToState),"mobile-sub-nav"===backToState&&$(".global-header .header-nav .main-nav .nav-l3").attr("aria-hidden","true"),"mobile-nav"===backToState&&$(".global-header .header-nav .main-nav .nav-l2").attr("aria-hidden","true"),event.preventDefault()})}
      function setActiveOpen(item,addClasses){var parentList=$(item).closest("ul"),isActive=$(item).closest("li").hasClass("active");isActive||$("li",parentList).removeClass("open").removeClass("active"),$(item).closest("li").addClass(addClasses)}
      function setAriaStates(el){el.next().attr("aria-hidden","false")}
      function swapClass(oldClass,newClass){var previousState="hamburger"===oldClass?"menu":"close",expandedState="hamburger"===oldClass?"true":"false";$(".global-header ."+oldClass+" a").attr("data-previous-state",previousState).attr("aria-expanded",expandedState),$(".global-header ."+oldClass).removeClass(oldClass).addClass(newClass)}
      function setHeight(classPath,offset){var menuHeight=windowHeight-offset;$(".global-header "+classPath).height(menuHeight)}
      function resetStyles(){$("html").css("overflow",""),$(".global-header *").removeAttr("style"),$(".global-header .nav-l2 > ul > li > a").removeAttr("role","heading"),resetMainNavFormat()}
      function hasTouch(){options.hasTouch?($(".global-header").removeClass("no-touch"),$(".global-header").addClass("has-touch")):($(".global-header").removeClass("has-touch"),$(".global-header").addClass("no-touch"))}
      function size(){(windowHeight=getViewportElement().height()),(windowWidth=$(window).width())}
      function updateState(){windowWidth>=breakpoints.desktop.min&&windowWidth<=breakpoints.desktop.max&&(state="desktop"),windowWidth>=breakpoints.desktop.max&&(state="desktop"),windowWidth>=breakpoints.tabletPortrait.min&&windowWidth<=breakpoints.tabletPortrait.max&&(state="tablet-portrait"),windowWidth>=breakpoints.mobile.min&&windowWidth<=breakpoints.mobile.max&&(state="mobile")}
      function updateBodyClasses(){var superStates=["desktop","minimised","tablet-portrait","tablet-portrait-nav","tablet-portrait-sub-nav","mobile","mobile-nav","mobile-sub-nav","mobile-sub-nav-l3",],toClasses="";if($("body").attr("class"))
          for(var fromClasses=$("body").attr("class").split(" "),i=0;i<fromClasses.length;i++)
              $.inArray(fromClasses[i],superStates)===-1&&(toClasses=toClasses+" "+fromClasses[i]);(toClasses=toClasses+" "+state),$("body").removeClass().removeAttr("class").addClass(toClasses)}
      function resize(){$(window).resize($.debounce(function(){size();var currentState=state;$(".global-header").attr("class").match(/\-nav/g)||(updateState(),currentState!==state&&(changeState(state),getUtilities()))},options.timings.resizeDebounce))}
      function getUtilities(){var i,header=$(".global-header.desktop"),utilitiesBar=header.find(".utilities").width(),utilitiesBarList=header.find(".utilities ul").width(),primarylinksWidth=utilitiesBar-utilitiesBarList,viewportWidth=$(window).width()/2-primarylinksWidth+200,utilitiesItems=header.find(".utilities li").length-1,utilityWidth=0;for(header.find(".utilities li:lt("+utilitiesItems+")").show(),i=utilitiesItems;i>=0;--i){var utilitiesItem=header.find(".utilities li:eq("+i+")");(utilityWidth+=utilitiesItem.outerWidth(!0)),utilityWidth>viewportWidth&&utilitiesItem.hide()}}
      function searchBar(){closeSearch(),$(".global-header .search a").on({click:function(event){event.preventDefault();$(".global-header .utilities").hide(),$(".global-header .search-bar").show(),$(".global-header .search-bar input").focus(),$(".global-header").addClass("search-open")},}),$(".global-header .search-bar .search-close").on({click:function(event){event.preventDefault(),closeSearch(),$(".global-header .search a").focus()},}),$(".global-header .search-bar").on({keydown:function(event){/27/.test(event.which)&&(closeSearch(),$(".global-header .search-bar .search-clear").hide(),$(".global-header .search a").focus())},}),$(".global-header .search-bar input").on({keydown:function(event){/9/.test(event.which)&&$(this).parent().find(".global-header .search-bar .search-clear").focus()},keyup:function(){var textValue=$(this).val();""!==textValue?$(".global-header .search-bar .search-clear").show():$(".global-header .search-bar .search-clear").hide()},}),$(".global-header .search-bar .search-clear").on("click",function(event){event.preventDefault(),$(".search-bar input").val("").focus(),$(this).hide()})}
      function searchBarMobile(){searchBar(),$(".global-header .search a").on("click",function(event){$(".global-header.mobile .logo-section").hide()}),options.hasTouch&&($(document).on("focus",".search-bar input",function(){$(".global-header").addClass("position-fix"),$("html, body").animate({scrollTop:0},0)}),$(".search-bar input").on("input",function(){$(".global-header").addClass("position-fix"),$("html, body").animate({scrollTop:0},0)}),$(document).on("blur",".search-bar input",function(){$(".global-header").removeClass("position-fix")}))}
      function closeSearch(){$("#search-input").val(""),$(".global-header .search-bar").hide(),$(".global-header .utilities, .global-header.mobile .logo-section").show(),$(".global-header").removeClass("search-open")}
      function more(){if("desktop"===state||"minimised"===state){var morePresent=!1,moreOffsetWidth=140,moreOffsetUsed=!1,nav=$(".global-header .header-nav .main-nav");nav.css("visibility","hidden");var navWidth=nav.width(),navUlWidth=50,navLiItems=$(".global-header .header-nav .main-nav>ul>li");if(($(navLiItems).removeClass("more-item"),$(">ul li.more",nav).remove(),$(".global-header .header-more").remove(),$(navLiItems).each(function(index){var itemWidth=$(this).outerWidth();if(((navUlWidth+=itemWidth),navUlWidth>navWidth)){$(this).addClass("more-item").hide();var adjustedUlWidth=navUlWidth-itemWidth+moreOffsetWidth;adjustedUlWidth>navWidth&&moreOffsetUsed===!1&&($(this).prev().addClass("more-item").hide(),(moreOffsetUsed=!0)),(morePresent=!0)}}),morePresent)){var moreCount=$(">ul li.more-item",nav).length;1===moreCount&&$(">ul li.more-item",nav).prev().addClass("more-item").hide();var moreLi=$('<li class="more" aria-haspopup="true" />'),moreLink=$('<a href="#" aria-expanded="false"><span>More</span></a>');$(">ul li.more-item",nav).first().before(moreLi),$(moreLink).appendTo(moreLi);var headerMore=$('<div class="header-more">'),moreContainer=$('<div class="header-container">'),moreNav=$('<nav class="main-nav">'),moreList=$('<ul class="more-list">');$(headerMore).appendTo(".global-header"),$(moreContainer).appendTo(headerMore),$(moreNav).appendTo(moreContainer),$(moreList).appendTo(moreNav),$(">ul li.more-item",nav).clone().appendTo(moreList).show();var isActive=$(".global-header .more-nav .main-nav .more-item").hasClass("active");isActive&&$(".global-header .header-nav .main-nav li.more").addClass("active"),addMoreEvents()}}else $(".global-header .header-nav .main-nav > ul li").removeClass("more-item"),$(".global-header .header-nav .main-nav > ul li.more").remove(),$(".global-header .header-more").remove();nav.css("visibility","visible")}
      function showMoreNavigation(){$(".global-header .header-nav .main-nav li.more").addClass("open").find(">a").attr("aria-expanded","true"),$(".global-header .header-more").addClass("open").show(),$(".global-header .header-more .main-nav .more-list .nav-l3 a").on("click",function(event){copyActiveState(this)})}
      function hideMoreNavigation(){$("html").css("overflow",""),$(".global-header .main-nav li.more").removeClass("open").find(">a").attr("aria-expanded","false"),$(".global-header .header-more").removeClass("open").hide()}
      function addMoreEvents(){function hideNavForMore(){var header=$(".global-header"),mainNavs=$(".global-header .main-nav"),secondaryNavs=$(".global-header .main-nav .nav-l2");"opened"===mainNavs.attr("data-menustate")&&(overlay("hide"),secondaryNavs.hide(),mainNavs.attr("data-menustate","closed"),"minimised"===state?(headerHeight=54):"desktop"===state&&(headerHeight=126),header.css("height",headerHeight+"px"))}
          var moreButton=$(".global-header .main-nav li.more>a"),headerMore=$(".global-header .header-more");$(moreButton).on({mouseenter:function(){overlay("hide"),closeSearch(),showMoreNavigation()},mouseleave:function(){setTimeout(function(){var headerMoreInteractive=$(headerMore).hasClass("interactive");headerMoreInteractive||hideMoreNavigation()},250)},click:function(event){event.preventDefault();var isOpen=$(".global-header .main-nav li.more").hasClass("open");isOpen?(hideMoreNavigation(),hideNavForMore()):showMoreNavigation()},}),$(moreButton).on({keyup:function(event){if((/27/.test(event.which)&&hideMoreNavigation(),/37/.test(event.which)&&($(this).closest("li").prev().find(">a").focus(),hideMoreNavigation(),hideNavForMore()),/40/.test(event.which))){var isOpen=$(".global-header .main-nav li.more").hasClass("open");isOpen&&$(".global-header .header-more .main-nav .more-item >a").first().focus()}
                  /32/.test(event.which)&&$(this).trigger("click")},}),$(headerMore).on({mouseenter:function(){$(this).addClass("interactive")},mouseleave:function(){$(this).removeClass("interactive"),hideMoreNavigation()},}),$(".more-list > li",headerMore).on({keyup:function(event){/38/.test(event.which)&&$(moreButton).focus()},})}
      function copyActiveState(activeItem){var activeItemRoot=$(activeItem).closest(".more-item"),activeItemRootLink=$("> a",activeItemRoot),activeItemRootKey=activeItemRootLink[0].innerText;activeItemRootKey=activeItemRootKey.replace(/\s+/g,"");var activeItemKey=activeItem.innerText;activeItemKey=activeItemKey.replace(/\s+/g,"");var hiddenMoreItems=$(".global-header .header-nav .main-nav > ul > li.more-item"),matches=$("a",hiddenMoreItems),filteredMatches=$(matches).filter(function(index){var filterItemKey=this.innerText;return((filterItemKey=filterItemKey.replace(/\s+/g,"")),filterItemKey===activeItemKey)});$(filteredMatches).each(function(index){var matchItemRoot=$(this).closest(".more-item"),matchItemRootLink=$("> a",matchItemRoot),matchItemRootKey=matchItemRootLink[0].innerText;if(((matchItemRootKey=matchItemRootKey.replace(/\s+/g,"")),matchItemRootKey===activeItemRootKey)){var matchItemKey=this.innerText;if(((matchItemKey=matchItemKey.replace(/\s+/g,"")),matchItemKey===activeItemKey&&activeItemKey!==activeItemRootKey)){var activeL2ItemRoot=$(activeItem).closest(".nav-l2 > ul > li"),activeL2ItemRootLink=$("> a",activeL2ItemRoot),activeL2ItemRootKey=activeL2ItemRootLink[0].innerText;activeL2ItemRootKey=activeL2ItemRootKey.replace(/\s+/g,"");var matchL2ItemRoot=$(this).closest(".nav-l2 > ul > li"),matchL2ItemRootLink=$("> a",matchL2ItemRoot),matchL2ItemRootKey=matchL2ItemRootLink[0].innerText;(matchL2ItemRootKey=matchL2ItemRootKey.replace(/\s+/g,"")),matchL2ItemRootKey===activeL2ItemRootKey&&($(".global-header .header-nav .main-nav li.more-item").removeClass("active"),$(".global-header .header-nav .main-nav li.more-item li").removeClass("active"),$(matchItemRoot).addClass("active"),$(this).closest("li").addClass("active"),$(matchL2ItemRoot).addClass("active"))}}})}
      function calcWidthMinimised(){var header=$(".global-header.minimised"),headerWidth=header.find(".header-main .header-container").width(),iconWidth=60,utilitiesBar=header.find(".utilities").width(),utilitiesBarList=header.find(".utilities ul").width(),primarylinksWidth=utilitiesBar-utilitiesBarList,iconsWidth=iconWidth*header.find(".utilities li").length,utilitiesBarMin=primarylinksWidth+iconsWidth,newNavWidth=headerWidth-utilitiesBarMin;header.find(".header-nav .main-nav").width(newNavWidth)}
      function changeMainNavFormat(el){el.parents(".header-nav").addClass("main-nav-selected"),el.parents("ul").addClass("norightborder"),el.addClass("main-nav-link-focus no-link-highlight"),el.parent().siblings().find("a").removeClass("main-nav-link-focus").addClass("no-link-highlight").attr("aria-expanded","false"),el.closest("ul").find("li").addClass("list-activated")}
      function resetMainNavFormat(){var $el=$(".global-header .header-nav .main-nav > ul > li > a");$el.parents(".header-nav").removeClass("main-nav-selected"),$el.parents("ul").removeClass("norightborder"),$el.parent().removeClass("extra-height"),$el.removeClass("main-nav-link-focus no-link-highlight"),$el.closest("ul").find("li").removeClass("list-activated")}
      var windowHeight,windowWidth,headerHeight,state="",heights={segment:{mobile:36,tablet:36,desktop:36,minimised:0},header:{mobile:54,tablet:66,desktop:126,minimised:54},},breakpoints={desktop:{min:1024,max:9999},tabletPortrait:{min:768,max:1023},mobile:{min:1,max:767},},options={basepath:"/bdl/",form:{addModClassName:!0},gridType:null,hasTouch:!1,log:{enabled:!1},modsForInit:{},modsInPage:{},overlayActive:!1,tapOrClickEvent:"click",timings:{resizeDebounce:50,scrollDebounce:15,debounce:250},windowHeight:getViewportElement().height(),windowWidth:window.innerWidth||$(window).width(),ariaDescribedby:{ariaOpenConfirm:"sub heading level 2 of expanded menu item level 1.",ariaLeftRightArrowMoveBetweenHeading:"Use left and right arrow to move around sub heading of menu.",ariaUpDownArrow:"Use up and down arrow or tab to navigate between each link and section.",ariaClearField:"Press enter to clear text field.",},},lastScrollTop=0,lastStateChange=0,st=0;return{init:init}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.input=(function(){function init(){addPlaceholder()}
      function addPlaceholder(){($.support.placeholder="placeholder" in document.createElement("input")),$.support.placeholder||($("[placeholder]").focus(function(){$(this).val()===$(this).attr("placeholder")&&$(this).val("")}).blur(function(){""===$(this).val()&&$(this).val($(this).attr("placeholder"))}).blur(),$("[placeholder]").parents("form").submit(function(){$(this).find("[placeholder]").each(function(){$(this).val()===$(this).attr("placeholder")&&$(this).val("")})}))}
      return{init:init}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.skiplinks=(function(){function init(){bdlf.log.information("[bdlf.skiplinks.init]"),$('.mod-skiplinks a[href*="#"]').on("click",function(event){var skipTo="#"+this.href.split("#")[1];$(skipTo).attr("tabindex",-1).on("blur focusout",function(){$(this).removeAttr("tabindex")}).focus()}),$("body").addClass("skiplinks-hidden"),$(".mod-skiplinks a:focus").length>0&&($("body").addClass("skiplinks-focus"),$("body").removeClass("skiplinks-hidden")),$(".mod-skiplinks a").on("focus",function(e){$("body").addClass("skiplinks-focus"),$("body").removeClass("skiplinks-hidden")}),$(".mod-skiplinks a").on("blur",function(e){$("body").removeClass("skiplinks-focus"),$("body").addClass("skiplinks-hidden")})}
      return{init:init}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";$(function(){$("table.table").length&&bdlf.table.init()}),(bdlf.table=(function(){function init(tableSelector){bdlf.log.information("[bdlf.table.init]");var tables=$(tableSelector?tableSelector:".table");setResponsiveness(tables),setSorting(tables)}
      function setResponsiveness(tables){tables.filter(".table-responsive").each(function(index,table){bdlf.log.information("[bdlf.table.init.responsiveness]");for(var headertext=[],headers=$(table).find("th"),tablebody=$(table).find("tbody")[0],h=0;h<headers.length;h++){var current=headers[h];headertext.push(current.textContent.replace(/\r?\n|\r/,""))}
          for(var row,r=0;(row=tablebody.rows[r]);r++)
              for(var col,c=0;(col=row.cells[c]);c++)
                  col.setAttribute("data-th",headertext[c]);})}
      function setSorting(tables){bdlf.log.information("[bdlf.table.init.sorting]");var sortableTables=tables.filter(".table-sortable");sortableTables.find("th .sorter-wrapper").remove(),sortableTables.find("th[data-sort]").append('<div class="sorter-wrapper"><span class="sort-arrow-up"></span><span class="sort-arrow-down"></span></div>'),sortableTables.each(function(index,table){$(table).find("th[data-sort]").length&&$(table).tablesorter()})}
      return(($.fn.tablesorter=function(sortFns){return this.each(function(){var $table=$(this);(sortFns=sortFns||{}),(sortFns=$.extend({},$.fn.tablesorter.defaultSortFns,sortFns)),$table.data("sortFns",sortFns),$table.on("click.tablesorter","thead th",function(){$(this).tablesort()}),$table.on("click.tablesorter","thead th div",function(){$(this).tablesort()})})}),($.fn.tablesort=function(forceDirection){var $thisTh=$(this),thIndex=0,dir=$.fn.tablesorter.dir,$table=$thisTh.closest("table"),datatype=$thisTh.data("sort")||null;if(null!==datatype){$thisTh.parents("tr").find("th").slice(0,$(this).index()).each(function(){var cols=$(this).attr("colspan")||1;thIndex+=parseInt(cols,10)}),$thisTh.parents("tr").find("th div").slice(0,$(this).parent().index()).each(function(){var cols=$(this).attr("colspan")||1;thIndex+=parseInt(cols,10)});var sortDir;return(1===arguments.length?(sortDir=forceDirection):((sortDir=forceDirection||$thisTh.data("sort-default")||dir.ASC),$thisTh.data("sort-dir")&&(sortDir=$thisTh.data("sort-dir")===dir.ASC?dir.DESC:dir.ASC)),$table.trigger("beforetablesort",{column:thIndex,direction:sortDir,}),$table.css("display"),setTimeout(function(){var column=[],sortFns=$table.data("sortFns"),sortMethod=sortFns[datatype],trs=$table.children("tbody").children("tr");trs.each(function(index,tr){var $e=$(tr).children().eq(thIndex),sortVal=$e.data("sort-value");if("undefined"==typeof sortVal){var txt=$e.text();$e.data("sort-value",txt),(sortVal=txt)}
          column.push([sortVal,tr])}),column.sort(function(a,b){return sortMethod(a[0],b[0])}),sortDir!==dir.ASC&&column.reverse(),(trs=$.map(column,function(kv){return kv[1]})),$table.children("tbody").append(trs),$table.find("th").data("sort-dir",null).removeClass("sorting-desc sorting-asc"),$table.find("th div").data("sort-dir",null).removeClass("sorting-desc sorting-asc"),$thisTh.data("sort-dir",sortDir).addClass("sorting-"+sortDir),$("html").hasClass("ie8")&&$("th").hide().show(),$table.trigger("aftertablesort",{column:thIndex,direction:sortDir,}),$table.css("display")},10),$thisTh)}}),($.fn.updateSortVal=function(newSortVal){var $thisTd=$(this);return($thisTd.is("[data-sort-value]")&&$thisTd.attr("data-sort-value",newSortVal),$thisTd.data("sort-value",newSortVal),$thisTd)}),($.fn.stripChars=function(val){return val.replace(/[^0-9.]/g,"")}),($.fn.tablesorter.dir={ASC:"asc",DESC:"desc"}),($.fn.tablesorter.defaultSortFns={int:function(a,b){return((a=$.fn.stripChars(a)),(b=$.fn.stripChars(b)),parseInt(a,10)-parseInt(b,10))},float:function(a,b){return((a=$.fn.stripChars(a)),(b=$.fn.stripChars(b)),parseFloat(a)-parseFloat(b))},string:function(a,b){return a.localeCompare(b)},"string-ins":function(a,b){return((a=a.toLocaleLowerCase()),(b=b.toLocaleLowerCase()),a.localeCompare(b))},}),{init:init})})())})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.tabs=(function(){function init(){bdlf.log.information("[bdlf.tabs.init]"),$.extend(bdlf.options,{tabs:{buildIndicators:!1}}),eventsInit(),domInit($(".mod-tabs"))}
      function eventsInit(){bdlf.log.information("[bdlf.tabs.eventsInit]"),$("BODY").on("click",".mod-tabs .tab-triggers A",function(event){event.preventDefault();var modTabsObj=$(this).parents(".mod-tabs"),selfObj=$(this),tabIndex=$(".tab-triggers A",modTabsObj).index(selfObj);modTabsObj.attr("data-active-tab",tabIndex),selfObj.parent().attr({class:"active","aria-selected":!0}).siblings().removeClass("active").attr("aria-selected",!1),$(".tab-content:eq("+tabIndex+")",modTabsObj).attr("aria-hidden",!1).show().siblings(".tab-content").attr("aria-hidden",!0).hide(),$(".tab-triggers SELECT",modTabsObj).prop("selectedIndex",tabIndex+1),hasIndicators(modTabsObj)&&($(".indicators LI:eq("+tabIndex+")",modTabsObj).attr("class","active").siblings("LI").removeClass("active"),checkFirstLastTab.call(modTabsObj,tabIndex))}).on("click",".mod-tabs .indicators LI A",function(event){event.preventDefault();var modTabsObj=$(this).parents(".mod-tabs"),selfObj=$(this),tabIndex=$(".indicators A",modTabsObj).index(selfObj);$(".tab-triggers LI:eq("+(tabIndex-1)+") A",modTabsObj).click()}).on("click",".mod-tabs .indicators>A",function(event){event.preventDefault();var modTabsObj=$(this).parents(".mod-tabs"),selfObj=$(this),isPrevious=selfObj.next().is("OL"),currentActiveTabIndex=parseInt(modTabsObj.attr("data-active-tab")),newTabIndex=isPrevious?currentActiveTabIndex-1:currentActiveTabIndex+1;$(".tab-triggers LI:eq("+newTabIndex+") A",modTabsObj).click()}).on("change",".mod-tabs .tab-triggers SELECT",function(event){var modTabsObj=$(this).parents(".mod-tabs"),selectedIndex=$(this)[0].selectedIndex;$(".tab-triggers LI:eq("+(selectedIndex-1)+") A",modTabsObj).click()})}
      function domInit(selector){bdlf.log.information("[bdlf.tabs.domInit]: "+selector);var selfObj,defaultActiveTab=0;selector.each(function(){(selfObj=$(this)),selfObj.attr("data-total-tabs",$(".tab-content",selfObj).size()),selector.hasAttr("data-active-tab")&&(defaultActiveTab=parseInt(selfObj.attr("data-active-tab"))),dropdown.call(selfObj,defaultActiveTab),bdlf.options.tabs.buildIndicators&&indicators.call(selfObj,defaultActiveTab),$(".tab-triggers LI:eq("+defaultActiveTab+") A",selfObj).click()})}
      function dropdown(defaultActiveTab){bdlf.log.information("[bdlf.tabs.dropdown]: defaultActiveTab="+defaultActiveTab);var modTabsObj=$(this),tabsTotal=parseInt(modTabsObj.attr("data-total-tabs"));$(".tab-triggers",modTabsObj).prepend(function(){var selectObj=$("<span />").append($("<select />")).append($("<span />")).attr("class","select-field");$("SELECT",selectObj).append($("<option />").prop("selected","selected").text("Please select..."));for(var i=0;i<=tabsTotal-1;i++)
          $("SELECT",selectObj).append($("<option />").html($(".tab-triggers LI:eq("+i+") A").html()));return selectObj})}
      function indicators(defaultActiveTab){bdlf.log.information("[bdlf.tabs.indicators]: defaultActiveTab="+defaultActiveTab);var modTabsObj=$(this),tabsTotal=parseInt(modTabsObj.attr("data-total-tabs"));$(".tab-panels",modTabsObj).append($("<div />").append($("<a />").attr("href","#").text("Go to previous tab")).append(function(){for(var olObj=$("<ol />"),i=1;i<=tabsTotal;i++)
          olObj.append($("<li />").IF(i===defaultActiveTab+1).attr("class","active").ENDIF().append($("<a />").attr("href","").text(i+" of "+tabsTotal)));return olObj}).append($("<a />").attr("href","#").text("Go to next tab")).attr("class","indicators"))}
      function checkFirstLastTab(tabIndex){bdlf.log.information("[bdlf.tabs.checkFirstLastTab]");var modTabsObj=$(this),totalTabs=parseInt(modTabsObj.attr("data-total-tabs"));modTabsObj.removeClass("first-tab last-tab"),0===tabIndex&&modTabsObj.addClass("first-tab"),tabIndex===totalTabs-1&&modTabsObj.addClass("last-tab")}
      function hasIndicators(selector){return(bdlf.log.information("[bdlf.tabs.hasIndicators]: selector="+selector),selector.has(".indicators").size()>0)}
      return{dropdown:dropdown,indicators:indicators,init:init}})()})(bdlf,jQuery);var bdlf=window.bdlf||{};!(function(bdlf,$){"use strict";bdlf.textarea=(function(){function init(){bdlf.log.information("[bdlf.textarea.init]"),domInit($(".mod-textarea[data-maxlimit]"))}
      function domInit(selector){bdlf.log.information("[bdlf.textarea.domInit]: "+selector);var hasMaxLimit,textareaObj,maxLength;selector.each(function(index,value){bdlf.log.information("[bdlf.textarea.domInit]: #"+index+" value: "+value),(textareaObj=$(this)),(hasMaxLimit=textareaObj.hasAttr("data-maxlimit")),hasMaxLimit&&((maxLength=parseInt(textareaObj.attr("data-maxlimit"),10)),$(textareaObj).data("showtextarea")&&($("<div />").attr({class:"textarea-counter",id:"textareaCounter"+index,}).text(maxLength).insertAfter(textareaObj),textareaObj.attr("data-showtextarea",!0),appendAccessHTML.call(textareaObj,maxLength)),counterHandler.call(textareaObj,{counterDomObj:$("#textareaCounter"+index),maxLength:maxLength,}))})}
      function appendAccessHTML(maxLength){bdlf.log.information("[bdlf.textarea.appendAccessHTML]: maxLength="+maxLength);var textareaObj=$(this),parentObj=textareaObj.parent();parentObj.find("label span").addClass("access").append(maxLength),$("<span />").attr({"aria-live":"polite",class:"access textarea-alert",role:"alert",}).text(maxLength).insertAfter(textareaObj)}
      function counterHandler(obj){var textareaObj=$(this),counterDomObj=obj.counterDomObj,maxLength=obj.maxLength;textareaObj.on("keyup",function(event){var currentLength=maxLength-$(this).val().length;counterDomObj.text(currentLength),currentLength>20?counterDomObj.removeClass().removeAttr("class").addClass("textarea-counter"):currentLength>=0&&currentLength<20?counterDomObj.removeClass().removeAttr("class").addClass("textarea-counter amber"):currentLength<0&&(counterDomObj.removeClass().removeAttr("class").addClass("textarea-counter red"),accessAlertCharacterLimit.call(textareaObj,currentLength))})}
      function accessAlertCharacterLimit(currentLength){var parentDomObj=$(this).parent(),maxlimitMsg=$(this).attr("data-maxlimitmessage");parentDomObj.find(".textarea-alert").text(maxlimitMsg+" "+ -currentLength)}
      function reload(){bdlf.log.information("[bdlf.textarea.reload]"),domInit($(".mod-textarea:not([data-showtextarea])"))}
      return{init:init,reload:reload}})()})(bdlf,jQuery)
  $(document).ready(function () {
      "use strict";
  
      $('body').on('click', '.main-nav li li a[data-nav-link!="#"]', function (e) {
          if ( ($(e.target).attr('data-nav-link') !== undefined) && ($('body').hasClass('desktop') || $('body').hasClass('minimised')) ) {
              window.location = $(e.target).attr('data-nav-link');
          }
      });
  
      $('.cookieprompt-wrapper A:first-child, #main-content a:first-child:not(.tooltip)').on('focus', function(){
          $('.main-nav .nav-l2').trigger('mouseleave');
      });
  
      $('body').keyup(function(e) {
          var code = (e.keyCode ? e.keyCode : e.which),
              focusMainCount = $('.mobile-nav #main-content :focus, .mobile-sub-nav #main-content :focus, .mobile-sub-nav-l3 #main-content :focus, .tablet-portrait-nav #main-content :focus, .utilities .search :focus').length,
              focusNavCount = $('.mobile-nav .header-nav :focus, .mobile-sub-nav .header-nav :focus, .mobile-sub-nav-l3 .header-nav :focus, .tablet-portrait-nav .header-nav :focus').length;
  
          if ( (code === 9 && focusMainCount) || (code === 27 && focusNavCount) ) {
              $('.utilities:visible .close a').trigger('click');
          }
      });
  
      $('.mobile-nav #main-content, .mobile-sub-nav #main-content, .mobile-sub-nav-l3 #main-content, .tablet-portrait-nav #main-content, .utilities:visible .search').on('focusin', function(){
          $('.utilities:visible .close a').trigger('click');
      });
  
      var menuScreenTimeout;
      $('BODY').on('mouseenter', '.main-nav > #menu-screen', function(){
          menuScreenTimeout = setTimeout(function() {
              $('.main-nav > #menu-screen').hide();
          }, 500);
      });
  
      $('BODY').on('mouseleave', '.main-nav > #menu-screen', function(){
          clearTimeout(menuScreenTimeout);
      });
  
      $('BODY').on('mouseleave', '.header-container', function(){
          $('.main-nav > #menu-screen').show();
      });
  
  
      $.extend($.expr[':'], {
          tabbable: function(el, index, selector){
              return $(el).is('a, button, :input, [tabindex]');
          }
      });
  
      $('BODY').on('click', 'A[href="#menu"]', function(){
          if ($(this).attr('data-previous-state') === 'close'){
              // When Mobile menu closed
              // For each tabbable element restore saved tabindex if this exists otherwise just remove tabindex attribute.
              $(':tabbable').each(function(){
                  if ($(this).attr('data-saved-tabindex')){
                      $(this).attr('tabindex', $(this).attr('data-saved-tabindex')).removeAttr('aria-hidden');
                  } else {
                      $(this).removeAttr('tabindex').removeAttr('aria-hidden');
                  }
              });
  
              // Remove aria-hidden from main content, footer and cookies warning
              $('#main-content, .footer, .cookies').removeAttr('aria-hidden');
  
          } else {
              // When Mobile menu opened.
              // For each tabbable element if it has a tabindex save this in another attribute then set tabindex to -1 for all of these.
              $(':tabbable').each(function(){
                  if ($(this).attr('tabindex')) {
                      $(this).attr('data-saved-tabindex', $(this).attr('tabindex'));
                  }
              }).attr('tabindex', '-1').attr('aria-hidden', 'true');
  
              // Remove tabindex from menu close button and menu items.
              $(this).removeAttr('tabindex').removeAttr('aria-hidden');
              $('.main-nav :tabbable').removeAttr('tabindex').removeAttr('aria-hidden');
  
              // Make main content, footer and cookies warning have aria-hidden = true
              $('#main-content, .footer, .cookies').attr('aria-hidden', 'true');
          }
      });
  });
  //$(function() {
  //    "use strict";
  //
  //    var updateImageProp = barclays.utils.debounce(function() {
  //        $('picture img').each(function(index) {
  //            var adaptiveImageId = 'adaptiveimage' + index,
  //                adaptiveImagePic = $(this).parent(),
  //                adaptiveImageLink = adaptiveImagePic.parent();
  
  //            if ( (adaptiveImagePic.is('picture')) && (adaptiveImagePic.next('.adaptive-image-caption').length)) {
  //                $(this).attr('aria-describedby', adaptiveImageId);
  //                adaptiveImagePic.next('.adaptive-image-caption')
  //                    .attr('id', adaptiveImageId)
  //                    .css('width', $(this).width());
  //            }
  
  //            if ( (adaptiveImageLink.is('a[data-component-type="Image"]')) && (adaptiveImageLink.next('.adaptive-image-caption').length)) {
  //                $(this).attr('aria-describedby', adaptiveImageId);
  //                adaptiveImageLink.next('.adaptive-image-caption')
  //                    .attr('id', adaptiveImageId)
  //                    .css('width', $(this).width());
  //            }
  //        });
  //    }, 250);
  
  //    updateImageProp();
  //    $(window).resize(updateImageProp);
  //});
  
  $(function() {
      "use strict";
  
      var updateImageProp = function() {
          $('picture img').each(function(index) {
              var adaptiveImageId = 'adaptiveimage' + index,
                  adaptiveImagePic = $(this).parent(),
                  adaptiveImageLink = adaptiveImagePic.parent();
  
              if ( (adaptiveImagePic.is('picture')) && (adaptiveImagePic.next('.adaptive-image-caption').length)) {
                  $(this).attr('aria-describedby', adaptiveImageId);
                  adaptiveImagePic.next('.adaptive-image-caption')
                      .attr('id', adaptiveImageId)
                      .css('width', $(this).width());
              }
  
              if ( (adaptiveImageLink.is('a[data-component-type="Image"]')) && (adaptiveImageLink.next('.adaptive-image-caption').length)) {
                  $(this).attr('aria-describedby', adaptiveImageId);
                  adaptiveImageLink.next('.adaptive-image-caption')
                      .attr('id', adaptiveImageId)
                      .css('width', $(this).width());
              }
          });
      };
  
      $(window).on('load',function(){
          updateImageProp();    
      })
      
      $(window).resize(updateImageProp);
  });
  
  function openShareLink(id) {
      "use strict";
  
      var e = encodeURIComponent(window.location.href);
      var title = encodeURIComponent($('H1').text());
      var desc = encodeURIComponent($('meta[name=description]').attr('content'));
  
      var facebookURL = 'http://www.facebook.com/sharer.php?u=' + e;
      var linkedInURL = 'http://www.linkedin.com/shareArticle?mini=true&url=' + e + '&title=' + title + '&summary=' + desc;
      var twitterURL = 'http://twitter.com/share?url=' + e + '&amp;text=' + title;
      var mailTo = 'mailto:?subject=' + title + '&body=' + title + '%0D%0A%0D%0A' + desc + '%0D%0A%0D%0A' + e;
  
      if (id === 'ss-facebook') {
          window.open(facebookURL, '_blank');
      } else if (id === 'ss-linkedin') {
          window.open(linkedInURL, '_blank');
      } else if (id === 'ss-twitter') {
          window.open(twitterURL, '_blank');
      } else if (id === 'ss-mailto') {
          window.open(mailTo, '_self');
      }
  
  }
  
  $('A[id^="ss-"]').on('click', function(e){
      "use strict";
  
      openShareLink(this.id);
  
      e.preventDefault();
  });
  /*
   * toggle Aria Expanded attributes
   * @public
   */
  function toggleAriaExpanded (el) {
      if (el.attr('aria-expanded') === 'false') {
          el.attr('aria-expanded', 'true'); 
      } else {
          el.attr('aria-expanded', 'false');
      }
  }
  
  /*
   * toggle Aria Hidden attributes
   * @public
   */
  function toggleAriaHidden (el) {
      if (el.attr('aria-hidden') === 'false') {
          el.attr('aria-hidden', 'true'); 
      } else {
          el.attr('aria-hidden', 'false');
      }
  }
  
  /*
   * toggle Tooltip Expander event
   * @public
   */
  function toggleTooltipExpander (link, content) {
      content.toggle();
      toggleAriaExpanded(link);
      toggleAriaHidden(content);
  }
  
  