function initCoursePageBanner(){let courseBanner=$('.course-page-banner');let accreditation=$('.accreditation-to-be-approved-link');let accreditationApprovalInfo=$('.accreditation-approval-information');let approvalCloseButton=$('.approval-close-button');if(courseBanner.length){var delay=0;$('.course-page-banner .cw > *:not(.application-link)').each(function(){var element=$(this);setTimeout(function(){element.addClass('active');},delay);delay+=350;});} if(accreditation.length&&accreditationApprovalInfo.length){let mouseOverInfo=false;accreditation.on('mouseenter',function(e){e.preventDefault();accreditationApprovalInfo.slideDown(250);accreditationApprovalInfo.addClass('active');return false;});accreditation.on('mouseleave',function(e){e.preventDefault();setTimeout(function(){if(!mouseOverInfo){accreditationApprovalInfo.slideUp(250);return false;}},250);});accreditation.on('keyup',function(e){e.preventDefault();let show=!mouseOverInfo;if(e.key==='Enter'){if(show){mouseOverInfo=true;accreditationApprovalInfo.slideDown(250);accreditationApprovalInfo.addClass('active');}else{mouseOverInfo=false;accreditationApprovalInfo.slideUp(250);accreditationApprovalInfo.removeClass('active');} return false;}}) accreditationApprovalInfo.on('mouseenter',function(e){$(this).addClass('active') mouseOverInfo=true;});accreditationApprovalInfo.on('mouseleave',function(e){$(this).removeClass('active') mouseOverInfo=false;$(this).slideUp(250);});approvalCloseButton.on('click',function(e){e.preventDefault();accreditationApprovalInfo.slideUp(250) accreditationApprovalInfo.removeClass('active');return false;});}} function initCourseClearingIndicator(){let courseClearingIndicatorLink=$('.clearing-indicator-link');let courseClearingIndicatorSuffix=$('.clearing-indicator-suffix');if($(window).height()<700&&$(window).outerWidth(true)>992){if(!!courseClearingIndicatorLink){courseClearingIndicatorLink.addClass('reduced-height');} if(!!courseClearingIndicatorSuffix){courseClearingIndicatorSuffix.addClass('reduced-height');}}} $(document).ready(function(){initCoursePageBanner();initCourseClearingIndicator();});; function initNotificationBanner(){if(getCookie('notificationBanner')!='disabled'){let notificationBanners=$('.block-notification-banner');if(notificationBanners.length>0){let viewport=$(window);let viewportPos=viewport.scrollTop();let header=$('#header') let headerHeight=header.outerHeight(true);let main=$('#main-content');notificationBanners.each(function(){let nBanner=$(this);let nBannerActive=true;nBanner.addClass('active');let fixedIndicatorControl=nBanner.children('input[type="hidden"]');let fixed=true;if(fixedIndicatorControl.length==1){fixed=(fixedIndicatorControl[0].value==="true");} let nBannerHeight=nBanner.outerHeight(true);let nBannerCurPos=nBanner.offset().top;let nBannerOrigPos=nBanner.offset().top;checkNotificationBannerPosition(nBanner,nBannerOrigPos,nBannerCurPos,nBannerHeight) viewport.scroll(function(){nBannerCurPos=nBanner.offset().top;checkNotificationBannerPosition(nBanner,nBannerOrigPos,nBannerCurPos,nBannerHeight,nBannerActive,fixed)});viewport.resize(function(){nBannerHeight=nBanner.outerHeight(true);resetNotificationBannerPosition(nBanner,nBannerOrigPos);checkNotificationBannerPosition(nBanner,nBannerOrigPos,nBannerCurPos,nBannerHeight,nBannerActive,fixed);});let nbClose=nBanner.find('.nb-close-trigger');if(nbClose.length>0){nbClose.click(function(){resetNotificationBannerPosition(nBanner,nBannerOrigPos);nBanner.removeClass('active');nBannerActive=false;setCookie('notificationBanner','disabled',0);});}});viewport.scroll(function(){viewportPos=viewport.scrollTop();});function checkNotificationBannerPosition(nBanner,nBannerOrigPos,nBannerCurPos,nBannerHeight,nBannerActive,nFixed){if(nBannerActive&&nFixed){if((headerHeight+viewportPos)>=nBannerOrigPos){if(!nBanner.hasClass('fixed')){main.css({'margin-top':nBannerHeight});nBanner.css({'top':headerHeight});nBanner.addClass('fixed');}} else if(nBannerOrigPos>=nBannerCurPos&&nFixed){if(nBanner.hasClass('fixed')){main.css({'margin-top':0});nBanner.css({'top':0});nBanner.removeClass('fixed');}}}} function resetNotificationBannerPosition(nBanner,nBannerOrigPos){if(nBanner.hasClass('fixed')){main.css({'margin-top':0});nBanner.css({'top':0});nBanner.removeClass('fixed');} nBannerOrigPos=nBanner.offset().top;headerHeight=header.outerHeight(true);}}}} function initLiveChatTrigger(){let liveChatTriggers=$('.live-chat-trigger');if(liveChatTriggers.length>0){$.getScript("https://v4in1-si.click4assistance.co.uk/SI.js",function(){liveChatTriggers.each(function(){$(this).addClass('active');$(this).click(function(){$('img[id^="C4A"]').click();});});});}} function InitialiseC4A(){var Tool3=new C4A.Tools(3);C4A.Run('0805304e-1c58-4625-9ace-8bf97e0c7274');} $(document).ready(function(){initNotificationBanner();initLiveChatTrigger();});;; ;(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports!=='undefined'){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){'use strict';var Slick=window.Slick||{};Slick=(function(){var instanceUid=0;function Slick(element,settings){var _=this,dataSettings;_.defaults={accessibility:true,adaptiveHeight:false,appendArrows:$(element),appendDots:$(element),arrows:true,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:false,autoplaySpeed:3000,centerMode:false,centerPadding:'50px',cssEase:'ease',customPaging:function(slider,i){return $('