function showBannerWithResourceKey(n){$.post("/ajax/GetBannerResources",{key:n},n=>{showMsgSlide(n.Header,n.Message,"caution",n.Button,!0)})}function htmlDecode(n){var t=document.createElement("textarea");return t.innerHTML=n,t.childNodes.length===0?"":t.childNodes[0].nodeValue}function showMsgSlide(n,t,i,r,u,f){f!=null&&(slideUpOnOk=f);var e=$("#siteMsgSlideUp"),s=$("#siteMsgSlideUpBG"),h=$("#siteMsgSlideUp #slideUpOKBtn"),o=$("#siteMsgSlideUp #msgClose");e.addClass(i);e.find(".heading").html(n);e.find(".msg").html(t);h.text(r&&r.length==0?"OK":r);u?o.hide():o.show();e.addClass("active");s.addClass("active")}function defaultImg(n){$(n).attr("src","//static.hidive.com/misc/HIDIVE_ComingSoon_512x288.jpg")}function toggleShowMenu(){$("#show-menu").slideToggle()}function countdownTimer(){$(".countdown").each(function(){var t=$(this),r=t.data("utc"),u=new Date(r),i=(u-new Date)/1e3,n;if(i<=0){t.html("Loading...");window.location.reload();return}n=Math.floor(i/3600);minutes=Math.floor((i-n*3600)/60);seconds=Math.floor(i-n*3600-minutes*60);t.html("Starts in "+n+(n==1?" Hr ":" Hrs ")+minutes+" Min "+seconds+" Sec");t.show()})}function IsLoggedIn(){return typeof $.cookie(".AspNet.ApplicationCookie")!="undefined"}function ShowSplashMonkey(){var n=typeof $.cookie("SplashMonkey")=="undefined";return n&&$.cookie("SplashMonkey","false"),n}function setVid(){var n=$(this),t=url("?vid",n.attr("href"));t!=cvid&&n.attr("href",n.attr("href").replace(t,cvid))}function lazyLoadImages(){$("img.lazy-load").each(function(){var n=$(this);setTimeout(function(){n.data("lazy-src")!=""&&n.attr("src")==""&&n.attr("src",n.data("lazy-src"))},0)})}function AnimateCSS(n,t,i){this.cssElement=n;this.minDelay=t;this.maxDelay=i}function addRating(n){var t=$("#selectRating").val();t>0&&$.post("/Store/AddProductRating",{upc:n,rating:t}).done(function(n){$("#stars").html(n)})}function updateQueue(n){var t=$(n).data("title-id"),i=$(n).data("hash"),r=$(n).data("queue-value").toLowerCase()=="true";$.post("/Ajax/UpdateQueueTitle",{titleId:t,value:!r,hash:i},function(n){vid=n.vid;var i=$(".queue"+t),r=$(".queue"+t+" .btn-text");i.data("queue-value",n.queued+"");i.removeClass("btn-primary").removeClass("btn-default");i.addClass(n.queued?"btn-default":"btn-primary");r.html(n.queued?"Remove from Queue":"Add to Queue")})}function updateFavorite(n){var t=$(n).data("title-id"),i=$(n).data("hash"),r=$(n).data("favorite-value").toLowerCase()=="true";$.post("/Ajax/UpdateFavoriteTitle",{titleId:t,value:!r,hash:i},function(n){vid=n.vid;var i=$(".favorite"+t),r=$(".favorite"+t+" .btn-text");i.data("favorite-value",n.favorite+"");i.removeClass("btn-primary").removeClass("btn-default");i.addClass(n.favorite?"btn-default":"btn-primary");r.html(n.favorite?"Remove Favorite":"Add Favorite")})}function updateContinue(n){var t=$(n).data("title-id"),i=$(n).data("episode-id"),r=$(n).data("hash"),u=$(n).data("continue-value").toLowerCase()=="true";$.ajax({method:"POST",url:"/Ajax/UpdateContinueView",data:{episodeId:i,value:!u,hash:r,titleId:t},success:function(n){vid=n.vid;var i=$(".continue"+t);i.data("continue-value",n.continued+"");n.continued?i.find(".btn-text").text("Stop Watching"):i.find(".btn-text").text("Undo");i.find(".fa").toggleClass("fa-undo","fa-times")},error:function(n){console.log(n)}})}function formatLocalDateTime(n){var t=n.toString().split(" "),r=t[4].split(":"),i=n.toString().split("(")[1].split(" "),u=i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0),f=n.toLocaleTimeString().split(" ")[1];return t[0]+" "+t[1]+" "+t[2]+" "+t[3]+" "+((n.getHours()+23)%12+1)+":"+r[1]+" "+f+" "+u}function submitForm(n){$(n).submit()}function subscribeNow(n){n!=null&&n!="undefined"&&n!=""?($("#signInModal .custom-msg").html(n),$("#signInModal .custom-msg").show()):($("#signInModal .custom-msg").html(""),$("#signInModal .custom-msg").hide());$("#signInModal").modal("show")}function joinCommunityNow(n){n!=null&&n!="undefined"&&n!=""?($("#joinCommunityModal .custom-msg").html(n),$("#joinCommunityModal .custom-msg").show()):($("#joinCommunityModal .custom-msg").html(""),$("#joinCommunityModal .custom-msg").hide());$("#joinCommunityModal").modal("show")}function temporaryHtml(n,t,i){var r=$(n).html();$(n).css({opacity:0}).html(t).animate({opacity:1},function(){setTimeout(function(){$(n).animate({opacity:0},function(){$(n).html(r).css({opacity:1})})},i)})}function intercept(){var n=getParameter("int"),f=getParameter("debug"),i,r,t,u;n!==null&&(i="int-"+n,r=$.cookie(i),f!==null||r===undefined)&&(t=`/intercept/${n}`,t=`//${window.hidive.settings.assetsDomain}/intercept/${n}`,u=`${t}/${n}.json`,$.getJSON(u).done(r=>{var f=$.cookie("UserStatus"),e,s,o,u,h,c;(f===undefined&&(f="Visitor"),r.users.includes("All")||r.users.includes(f))&&((e=new Date,s=new Date(r.start),s>e)||(o=new Date(r.end),o<e)||(u=navigator.language,r.languages.includes(u)||(u="en-US"),r.css&&$("head").append(`<link rel="stylesheet" type="text/css" href="${t}/${n}.css"/>`),h=r.mobile&&BrowserDetection.IsMobile()?"mobile":"desktop",c=`${t}/${n}-${u}-${h}.html`,$.ajax(c).done(u=>{$(()=>{var e=`<div id="int-${n}" class="hdv-modal-bg"></div>`,f;$("body").append(e);f=$(`#int-${n}`);f.append(u);$(".hdv-modal-bg .fa-times").click(()=>{$(".hdv-modal-bg").removeClass("active")});r.js&&$("head").append(`<script type="text/javascript" src="${t}/${n}.js"/>`);f.addClass("active");$.cookie(i,$.now(),{expires:o})})}).fail((n,t,i)=>{console.log({a:n,b:t,c:i})})))}).fail((n,t,i)=>{console.log({a:n,b:t,c:i})}))}function compress(){var n=$("#url").val(),i=$("#type").val(),r=$("#originalSize").val(),u=$("#targetSize").val(),t;return $("#full").attr("src",n),t=new Promise(t=>{t(ResizeImage(n,r,u,i))}),t.then(()=>!0)}function ResizeImage(n,t,i,r,u){if(u!=null&&(u.onerror="",$(u).attr("src",n)),!(imagesResized>=30))return imagesResized++,$.post("/ajax/ResizeImage/",{type:r,url:n,originalSize:t,targetSize:i}).fail(function(t,i){console.log(i+" "+n);console.log(t)})}function ReCaptchaPrompt(){var n=Math.floor(Math.random()*10+1),t=Math.floor(Math.random()*10+1),i=Math.round(Math.random()),r="Prove you are human, what is "+n+" "+operation[i]+" "+t+"?",u=prompt(r)||prompt(r),f=i?n*t:n+t;return u!=null&&u==f?!0:!1}function ReCaptcha(n,t,i,r){$.ajax({method:"POST",url:"/ajax/ReCaptcha",data:{token:n,action:t},success:function(n){if((!n.Success||!n.ReCaptcha.success)&&!ReCaptchaPrompt()){r();return}i()},error:function(){r()}})}function hp(n,t){return n.z(()=>{t()})?!1:!0}function getParameter(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)","i"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function tryResumeSubscription(){$("#acceptResume, .btn").prop("disabled",!0);$.ajax({method:"POST",url:"/account/TryPauseResume",success:function(n){n.Success?window.location.reload(!0):(alert(n.Message),$("#acceptResume, .btn").prop("disabled",!1))},error:function(n,t,i){console.log({error:{jqXHR:n,textStatus:t,errorThrown:i}})}})}function disableBtnForTime(n,t,i){n.canResend=!1;var r=i,u=setInterval(function(){r<=0?(clearInterval(u),document.getElementById("countdown").innerHTML="",document.getElementById("countdown").style.display="none",n.canResend=!0):document.getElementById("countdown").innerHTML=`You are clicking too fast. Try again in ${r} second${r==1?"":"s"}.`;r-=1},1e3)}function toggleLoadingBtn(n){$(n).find(".fa").toggleClass("fa-arrow-right fa-spinner fa-pulse");$(n).prop("disabled",function(n,t){return!t})}function copyToClipboard(n){var t=document.getElementById(n);t.select();t.setSelectionRange(0,99999);document.execCommand("copy")}function loadTitleWindowContent(n,t,i){if($("#title"+n).length>0){i&&i();return}$.post({url:"/shows/titlewindowcontent",data:{id:n,vid},success:function(n){$(".title-data").append(n);$(".utc2local").each(function(){var n=$(this),t=n.data("utc"),i=new Date(t+" UTC");n.html(formatLocalDateTime(i))});i&&i()},error:function(r,u,f){t<5?loadTitleWindowContent(n,++t,i):console.log({textStatus:u,errorThrown:f})}})}function initTitleSlider(){$(".title-slider").hasClass("show-list")?$(".title-slider").slick(SHOW_SLIDER_SETTINGS):$(".title-slider").slick(SLIDER_SETTINGS)}function findCurrent(n){var t=null,i=null;switch(n){case"playing":try{t=$(".scroll-area .episode-slider").find(".currentEpisode");i=$(t).parent().parent().data("slick-index");$(".scroll-area .episode-slider").slick("slickGoTo",parseInt(i),!1)}catch(r){setTimeout(function(){findCurrent("playing")},100);return}break;case"watched":try{t=$(".scroll-area .episode-slider .watched").last();i=$(t).parents(".cell").data("slick-index");$(".scroll-area .episode-slider").slick("slickGoTo",parseInt(i),!1)}catch(r){setTimeout(function(){findCurrent("playing")},100);return}}}function assignRecommendedListener(){$(".recommended .hitbox").hover(function(){var n=$(this).parent().parent().attr("id");$(".player").removeClass("fadeIn");$("#"+n+" .default-img").css("opacity","0");$("#"+n+" .img-rotator").show();$("#"+n+" .player").addClass("fadeIn");startImgRotator(n,!0)},function(){clearTimeout(currImgRotator.timer);currImgRotator.rotate=!1;var n=$(this).parent().parent().attr("id");$("#"+n+" .default-img").css("opacity","1");$("#"+n+" .img-rotator").hide();$("#"+n+" .img-rotator img").hide();$("#"+n).find(".player").removeClass("fadeIn")})}function assignEpisodeListener(){$(".episodes .hitbox").hover(function(){if(!$(this).hasClass("currentEpisode")){var n=$(this).parent().parent().attr("id");$(".player").removeClass("fadeIn");$("#"+n+" .player").addClass("fadeIn")}},function(){var n=$(this).parent().parent().attr("id");$("#"+n+" .player").removeClass("fadeIn")})}function showSubSection(n,t){$(activeWin).find("."+curSubSection).fadeOut("medium",function(){$(activeWin).find("."+n).fadeIn("medium");t&&t()});curSubSection=n}function removeSelectedNav(){var n=$(activeWin).find(".navigation div div span");$(n).removeClass("nav-selected")}function mouseOverTitle(n){var t=$("#"+n+" .hitbox .arrow_box");$(t).hasClass("green")||($("#"+n+" .img-rotator img").length!=0&&(startImgRotator(n),$("#"+n+" .default-img").css("opacity","0"),$("#"+n+" .img-rotator").show()),$("#"+n+" .player").addClass("fadeIn"),$("#"+n+" .synopsis").addClass("fadeIn"),$("#"+n+" .expander").addClass("fadeIn"),$("#"+n+" .expander").css("cursor","pointer"))}function startImgRotator(n,t){var i;clearTimeout(currImgRotator.timer);i=t&&activeWin?$(activeWin).find("#"+n+" .img-rotator img"):$("#"+n+" .img-rotator img");currImgRotator.imgArr=jQuery.makeArray(i);currImgRotator.count=0;currImgRotator.rotate=!0;loopImgRotate()}function loopImgRotate(){showTargetImg()}function showTargetImg(){var t=currImgRotator.imgArr.length,i=currImgRotator.imgArr,n=currImgRotator.count;($(i[n]).fadeIn(500),t<=1)||(currImgRotator.timer=setTimeout(function(){$(i[n]).fadeOut(250,function(){n<t-1?currImgRotator.count++:currImgRotator.count=0;clearTimeout(currImgRotator.timer);loopImgRotate()})},2e3))}function mouseOutTitle(n){clearTimeout(currImgRotator.timer);currImgRotator.rotate=!1;$("#"+n+" .default-img").css("opacity","1");$("#"+n+" .img-rotator").hide();$("#"+n+" .img-rotator img").hide();$("#"+n+" .player").removeClass("fadeIn");$("#"+n+" .synopsis").removeClass("fadeIn");$("#"+n+" .expander").removeClass("fadeIn");$("#"+n+" .expander").css("cursor","default")}function mouseClickTitle(n){var t=$("#"+n+" .hitbox .arrow_box");removeFrame();$(t).addClass("green");$("#"+n+" .default-img").css("opacity","1");$("#"+n+" .img-rotator").hide();$("#"+n+" .img-rotator img").hide();$("#"+n+" .player").removeClass("fadeIn");$("#"+n+" .synopsis").removeClass("fadeIn");$("#"+n+" .expander").removeClass("fadeIn");$("#"+n+" .expander").css("cursor","default");showWindow(n)}function removeFrame(){var n=$(".arrow_box");$(n).hasClass("green")&&$(n).removeClass("green")}function showWindow(n){var r=$("#"+n).data("section"),i=$("#"+r+" .window"),t=$("#"+r+" .window .details"),f=$("#"+n).data("id"),u=getNewInfo(f);curSection!=r&&activeWin!=null&&closeWindow();$(i).css("display")!="block"?($(t).html(u),$(i).slideDown("medium",function(){$(t).fadeTo("medium",1);$(t).find(".text-container").animate({"margin-left":"0px",opacity:"1"},1e3);scrollToSelected();assignImgRotateListeners()}),activeWin=i,curSection=r,initStars(i)):$(t).fadeTo("fast",.01,function(){removeSelectedNav();$(activeWin).find(".nav-info").addClass("nav-selected");$(t).html(u);$(t).fadeTo("medium",1,function(){assignImgRotateListeners()});$(t).find(".text-container").animate({"margin-left":"0px",opacity:"1"},700);initStars(i)});curSubSection="information"}function assignImgRotateListeners(){var n=$(activeWin).find(".title-img .player");$(n).addClass("activated");$(n).mouseenter(function(){winImgRotate(n)});$(n).mouseleave(function(){clearWinImgRotator(n)})}function scrollToSelected(){var n=$(activeWin).parent().offset().top-90;$("html, body").animate({scrollTop:n},1e3)}function getNewInfo(n){var t=$("#title"+n).html();return(t==null||t.length==0)&&loadTitleWindowContent(n,2),t}function closeWindow(){curSection=null;$(activeWin).slideUp("medium");removeSelectedNav();$(activeWin).find(".nav-info").addClass("nav-selected");activeWin=null}function winImgRotate(n){var t=$(n).parent().find(".img-rotator"),i=$(t).find("img");i.length<=1||($(t).show(),winRotator.count=1,winRotator.imgArr=i,winRotator.bgImg=$(n).parent().css("background-image"),$(n).parent().css("background-image","none"),rotateWinImgs())}function clearWinImgRotator(n){var t=$(n).parent().find(".img-rotator");$(n).parent().css("background-image",winRotator.bgImg);$(t).hide();$(t).find("img").hide();clearTimeout(winRotator.timer);winRotator={}}function rotateWinImgs(){if(winRotator.imgArr!=null){var i=winRotator.imgArr.length,t=winRotator.imgArr,n=winRotator.count;$(t[n]).fadeIn(500);winRotator.timer=setTimeout(function(){$(t[n]).fadeOut(250,function(){n<i-1?winRotator.count++:winRotator.count=0;clearTimeout(winRotator.timer);rotateWinImgs()})},2e3)}}function initStars(n){var t;t=n==null?$(".stars"):$(n).find(".stars");iterateStarData(t)}function iterateStarData(n){for(var i,t=0;t<n.length;t++)i=$(n[t]).data("json"),setData(i,n[t])}function setData(n,t){var i=(n.overall/1).toFixed(2);n.overall=i;doStarRating(n,t)}function doStarRating(n,t){var i=n.overall,r=!1,u;n.isUser==!1&&($(".title-"+n.titleID+" .star-rating").addClass("disabled"),r=!0);$(".title-"+n.titleID+" .overallRating").text(i);n.userRating>0&&(i=n.userRating,r=!0,$(".title-"+n.titleID+" .yourRating").show(),$(".title-"+n.titleID+" .myRating").text(i),$(".title-"+n.titleID).find(".star-rating").addClass("disabled"));u=$(t).find(".star-rating").hasClass("star-rating-init");$(t).find(".star-rating").starRating({totalStars:5,useFullStars:!0,starSize:22,emptyColor:"lightgray",activeColor:"(0,174,240,1)",hoverColor:"rgba(0,174,240,1)",starGradient:{start:"rgb(0,174,240)",end:"rgb(0,75,103)"},initialRating:i,readOnly:r,disableAfterRate:!0,callback:function(t,i){var r=i.parent();$.ajax({method:"POST",url:"/Ajax/AddTitleRating",data:{titleId:n.titleID,rating:t,hash:n.hash},success:function(i){vid=i.vid;var r=(Math.round(i.newRating*2)/2).toFixed(1);$(".title-"+n.titleID).find(".yourRating").show();$(".title-"+n.titleID).find(".myRating").text(t);$(".title-"+n.titleID).find(".overallRating").text(r);$(".title-"+n.titleID).find(".star-rating").starRating("setRating",t);return},error:function(){}})}});$(".title-"+n.titleID+" .star-rating").addClass("star-rating-init")}function buildShopifyClient(){if(typeof client!="undefined"){var n=localStorage.getItem("lastCartId");if(n===null){createCart();return}if(n.includes("shopify-buy")){localStorage.removeItem("lastCartId");localStorage.removeItem("carts."+n);createCart();return}fetchCart(n)}}function renderCartItems(){var n=$(".cart-item-container"),i,t;n.empty();i=$("#CartItemTemplate").html();t=cart.lineItems.map(function(n){return renderCartItem(n)});n.append(t);setTimeout(function(){n.find(".js-hidden").removeClass("js-hidden")},0);updateTotalCartPricing()}function renderCartItem(n){var i=$("#CartItemTemplate").html(),t=$(i),r=n.variant.image.src;return t.attr("data-variant-id",n.id),t.addClass("js-hidden"),t.find(".cart-img").attr("src",r),t.find(".cart-item__title").text(n.title),t.find(".cart-item__variant-title").text(n.variant.title),t.find(".cart-item__price").text(formatAsMoney(n.variant.price)),t.find(".cart-item__quantity").attr("value",n.quantity),t.find(".quantity-decrement").attr("data-variant-id",n.variant.id),t.find(".quantity-increment").attr("data-variant-id",n.variant.id),t}function updateTotalCartPricing(){$(".cart .pricing").text(formatAsMoney(cart.subtotalPrice));totalCartCount=getCartQuantity();$("#cart-bug .badge").text(totalCartCount)}function formatAsMoney(n,t,i,r,u){t=t||"$";i=i||",";r=r||".";u=u||".";var f=new RegExp("(\\d)(?=(\\d{3})+\\.)","g");return t+parseFloat(n,10).toFixed(2).replace(u,r).replace(f,"$1"+i).toString()}function findCartItemByVariantId(n){return cart.lineItems.filter(function(t){return t.variant.id===n})[0]}function findCartItemById(n){return cart.lineItems.filter(function(t){return t.id===n})[0]}function addOrUpdateVariant(n,t){openCart();var i=findCartItemByVariantId(n.id);i?updateVariantInCart(i,t):addVariantToCart(n,t);updateCartTabButton();$(".cart-item__quantity").attr("id",n.id)}function setPreviousFocusItem(n){previousFocusItem=n}function addVariantToCart(n,t){var i=[{variantId:n.id,quantity:t}];client.checkout.addLineItems(cart.id,i).then(t=>{cart=t;var r=t.lineItems.filter(function(t){return t.variant.id===n.id})[0],u=renderCartItem(r),i=$(".cart-item-container");i.append(u);setTimeout(function(){i.find(".js-hidden").removeClass("js-hidden")},0);updateTotalCartPricing();updateCartTabButton();$("#cart-bug").show();openCart();buildShopifyClient()}).catch(function(n){console.log("Item Add Fail");console.error(n)})}function updateCartTabButton(){if(cart!==null&&typeof cart!="undefined"&&cart.lineItems.length>0){var n=getCartQuantity();$(".btn--cart-tab .btn__counter").text(n);$(".btn--cart-tab").addClass("js-active")}else $(".btn--cart-tab").removeClass("js-active"),$(".cart").removeClass("js-active")}function updateVariantInCart(n,t){var i=cart.lineItems.length,r=[{id:n.id,quantity:t,variantId:n.variant.id}];client.checkout.updateLineItems(cart.id,r).then(r=>{cart=r;var u=$(".cart").find('.cart-item[data-variant-id="'+n.id+'"]');r.lineItems.length>=i?(u.find(".cart-item__quantity").val(parseInt(t)),u.find(".cart-item__price").text(formatAsMoney(n.variant.price))):(u.find(".cart-item__quantity").val(0),u.slideUp("fast",function(){u.remove();r.lineItems.length<1&&(closeCart(),$("#cart-bug").hide())}));updateCartTabButton();updateTotalCartPricing()}).catch(function(n){console.log("Item Update Fail");console.error(n)})}function getCartQuantity(){var t=0,n;if(typeof cart=="undefined")return 0;for(n=0;n<cart.lineItems.length;n++)t=t+cart.lineItems[n].quantity;return totalCartCount=t}function closeCart(){$(".cart").removeClass("js-active")}function openCart(){$(".cart").addClass("js-active")}function debounce(n,t,i){var r;return function(){var u=this,f=arguments,e=function(){r=null;i||n.apply(u,f)},o=i&&!r;clearTimeout(r);r=setTimeout(e,t);o&&n.apply(u,f)}}function fieldQuantityHandler(n){var i=parseInt($(this).closest(".cart-item").attr("data-variant-id"),10);console.log("Quantityhandler: "+i);var r=getSelectedVariant(product),t=findCartItemByVariantId(r.id),u=n.target.value;t&&updateVariantInCart(t,u)}function updateQuantity(n,t){var r,i=findCartItemByVariantId(t);i&&(r=n(i.quantity),updateVariantInCart(i,r))}function decrementQuantity(n){updateQuantity(function(n){return n-1},n)}function incrementQuantity(n){updateQuantity(function(n){return n+1},n)}function bindEventListeners(){function t(){$("#cartModal").modal("show")}$(".cart .btn--close").on("click",closeCart);$(document).on("click",function(n){$(n.target).closest(".cart").length||$(n.target).closest(".js-prevent-cart-listener").length||closeCart()});var n=27;$(document).on("keydown",function(t){t.which===n&&(previousFocusItem&&($(previousFocusItem).focus(),previousFocusItem=""),closeCart())});$(".btn--cart-checkout").on("click",function(){t()});$(".btn--cart-tab").click(function(){setPreviousFocusItem(this);openCart()});$("#clearAll").click(function(){for(var t=[],n=0;n<cart.lineItems.length;n++)t.push(cart.lineItems[n].id);client.checkout.removeLineItems(cart.id,t).then(n=>{closeCart(),cart=n,updateTotalCartPricing(),updateCartTabButton(),$("#cart-bug").hide(),$(".cart-item").each(function(){$(this).remove()})}).catch(function(n){console.log("Clear Checkout Fail");console.error(n)})})}function createCart(){client.checkout.create().then(function(n){cart=n;localStorage.setItem("lastCartId",cart.id);cartLineItemCount=0})}function fetchCart(n){client.checkout.fetch(n).then(function(n){cart=n;cart===null||cart.completedAt!==null||typeof cart=="undefined"?createCart():(cartLineItemCount=cart.lineItems.length,renderCartItems(),cartLineItemCount>0&&(totalCartCount=getCartQuantity(),$("#cart-bug .badge").text(totalCartCount),$("#cart-bug").show(),$("#shopSection").show()))})}var slideUpOnOk,search,imagesResized,BrowserDetection,cart,cartLineItemCount,product,totalCartCount;(()=>{function u(){}function f(){$(()=>{o(),s(),h(),y(),p()})}function t(){return((1+Math.random())*65536|0).toString(16).substring(1)}function r(){return(t()+t()+"-"+t()+"-4"+t().substr(0,3)+"-"+t()+"-"+t()+t()+t()).toLowerCase()}function e(){$.cookie("CacheId",r().replaceAll("-",""),{expires:432e5,domain:i()})}function i(){var n=window.location.hostname.split(".");return n.slice(n.length-2,n.length).join(".")}function o(){var t,r;if(!n.visitor.IsGuest&&!n.visitor.HasSeenReleaseNotes&&n.resources["ReleaseNotes.Enabled"]=="true"){var u=n.resources["ReleaseNotes.Header.Text"],f=htmlDecode(n.resources["ReleaseNotes.Body.HTML"]),o=n.resources["ReleaseNotes.Button.Text"],s=()=>{$.cookie("ReleaseNotes",n.resources["ReleaseNotes.Version"],{expires:36500,domain:i()}),e()};showMsgSlide(u,f,"caution",o,!0,s)}$("#slideUpOKBtn").click(function(){slideUpOnOk&&slideUpOnOk();$("#siteMsgSlideUp").removeClass("error");$("#siteMsgSlideUp").removeClass("caution");$("#siteMsgSlideUp").removeClass("success");$("#siteMsgSlideUp").removeClass("default");$("#siteMsgSlideUpBG").removeClass("active");$("#siteMsgSlideUp").removeClass("active");$("#siteMsgSlideUp #slideUpOKBtn").text("OK");$("#siteMsgSlideUp #msgClose").show()});t=$("#ribbonWrapper").data("end-countdown");t!="undefined"&&t!=null&&t!=""&&(r=new Date(Date.parse(t.enddate)),$("#CountDown").countdown({until:r,compact:!0,format:"dHMS"}));$.cookie("subscribeModalShown")==null&&setTimeout(function(){$("#changePlanModal").fadeIn()},1e3);$("#acknowledgeBtn, #modalSubscribe").click(function(){$("#changePlanModal").hide();$.cookie("subscribeModalShown",$.now(),{expires:1})});$.cookie("PaymentAcknowledged")==null&&setTimeout(function(){$("#updatePaymentModal").fadeIn()},1e3);$("#paymentOK, #modalUpdate").click(function(){$("#updatePaymentModal").fadeOut();var n=new Date;n.setTime(n.getTime()+36e5);$.cookie("PaymentAcknowledged",$.now(),{expires:n})});$(".resume-sub-modal").click(function(){$("#modalTemplate").modal("show");$("#modalTemplateBody").load("/Modal/ResumeSubscription")});$("#pseudoPIN").focus(function(){var n=$(this);n.attr("type","text");$("#showPassword").prop("disabled",!0);$("#showPassword").removeClass("btn-warning");$("#showPassword").addClass("btn-default")});$("#pseudoPIN").focusout(function(){var n=$(this);n.attr("type","password");$("#showPassword").prop("disabled",!1);$("#showPassword").removeClass("btn-warning");$("#showPassword").addClass("btn-default");$("#UserProfile_PIN").val($("#pseudoPIN").val())})}function s(){$.cookie("appBannerClosed")==null&&$("#marketApp").hide().delay(500).slideDown();$("#marketApp .close").on("click",function(){var n=$(this);$.cookie("appBannerClosed",$.now(),{expires:1});$("#marketApp").slideUp()})}function h(){var n=$("body").data("json");window.hidive.main(n)}function c(n,t,i){grecaptcha.ready(function(){grecaptcha.execute(n,{action:t}).then(function(n){i(n)})})}function l(){c("6LdjmbsUAAAAAHDBqEFmD4cQJ3QzVK3hZflHbQ55","submitContact",n=>{ReCaptcha(n,"submitContact",a,v)});return}function a(){var i=$(".hidive-contact-form").data("contact-form"),u;if(i!="undefined"&&i!=""&&i!=null){var n=i.id,f=$("#"+n+"Form").serializeObject(),r=!0,t=$("#body");if(r){if(t.attr("placeholder","Your Message (1000) - REQUIRED"),t.parent().addClass("has-error"),!t.val().length>0)return;t.parent().removeClass("has-error")}else r||(t.attr("placeholder","Your Message (1000)"),t.parent().removeClass("has-error"));u=this;$.post("/home/contact",f).done(function(t){t?($("#"+n+"Message").addClass("alert alert-success").html("Your message has been submitted. We strive for excellent customer service and will do our best to respond within 24 hours."),$("#"+n+"Message").fadeIn().html(),$("#"+n+"Form")[0].reset(),setTimeout(function(){$("#"+n+"Message").fadeOut("medium",function(){$(u).prop("disabled",!1);$("#"+n+"Modal").modal("hide")}).html()},5e3)):$("#"+n+"Message").addClass("alert alert-danger").html("Your message was not submitted. Please try again.")})}}function v(){console.log("contactFormError");return}function y(){var t=$(".hidive-contact-form").data("contact-form"),n;t!="undefined"&&t!=""&&t!=null&&(n=t.id,$("#"+n+"Submit").click(function(n){n.preventDefault();l()}),$("#"+n+"Subject").change(function(){var i=$(this),t=$("#quick"+i.val());$(".quickHelp ul").hide();t.length>0?($("#"+n+"Quick").show(),t.show()):$("#"+n+"Quick").hide()}))}function p(){setTimeout(function(){return},2e3);$('[data-toggle="tooltip"]').tooltip({container:"body",trigger:"hover",delay:{show:500,hide:100}});$.cookie("TimeZoneOffset",(new Date).getTimezoneOffset()/-60,{domain:i()});$("#contactUs, .contactUs").on("mouseup",function(){return $("#contactUsModal").modal("show"),!1});$("#shop").on("click",function(){return $("#shopModal").modal("show"),!1});$("#goToShop").click(function(){$("#shopModal").modal("hide")});$(".countdown").length>0&&setInterval(countdownTimer,1e3);$("#searchIcon").click(function(){var n=$("#nav-search"),t=$("#signUpNow");n.fadeIn(200);t.fadeOut(0);n.animate({width:250},"medium",function(){$(n).find("input").focus()})});$("#nav-search").find("input").blur(function(){$(this).val().length==0&&($("#nav-search").animate({width:40}).fadeOut(200,"swing",()=>{$("#signUpNow").fadeIn(0)}),$("#nav-search .typeahead").typeahead("val",""))});$("#nav-search .typeahead").bind("typeahead:select",function(){$("#nav-search").submit()});$("#body-search .typeahead").bind("typeahead:select",function(){$("#body-search").submit()});$("#body-search .typeahead, #nav-search .typeahead").typeahead({hint:!1,highlight:!0,minLength:3},{name:"search",limit:10,source:search,templates:{empty:'<div class="empty-message col-xs-12">\nNo matching titles...\n<\/div>'}});$("#showsBtn").click(function(n){n.stopPropagation();toggleShowMenu()});$("#show-menu").mouseleave(function(){$("#show-menu").css("display")!="none"&&toggleShowMenu()});cbInterval=setInterval(function(){cvid=$.cookie("VisitId")},1e3);$("#nav-search").submit(function(){var n=$.trim($('[name="q"]').val());if(n==="")return!1});$("a").each(function(){var n=$(this),t=n.attr("href");if(t!=null&&t.indexOf("&vid=")>0)n.on("mouseover",setVid)});$.cookie("Registered")==null&&(animateSignup=new AnimateCSS("#signUpNow",3.14,31.14).animate());lazyLoadImages();$(".pinnableSearch").click(function(){var n=$(this);$.post("/search/toggle/"+n.data("search-id")).done(function(t){vid=t.VisitId;n.find("span.icon").toggleClass("glyphicon-pushpin glyphicon-remove-sign")})})}var n=window.hidive=window.hidive||{};u();$.getJSON("/ajax/getsitesettings").done(t=>{n.settings=t.Settings,n.resources=t.Resources,n.visitor=t.Visitor,intercept(),f()})})();slideUpOnOk=null;$(document).on("click","#acceptResume",tryResumeSubscription);var cbInterval=null,vid=url("?vid",window.location.href),cvid=$.cookie("VisitId"),animateSignup=null;$.cookie.defaults={path:"/",domain:window.location.hostname},function(n,t){function f(n,i){t("#siteAlertSubject").html(n);t("#siteAlertMessage").html(i);t("#siteAlertModal").modal("show")}function e(){t.cookie("undoMaintenance",window.location);window.location="/maintenance.html"}function o(){var n=t.cookie("undoMaintenance");window.location=typeof n=="undefined"?"/":n}var u=n.signalr=n.signalr||{},r=u.siteHub={},i=null;r.init=function(){i==null&&(i=t.connection.siteHub,i!=null)&&(i.client.displaySiteAlert=f,i.client.enableMaintenance=e,i.client.disableMaintenance=o)};r.sendSiteAlert=function(n,t){return i==null?(alert("Site Hub Not Enabled"),!1):(i.server.sendSiteAlert(n,t),!0)};r.enableMaintenance=function(){return i==null?(alert("Site Hub Not Enabled"),!1):(i.server.enableMaintenance(),!0)};r.disableMaintenance=function(){return i==null?(alert("Site Hub Not Enabled"),!1):(i.server.disableMaintenance(),!0)};r.alert=function(){alert("i have a new notification")}}(window.hidive=window.hidive||{},jQuery),function(n,t){var i=n.signalr=n.signalr||{},r,u=!1;i.init=function(n){r=n;r.enabled&&(r.siteHub&&i.siteHub.init(),i.chatHub&&i.chatHub.init(r.chatConfig),i.connect())};i.connect=function(){if(!u){t.connection.hub.url=r.signalrUrl+"/signalr";t.connection.hub.logging=r.logging;try{t.connection.hub.start().done(function(){u=!0});t.connection.hub.disconnected(function(){u=!1});t.connection.hub.error(function(n){console.log("Signalr Error: "+n)})}catch(n){}}}}(window.hidive=window.hidive||{},jQuery),function(n,t){var i,r;n.publicProperty=null;n.isProd=null;n.publicMethod=function(){};typeof console._commandLineAPI!="undefined"?r=console._commandLineAPI:typeof console._inspectorCommandLineAPI!="undefined"?r=console._inspectorCommandLineAPI:typeof console.clear!="undefined"&&(r=console);n.main=function(u){if(u!=null){if(i=u,n.isProd=i.isProd,n.signalr.init(i.signalR),n.videoplayer!="undefined"&&n.videoplayer!=""&&n.videoplayer!=null&&(n.videoplayer.main(i.playerConfig),i.playerConfig==null)){var f=window.location.href,e=f.indexOf("#");e!=-1&&showBannerWithResourceKey("Chat.AutoJoin.NoPlayer")}n.account&&(n.account.updatePayment&&n.account.updatePayment.initUpdatePaymentForm&&n.account.updatePayment.initUpdatePaymentForm(),n.account.convertToYearly&&n.account.convertToYearly.initAccountPaymentForm());i.isProd&&t(document).ready(function(){r.clear()})}}}(window.hidive=window.hidive||{},jQuery);window.onunload=function(){window.clearInterval(cbInterval)};search=new Bloodhound({initialize:!0,datumTokenizer:Bloodhound.tokenizers.whitespace,queryTokenizer:Bloodhound.tokenizers.whitespace,local:null,remote:{url:"/search/typeaheadfull?q=%QUERY",wildcard:"%QUERY"}});AnimateCSS.prototype={cssElement:null,lastAnimation:"",animations:["bounce","flash","rubberBand","shake","swing","tada","wobbble","jello"],minDelay:0,maxDelay:30,getAnimationTimeout:function(){return(Math.random()*(this.maxDelay-this.minDelay)+this.minDelay)*1e3},animate:function(){$(this.cssElement).removeClass("animated "+this.lastAnimation);this.lastAnimation=this.animations[Math.floor(Math.random()*this.animations.length)];$(this.cssElement).addClass("animated "+this.lastAnimation);setTimeout(this.animate.bind(this),this.getAnimationTimeout())}};$(".search-query").keypress(function(n){return n.which==13?($("form#nav-search").submit(),!1):!0});imagesResized=0;BrowserDetection={IsChrome:function(){return!!window.chrome&&!!window.chrome.webstore||navigator.userAgent.match(/CriOS/i)!=null},IsFirefox:function(){return typeof InstallTrigger!="undefined"},IsSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0},IsIE:function(){return!1||!!document.documentMode},IsEdge:function(){return!BrowserDetection.IsIE()&&!!window.StyleMedia},IsOpera:function(){return!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0},IsBlink:function(){return(BrowserDetection.IsChrome()||BrowserDetection.IsOpera())&&!!window.CSS},IsAppleWebKit:function(){return navigator.userAgent.match(/AppleWebKit/i)!=null},IsXbox:function(){return navigator.userAgent.match(/Xbox/i)!=null},IsXboxOne:function(){return navigator.userAgent.match(/Xbox One/i)!=null},IsAndroid:function(){return navigator.userAgent.match(/Android/i)!=null},IsiOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)!=null},IsMobileOpera:function(){return navigator.userAgent.match(/Opera Mini/i)!=null},IsMobileWindows:function(){return navigator.userAgent.match(/IEMobile/i)!=null},IsMobile:function(){return BrowserDetection.IsAndroid()||BrowserDetection.IsiOS()||BrowserDetection.IsMobileOpera()||BrowserDetection.IsMobileWindows()},IsMobileFD:function(){return typeof orientation!="undefined"||navigator.userAgent.indexOf("IEMobile")!==-1},IsFirefox49:function(){return BrowserDetection.IsFirefox()&&navigator.userAgent.indexOf("Firefox/49")>0},IsFirefox50:function(){return BrowserDetection.IsFirefox()&&navigator.userAgent.indexOf("Firefox/50")>0},IsFirefox51:function(){return BrowserDetection.IsFirefox()&&navigator.userAgent.indexOf("Firefox/51")>0}};const operation=["+","x"];var VIDEOGRAM_SLIDER_SETTINGS={slidesToShow:6,slidesToScroll:6,infinite:!1,draggable:!0},SLIDER_SETTINGS={slidesToShow:5,slidesToScroll:5,infinite:!0,draggable:!1,dots:!0,lazyLoad:"ondemand"},SHOW_SLIDER_SETTINGS={slidesToShow:5,slidesToScroll:5,draggable:!1},EPISODE_SETTINGS={slidesToShow:5,slidesToScroll:5,lazyLoad:"ondemand",infinite:!1,draggable:!1,dots:!0},activeWin=null,curSection=null,curSubSection="",currImgRotator={},winRotator={};$(function(){$(document).on("click",".episode-play",function(){if(window.hidive.videoplayer!==undefined){var n=$(this),t=n.data("key"),i=n.data("videotitle"),r=n.data("chatkey"),u=n.data("playurl");window.hidive.videoplayer.updateChangeEpisode(t,i,null,!1,r);window.history.pushState("","",u)}else window.location.href=$(this).data("playurl")})});$(document).ready(function(){setTimeout(function(){$("#userGreeting").fadeTo(500,0,function(){$(this).slideUp()})},1e4);$(".user-carousel").slick({autoplay:!0,dots:!0,autoplaySpeed:7e3,fade:!1,responsive:[{breakpoint:1024,settings:{arrows:!1}}]});$(".user-carousel .title-img .player").mouseenter(function(){winImgRotate($(this))});$(".user-carousel .title-img .player").mouseleave(function(){clearWinImgRotator(this)});$(".carousel").hasClass("slick-initialized")||($(".carousel").slick({autoplay:!0,dots:!0,autoplaySpeed:5e3}),$(".carousel").css("opacity","1"));$(".carousel-bottom").hasClass("slick-initialized")||($(".carousel-bottom").slick({autoplay:!0,dots:!0,autoplaySpeed:5e3}),$(".carousel").css("opacity","1"));$(".title-slider").on("afterChange",function(n,t){if(activeWin!=null&&t.animating==!0)$(this).find(".slick-current .hitbox").trigger("click");else return});initTitleSlider();$(".nav-info").click(function(){var n=$(this).parent().parent().data("section");removeSelectedNav();$(this).addClass("nav-selected");showSubSection("information")});$(".nav-episode").click(function(){var n=$(this).parent().parent().data("section");removeSelectedNav();$(this).addClass("nav-selected");showSubSection("episodes",function(){$(activeWin).find(".episode-slider").hasClass("slick-initialized")||$(activeWin).find(".episode-slider").slick(EPISODE_SETTINGS)});assignEpisodeListener();$(function(){$('[data-toggle="tooltip"]').tooltip()})});$(".nav-recommend").click(function(){var n="#"+$(this).parent().parent().data("section");removeSelectedNav();$(this).addClass("nav-selected");showSubSection("recommended",function(){$(activeWin).find(".recommended-slider").hasClass("slick-initialized")||$(activeWin).find(".recommended-slider").slick(SLIDER_SETTINGS)});assignRecommendedListener();assignEpisodeListener();$(function(){$('[data-toggle="tooltip"]').tooltip()})});$(".title-slider .hitbox").hover(function(){var n=$(this).parent().attr("id"),t=$(this).parent().data("id");mouseOverTitle(n)},function(){var n=$(this).parent().attr("id");mouseOutTitle(n)});$(".title-slider .hitbox").click(function(n){var r=n.target,t,i;if(!$(r).data("play")){if(t=$(this).parent().attr("id"),i=$(this).parent().data("id"),$(this).find(".arrow_box").hasClass("green")){removeFrame();closeWindow(t);$("#"+t+" .default-img").css("opacity","0");$("#"+t+" .img-rotator").show();$("#"+t+" .player").addClass("fadeIn");$("#"+t+" .synopsis").addClass("fadeIn");$("#"+t+" .expander").addClass("fadeIn");$("#"+t+" .expander").css("cursor","pointer");return}loadTitleWindowContent(i,1,function(){mouseClickTitle(t)})}});$(".window .closeBtn").click(function(){removeFrame();closeWindow()})});$(document).ready(function(){initStars(null);$(this).on("click",".edit-rating",function(){var n=$(this).parents(".stars").find(".star-rating");$(n).starRating("setReadOnly",!1);$(n).starRating("setRating",0)})});totalCartCount=0;$(document).ready(function(){buildShopifyClient();$(".cart .scrollbar-inner").scrollbar();$(this).on("click","#cart-bug a",function(n){$(".cart").addClass("js-active");n.stopPropagation()});$(this).on("click",".cart",function(n){n.stopPropagation()});bindEventListeners();$("#goToStore").click(function(){window.open(cart.webUrl,"_blank")})});$(".cart").on("click",".quantity-increment",function(){var n=$(this).data("variant-id");incrementQuantity(n)});$(".cart").on("click",".quantity-decrement",function(){var n=$(this).data("variant-id");decrementQuantity(n)})