text: (function(b,c,k){b.yit_popup=function(l,e){var m={popup_class:"ypop",content:"",delay:0,position:"center",mobile:!1},a=this;a.settings={};var d=b(l);a.init=function(){a.settings=b.extend({},m,e);0==b("body").find(".ypop-modal").length?a.bigwrapper=b("<div />",{"class":"ypop-modal"}).prependTo("body"):a.bigwrapper=b("body").find(".ypop-modal");0==a.bigwrapper.find(".ypop-overlay").length?a.overlay=b("<div />",{"class":"ypop-overlay"}).appendTo(a.bigwrapper):a.overlay=a.bigwrapper.find(".ypop-overlay");
      0==a.bigwrapper.find(".ypop-wrapper").length?a.popup=b("<div />",{"class":"ypop-wrapper "+a.settings.popup_class}).appendTo(a.bigwrapper):a.popup=a.bigwrapper.find(".ypop-wrapper");0==a.popup.find(".close").length?a.close=b("<a />",{"class":"close"}).appendTo(a.popup):a.close=a.popup.find(".close");n()};var n=function(){b(k).on("touchstart click",".ypop-overlay",function(a){(b(a.target).hasClass("close")||0==b(a.target).parents(".ypop-overlay").length)&&f()}).on("keyup",function(a){27==a.keyCode&&
  f()}).on("click",".ypop-wrapper a.close",function(){f()});b(c).on("resize",function(){g()});b("html").removeClass("yit-opened");p()},g=function(){var b=a.popup.outerWidth();a.popup.outerHeight();if(a.settings.mobile){if(a.popup.outerHeight()>jQuery(c).height()-120||a.popup.outerWidth()>jQuery(c).width()-60)b=jQuery(c).width()-60;a.popup.css({width:b+"px",height:"auto"})}"center"==a.settings.position?a.popup.css({position:"fixed",top:Math.max(0,(jQuery(c).height()-a.popup.outerHeight())/2-50)+"px",
      left:Math.max(0,(jQuery(c).width()-b)/2)+"px"}):"left-top"==a.settings.position?a.popup.css({position:"fixed",top:" 0px",left:"0px"}):"left-bottom"==a.settings.position?a.popup.css({position:"fixed",bottom:" 0px",left:"0px"}):"right-bottom"==a.settings.position?a.popup.css({position:"fixed",bottom:" 0px",right:"0px"}):"right-top"==a.settings.position&&a.popup.css({position:"fixed",top:" 0px",right:"0px"})},p=function(){0<a.settings.delay?setInterval(function(){h();b(".ypop-modal").addClass("open");
      g()},a.settings.delay):(h(),b(".ypop-modal").addClass("open"),g())},f=function(){d.trigger("close.ypop");b(".ypop-modal").removeClass("open");a.popup.remove();a.overlay.remove()},h=function(){""!=a.settings.content?a.popup.html(a.settings.content):d.data("container")?a.popup.html(b(d.data("container")).html()):d.data("content")?a.popup.html(d.data("content")):d.attr("title")?a.popup.html(d.attr("title")):a.popup.html("");a.popup.find("form, input, label, a").each(function(){if("undefined"!=typeof b(this).attr("id")){var a=
      b(this).attr("id")+"_ypop";b(this).attr("id",a)}"undefined"!=typeof b(this).attr("for")&&(a=b(this).attr("for")+"_ypop",b(this).attr("for",a))});0==a.overlay.find(".close").length?a.close=b("<a />",{"class":"close"}).appendTo(a.popup):a.close=a.overlay.find(".close")};a.init()};b.fn.yit_popup=function(c){return this.each(function(){if(void 0===b(this).data("yit_popup")){var e=new b.yit_popup(this,c);b(this).data("yit_popup",e)}})}})(jQuery,window,document);