'+d+'<\/div>
<\/i>',v&&(a+='<\/i>'),p&&(a+='<\/i>'),a+="<\/div><\/li>",$(wrapper).append(a),$(".seating li:last").addClass("s"+h),v&&$(".seating li:last").addClass("was-acc-seat"),p&&$(".seating li:last").addClass("was-acc-seat")),$("#s"+h).addClass("sel"),tpt+=c,tft+=l):showMsg("mm_too_many_seats_error",15e3));ut()}function ut(){cl<=0?$("#scount").html(""):$("#scount").html(" ( "+cl+" )");$("#stotal").html("$"+tpt.formatMoney(2));$("#ftotal").html("$"+tft.formatMoney(2));$("#gtotal").html("$"+(tpt+tft).formatMoney(2));$("#btnContinue").removeClass("disabled");cl<=0&&$("#btnContinue").addClass("disabled")}function rm(){cl=0;tpt=0;tft=0;tm=setTimeout(function(){showMsg("mm_refresh_map_error",15e3);$(".loader-container").hide()},2e4);$(".loader-container").toggle();lsm();ut()}function cs(n){$.ajax({type:"POST",url:"https://boxoffice.adventuretix.com/franklintheatrearts/csi",data:{id:n},success:function(){rm()}})}function cpr(n){var t=JSON.stringify(ns);$.ajax({type:"POST",url:"https://boxoffice.adventuretix.com/franklintheatrearts/csi",data:{prId:n,sels:t},success:function(){$(".loader-container").toggle();window.location.reload(!0)}})}function lss(){lssip||(lssip=!0,sa.length>0&&(tm=setTimeout(function(){showMsg("mm_lock_seats_error",15e3);$(".locking-container").hide()},25e3),$(".locking-container").toggle(),$.ajax({type:"POST",url:"https://boxoffice.adventuretix.com/franklintheatrearts/lss/"+ck(),data:{sa:sa},success:function(n){if(clearTimeout(tm),n=="OK")window.location.replace("https://boxoffice.adventuretix.com/franklintheatrearts/add");else{if($(".loader-container").hide(),$(".locking-container").hide(),n=="XS"){window.location.replace("https://boxoffice.adventuretix.com/franklintheatrearts/");return}ns=[];sa=[];n.length>0?n=="-ERR"||n=="-NLC"||n=="ERR"||n=="NLC"?showMsg("mm_lock_seats_error",15e3):n=="LSF"?showMsg("mm_seats_unavailable_error",15e3):(n!="NA"&&$("#ua_seat_message").html(n),showMsg("mm_seats_unavailable_error",15e3)):showMsg("mm_lock_seats_error",15e3);rm()}}})),lssip=!1)}function showMsg(n,t){$("#"+String(n)+".defaul-open").show().addClass("open");$("#"+String(n)+".defaul-open").removeClass("hide");$(".lean-overlay.defaul-open").show().addClass("open");t>0&&setTimeout(function(){hideMsg(n)},t)}function hideMsg(n){$("#"+String(n)+".defaul-open").removeClass("open");$("#"+String(n)+".defaul-open").addClass("hide");$(".lean-overlay.defaul-open").removeClass("open").hide()}function sasa(n){cnas?chgAcc():(psc=n,showMsg("mm_confirm_accessible_seats",0))}function setAcc(n){cnas=n.checked;cnas?$("#btn_mm_confirm_accessible_seats").removeClass("disabled"):$("#btn_mm_confirm_accessible_seats").addClass("disabled")}function cclAcc(){cnas=!1;chgAcc()}function cnfAcc(){chgAcc()}function chgAcc(){hideMsg("mm_confirm_accessible_seats");cnas&&($(".acs").each(function(){$(this).off("click")}),$(".acc").each(function(){$(this).off("click")}),$(".acs").click(function(){ts(this)}),$(".acc").click(function(){ts(this)}));cnas&&typeof psc!="undefined"&&(ts(psc),psc=undefined)}var sa=[],ns=[],ms=[],mx=100,ml=40,cl=0,tpt=0,tft=0,wrapper=$("ul.seating"),tm,cnas=!1,sua=!1,psc=undefined,lssip;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=String(parseInt(u=Math.abs(Number(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):"")};lssip=!1;$(document).ready(function(){lsm()})