function cacheBaseDomElements(){_ceufastApp.SearchStrDT=$("#SearchStrDT");_ceufastApp.SearchStrMobile=$("#SearchStrMobile");_ceufastApp.searchResults=$("#searchResults");_ceufastApp.searchSuggestions=$("#searchSuggestions");_ceufastApp.MenuUserName=$("#MenuUserName");_ceufastApp.MenuPassword=$("#MenuPassword");_ceufastApp.MenuRememberMe=$("#MenuRememberMe");_ceufastApp.alertsPanelDT=$("#alertsPanelDT")}function initializeBaseUi(){Modernizr.input.placeholder||$("[placeholder]").each(function(){var n=$(this).attr("placeholder");$(this).watermark(n)})}function initializeBaseEvents(){$(document).ready(function(){});$(".hamburger").on("click",function(){var n=$(this),t=$(".mobile-menu");n.hasClass("collapsed")?(n.addClass("is-active"),t.animate({opacity:"0.0"},200)):(n.removeClass("is-active"),t.animate({opacity:"1.0"},200))});_ceufastApp.SearchStrDT.on("keyup",function(n){n.keyCode===13&&_ceufastApp.selectSearchBarResultIndex===-1?siteSearch():n.keyCode===13?navigateToSearchResult():n.keyCode===40?navigateSearchResults(1):n.keyCode===38?navigateSearchResults(-1):(clearTimeout(_ceufastApp.searchStringTimer),_ceufastApp.searchStringTimer=null,_ceufastApp.searchStringTimer=setTimeout(function(){_ceufastApp.searchStringTimerProgress===0&&searchBaseResults()},300))});$("#btnSiteSearch").on("click",function(){siteSearch()});_ceufastApp.SearchStrMobile.on("keyup",function(n){n.keyCode===13&&_ceufastApp.selectSearchBarResultIndex===-1&&siteSearch(!0)});$("#btnSiteSearchMobile").on("click",function(){if(_ceufastApp.SearchStrMobile.val().length===0)if(_ceufastApp.SearchStrMobile.is(":visible"))_ceufastApp.SearchStrMobile.animate({width:"5px"}),$("#imgLogo").animate({opacity:"1.0"}),setTimeout(function(){_ceufastApp.SearchStrMobile.hide()},500);else{var n="100%",t=$(window).width();t>550&&(n="50%");_ceufastApp.SearchStrMobile.show();_ceufastApp.SearchStrMobile.animate({width:n});t<550&&$("#imgLogo").animate({opacity:"0.1"})}else siteSearch(!0)});_ceufastApp.SearchStrDT.on("focus",function(){_ceufastApp.SearchStrDT.val().length===0?(_ceufastApp.searchResults.hide(),_ceufastApp.searchSuggestions.show()):(_ceufastApp.searchResults.show(),_ceufastApp.searchSuggestions.hide())});_ceufastApp.SearchStrDT.on("blur",function(){setTimeout(function(){_ceufastApp.searchResults.hide();_ceufastApp.searchSuggestions.hide()},200)});$("#hp-learnmore").on("click",function(){scrollToSection("hp-morefeatures")});$("#features-learnmore").on("click",function(){scrollToSection("features-outstandingsupport")});_ceufastApp.MenuUserName.on("focus",function(){_ceufastApp.MenuUserName.parent().addClass("active")});_ceufastApp.MenuPassword.on("focus",function(){_ceufastApp.MenuPassword.parent().addClass("active")});_ceufastApp.MenuUserName.on("blur",function(){_ceufastApp.MenuUserName.parent().removeClass("active")});_ceufastApp.MenuPassword.on("blur",function(){_ceufastApp.MenuPassword.parent().removeClass("active")});$("#miMyAccount").on("click",function(){_ceufastApp.MenuUserName&&setTimeout(function(){_ceufastApp.MenuUserName.focus()},200)});_ceufastApp.MenuPassword.on("keyup",function(n){n.keyCode===13&&signIn()});$(".form-control").on("click",function(n){n.stopPropagation()});$(".btnSignIn").on("click",function(n){n.stopPropagation();signIn()});$(".nav-professions, .nav-professions-selected, .nav-states, .nav-states-selected").on("click",function(){toggleSiteFilter($(this))});$(window).scroll(function(){isMobile()&&(closeSiteProfessions(),closeSiteStates())});_ceufastApp.alertsPanelDT.on("click",function(n){n.stopPropagation()})}function toggleSiteFilter(n){var t=n.data("type");t==="profession"?_ceufastApp.professionsOpen?closeSiteProfessions():openSiteProfessions():_ceufastApp.statesOpen?closeSiteStates():openSiteStates()}function openSiteProfessions(){closeSiteStates();_ceufastApp.professions.length===0?callAPI_Get("/api/public/getsiteprofessions",function(n){$("#tmplSiteProfession").tmpl(n).appendTo(".site-professions");_ceufastApp.professions=n;isMobile()&&$("<div class='profession-item'><\/div>").appendTo(".site-professions");showSiteProfessions();$(".profession-item").on("click",function(){var n=$(this);setSiteProfession(n)});$("#siteProfessionsMore").on("click",function(){_ceufastApp.professionContainerBase===0&&(_ceufastApp.professionContainerBase=getContainerBaseValue(".site-professions"));var n=getNextHiddenChild(_ceufastApp.professionContainerBase,"profession-item");n.length>0&&scrollContainerToChild($(".site-professions"),n)})},!0):showSiteProfessions()}function showSiteProfessions(){$(".filter-tooltip").hide();$(".profession-item").slideDown();setTimeout(function(){isMobile()&&$("#siteProfessionsMore").fadeIn(200)},400);_ceufastApp.professionsOpen=!0}function closeSiteProfessions(){_ceufastApp.professionsOpen&&($("#siteProfessionsMore").hide(),$(".profession-item").slideUp(),_ceufastApp.professionsOpen=!1)}function setSiteProfession(n){setSiteProfessionCookie(n.data("val"),n.data("prefix"));closeSiteProfessions();setSiteProfessionUI();gtag("event","Profession Selected",{event_category:"Menu Click",event_label:n.data("prefix")})}function setSiteProfessionCookie(n,t){var i=n+"|"+t;setCookie(COOKIE_PROFESSION,i,90)}function setSiteProfessionUI(n){var i,r,t,u;$(".nav-professions").length>0&&!IE(9)&&!IE(8)&&!IE(7)&&(i=getCookie(COOKIE_PROFESSION),i===""?($(".nav-professions").show(),window.location.pathname.startsWith("/state")||getCookie(COOKIE_PROMPT_FILTER)!==""||($(".filter-tooltip").delay(2e3).fadeIn(),setCookie(COOKIE_PROMPT_FILTER,"false"))):($(".nav-professions").hide(),r=i.split("|"),$(".selected-profession").html("("+r[1]+")"),$(".nav-professions-selected").show(),_ceufastApp.selectedProfession=r[0],t=getCookie("Ceufast_GeoRegion"),u=getCookie(COOKIE_STATE),u===""&&t!==""&&t!=="NA"?getSiteStates(!1,function(){var i=$(".state-item[data-val='"+t+"']");i.length>0&&setSiteState(i,n)}):setSiteStateUI()))}function openSiteStates(){closeSiteProfessions();_ceufastApp.states.length===0?getSiteStates(!0):showSiteStates()}function getSiteStates(n,t){callAPI_Get("/api/public/getstates",function(i){$("#tmplSiteState").tmpl(i).prependTo(".site-states");_ceufastApp.states=i;isMobile()&&$("<div class='state-item'><\/div>").appendTo(".site-states");n&&showSiteStates();$(".state-item").on("click",function(){var n=$(this);setSiteState(n)});$("#siteStatesMore").on("click",function(){_ceufastApp.stateContainerBase===0&&(_ceufastApp.stateContainerBase=getContainerBaseValue(".site-states"));var n=getNextHiddenChild(_ceufastApp.stateContainerBase,"state-item");n.length>0&&scrollContainerToChild($(".site-states"),n)});t!==undefined&&t()},!0)}function showSiteStates(){$(".state-item").slideDown();setTimeout(function(){isMobile()&&$("#siteStatesMore").fadeIn(200)},400);_ceufastApp.statesOpen=!0}function closeSiteStates(){_ceufastApp.statesOpen&&($("#siteStatesMore").hide(),$(".state-item").slideUp(),_ceufastApp.statesOpen=!1)}function setSiteState(n,t){var u=n.data("val"),i,r;setCookie(COOKIE_STATE,u,90);closeSiteStates();setSiteStateUI();gtag("event","State Selected",{event_category:"Menu Click",event_label:n.data("val")});i=n.data("lpp");t||i===""||window.location.pathname!=="/"||(r=getCookie(COOKIE_PROFESSION).split("|")[0],i.indexOf(r)!==-1&&(window.location.href=n.data("lpu")+"?ref=sitefilters"))}function setSiteStateUI(){var n=getCookie(COOKIE_STATE);n===""?$(".nav-states").show():($(".nav-states").hide(),$(".selected-state").html("("+n+")"),$(".nav-states-selected").show(),_ceufastApp.selectedState=n)}function siteSearch(n){var t;t=n?returnAlphaNumericSpace(_ceufastApp.SearchStrMobile.val()):returnAlphaNumericSpace(_ceufastApp.SearchStrDT.val());window.location="/search?s="+t}function returnAlphaNumericSpace(n){return n.replace(/[^a-z0-9 ]/ig,"")}function signIn(){if($("#menuForm").valid()){$(".btnSignIn").html("Authenticating").addClass("disabled");var n={UserName:_ceufastApp.MenuUserName.val(),Password:_ceufastApp.MenuPassword.val(),RememberMe:_ceufastApp.MenuRememberMe.val()},t=_ceufastApp.baseUrl+"loginfrommenu";callAPI_PostAntiForgery(t,signInAction,AddAntiForgeryToken(n,"menuForm"),!1)}}function signInAction(n){if(n.Authenticated)window.location=n.RedirectUrl;else if($("#loginErrorMessage, #loginErrorMessageMobileView").html(n.ErrorMessage).show(),$(".btnSignIn").html("Login").removeClass("disabled"),_ceufastApp.loginAttempt+=1,_ceufastApp.loginAttempt>2){var t=$(".fp-emphasize").css("color","#e89322").css("font-weight","bold");t.fadeOut(_ceufastApp.blinkRate).fadeIn(_ceufastApp.blinkRate).fadeOut(_ceufastApp.blinkRate).fadeIn(_ceufastApp.blinkRate*4)}}function initializeAlerts(){$("#IsAuthenticated").val()=="true"&&$("#IsUser").val()=="true"&&$("#stopalerts").val()===undefined&&callAPI_Get("/myaccount/getalerts",updateAlerts,!0)}function updateAlerts(n){if(n.Alerts.length>0){$("#alertTemplate").tmpl(n.Alerts).appendTo(".alerts-panel");$(".btn-warning").on("click",function(){deleteAlert($(this).data("id"))});$("#alertsDT, #alertsMobile").show();$("#SearchStrDT").addClass("with-alert");$(".top").find(".list-box").addClass("with-alert")}}function deleteAlert(n){var t={id:parseInt(n)};callAPI_Post("/myaccount/deletealert",deleteAlertAction,JSON.stringify(t),!1)}function deleteAlertAction(n){n.Success&&($(".alert-panel[data-id="+n.Id+"]").remove(),$(".alert-panel").length==0&&$("#alertsDT, #alertsMobile").attr("style","display:none !important;"))}function confirmRememberMe(){var n=$("#ConfirmRememberMe");if(n.val()&&n.val().toLowerCase()==="true"){_ceufastApp.confirmRememberMeWindow=$("#confirmRememberMeWindow").kendoWindow({height:"210px",width:"435px",actions:[],visible:!1,modal:!0,resizable:!1,pinned:!0,title:"Remember Me For 30 Days"}).data("kendoWindow");_ceufastApp.confirmRememberMeWindow.center();$("#confirmRememberbtn").on("click",function(){_ceufastApp.RememberMe=!0;confirmedRememberMe()});$("#confirmRememberCancelbtn").on("click",function(){_ceufastApp.RememberMe=!1;confirmedRememberMe()});_ceufastApp.confirmRememberMeWindow.open()}}function confirmedRememberMe(){callAPI_Get("/account/remembermewarningconfirmed",confirmedRememberMeAction,!0,!1)}function confirmedRememberMeAction(){_ceufastApp.RememberMe?_ceufastApp.confirmRememberMeWindow.close():window.location="/account/stoprememberingme"}function searchBaseResults(){var n,t;_ceufastApp.searchStringTimerProgress++;n={searchString:returnAlphaNumericSpace(_ceufastApp.SearchStrDT.val())};_ceufastApp.SearchStrDT.val().length===0?(_ceufastApp.selectSearchBarResultIndex=-1,_ceufastApp.searchStringTimerProgress=0,_ceufastApp.searchResults.hide(),_ceufastApp.searchSuggestions.show(),_ceufastApp.searchResults.html("")):_ceufastApp.SearchStrDT.val().length>0&&(t="/search/searchbar",callAPI_Post(t,searchBaseResultsAction,JSON.stringify(n),!0,!1))}function searchBaseResultsAction(n){var t,i;_ceufastApp.searchStringTimerProgress=0;_ceufastApp.selectSearchBarResultIndex=-1;_ceufastApp.searchResults.html(n);_ceufastApp.searchResults.show();_ceufastApp.searchSuggestions.hide();t=encodeURI(returnAlphaNumericSpace(_ceufastApp.SearchStrDT.val()));t.length>=3&&(i="/searchbar?s="+t,gtag("config","UA-226452-1",{page_title:"Site Search",page_path:i}))}function navigateSearchResults(n){if(_ceufastApp.searchBarResults&&_ceufastApp.searchBarResults.length>0){if(n===-1&&_ceufastApp.selectSearchBarResultIndex===0)return;if(n===1&&_ceufastApp.selectSearchBarResultIndex===_ceufastApp.searchBarResults.length-1)return;_ceufastApp.selectSearchBarResultIndex+=n;$(".selected-result").removeClass("selected-result");var t=$(".search-result");$(t[_ceufastApp.selectSearchBarResultIndex]).addClass("selected-result")}}function navigateToSearchResult(){if(_ceufastApp.searchBarResults&&_ceufastApp.searchBarResults.length>0){var n=_ceufastApp.searchBarResults[_ceufastApp.selectSearchBarResultIndex],t="";switch(n.ResultType){case 3:t="/course/"+n.Url;break;case 10:t=n.Url;break;case 9:t="/blog/"+n.Url;break;case 1:t=n.Url}window.location=t}}function scrollToSection(n){var t=$("#"+n);t!=undefined&&$("html,body").animate({scrollTop:t.offset().top},1e3)}function callAPI_Get(n,t,i,r){i==null&&(i=!0);callEndpoint_Get({url:n,async:i,success:function(n){t(n)},error:function(n){callAPIError(n)},dataType:r})}function callAPI_Post(n,t,i,r,u){r==null&&(r=!0);u==null&&(u=!0);var f={url:n,postdata:i,async:r,success:function(n){t(n)}};f.error=u?handleApiCallError:t;callEndpoint_Post(f)}function handleApiCallError(n){callAPIError(n)}function callAPI_PostAntiForgery(n,t,i,r){r==null&&(r=!0);callEndpoint_PostAntiForgery({url:n,postdata:i,async:r,success:function(n){t(n)},error:function(n){callAPIError(n)}})}function callEndpoint_Post(n){n.async||(n.async=!0);n.actionArgs||(n.actionArgs=null);var t=Math.ceil(Math.random()*2);n.url=n.url.indexOf("?")==-1?n.url+"?rn="+t:n.url+"&rn="+t;$.ajax({type:"POST",url:appendRandomNumber(n.url),dataType:"json",data:n.postdata,contentType:"application/json; charset=utf-8",success:function(t){n.success(t,n.actionArgs)},error:function(t){n.error(t.responseText)},async:n.async})}function callEndpoint_PostAntiForgery(n){n.async||(n.async=!0);n.actionArgs||(n.actionArgs=null);var t=Math.ceil(Math.random()*2);n.url=n.url.indexOf("?")==-1?n.url+"?rn="+t:n.url+"&rn="+t;$.ajax({type:"POST",url:appendRandomNumber(n.url),dataType:"json",data:n.postdata,success:function(t){n.success(t,n.actionArgs)},error:function(t){n.error(t.responseText)},complete:function(n){console.log("XHR status: "+n.status)},async:n.async})}function callEndpoint_Get(n){n.async||(n.async=!0);n.actionArgs||(n.actionArgs=null);n.dataType||(n.dataType="json");$.ajax({type:"GET",url:appendRandomNumber(n.url),dataType:n.dataType,contentType:"application/json; charset=utf-8",success:function(t){n.success(t,n.actionArgs)},error:function(t){n.error(t.responseText)},async:n.async})}function callAPIError(n){alert("The following error occurred: \r"+n)}function appendRandomNumber(n){var t=Math.ceil(Math.random()*1e4);return n.indexOf("?")==-1?n+"?rn="+t:n+"&rn="+t}function formatPhoneVal(n){return n.length==10?n.substring(0,3)+"-"+n.substring(3,6)+"-"+n.substring(6):n}function stripPhoneVal(n){return n=n.replace(/[^\w\s]/gi,""),n.replace(/ /g,"")}function scrollToBottom(n){var t=$("#"+n);t.animate({scrollTop:t[0].scrollHeight},1e3)}function scrollContainerToChild(n,t){n.animate({scrollTop:n.scrollTop()+t.position().top},1e3)}function getContainerBaseValue(n){var t=$(n),i=t.scrollTop(),r=t.height();return i+r-1}function getNextHiddenChild(n,t){return $("."+t).filter(function(){var t=$(this),i=t.height(),r=t.position().top,u=r+i-1;return u>=n}).first()}function convertFromKendoDate(n){return kendo.toString(kendo.parseDate(n),"G")}function getQueryStringParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t===null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function getKendoDataItemById(n,t){for(var r=n.data(),i=0;i<r.length;i++)if(r[i].Id===t)return r[i];return undefined}function getKendoDataItemByUserId(n,t){for(var r=n.data(),i=0;i<r.length;i++)if(r[i].UserId===parseInt(t))return r[i];return undefined}function setCookie(n,t,i){var u="",r;i&&(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toUTCString());document.cookie=n+"="+t+u+"; path=/"}function getCookie(n){for(var r=n+"=",u=document.cookie.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)===" ";)t=t.substring(1);if(t.indexOf(r)===0)return t.substring(r.length,t.length)}return""}function isMobile(){if(typeof window.matchMedia!="undefined"||typeof window.msMatchMedia!="undefined"){var n=window.matchMedia("(pointer:coarse)");return n.matches}return!1}function copyToClipboard(n){var t=$("<input>"),i;return $("body").append(t),t.val(n).select(),i=document.execCommand("copy"),t.remove(),i||console.error("Cannot copy text"),i}function getSelectedRadioButtonVal(n){return $(':radio[name="'+n+'"]:checked').val()}function IE(n){return RegExp("msie"+(isNaN(n)?"":"\\s"+n),"i").test(navigator.userAgent)}function initializeTestimonialUi(){var n=$(".testimonial-ph");n.length>0&&callAPI_Get("/api/public/gettestimonials",function(t){$.template("testimonial",$("#tmplTestimonial").html());$(window).width()>760?loadNormal(n,t):loadPhone($(n[0]),t,-1);gtag("event","Testimonials",{event_category:"Testimonials Displayed",event_label:window.location.pathname})},!0)}function loadNormal(n,t){for(var r,i=0;i<n.length;i++)r=i*500,setTimeout(loadTestimonial,r,$(n[i]),t[i])}function loadPhone(n,t,i){i!==-1?(_testimonials.testimonial=document.querySelector(".testimonial"),_testimonials.testimonial.classList.remove("bounceInRight"),_testimonials.testimonial.classList.add("slideOutLeft","faster"),_testimonials.testimonial.addEventListener("animationend",nextTestimonial,!1),_testimonials.testimonial.ph=n,_testimonials.testimonial.data=t,_testimonials.testimonial.index=i):(i++,loadAndWaitTestimonial(n,t,i))}function nextTestimonial(n){var r=n.target.ph,i=n.target.data,t=n.target.index;_testimonials.testimonial.removeEventListener("animationend",nextTestimonial);_testimonials.testimonial.parentNode.removeChild(_testimonials.testimonial);t<i.length-1?t++:t=0;loadAndWaitTestimonial(r,i,t)}function waitForNextTestimonial(n){var t=n.target.ph,i=n.target.data,r=n.target.index;_testimonials.testimonial.removeEventListener("animationend",waitForNextTestimonial);setTimeout(loadPhone,6e3,t,i,r)}function loadAndWaitTestimonial(n,t,i){loadTestimonial(n,t[i]);_testimonials.testimonial=document.querySelector(".testimonial");_testimonials.testimonial.addEventListener("animationend",waitForNextTestimonial,!1);_testimonials.testimonial.ph=n;_testimonials.testimonial.data=t;_testimonials.testimonial.index=i}function loadTestimonial(n,t){n.html($.tmpl("testimonial",t))}var _ceufastApp={},COOKIE_PROFESSION="ceufast_site_profession",COOKIE_STATE="ceufast_site_state",COOKIE_PROMPT_FILTER="ceufast_site_prompt_filter",_testimonials;$(document).ready(function(){_ceufastApp={baseUrl:"/account/",searchStringTimer:{},searchStringTimerCheck:{},searchStringTimerProgress:0,isOldIEBrowser:$.browser.msie&&parseFloat($.browser.version)<9,selectSearchBarResultIndex:-1,loginAttempt:0,blinkRate:500,selectedProfessionId:function(){return null},selectedProfessionPrefix:function(){return null}};cacheBaseDomElements();initializeBaseUi();initializeBaseEvents();initializeAlerts();confirmRememberMe()});AddAntiForgeryToken=function(n,t){return n.__RequestVerificationToken=$("#"+t+" input[name=__RequestVerificationToken]").val(),n};String.prototype.startsWith||(String.prototype.startsWith=function(n,t){return t=t||0,this.indexOf(n,t)===t});Array.prototype.move=function(n,t){this.splice(t,0,this.splice(n,1)[0])};Number.prototype.formatMoney=function(n,t,i){var u=this,n=isNaN(n=Math.abs(n))?2:n,t=t==undefined?".":t,i=i==undefined?",":i,e=u<0?"-":"",f=parseInt(u=Math.abs(+u||0).toFixed(n))+"",r=(r=f.length)>3?r%3:0;return e+(r?f.substr(0,r)+i:"")+f.substr(r).replace(/(\d{3})(?=\d)/g,"$1"+i)+(n?t+Math.abs(u-f).toFixed(n).slice(2):"")};Date.prototype.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.prototype.getMonthName=function(){return this.monthNames[this.getMonth()]};_testimonials={};$(document).ready(function(){_testimonials={testimonial:null};initializeTestimonialUi()})