function calendarAnchors(){"use strict";var f=$("#scheduleCalendar"),s=f.find("li.days,li.days li"),i=f.find("li.days li a"),t=$(),r=$(window),n=220,u=function(){var u=t.not(".ng-hide").first(),l,f,o,e,h,c;t.each(function(){var n=$(this),t=n.data("top"),i=u.data("top"),f=r.scrollTop();f>=t&&i<t&&(u=n)});f=u.data("item");typeof f!="undefined"&&(o=u.find(">ol.match-list>li.match-li"),e=o.first(),o.each(function(){var t=$(this),i=t.offset().top-n,u=e.offset().top-n,f=r.scrollTop();f>=i&&u<i&&(e=t)}),h=e.find(">div.match:first span.pool"),h.length>0&&$(".weekbar>.weekbar-weekno").text(h.text()),c=u.find("time:first"),c.length>0&&$(".weekbar>.weekbar-date").text(c.text()),l=f.parent().closest("li"),s.removeClass("current"),i.blur(),f.add(l).addClass("current"),$("#month"+$(f).data("monthid")).click())},e=function(){n=40;$("#scheduleCalendar").is(":visible")&&(n+=$("#scheduleCalendar").outerHeight());$("#submenu").is(":visible")&&(n+=$("#submenu").outerHeight());$(".top-bar").is(":visible")&&(n+=$(".top-bar").outerHeight());t.each(function(){var t=$(this),i=t.offset();t.data("top",i.top-n)})},o;if(i.each(function(){var i=$(this),r=i.closest("li"),u=i.attr("href"),n=$(u);n.length>0&&!n.hasClass("ng-hide")&&(n.data("item",r),t=t.add(n))}),i.length>0){r.on("scroll",u).on("resize",function(){resizeSchedule();clearTimeout(o);o=setTimeout(function(){e();u()},10)});e();u()}resizeSchedule()}function resizeSchedule(){var u=!1,f,n;enquire.register("all and (max-width: 600px)",{match:function(){u=!0},unmatch:function(){u=!1}});var r=$("#scheduleCalendar ol.days-container"),t=r.find("li.days:not('.ng-hide')"),i=t.find("li:not('.ng-hide')").length;i>0&&(f=u?t:r,n=Math.floor(f.width()/i),n=n>80?80:n,n=n<36?36:n,t.find("li:not('.ng-hide')").css("width",n+"px"),t.find(">ol:first").width(n*i+"px"));r=$("#scheduleCalendar ol.months-container");t=r.find("li.months:not('.ng-hide')");i=t.find("li:not('.ng-hide')").length;i>0&&t.find("li:not('.ng-hide')").css("width","calc(100%/"+i+")")}function scrollToAnchor(){"use strict";function c(n,t){var i=$(".team figcaption.ng-binding"),r=$(i[0]).text()+"-"+$(i[1]).text();console.log("GTM Action "+n+" "+t+" "+r);window.dataLayer=window.dataLayer||[];dataLayer.push({event:"GA Tracking",eventCategory:n,eventAction:t,eventLabel:r,eventValue:0,eventNonInteraction:!1})}var t=$("#submenu a[href^=#]"),i=$("#scheduleCalendar a[href^=#]"),l=t.add(i),r=$(window),u=$("body"),f=$("html, body"),n=40,e=80+n,o=110+n,s=function(t,i,u){var o=$(i),s=o.offset(),c=s?s.top:0,l=r.scrollTop(),e=10,h;$("#scheduleCalendar").is(":visible")&&(e+=$("#scheduleCalendar").outerHeight());$("#submenu").is(":visible")&&(e+=$("#submenu").outerHeight());$(".top-bar").is(":visible")&&(e+=$(".top-bar").outerHeight());$("#submenu").is(".sticky")||(e+=$("#submenu").outerHeight()+35);h=c-e;u=u||n;o.length>0&&(f.scrollTop(h),r.trigger("resize"))},h=function(n){var t=$(this),f=t.attr("href"),e=t.data("margin"),r,i,u;s(n,f,e);i="";r=$("#subnav a.selected");r.length==1&&(i=r.data("gtm-category"),u=t.data("gtm-action"),c(i,u))};t.data({margin:e});i.data({margin:o});u.find("a[href^=#]").on("click",h)}function calculate_scheduleCalender(){setTimeout(function(){$("#scheduleCalendar.sticky").css("top",$("#submenu").outerHeight()+$(".top-bar").height()-1)},100)}$(function(){"use strict";var r=$(window),n=$("#submenu").last(),e=$("html, body"),u=0,t=function(){var t=r.scrollTop(),i=n.data("startOffset").top,f=n.hasClass("sticky");t>i&&!f?(n.addClass("sticky"),u=$("#submenu").outerHeight()+$(".top-bar").height()-1,$("#scheduleCalendar").addClass("sticky").css("top",u)):t<=i&&f&&(n.removeClass("sticky"),$("#scheduleCalendar").removeClass("sticky"),$("#scheduleCalendar").css("top",""),$("#submenu").removeClass("sticky"))},i=function(){var i,r,t;$("#submenu.sticky").css("top",$(".top-bar").height()-1);i=$(".top-bar").height()-1;$("#submenu").is(":visible")&&(i+=$("#submenu").outerHeight());$("#scheduleCalendar.sticky").css("top",i);r=n.hasClass("sticky");n.removeClass("sticky");t=n.offset();t.top=t.top-$(".top-bar").outerHeight()-45;n.data({startOffset:t}).toggleClass("sticky",r)},f;if(n.length>0){r.on("scroll",t).on("resize",function(){clearTimeout(f);f=setTimeout(function(){i();t()},10)});$("#submenu").find(".filter a").on("click",function(n){n.preventDefault();calculate_scheduleCalender()});i();setTimeout(function(){i()},350);t()}});$(function(){"use strict";scrollToAnchor();var e=$("#submenu"),t=e.find("nav.lvl2 a"),n=$(),r=$(window),o=140,i=function(){var i=n.first(),u=i.data("anchor");n.each(function(){var n=$(this),f=n.data("anchor"),t=n.data("top"),e=i.data("top"),o=r.scrollTop();o>=t&&(t===e?(i=i.add(n),u=u.add(f)):e<t&&(i=n,u=f))});t.removeClass("selected");u&&u.addClass("selected")},u=function(){n.each(function(){var n=$(this),t=n.offset();n.data("top",t.top-o)})},f;if(t.each(function(){var i=$(this),r=i.attr("href"),t=$(r);t.length>0&&(t.data("anchor",i),n=n.add(t))}),t.length>0){r.on("scroll",i).on("resize",function(){clearTimeout(f);f=setTimeout(function(){u();i()},10)});u();i()}})