function subNext(s,a){s.removeClass("is-showing"),s.next().addClass("is-showing"),a.removeClass("is-active").next().addClass("is-active")}function subPrev(s,a){s.removeClass("is-showing"),s.prev().addClass("is-showing"),a.removeClass("is-active").prev().addClass("is-active")}$("div[class*=modal-btn-]").on("click",(function(){var s=$(this),a=s.parents(".modal-body"),e=a.index(),i=$(".modal-header span").eq(e);s.hasClass("modal-btn-next")?subNext(a,i):s.hasClass("modal-btn-prev")&&subPrev(a,i)}));