function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function addCECredittoCart(n){$("#divPurchaseCECreditmodal").length>0&&$("#divPurchaseCECreditmodal").modal("hide");$.post(ADD_CECREDITTOCART_URL,{productId:n},function(n){if(n&&n.addToCartItemDetails){var t=JSON.parse(n.addToCartItemDetails);googleAnalytics.addToCartEvent(t);facebookMetaPixel.addToCartEvent(t)}if(n.isSendCustomerToCart&&!IsProceedToMemberShipGroup())return setTimeout(function(){window.location.href="/shoppingcart"},555),!1;n.CartCount&&($("#cartspancount").html(n.CartCount),$("#cartItemList").load(GET_CART_URL));proceedToMembershipGroup()})}function AddProductToCart(n,t){$.post(ADD_TO_CART_URL,{listCart:JSON.stringify(n)},function(n){if($("#hdnAgendaAnswer").val(""),$(".divPurchaseExceedMessage").hide(),n&&n.addToCartItemDetails){var i=JSON.parse(n.addToCartItemDetails);googleAnalytics.addToCartEvent(i);facebookMetaPixel.addToCartEvent(i)}if(n.isSendCustomerToCart&&!n.IsCECreditPrice&&!n.IsPurchaseLimitExceeded&&!IsProceedToMemberShipGroup())return setTimeout(function(){window.location.href="/shoppingcart"},555),!1;n.CartCount&&($("#cartspancount").html(n.CartCount),$("#cartItemList").load(GET_CART_URL));n.isCompareProduct&&($("#compareProductcartspancount").html(n.compareProductCount),$("#compareProductcartItemList").load(GET_COMPAREPRODUCTCART_URL));n.IsCECreditPrice&&typeof displayPurchaseCEMessage=="function"&&displayPurchaseCEMessage(t,n.CECreditPrice);n.Message&&displayCartMessages($(".ProductDetailPortion"),n,"ProductDetail");n.IsPurchaseLimitExceeded||n.IsCECreditPrice||proceedToMembershipGroup()})}function OpenAgendaPopup(n,t,i,r,u,f){var e=$(this).attr("data-height"),o=$(this).attr("data-width");return $.magnificPopup.close(),$.magnificPopup.open({items:{src:AGENDA_PRODUCT_POPUP+"?productId="+n+"&orderItemId=0&productPrice="+t+"&entityType="+i+"&discountId="+r+"®istrantTypeOrderItemId="+u+"&priceType="+f},type:"iframe",closeOnBgClick:!1,mainClass:"CustomPop"}),$(".mfp-content").css("height",e),$(".mfp-content").css("width",o),$(".mfp-iframe-holder .mfp-content").css("max-height",e+"px"),$(".mfp-iframe-holder .mfp-content").css("max-width",o+"px"),!1}function beginPaging(){}function successPaging(){$("#dt_basic_wrapper_review").attr("action",$("#pagingReviewFormAction").attr("href"))}function failurePaging(){}function printProductDetail(){var n=$(".productBody").parent().html(),t=document.body.innerHTML;document.body.innerHTML=n;window.print();document.body.innerHTML=t}function LoadAgendaFormView(n){var t=1,i;n!=undefined&&n!=""&&n!=""&&(t=n);i=GET_PRODUCT_AGENDATAB+"?productId="+ProductId+"&pageNo="+t;$("#grid_list_AgendaTab").load(i,function(){$("#divProgress").hide()})}function CloseAgendamodal(){$.magnificPopup.close()}function selectActiveTab(){locationTab!=undefined&&Number(locationTab)>0?($('.clsTabListProdDetails li a[href="#tabLocation"]').trigger("click"),$("html, body").animate({scrollTop:$(".clsTabListProdDetails").offset().top-200},1e3)):$(".clsTabListProdDetails").find("li.active a").length>0&&$($(".clsTabListProdDetails").find("li.active a").attr("href")).addClass("active in")}function setPurchaseBothGroupAndProductSessionStorage(n,t,i,r,u,f){sessionStorage.removeItem("PurchaseBothGroupAndProductInfo");var e={ProductId:n,MemberShipTypeId:t,PriceId:i,PriceEntityType:r,EventTimeId:u,ProductregistranttypeId:f};sessionStorage.setItem("PurchaseBothGroupAndProductInfo",JSON.stringify(e))}function addToCartmemberShipWithoutQuestionSet(n,t,i,r){if(n==!0){var u={memberhipLable:$("#hdnMembershipLabel").val(),mebershipTypeId:i,alertFrom:""};membbershipAuthorizationAlert(u,function(){addtoCartMembership(i,!0,r)})}else addtoCartMembership(i,!0,r)}function addToCartProductAfterMembership(n){n>0&&$(".btnAddtocart:first").trigger("click")}function GroupQuestionSetPopup(n){$.magnificPopup.open({items:{src:n},type:"iframe",closeOnBgClick:!1,mainClass:"CustomPop"})}function clearSessionStorageKeyForGroup(){sessionStorage.removeItem("PurchaseBothGroupAndProductInfo")}function layoutPopupFunction(){if(parent.$("body").find(".mfp-content").contents().find(".mfp-close").length>0)parent.$("body").find(".mfp-content").contents().find(".mfp-close").on("click",function(){})}function showExpandDescriptionBtn(){$("#divProductDescription").length>0&&$("#divProductDescription").prop("scrollHeight")>$("#divProductDescription").prop("clientHeight")?$("#btnReadMoreDescription").show():$("#btnReadMoreDescription").hide()}function proceedToMembershipGroup(){if(IsProceedToMemberShipGroup()){var n=JSON.parse(sessionStorage.getItem("PurchaseBothGroupAndProductInfo"));return(new AddToGroup).init({customerId:customerId,membershipTypeId:n.MemberShipTypeId,authorizePaymentLabel:authorizePaymentLabel,membershipLabel:membershipLabel,progressEl:$("#divProgress"),currentStage:currentStage}),!1}}function IsProceedToMemberShipGroup(){if(sessionStorage.getItem("PurchaseBothGroupAndProductInfo")&&sessionStorage.getItem("PurchaseBothGroupAndProductInfo")!=null){var n=JSON.parse(sessionStorage.getItem("PurchaseBothGroupAndProductInfo"));return n!=null&&n.MemberShipTypeId>0}return!1}function selectEventTime(){var n=getParameterByName("eventTimeId");n&&$('select[id="EventDate"] option[value="'+n+'"]').prop("selected","selected")}function StatusCountDown(n){var t=this;t.start=$(n).attr("data-unixStart")?new Date(Number($(n).attr("data-unixStart"))):"";t.run=function(n){t.countDown(n);return};t.countDown=function(i){i&&(n=i);var r=Helper.Timer.curServerTime();r>t.start?t.enableLaunchButtons():t.start||t.enableLaunchButtons()};t.enableLaunchButtons=function(){$(n).length>0&&($(n).find("a").attr("href","#tabCourse"),$(n).show())};t.run()}var saveAddToCartProducts,countDown;Array.prototype.unique=function(){for(var t,n=this.concat(),i=0;i0&&$(".clsTabListProdDetails")!=null&&$(".clsTabListProdDetails li:first-child").addClass("active");$(".clspopRelatedProduct").popover({placement:"top",html:!0}).on("mouseenter",function(){var n=this;$(this).popover("show");$(this).siblings(".popover").on("mouseleave",function(){$(n).popover("hide")})}).on("mouseleave",function(){var n=this;setTimeout(function(){$(".popover:hover").length||$(n).popover("hide")},100)});var n=$('a[data-val^="slideshow"]').map(function(){return $(this).attr("data-val")}).get().unique();$.each(n,function(n,t){$('a[data-val="'+t+'"]').magnificPopup({type:"image",tLoading:"Loading image #%curr%...",mainClass:"mfp-img-mobile",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{verticalFit:!0,tError:'The image #%curr%<\/a> could not be loaded.',titleSrc:function(){}},zoom:{enabled:!0,duration:300,opener:function(n){return n.find("img")}}})});setTimeout(function(){selectActiveTab()},100);getProductsInfo();DisplayInnerTabs();clearSessionStorageKeyForGroup();selectEventTime();$(".videoReplyEventDate")&&$(".videoReplyEventDate").length>0&&setFreeViewerUrl($("#EventDate").val());showExpandDescriptionBtn();typeof dataCustomFilter=="function"&&dataCustomFilter()});$("#aShare").click(function(){$("#divShare").toggle()});$("#aPrint").click(function(){window.print()});$(".dropdown-menu li a").click(function(){var n=$(this).parent().parent().parent().find("button");n.text($(this).text());n.val($(this).text());n.append("<\/span>")});$("body").on("click",".btnDetailAddCECredittoCart",function(){var n=$(this).attr("data-productId");addCECredittoCart(n)});$("body").on("click",".btnDetailCloseAddCECredittoCart",function(){var n=$(this).attr("data-isSendCustomerCart");n!=undefined&&n=="True"&&(window.location.href="/shoppingcart")});$("body").on("click",".btnAddtocart,.btnCartAgendaProduct",function(n,t,i){$(".productBody input[name='price']:checked").val()||!n.which||n.originalEvent===undefined?saveAddToCartProducts(t,i):alert("Please select one of the pricing options to add this item to your cart.")});$("body").on("change","#recordingAddOn",function(){var n=$("#recordingAddOn"),t=$("#recordingAddOnPurchaseAlert");n.is(":checked")&&!n.data("purchaseAlertAccepted")&&t.length>0&&(n.prop("checked",!1),t.modal("show"))});$("body").on("click","#recordingAddOnPurchaseAlert .btn-ok",function(){var n=$("#recordingAddOn");n.data("purchaseAlertAccepted",!0);n.prop("checked",!0);n.data("purchaseAlertAccepted",!1)});saveAddToCartProducts=function(n,t){var w,it,b,f,o,u,st,c,ht,p,nt,tt;$.magnificPopup.close();w="AddOnPrice";it="AddOnRecordingPackage";productTypeId&&productTypeId==12&&(w="ClassroomAddOn");b="";$("#hdnBundleType4Product")&&(b=$("#hdnBundleType4Product").val());b!="1"||$(".clsAdditionalprice").is(":checked")?$(".clsAdditionalprice").is(":checked")?(f="alertmodelAdditionalPrice"+ProductId,$("#"+f).modal("hide")):(f="alertmodel"+ProductId,$("#"+f).modal("hide")):(f="bundleType4AlertPopup",$("#"+f).modal("hide"));var l=0,e=$(".rdbprice input[type=radio]:checked,.rdbprice input[type=checkbox]:checked"),s=t&&Number(t)>0;s&&($("#divProgress").show(),e=$(".rdbprice input[type=radio][data-productpriceid="+t+"],.rdbprice input[type=checkbox][data-productpriceid="+t+"]"));var rt=e.attr("value"),ut=rt?rt.split(","):"",i=ut[0],a=ut[1],ft=1,ct=$("#ProductEventTimeId").val(),et=$(".EventDate").val(),r=e.attr("data-priceType"),h=e.attr("data-entitytype"),ot=e.attr("data-productregistranttypeid");l=et>0?et:ct;var k=!1,lt=$("input[class=clsAdditionalprice]:checked").prop("checked"),d=0,v=0,y=0,g=s;if(!s&&sessionStorage.getItem("PurchaseBothGroupAndProductInfo")&&sessionStorage.getItem("PurchaseBothGroupAndProductInfo")!=null&&(o=JSON.parse(sessionStorage.getItem("PurchaseBothGroupAndProductInfo")),i=o.PriceId,h=o.PriceEntityType,l=o.EventTimeId,r="MembershipPrice",ot=o.ProductregistranttypeId,g=!0,v=o.MemberShipTypeId,y=1),s?(r="MembershipPrice",v=e.closest(".clsProductPriceItem").find(".PayOutStandingInvoices").attr("data-groupmembershiptypeid"),y=1):$("#hdnMarketingEntityType").val()!=""&&$("#hdnMarketingEntityType").val()=="2"&&(v=$("#hdnMarketingEntityId").val(),y=$("#hdnMarketingEntityType").val()),u=[],r!="AdditionalPrice"&&u.push({productId:ProductId,productPriceId:i,EventTimeId:l,productPrice:a,quantity:ft,priceType:r,IsAdditionalItemChecked:k,additionalprice:d,IsAddOnProduct:!1,RegistrantTypeOrderItemId:n&&!isNaN(n)?n:0,MarketingEntityId:v,MarketingEntityType:y}),lt&&!g&&(k=!0,d=$("input[class=clsAdditionalprice]:checked").attr("data-value"),st=$("input[class=clsAdditionalprice]:checked").attr("data-eventid"),u.push({productId:ProductId,productPriceId:i,EventTimeId:st,productPrice:a,quantity:ft,priceType:r,IsAdditionalItemChecked:k,additionalprice:d,IsAddOnProduct:!1})),g||$(".clsRelatedProduct:checked").each(function(){u.push({productId:$(this).attr("data-productId"),EventTimeId:$(this).attr("data-eventTimeId"),priceType:w,productPrice:$(this).attr("data-ProductPrice"),quantity:1,IsAddOnProduct:!0,RelatedProductId:$(this).attr("data-relatedproductid")})}),$("#recordingAddOn").is(":checked")&&(c=$("#recordingAddOn"),u.push({productId:c.attr("data-productId"),EventTimeId:c.attr("data-eventTimeId"),priceType:it,productPrice:c.attr("data-ProductPrice"),quantity:1,IsAddOnProduct:!0,RelatedProductId:c.attr("data-relatedproductid")})),i&&Number(i)>0&&!n&&ot>0&&(ht=IsRegistrantTypeQuestionSetAvailable(i,l,ProductId,productTypeId),ht))return OpenRegistrantTypeQuestionSetPopup(ProductId,i,r),!1;if(p=$("#hdnAgendaAnswer").val(),nt=$("#hdnisExistAgendaonCart").val(),nt!=undefined&&nt==1&&(p==undefined||p==""||p=="")){if(tt=s?r:"",h&&h=="4")return OpenAgendaPopup(ProductId,a,h,i,n,tt),!1;$.ajax({type:"POST",url:"/items/chekagendagroupdiscount",dataType:"json",data:{productId:ProductId},success:function(t){if(t!=undefined&&t==0)return OpenAgendaPopup(ProductId,a,h,i,n,tt),!1;AddProductToCart(u,ProductId)},error:function(){$("#divProgress").hide();alert("Error! Please try again later.")}})}else AddProductToCart(u,ProductId)};$("body").on("click",".btnAddBundleToMyCart",function(){var n=[],t=JSON.parse($(".cldHdnProducts").val());$.each(t,function(t,i){n.push({productId:i.ProductId,productType:i.ProductType,quantity:"1",productPriceId:0,EventTimeId:i.EventTimeId,productPrice:i.SpecialPrice,priceType:"StandardPrice",productTypeId:i.ProductTypeId,basePrice:i.Price,bundleProductId:i.BundleProductId,bundleId:i.BundleId})});$.ajax({type:"POST",url:BUNDLE_ADDTOCART_LINK,dataType:"json",data:{listCart:JSON.stringify(n),isBundleType4:!0},success:function(t){if(t&&t.addToCartItemDetails){var i=JSON.parse(t.addToCartItemDetails);googleAnalytics.addToCartEvent(i);facebookMetaPixel.addToCartEvent(i)}if(t.CartCount!=null&&t.CartCount!=""&&t.CartCount!="0"&&($("#cartspancount").html(t.CartCount),$("#cartItemList").load(GET_CART_URL),t.isSendCustomerToCart!=undefined&&t.isSendCustomerToCart==!0&&!t.IsBundleCECreditPrice))return window.location.href="/shoppingcart",!1;t.isCompareProduct!=undefined&&t.isCompareProduct==!0&&($("#compareProductcartspancount").html(t.compareProductCount),$("#compareProductcartItemList").load(GET_COMPAREPRODUCTCART_URL));t.Message!=null&&t.Message!=""&&($("#CartMessage").html(t.Message),$(".CartMessage").show());t.IsBundleCECreditPrice&&n.length>0&&typeof displayBundlePurchaseCEMessage=="function"&&displayBundlePurchaseCEMessage(n[0].bundleId)},complete:function(){$("#bundleType4AlertPopup").modal("hide")},error:function(){alert("Error! Please try again later.")}})});$("body").on("click",".btnAddCompareProductItem",function(){var n=$(this).attr("data-value");$.ajax({type:"POST",url:ADD_COMPAREPRODUCT_URL,dataType:"json",data:{ProductId:n},success:function(n){if(n&&n.addToCartItemDetails){var t=JSON.parse(n.addToCartItemDetails);googleAnalytics.addToCartEvent(t);facebookMetaPixel.addToCartEvent(t)}n.CartCount!=null&&n.CartCount!=""&&n.CartCount!="0"&&(parent.$("#compareProductcartspancount").html(n.CartCount),parent.$("#compareProductcartItemList").load(GET_COMPAREPRODUCTCART_URL));n.Message!=null&&n.Message!=""&&displayCartMessages($(".ProductDetailPortion"),n,"ProductDetail");n.isChangeWishlist==!0&&parent.$("#Wishlistcount").html("("+n.wishlistCount+")")},complete:function(){},error:function(){alert("Error! Please try again later.")}})});$("body").on("click",".btnHidePurchaseAlert",function(){var n="#"+$(this).attr("data-val");$(n).modal("hide")});$("#bundleType4AlertPopup").on("shown.bs.modal",function(){if($("#bundleType4ProductList").html().length==0){$("#bundleType4ProductList").html("

Please wait ...<\/p>");var n=$("#hdnBundleType4Product").attr("data-val");$("#bundleType4ProductList").load(ADD_BUNDLE_TYPE_4_ADD_TO_CART_URL+"?id="+n,function(){})}});$(".productBody input[name='price']").on("change",function(){$(".ShowAcknowledgePopup").length>0?$(".clsAdditionalprice").is(":checked")?($(".ShowAcknowledgePopup").attr("data-val",$(".ShowAcknowledgePopup").attr("data-additionalpricediv")),$(".ShowPrerequisiteProducts").length>0&&$(".ShowAcknowledgePopup").show()):($(".ShowAcknowledgePopup").attr("data-val",$(".ShowAcknowledgePopup").attr("data-nexttargetdiv")),$(".ShowPrerequisiteProducts").length>0&&$(".ShowAcknowledgePopup").hide()):$(".clsAdditionalprice").is(":checked")?($(".clsAdditionalPriceCart").show(),$(".clsStandardPriceCart").hide()):($(".clsAdditionalPriceCart").hide(),$(".clsStandardPriceCart").show());$('.productBody input[name="price"][data-pricetype!="AdditionalPrice"]:checked').length>0?($(".clsRelatedAddOnProducts").removeClass("addongrayout").find('input[type="checkbox"]').prop("disabled",!1),$(".clsAddonRecording").removeClass("addongrayout").find('input[type="checkbox"]').prop("disabled",!1)):($(".clsRelatedAddOnProducts").addClass("addongrayout").find('input[type="checkbox"]').prop("disabled",!0).prop("checked",!1),$(".clsAddonRecording").addClass("addongrayout").find('input[type="checkbox"]').prop("disabled",!0).prop("checked",!1))});$("body").on("click",".btnProductStock",function(){var n=$(this).attr("data-saveLaterUrl"),t="We're sorry, but this product is out of stock.";n!=undefined&&n!=""&&n!=""&&(t+=" Click "+n+" to save this for later");displayCartMessages($(".ProductDetailPortion"),data={Message:t},"ProductDetail")});$("body").on("click",".btnAgendaContinue",function(){var n=$(this).attr("data-value");n!=undefined&&($("#divProgress").show(),LoadAgendaFormView(n))});$("body").on("change",".clsOtherItemDates",function(){var n=$("option:selected",this).attr("data-itemurl"),t,i;n!=undefined&&n!=""&&n!=""&&(t=$("#hdnMarketingEntityId").val(),i=$("#hdnMarketingEntityType").val(),t>0&&i=="2"&&(n+=n.indexOf("?")>=0?"&cmp_id="+t:"?cmp_id="+t),$("#divProgress").show(),window.location.href=n)});$("body").on("click",".btnLoadSpeaker",function(){$(".divLoadSpeaker").show();$(".btnLoadSpeaker").hide()});$("body").on("click",".clsAgendaDescription",function(){var n=$(this).attr("data-id"),t=$(this).attr("data-agendaformid");$(n).css("display")=="none"?($(n).show("slow"),$(this).find(".agendaSymbol").addClass("fa-minus").removeClass("fa-plus"),$(".clsDescription"+t).hide()):($(n).hide("slow"),$(this).find(".agendaSymbol").addClass("fa-plus").removeClass("fa-minus"),$(".clsDescription"+t).show())});$("body").ready(function(){if($("#hdnBtnGroup").length>0&&$("#hdnBtnGroup").val()!=undefined){var n=$("#hdnBtnGroup").val().split(",");$.each(n,function(t){var i="";$(".rdb"+n[t]).each(function(){i+=$(this).html()});$(".rdb"+n[t]).not(":first").remove();$(".rdb"+n[t]).html(i)})}});$(".clsPurchaseBothGroupAndProduct").on("click",function(){$('.productBody input[name="price"]:not(input[disabled="disabled"]):first').prop("checked",!0);var i=$(this).attr("data-priceid"),f=$(this).attr("data-productid"),n=$(this).attr("data-membershiptypeid"),c=$(this).attr("data-groupQuestionhref"),e=$(this).attr("data-entitytype"),o=$("#ProductEventTimeId").val(),r=$(".EventDate").val(),s=r>0?r:o,h=$(this).attr("data-productregistranttypeid"),u=$(this).attr("data-customermembershipId"),t=$(this).attr("data-membershipstatus");if(!n||n<=0)return!1;if(t&&u&&(t=="Invited"||t=="UserRejected"))return $("#divProgress").show(),window.location.href="/group/exitgroup/"+u,!1;setPurchaseBothGroupAndProductSessionStorage(f,n,i,e,s,h);addToCartProductAfterMembership(i)});$("body").on("click",".clsStandardPriceCart",function(n){!n.which||n.originalEvent===undefined||clearSessionStorageKeyForGroup()});$("#btnReadMoreDescription,#btnReadLessDescription").click(function(){$(this).attr("id")=="btnReadMoreDescription"?($("#btnReadMoreDescription").attr("id","btnReadLessDescription").text("Read Less..."),$("#divProductDescription").css("overflow-y","auto")):($("#btnReadLessDescription").attr("id","btnReadMoreDescription").text("Read More..."),$("#divProductDescription").animate({scrollTop:0},"fast").css("overflow-y","hidden"))});$("body").on("click",".signInToGetGroupPrice",function(){var n=$(this).attr("data-href");return $.magnificPopup.open({items:{src:n},type:"iframe",closeOnBgClick:!0,mainClass:"pop500"}),!1});countDown={};countDown.check=function(){var n=$(".clsCourseTab");StatusCountDown(n)};Helper.Interval.set("ACCESS_CLASSROOMCOURSETAB",countDown.check,1);$("body").on("click",".ddStarRating",function(){$("a[href='#tabReviews']").click();$("html, body").animate({scrollTop:$("a[href='#tabReviews']").offset().top-120},"slow")});$("body").on("change","#EventDate",function(){var n=$("option:selected",this).attr("data-itemurl"),t,i;n!=undefined&&n!=""&&n!=""&&(t=$("#hdnMarketingEntityId").val(),i=$("#hdnMarketingEntityType").val(),t>0&&i=="2"&&(n+=n.indexOf("?")>=0?"&cmp_id="+t:"?cmp_id="+t),$("#divProgress").show(),window.location.href=n)})