text: !function(t){var e,i,o,n;i=0,o=0,e=!1,n={init:function(s){"fixed"!==t("body").css("position")&&(i=t(document).scrollTop()),o=window.innerWidth-document.documentElement.clientWidth,e=s.freeze,n.create(s.name,s.size,s.title,s.content,s.callback)},create:function(i,o,s,l,d){var a;a=n.template(i,o,s,l),e&&"fixed"!==t("body").css("position")&&n.freeze(!0),t("body").append(a).ready(function(){d&&d()}),n.binding(i)},isInteger:function(t){return t===parseInt(t,10)},template:function(t,e,i,o){var s;return s=n.isInteger(e)?'<div class="simple-modal-box" style="max-width: '+e+'px;">':'<div class="simple-modal-box simple-modal-box--'+e+'">','<div class="simple-modal simple-modal--'+t+'">\n\t<div class="simple-modal__container">\n\t\t<div class="simple-modal__middle">\n\t\t\t<div class="simple-modal__box">\n\t\t\t\t'+s+'\n\t\t\t\t\t<div class="simple-modal-box__header">\n\t\t\t\t\t\t<div class="simple-modal-box__title">'+i+'</div>\n\t\t\t\t\t\t<button class="simple-modal-box__close" type="button"></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="simple-modal-box__content">'+o+"</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>"},binding:function(e){t(".simple-modal--"+e+" .simple-modal-box__close").click(function(){n.close(e)}),t(".simple-modal--"+e+" .simple-modal__container").mousedown(function(t){t.target.closest(".simple-modal-box")||n.close(e)})},freeze:function(e){e?(t("body").css("top","-"+i+"px").css("position","fixed").css("width","100%"),t("html").hasClass("no-touch")&&t("body").css("padding-right",o)):(t("body").css("top","auto").css("position","relative").css("padding-right",""),t(document).scrollTop(i))},close:function(i){t(".simple-modal--"+i).remove(),e&&0===t(".simple-modal").length&&n.freeze(!1)}},jQuery.fn.simpleModal=function(e){e=t.extend({name:"",title:"",content:"",size:"small",freeze:!0},e),n.init(e)}}(jQuery);