"+r+"<\/div>")}$("#"+String(n)+".defaul-open").show().addClass("open");$("#"+String(n)+".defaul-open").removeClass("hide");$(".lean-overlay.defaul-open").show().addClass("open");t>0&&(timeout=setTimeout(function(){hideMsg(n)},t))}function apShowMsgRpl(n,t,i,r,u,f,e,o){var s,h,c,l,a,v;u&&f&&(s="#"+u,h="
"+f+"<\/div>",$(s).replaceWith(h));i&&r&&(c="#"+i,l="
"+r+"<\/h4>",$(c).replaceWith(l));e&&o&&(a="#"+e,v="
<\/i><\/div>",$(a).replaceWith(v));$("#"+String(n)+".defaul-open").show().addClass("open");$("#"+String(n)+".defaul-open").removeClass("hide");$(".lean-overlay.defaul-open").show().addClass("open");t>0&&(timeout=setTimeout(function(){hideMsg(n)},t))}function hideMsg(n){timeout&&clearTimeout(timeout);$("#"+String(n)+".defaul-open").removeClass("open");$("#"+String(n)+".defaul-open").addClass("hide");$(".lean-overlay.defaul-open").removeClass("open").hide()}function ck(){for(var n="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<12;i++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function ap(){var n=document.getElementById("promoInput").value;n.trim()&&(shlo("Applying Discount"),$.ajax({type:"POST",url:"https://boxoffice.adventuretix.com/adventuretix/setpromocode/"+ck(),data:{promo:n},success:function(n){if(n=="XS"&&(hlo(),window.location.replace("https://boxoffice.adventuretix.com/adventuretix/")),n=="!InvalidCode!"){hlo();var t=document.getElementById("promoInput");t.style.color="red";t.style.fontWeight="bold";t.value="Invalid Code";t.disabled=!0;setTimeout(function(){t.value="";t.style.color="initial";t.style.fontWeight="normal";t.disabled=!1},2e3)}n=="!Reload-Page!"&&location.reload(!0);(n=="mm_cannot_apply_discount_error"||n=="mm_cannot_apply_discount_error_refresh")&&(hlo(),apShowMsg(n,1e4))}}))}function ad(n,t,i){n&&t&&i&&(shlo("Applying Discount"),$.ajax({type:"POST",url:"https://boxoffice.adventuretix.com/adventuretix/setpromocode/"+ck(),data:{discountId:n,seatId:t,eventId:i},success:function(n){n=="XS"&&(hlo(),window.location.replace("https://boxoffice.adventuretix.com/adventuretix/"));n=="!Reload-Page!"&&location.reload(!0);(n=="mm_cannot_apply_discount_error"||n=="mm_cannot_apply_discount_error_refresh")&&(hlo(),apShowMsg(n,1e4))}}))}function af(){var n=document.getElementById("flexInput").value;n.trim()&&(hideMsg("mm_apply_flex_pass"),shlo("Applying FlexPass"),$.ajax({type:"POST",url:"https://boxoffice.adventuretix.com/adventuretix/setpromocode/"+ck(),data:{flexpasscode:n},success:function(n){var t,i;n=="XS"&&(hlo(),window.location.replace("https://boxoffice.adventuretix.com/adventuretix/"));n=="!InvalidCode!"&&(hlo(),t=document.getElementById("flexInput"),t.style.color="red",t.style.fontWeight="bold",t.value="Invalid Code",t.disabled=!0,setTimeout(function(){t.value="";t.style.color="initial";t.style.fontWeight="normal";t.disabled=!1},2e3));n=="!Reload-Page!"&&location.reload(!0);n&&(i=n.split("|"),i.length==7&&i[0]=="!FlexPass-Error!"&&(hlo(),apShowMsgRpl(i[1],i[2],i[3],i[4],i[5],i[6])))}}))}function ar(n,t){var i=document.getElementById(n);shlo("Applying Your Change");$.ajax({type:"POST",url:"https://boxoffice.adventuretix.com/adventuretix/setrewards/"+ck(),data:{apply:i.checked,sid:t},success:function(n){n=="XS"&&(hlo(),window.location.replace("https://boxoffice.adventuretix.com/adventuretix/"));n=="!Reload-Page!"&&location.reload(!0);n=="!NOTIX!"&&(hlo(),$(i).removeAttr("checked"),apShowMsg("mm_cannot_apply_banked_ticket_error",1e4))},error:function(){hlo()}})}function shlo(n){n&&$("#locking-container-text span").text(n);$(".apply-discount-locking-container").show()}function hlo(){$(".apply-discount-locking-container").hide()}var timeout