Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram - Version 1.10.12

Version Description

Compatibility with MailPoet 3

Download this release

Release Info

Developer Icegram
Plugin Icon 128x128 Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram
Version 1.10.12
Comparing to
See all releases

Code changes from version 1.10.11 to 1.10.12

Files changed (5) hide show
  1. assets/js/icegram.min.js +1 -1
  2. icegram.php +10 -10
  3. ig-offer.php +0 -40
  4. ig-survey.php +1 -7
  5. readme.txt +8 -2
assets/js/icegram.min.js CHANGED
@@ -1 +1 @@
1
- function Icegram(){}function Icegram_Message_Type(a){var a;this.root_container="#icegram_messages_container",this.data=a,this.type=a.type,this.data.delay_time=parseInt(this.data.delay_time),"string"!=typeof this.data.link||""==this.data.link||/^tel:/i.test(this.data.link)||/^https?:\/\//i.test(this.data.link)||(this.data.link="http://"+this.data.link),this.set_template(this.get_template_default()),jQuery(window).trigger("msg_preinit.icegram",[this]),this.init()}Icegram.prototype.init=function(a){if(void 0!=a){jQuery(window).trigger("preinit.icegram",[a]),this.data=a,this.defaults=jQuery.extend({},a.defaults),this.message_data=a.messages,this.messages,this.tracking_data=[],this.message_template_cache={},this.map_id_to_index={},this.map_type_to_index={},this.mode=void 0==window.ig_mode?"local":window.ig_mode,this.powered_by={link:"https://www.icegram.com/?utm_source=inapp&utm_campaign=poweredby&utm_medium="},this.powered_by.text=this.defaults.powered_by_text,this.powered_by.logo=this.defaults.powered_by_logo,jQuery("body").append('<div id="icegram_messages_container"></div>');this.messages=[];var b=this;this.message_data.length>0&&jQuery.each(this.message_data,function(a,c){try{if(-1==window.location.href.indexOf("campaign_preview_id")){if("yes"==c.retargeting&&1==jQuery.cookie("icegram_campaign_shown_"+c.campaign_id))return;if("yes"==c.retargeting_clicked&&1==jQuery.cookie("icegram_campaign_clicked_"+c.campaign_id))return}"undefined"!==c.ig_mobile_popup&&1==c.ig_mobile_popup&&(c.delay_time=-1);var d=null,e=c.type.split("-").join(" ").ucwords().split(" ").join("_");d="function"==typeof window["Icegram_Message_Type_"+e]?new window["Icegram_Message_Type_"+e](c):new Icegram_Message_Type(c),b.messages.push(d),b.map_id_to_index["_"+c.id]=a,b.map_type_to_index[c.type]=jQuery.isArray(b.map_type_to_index[c.type])?b.map_type_to_index[c.type]:new Array,b.map_type_to_index[c.type].push(a)}catch(f){console.log(f)}}),jQuery(window).on("unload",function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!1)}),setInterval(function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!0)},5e3),jQuery(window).trigger("init.icegram",[this])}},Icegram.prototype.timer_tick=function(){},Icegram.prototype.get_template_fn=function(a){return this.message_template_cache[a]},Icegram.prototype.set_template_fn=function(a,b){this.message_template_cache[a]=b},Icegram.prototype.get_message=function(a){return this.messages.length>a?this.messages[a]:void 0},Icegram.prototype.get_message_by_id=function(a){if(this.map_id_to_index.hasOwnProperty("_"+a)){var b=this.map_id_to_index["_"+a];return this.get_message(b)}},Icegram.prototype.get_message_by_campaign_id=function(a){a=String(a);var b=[],c=this.messages;return a.indexOf(" ")&&(a=a.split(" ")),jQuery.each(a,function(a,d){jQuery.each(c,function(a,c){d==c.data.campaign_id&&b.push(c)})}),b},Icegram.prototype.get_messages_by_type=function(a){if(this.map_type_to_index.hasOwnProperty(a)){var b=this.map_type_to_index[a],c=[];if(jQuery.isArray(b)){var d=this;jQuery.each(b,function(a,b){c.push(d.get_message(b))})}return c}},Icegram.prototype.get_powered_by=function(a){var b=jQuery.extend({},this.powered_by);return b.link=b.link+(a||""),b},Icegram.prototype.track=function(a,b){"object"==typeof b&&b.hasOwnProperty("message_id")&&b.hasOwnProperty("campaign_id")&&-1==b.message_id.indexOf("_00")&&(jQuery(window).trigger("track.icegram",[a,b]),this.tracking_data.push({type:a,params:b}))},Icegram.prototype.submit_tracking_data=function(a){var b=window.location.protocol.split(":"),c=b[0],d=this.data.ajax_url.split("://"),e=d[0];if(this.tracking_data.length>0&&-1==window.location.href.indexOf("campaign_preview_id")&&!this.is_bot()){var f={type:"POST",url:this.data.ajax_url,async:a||!1,data:{action:"icegram_event_track",event_data:JSON.parse(JSON.stringify(this.tracking_data)),ig_remote_url:"remote"==this.mode?window.location.href:void 0},success:function(a,b,c){},error:function(a,b,c){}};"remote"==this.mode?(f.xhrFields={withCredentials:!0},f.crossDomain=!0,f.async=!0):c!=e&&(f.xhrFields={withCredentials:!0},jQuery.extend(f.data,{ig_local_url_cs:window.location.href})),jQuery.ajax(f),this.tracking_data=[]}},Icegram.prototype.is_bot=function(){var a=/bot|spider|crawl|sucker|ia_archiver|alexa|spade|slurp|webbug|ZyBorg|Feedfetcher-Google|Mediapartners-Google|aolserver|seamonkey|binlar|casper|comodo|feedfinder|jakarta|java|larbin|libwww|pycurl|linkwalker|steeler|nutch|turnit|zmeu/i;return!!a.test(navigator.userAgent)},Icegram.prototype.hide_all_messages=function(){this.messages.length>0&&jQuery.each(this.messages,function(a,b){b.hide()})},Icegram_Message_Type.prototype.init=function(){this.render(),this.add_event_handlers()},Icegram_Message_Type.prototype.add_event_handlers=function(){this.el.on("click",{self:this},this.on_click),jQuery(window).on("resize",{self:this},this.on_resize)},Icegram_Message_Type.prototype.animations={},Icegram_Message_Type.prototype.embed_form=function(){if(-1===jQuery.inArray(this.data.type,["toast","badge","ribbon","exit-redirect"])){var a=null,b=this.data.form_layout,c=this.data.form_has_label,d=this.data.form_style||"none",e=this.data.label||void 0;if(d=d.toLowerCase().replace(" ","_"),void 0!=this.data.use_form&&"yes"==this.data.use_form&&(a=this.data.form_html),this.el.find("form.ig_embed_form").length>0){var f=this.el.find("form.ig_embed_form");b="inline",-1===jQuery.inArray(this.data.type,["messenger","tab","sidebar","interstitial","sticky"])&&(f.hasClass("ig_left")?b="left":f.hasClass("ig_right")&&(b="right")),"inline"==b&&this.el.find("form.ig_embed_form").replaceWith('<div class="ig_form_container layout_inline"></div>'),c=f.find(".ig_form_el_group label").length>0?"yes":void 0,0==f.find(".ig_button").length&&0==f.find("button[type=submit]").length&&(e=e||"Submit",f.append('<input class="ig_button" type="submit" value="'+e+'">')),a=jQuery("<div/>").append(f).html()}if(null==a)this.el.find(".ig_form_container").remove();else{var g=window.icegram.formProcess(this,a);if(g&&0==this.el.find(".ig_form_container form").length){var h=void 0!=this.data.form_header&&""!=this.data.form_header?'<div class="ig_form_header">'+this.data.form_header+"</div>":"",i=void 0!=this.data.form_footer&&""!=this.data.form_footer?'<div class="ig_form_footer">'+this.data.form_footer+"</div>":"",j=jQuery("<div/>").html(a);if(this.el.find(".ig_form_container").append(h).append(g).append(i),this.data.rainmaker_form_code&&""!=this.data.rainmaker_form_code){this.data.cta&&"form"!==this.data.cta&&this.data.show_response&&this.data.response_text&&(!this.data.response_text||""!=this.data.response_text)||(this.data.response_text=j.find(".rm_form_message").html()||""),this.el.find(".ig_form_container").addClass(j.find(".rm_form_container").data("type")).data("form-id",j.find(".rm_form_container").data("form-id")).addClass("rainmaker_form");var k=j.find("#rm_script"),l=j.find("#rm_style");this.el.find(".ig_form_container").prepend(l).append(k);var m=j.find(".rm_captcha"),n=j.find(".rm_form_error_message");this.el.find(".ig_form_container form").prepend(n).append(m)}void 0==c?this.el.find(".ig_el_label").not("span.ig_el_label").remove():(this.el.find("input, textarea").removeAttr("placeholder"),this.el.find("select option.ig_el_placeholder").remove()),this.el.find(".ig_form_container .ig_button").length>0&&(this.el.find(".ig_button").not(".ig_form_container .ig_button").hide(),e=e||this.el.find(".ig_button").val()||"Submit",this.el.find(".ig_button").val(e)),this.el.addClass("ig_form_"+b);var o="";void 0!=this.data.form_bg_color&&""!=this.data.form_bg_color?(this.el.find(".ig_form_container").css("background-color",this.data.form_bg_color),o+=".ig_form_"+b+".ig_form_"+d+" .ig_form_container:before{ background-color:"+this.data.form_bg_color+"; border-color:"+this.data.form_bg_color+";}"):o+=".ig_form_"+b+".ig_form_"+d+" .ig_form_container:before{ display:none;}",void 0!=this.data.form_text_color&&""!=this.data.form_text_color&&this.el.find(".ig_form_container").css("color",this.data.form_text_color),this.el.addClass("ig_form_"+d).find(".ig_form_container").prepend('<style type="text/css">'+o+"</style>"),jQuery.each(this.el.find(".ig_form_container")||[],function(a,b){jQuery(b).find(".ig_form_els").first().addClass("ig_form_els_first").end().last().addClass("ig_form_els_last")})}}}},Icegram_Message_Type.prototype.render=function(){this.pre_render();var a=this.render_template();try{jQuery(this.root_container).append(a)}catch(b){}this.dom_id="icegram_message_"+this.data.id,this.el=jQuery("#"+this.dom_id),this.set_position();var c=window.icegram.get_powered_by(this.type);if(c.hasOwnProperty("link")&&c.hasOwnProperty("text")&&""!=c.text&&this.add_powered_by(c),void 0!=this.data.headline&&""!=this.data.headline||this.el.find(".ig_headline").hide(),void 0!=this.data.icon&&""!=this.data.icon||this.el.addClass("ig_no_icon").find(".ig_icon").remove(),void 0!=this.data.message&&""!=this.data.message||this.el.find(".ig_message").hide(),void 0!=this.data.label&&""!=this.data.label||this.el.find(".ig_button").hide(),this.embed_form(),void 0==this.data.use_theme_defaults||"yes"!=this.data.use_theme_defaults){if(void 0!=this.data.text_color&&""!=this.data.text_color&&(this.el.css("color",this.data.text_color),this.el.find(".ig_container").css("color",this.data.text_color)),void 0!=this.data.bg_color&&""!=this.data.bg_color&&(this.el.css("background-color",this.data.bg_color),this.el.find(".ig_container").css("background-color",this.data.bg_color)),void 0!=this.data.cta_bg_color&&""!=this.data.cta_bg_color){this.el.find('.ig_button, form input[type="submit"]').css("background-color",this.data.cta_bg_color);var d=window.icegram.hexToHsl(this.data.cta_bg_color);this.el.find('.ig_button, form input[type="submit"]').css("border-color","hsl("+d.h+","+(d.s-5)+"%,"+(d.l-8)+"%)")}void 0!=this.data.cta_text_color&&""!=this.data.cta_text_color&&this.el.find('.ig_button, form input[type="submit"]').css("color",this.data.cta_text_color)}this.data.use_custom_code&&this.data.custom_css&&this.el.prepend('<style id="ig_custom_css_'+this.data.id+'" type="text/css">'+this.data.custom_css.replace(/#ig_this_message/g,"#"+this.dom_id)+"</style>"),"string"==typeof this.data.link&&""!=this.data.link&&this.el.parent().find(".ig_cta, .ig_button").css("cursor","pointer"),this.post_render(),this.hide({},!0),this.set_up_show_trigger()},Icegram.prototype.formProcess=function(a,b){var c=jQuery("<div/>").html(b).find('input[name="fake_text"]').data("required_field",!0).end().find("input.rm_required_feild").data("required_field",!0).end().find(".gform_validation_container input").data("required_field",!0).end().find(".rm_captcha_input").data("keep_class",!0).end().find(".required_field").data("required_field",!0).end().find("input, label, select, textarea, button").not(".rm_captcha_input, .rm_captcha_verify").not("br");if(c.length>0){var d=jQuery('<div class="ig_embed_form_container ig_clear_fix"></div>'),e=jQuery("<div/>").html(b).find("form").removeAttr("class").removeAttr("style").addClass("ig_clear_fix").empty(),f=".",g=0;jQuery.each(c,function(a,b){var c=jQuery(b),e=jQuery('<div class="ig_form_els"></div>');if(c.removeAttr("style"),c.data("keep_class")||c.removeAttr("class"),(-1==c.attr("tabindex")||c.is('*[name*="[abs]"]')||c.data("required_field")||"_mc4wp_required_but_not_really"==c.attr("name"))&&(c.addClass("ig_form_required_field").removeData("required_field"),g--),"hidden"!=c.attr("type")&&c.prop("disabled")!==!0||(c.addClass("ig_form_hidden_field"),g--),c.is("label"))f=c.not("input, select, textarea, button, span, br").text().replace(/\s+/g," ")||".";else if((c.is("input")||c.is("button")||c.is("textarea")||c.is("select"))&&!c.is("input[type=radio]")){if(c.removeAttr("id"),c.is("button")){var h=c.not("br, span, div").text().trim()||"";c.remove(),c=jQuery('<input type="submit" value="'+h+'">')}!c.is("input[type=submit]")&&!c.is("input[type=button]")||c.is(".ig_form_hidden_field, .ig_form_required_field")||c.addClass("ig_button"),(c.is("input[type=text]")||c.is("input[type=email]"))&&c.attr("size",25),label_class="ig_el_label ig_button_label","."!=f&&(label_class="ig_el_label",c.is("select")?jQuery('<option class="ig_el_placeholder">'+f+"</option>").prependTo(c):c.attr("placeholder",f)),jQuery('<label class="'+label_class+'">'+f+"</label>").appendTo(e),f=".",e.append(c),d.append(e),g++}else c.is("input[type=radio]")&&(label_class="ig_el_label ig_button_label","."!=f&&(label_class="ig_el_label"),jQuery('<label><span class="'+label_class+'">'+f+"</span></label>").prepend(c).appendTo(e),f=".",e.addClass("ig_form_el_radio"),d.append(e),g++)});var h=["","ig_full","ig_half","ig_third","ig_quater"];return g=4>g?g:4,d.find(".ig_form_required_field").length<=0&&d.append('<div class="ig_form_els"><input class="ig_form_required_field" type="text" tabindex="-1" value="" /></div>'),d.addClass(h[g]).find(".ig_form_required_field").parent().removeClass("ig_form_els").css({position:"absolute",left:"-5000px"}).end().end().find(".ig_form_hidden_field").parent().removeClass("ig_form_els").css({display:"none"}),e.append(d),jQuery("<div/>").append(e).html()}return null},Icegram_Message_Type.prototype.render_template=function(){return"function"!=typeof window.icegram.get_template_fn(this.type)&&window.icegram.set_template_fn(this.type,new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+this.template.replace(/[\r\t\n]/g," ").split("{{").join(" ").replace(/((^|\}\})[^\t]*)'/g,"$1\r").replace(/\t=(.*?)\}\}/g,"',$1,'").split(" ").join("');").split("}}").join("p.push('").split("\r").join("\\'")+"');}return p.join('');")),window.icegram.get_template_fn(this.type)(this.data)},Icegram_Message_Type.prototype.pre_render=function(){},Icegram_Message_Type.prototype.post_render=function(){},Icegram_Message_Type.prototype.set_up_show_trigger=function(){if(isNaN(this.data.delay_time))this.show();else if(this.data.delay_time>=0){var a=this;this.timer=setTimeout(function(){a.show()},1e3*this.data.delay_time)}},Icegram_Message_Type.prototype.set_template=function(a){this.template=a},Icegram_Message_Type.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram"><div class="ig_headline">{{=headline}}</div></div>'},Icegram_Message_Type.prototype.show=function(a,b){this.is_visible()||(this.animate("in"),this.pre_show(),this.el.show(a),this.el.addClass("ig_show").removeClass("ig_hide"),b!==!0&&this.track("shown"),this.post_show());var c=this;window.icegram.adjustFormContainerHeight(c)},Icegram_Message_Type.prototype.hide=function(a,b){if(this.is_visible()){var c=this;this.animate("out"),this.pre_hide(),setTimeout(function(){c.el.hasClass("ig_no_hide")||c.el.hide(a),c.el.addClass("ig_hide").removeClass("ig_show")},500),b!==!0&&this.track("closed"),this.post_hide()}},Icegram_Message_Type.prototype.set_position=function(){},Icegram_Message_Type.prototype.add_powered_by=function(a){},Icegram_Message_Type.prototype.pre_show=function(){},Icegram_Message_Type.prototype.post_show=function(){},Icegram_Message_Type.prototype.pre_hide=function(){},Icegram_Message_Type.prototype.post_hide=function(){},Icegram_Message_Type.prototype.track=function(a,b){"function"==typeof window.icegram.track&&(b=b||{},jQuery.extend(b,{message_id:this.data.id,campaign_id:this.data.campaign_id,expiry_time:this.data.expiry_time,expiry_time_clicked:this.data.expiry_time_clicked}),window.icegram.track(a,b))},Icegram_Message_Type.prototype.is_visible=function(){return this.el.hasClass("ig_show")},Icegram_Message_Type.prototype.toggle=function(a){this.is_visible()?this.hide(a):this.show(a)},Icegram_Message_Type.prototype.on_click=function(a){if(a.data=a.data||{self:this},jQuery(a.target).filter(".ig_close").length||jQuery(a.target).parents(".ig_close").length)return void a.data.self.hide();var b=jQuery(a.target).closest(".icegram").find("form:visible").first();(jQuery(a.target).filter(".ig_button, .ig_cta, :submit").length||jQuery(a.target).parents("button[type=submit]").length||jQuery(a.target).filter(".es_submit_button").length||jQuery(a.target).parents(".ig_button, .ig_cta").length&&!(b.find(".ig_button, input[type=button], input[type=submit], button[type=submit]").length>0))&&jQuery(a.target).not(".donot-track").length&&a.data.self.on_cta_click(a)},Icegram_Message_Type.prototype.on_resize=function(a){},Icegram_Message_Type.prototype.on_cta_click=function(a){a.data=a.data||{self:this};var b=jQuery(a.target).closest(".icegram").find("form:visible").first();return jQuery(b).length&&jQuery(b).find(".ig_form_required_field").length&&""!==jQuery(b).find(".ig_form_required_field").val()?(a.preventDefault(),void a.data.self.hide()):(a.data.self.track("clicked"),void(jQuery(b).length?jQuery(b).submit(function(a){jQuery(b).hasClass("ig_form_init_done")&&a.preventDefault()}):"string"==typeof a.data.self.data.link&&""!=a.data.self.data.link?(window.location.href=a.data.self.data.link,a.data.self.hide()):a.data.self.data.hide!==!1&&a.data.self.hide()))},Icegram_Message_Type.prototype.animate=function(a){if("undefined"!=typeof this.data.animation){var b=this.data.animation,c=this;"in"==a?"function"==typeof this.animations[b+"_in"]?this.animations[b+"_in"](c):this.el.hasClass("ig_anim_"+b+"_in")||(this.el.removeClass("ig_anim_"+b+"_out"),setTimeout(function(){c.el.addClass("ig_anim_"+b+"_in")},1)):"out"==a&&("function"==typeof this.animations[b+"_out"]?this.animations[b+"_out"](c):(this.el.removeClass("ig_anim_"+b+"_in"),setTimeout(function(){c.el.addClass("ig_anim_"+b+"_out")},1)))}},String.prototype.ucwords=function(){return this.toLowerCase().replace(/\b[a-z]/g,function(a){return a.toUpperCase()})},Icegram.prototype.adjustFormContainerHeight=function(a){var b="";if(a.el.hasClass("ig_form_left")||a.el.hasClass("ig_form_right")){b=a.el.hasClass("ig_form_left")?"left":"right";var c=a.el.find(".ig_data").outerHeight()>a.el.find(".ig_form_container.layout_"+b).outerHeight()?a.el.find(".ig_data").outerHeight():a.el.find(".ig_form_container.layout_"+b).outerHeight();a.el.find(".ig_form_container").outerHeight(c)}},Icegram.prototype.hexToRgb=function(a){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},Icegram.prototype.rgbToHsl=function(a,b,c){a/=255,b/=255,c/=255;var d,e,f=Math.max(a,b,c),g=Math.min(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i;break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}h=Math.floor(100*h),e=Math.floor(100*e),d=Math.floor(60*d),0>d&&(d+=360)}return{h:d,s:e,l:h}},Icegram.prototype.hexToHsl=function(a){var b=window.icegram.hexToRgb(a);return window.icegram.rgbToHsl(b.r,b.g,b.b)},"function"!=typeof Object.create&&!function(){var a=function(){};Object.create=function(b){if(arguments.length>1)throw Error("Second argument not supported");if(null===b)throw Error("Cannot set a null [[Prototype]]");if("object"!=typeof b)throw TypeError("Argument must be an object");return a.prototype=b,new a}}();var es_responseHandler=function(a){if("undefined"!=typeof icegram){var b=((jQuery(a.target).closest("[id^=icegram_message_]")||{}).attr("id")||"").split("_").pop()||0,c=icegram.get_message_by_id(b)||void 0;"undefined"!=typeof c&&(jQuery(a.target).find(".es_msg_ig").remove(),"form_via_ajax"===c.data.cta&&"success"===a.detail.es_response?(""===c.data.response_text&&(c.data.response_text=a.detail.msg),c.el.trigger("form_success.ig_cta",[c])):"undefined"!=typeof c.data.use_form&&jQuery(a.target).append('<div class="es_msg es_msg_ig">'+a.detail.msg+"</div>"))}};document.addEventListener("es_response",es_responseHandler,!1),void 0!==typeof jQuery.cookie&&!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});;function Icegram_Message_Type_Action_Bar(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Action_Bar.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Action_Bar.prototype.constructor=Icegram_Message_Type_Action_Bar,Icegram_Message_Type_Action_Bar.prototype.get_template_default=function(){return'<div class="icegram action_bar_{{=id}}" ><div class="ig_action_bar ig_container ig_{{=theme}} ig_no_hide" id="icegram_message_{{=id}}"><div class="ig_content ig_clear_fix"><div class="ig_close" id="ig_close_{{=id}}"><span></span></div><div class="ig_form_container layout_left"></div><div class="ig_data ig_clear_fix"><div class="ig_headline">{{=headline}}</div><div class="ig_message">{{=message}}</div></div><div class="ig_button">{{=label}}</div><div class="ig_form_container layout_right layout_bottom"></div></div></div></div>'},Icegram_Message_Type_Action_Bar.prototype.post_render=function(){Icegram_Message_Type.prototype.post_render.apply(this,arguments),void 0!=this.data.use_theme_defaults&&"yes"==this.data.use_theme_defaults||void 0!=this.data.bg_color&&""!=this.data.bg_color&&this.el.find(".ig_close").css("background-color",this.data.bg_color),"21"!==this.data.position&&0==jQuery("#ig_body_pushdown").length&&jQuery("body").prepend('<div id="ig_body_pushdown"></div>')},Icegram_Message_Type_Action_Bar.prototype.set_position=function(){switch(this.data.position){case"21":this.el.addClass("ig_bottom");break;case"01":default:this.el.addClass("ig_top")}},Icegram_Message_Type_Action_Bar.prototype.add_powered_by=function(a){this.el.addClass("ig_has_pwby").find(".ig_content").before('<div class="ig_powered_by" ><a href="'+a.link+'" target="_blank"><img src="'+a.logo+'" title="'+a.text+'"/></a></div>')},Icegram_Message_Type_Action_Bar.prototype.on_click=function(a){return a.data=a.data||{self:this},jQuery(a.target).filter(".ig_show .ig_close, .ig_show .ig_close span").length?void a.data.self.hide():jQuery(a.target).filter(".ig_hide .ig_close, .ig_hide .ig_close span").length?void a.data.self.show():void Icegram_Message_Type.prototype.on_click.apply(this,arguments)},Icegram_Message_Type_Action_Bar.prototype.post_show=function(){if("21"!==this.data.position){var a=this.el.outerHeight()||0;jQuery("#ig_body_pushdown").css("display","block").animate({height:a},500),jQuery("*",document.body).not(".ig_action_bar, .ig_popup, .ig_messenger, .ig_inline, .ig_overlay, .ig_sidebar, .ig_tab, .ig_interstitial ,#ig_body_pushdown ").each(function(){var b=window.getComputedStyle(this,null);("fixed"===b.position||"absolute"===b.position&&("BODY"===this.parentNode.nodeName||"HEADER"===this.nodeName))&&!isNaN(parseInt(b.top,10))&&this.getBoundingClientRect().top<=a&&jQuery(this).data("ig_fx_top",b.top).animate({top:parseInt(b.top,10)+a+"px"},300)})}},Icegram_Message_Type_Action_Bar.prototype.pre_hide=function(){"21"!==this.data.position&&(jQuery("#ig_body_pushdown").animate({height:0},300).css("display","none"),jQuery("*",document.body).not(".ig_action_bar, .ig_popup, .ig_messenger, .ig_inline, .ig_overlay, .ig_sidebar, .ig_tab, .ig_interstitial ,#ig_body_pushdown ").each(function(){"undefined"!=typeof jQuery(this).data("ig_fx_top")&&jQuery(this).animate({top:jQuery(this).data("ig_fx_top")},200)}))};;function Icegram_Message_Type_Messenger(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Messenger.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Messenger.prototype.constructor=Icegram_Message_Type_Messenger,Icegram_Message_Type_Messenger.prototype.get_template_default=function(){return'<div class="icegram ig_messenger ig_{{=theme}} ig_container ig_cta" id="icegram_message_{{=id}}"><div class="ig_content"><div class="ig_close" id="ig_close_{{=id}}"></div><div class="ig_data"><div class="ig_headline">{{=headline}}</div><div class="ig_body"><img class="ig_icon" src="{{=icon}}"/><div class="ig_message">{{=message}}</div></div><div class="ig_footer"></div></div></div></div>'},Icegram_Message_Type_Messenger.prototype.set_position=function(){switch(this.data.position){case"20":this.el.addClass("ig_left ig_bottom");break;case"22":default:this.el.addClass("ig_right ig_bottom")}},Icegram_Message_Type_Messenger.prototype.add_powered_by=function(a){this.el.addClass("ig_has_pwby").find(".ig_content").after('<div class="ig_powered_by"><a href="'+a.link+'" target="_blank">'+a.text+"</a></div>")};;function Icegram_Message_Type_Popup(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Popup.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Popup.prototype.constructor=Icegram_Message_Type_Popup,Icegram_Message_Type_Popup.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram ig_popup ig_{{=theme}} ig_container mfp-hide"><div class="ig_close" id="popup_box_close_{{=id}}"></div><div class="ig_clear_fix" data={{=id}}><div class="ig_bg_overlay"></div><div class="ig_form_container layout_left"></div><div class="ig_data ig_clear_fix"><div class="ig_headline">{{=headline}}</div><div class="ig_content"><div class="ig_message ig_clear_fix">{{=message}}</div></div><div class="ig_button" >{{=label}}</div></div><div class="ig_form_container layout_right layout_bottom"></div></div></div>'},Icegram_Message_Type_Popup.prototype.post_render=function(){Icegram_Message_Type.prototype.post_render.apply(this,arguments),void 0!=this.data.use_theme_defaults&&"yes"==this.data.use_theme_defaults||void 0!=this.data.bg_color&&""!=this.data.bg_color&&this.el.find(".ig_bg_overlay").css("border-color",this.data.bg_color)},Icegram_Message_Type_Popup.prototype.show=function(a,b){if(!this.is_visible()){var c=this,d="#icegram_message_"+this.data.id;this.animate("in"),window.ig_popup=jQuery.magnificPopup,window.ig_popup.open({items:{src:d,type:"inline"},showCloseBtn:!1,callbacks:{close:function(){b!==!0&&c.track("closed"),c.el.removeClass("ig_show")},open:function(){window.icegram.adjustFormContainerHeight(c)}}}),c.el.addClass("ig_show").removeClass("ig_hide"),b!==!0&&this.track("shown")}},Icegram_Message_Type_Popup.prototype.add_powered_by=function(a){setTimeout(function(){jQuery(".mfp-wrap").append('<div class="ig_powered_by"><a href="'+a.link+'" target="_blank">'+a.text+"</a></div>")},1e3+1e3*this.data.delay_time)},Icegram_Message_Type_Popup.prototype.hide=function(a,b){if(this.is_visible()){var c="#icegram_message_"+this.data.id,d=this;this.animate("out"),setTimeout(function(){d.el.addClass("ig_hide").removeClass("ig_show"),jQuery.magnificPopup.close({items:{src:c,type:"inline"}})},500)}},"undefined"==typeof window.ig_popup&&!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),b.st.showCloseBtn&&(!b.st.closeBtnInside||b.currTemplate[b.currItem.type]===!0)&&b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),!d&&"loading"===a&&(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,H&&clearInterval(H),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){H&&clearInterval(H),H=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(H),c++,3===c?e(10):40===c?e(50):100===c&&e(500),void 0)},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:I(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(H&&clearInterval(H),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var J,K=function(){return void 0===J&&(J=void 0!==document.createElement("p").style.MozTransform),J};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return K()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var L="retina";a.magnificPopup.registerModule(L,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+L,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+L,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});;function Icegram_Message_Type_Toast(a){this.width=300,this.sticky=!1,this.duration=1e4,Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Toast.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Toast.prototype.constructor=Icegram_Message_Type_Toast,Icegram_Message_Type_Toast.prototype.get_template_default=function(){return'<li class="icegram ig_toast ig_container ig_{{=theme}} ig_cta" data="{{=id}}" id="icegram_message_{{=id}}"><div class="ig_wrapper"><div class="ig_content"><div class="ig_base"></div><div class="ig_line"></div><img class="ig_icon" src="{{=icon}}"/><div class="ig_headline">{{=headline}}</div><div class="ig_message">{{=message}}</div></div></div></li>'},Icegram_Message_Type_Toast.prototype.pre_render=function(){if("10"!=this.data.position&&"12"!=this.data.position||(this.data.position="20"),jQuery("ul#"+this.data.position).length)var a=jQuery("ul#"+this.data.position);else{var a=jQuery('<ul id="'+this.data.position+'"></ul>').addClass("ig_toast_block").appendTo(this.root_container).hide();a.width(this.width),"00"==this.data.position?a.css({top:"0",left:"0"}).addClass("ig_left").addClass("ig_top"):"01"==this.data.position?a.css({top:"0",left:"50%",margin:"5px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_top"):"02"==this.data.position?a.css({top:"0",right:"0"}).addClass("ig_right").addClass("ig_top"):"20"==this.data.position?a.css({bottom:"0",left:"0"}).addClass("ig_left").addClass("ig_bottom"):"21"==this.data.position?a.css({bottom:"0",left:"50%",margin:"5px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_bottom"):"22"==this.data.position?a.css({bottom:"0",right:"0"}).addClass("ig_right").addClass("ig_bottom"):"11"==this.data.position&&a.css({top:"50%",left:"50%",margin:"-"+this.width/2+"px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_top")}this.root_container=a},Icegram_Message_Type_Toast.prototype.pre_show=function(){!this.root_container.hasClass("active")&&this.root_container.addClass("active").show()},Icegram_Message_Type_Toast.prototype.post_show=function(){var a=this;!this.sticky&&this.duration>0&&setTimeout(function(){a.hide(),a.root_container.children().length||a.root_container.removeClass("active").hide()},this.duration)};
1
+ function Icegram(){}function Icegram_Message_Type(a){var a;this.root_container="#icegram_messages_container",this.data=a,this.type=a.type,this.data.delay_time=parseInt(this.data.delay_time),"string"!=typeof this.data.link||""==this.data.link||/^tel:/i.test(this.data.link)||/^https?:\/\//i.test(this.data.link)||(this.data.link="http://"+this.data.link),this.set_template(this.get_template_default()),jQuery(window).trigger("msg_preinit.icegram",[this]),this.init()}Icegram.prototype.init=function(a){if(void 0!=a){jQuery(window).trigger("preinit.icegram",[a]),this.data=a,this.defaults=jQuery.extend({},a.defaults),this.message_data=a.messages,this.messages,this.tracking_data=[],this.message_template_cache={},this.map_id_to_index={},this.map_type_to_index={},this.mode=void 0==window.ig_mode?"local":window.ig_mode,this.powered_by={link:"https://www.icegram.com/?utm_source=inapp&utm_campaign=poweredby&utm_medium="},this.powered_by.text=this.defaults.powered_by_text,this.powered_by.logo=this.defaults.powered_by_logo,jQuery("body").append('<div id="icegram_messages_container"></div>');this.messages=[];var b=this;this.message_data.length>0&&jQuery.each(this.message_data,function(a,c){try{if(-1==window.location.href.indexOf("campaign_preview_id")){if("yes"==c.retargeting&&1==jQuery.cookie("icegram_campaign_shown_"+c.campaign_id))return;if("yes"==c.retargeting_clicked&&1==jQuery.cookie("icegram_campaign_clicked_"+c.campaign_id))return}"undefined"!==c.ig_mobile_popup&&1==c.ig_mobile_popup&&(c.delay_time=-1);var d=null,e=c.type.split("-").join(" ").ucwords().split(" ").join("_");d="function"==typeof window["Icegram_Message_Type_"+e]?new window["Icegram_Message_Type_"+e](c):new Icegram_Message_Type(c),b.messages.push(d),b.map_id_to_index["_"+c.id]=a,b.map_type_to_index[c.type]=jQuery.isArray(b.map_type_to_index[c.type])?b.map_type_to_index[c.type]:new Array,b.map_type_to_index[c.type].push(a)}catch(f){console.log(f)}}),jQuery(window).on("unload",function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!1)}),setInterval(function(){"function"==typeof window.icegram.submit_tracking_data&&window.icegram.submit_tracking_data(!0)},5e3),jQuery(window).trigger("init.icegram",[this])}},Icegram.prototype.timer_tick=function(){},Icegram.prototype.get_template_fn=function(a){return this.message_template_cache[a]},Icegram.prototype.set_template_fn=function(a,b){this.message_template_cache[a]=b},Icegram.prototype.get_message=function(a){return this.messages.length>a?this.messages[a]:void 0},Icegram.prototype.get_message_by_id=function(a){if(this.map_id_to_index.hasOwnProperty("_"+a)){var b=this.map_id_to_index["_"+a];return this.get_message(b)}},Icegram.prototype.get_message_by_campaign_id=function(a){a=String(a);var b=[],c=this.messages;return a.indexOf(" ")&&(a=a.split(" ")),jQuery.each(a,function(a,d){jQuery.each(c,function(a,c){d==c.data.campaign_id&&b.push(c)})}),b},Icegram.prototype.get_messages_by_type=function(a){if(this.map_type_to_index.hasOwnProperty(a)){var b=this.map_type_to_index[a],c=[];if(jQuery.isArray(b)){var d=this;jQuery.each(b,function(a,b){c.push(d.get_message(b))})}return c}},Icegram.prototype.get_powered_by=function(a){var b=jQuery.extend({},this.powered_by);return b.link=b.link+(a||""),b},Icegram.prototype.track=function(a,b){"object"==typeof b&&b.hasOwnProperty("message_id")&&b.hasOwnProperty("campaign_id")&&-1==b.message_id.indexOf("_00")&&(jQuery(window).trigger("track.icegram",[a,b]),this.tracking_data.push({type:a,params:b}))},Icegram.prototype.submit_tracking_data=function(a){var b=window.location.protocol.split(":"),c=b[0],d=this.data.ajax_url.split("://"),e=d[0];if(this.tracking_data.length>0&&-1==window.location.href.indexOf("campaign_preview_id")&&!this.is_bot()){var f={type:"POST",url:this.data.ajax_url,async:a||!1,data:{action:"icegram_event_track",event_data:JSON.parse(JSON.stringify(this.tracking_data)),ig_remote_url:"remote"==this.mode?window.location.href:void 0},success:function(a,b,c){},error:function(a,b,c){}};"remote"==this.mode?(f.xhrFields={withCredentials:!0},f.crossDomain=!0,f.async=!0):c!=e&&(f.xhrFields={withCredentials:!0},jQuery.extend(f.data,{ig_local_url_cs:window.location.href})),jQuery.ajax(f),this.tracking_data=[]}},Icegram.prototype.is_bot=function(){var a=/bot|spider|crawl|sucker|ia_archiver|alexa|spade|slurp|webbug|ZyBorg|Feedfetcher-Google|Mediapartners-Google|aolserver|seamonkey|binlar|casper|comodo|feedfinder|jakarta|java|larbin|libwww|pycurl|linkwalker|steeler|nutch|turnit|zmeu/i;return!!a.test(navigator.userAgent)},Icegram.prototype.hide_all_messages=function(){this.messages.length>0&&jQuery.each(this.messages,function(a,b){b.hide()})},Icegram_Message_Type.prototype.init=function(){this.render(),this.add_event_handlers()},Icegram_Message_Type.prototype.add_event_handlers=function(){this.el.on("click",{self:this},this.on_click),jQuery(window).on("resize",{self:this},this.on_resize)},Icegram_Message_Type.prototype.animations={},Icegram_Message_Type.prototype.embed_form=function(){if(-1===jQuery.inArray(this.data.type,["toast","badge","ribbon","exit-redirect"])){var a=null,b=this.data.form_layout,c=this.data.form_has_label,d=this.data.form_style||"none",e=this.data.label||void 0;if(d=d.toLowerCase().replace(" ","_"),void 0!=this.data.use_form&&"yes"==this.data.use_form&&(a=this.data.form_html),this.el.find("form.ig_embed_form").length>0){var f=this.el.find("form.ig_embed_form");b="inline",-1===jQuery.inArray(this.data.type,["messenger","tab","sidebar","interstitial","sticky"])&&(f.hasClass("ig_left")?b="left":f.hasClass("ig_right")&&(b="right")),"inline"==b&&this.el.find("form.ig_embed_form").replaceWith('<div class="ig_form_container layout_inline"></div>'),c=f.find(".ig_form_el_group label").length>0?"yes":void 0,0==f.find(".ig_button").length&&0==f.find("button[type=submit]").length&&(e=e||"Submit",f.append('<input class="ig_button" type="submit" value="'+e+'">')),a=jQuery("<div/>").append(f).html()}if(null==a)this.el.find(".ig_form_container").remove();else{var g=window.icegram.formProcess(this,a);if(g&&0==this.el.find(".ig_form_container form").length){var h=void 0!=this.data.form_header&&""!=this.data.form_header?'<div class="ig_form_header">'+this.data.form_header+"</div>":"",i=void 0!=this.data.form_footer&&""!=this.data.form_footer?'<div class="ig_form_footer">'+this.data.form_footer+"</div>":"",j=jQuery("<div/>").html(a);if(this.el.find(".ig_form_container").append(h).append(g).append(i),this.data.rainmaker_form_code&&""!=this.data.rainmaker_form_code){this.data.cta&&"form"!==this.data.cta&&this.data.show_response&&this.data.response_text&&(!this.data.response_text||""!=this.data.response_text)||(this.data.response_text=j.find(".rm_form_message").html()||""),this.el.find(".ig_form_container").addClass(j.find(".rm_form_container").data("type")).data("form-id",j.find(".rm_form_container").data("form-id")).addClass("rainmaker_form");var k=j.find("#rm_script"),l=j.find("#rm_style");this.el.find(".ig_form_container").prepend(l).append(k);var m=j.find(".rm_captcha"),n=j.find(".rm_form_error_message");this.el.find(".ig_form_container form").prepend(n).append(m)}void 0==c?this.el.find(".ig_el_label").not("span.ig_el_label").remove():(this.el.find("input, textarea").removeAttr("placeholder"),this.el.find("select option.ig_el_placeholder").remove()),this.el.find(".ig_form_container .ig_button").length>0&&(this.el.find(".ig_button").not(".ig_form_container .ig_button").hide(),e=e||this.el.find(".ig_button").val()||"Submit",this.el.find(".ig_button").val(e)),this.el.addClass("ig_form_"+b);var o="";void 0!=this.data.form_bg_color&&""!=this.data.form_bg_color?(this.el.find(".ig_form_container").css("background-color",this.data.form_bg_color),o+=".ig_form_"+b+".ig_form_"+d+" .ig_form_container:before{ background-color:"+this.data.form_bg_color+"; border-color:"+this.data.form_bg_color+";}"):o+=".ig_form_"+b+".ig_form_"+d+" .ig_form_container:before{ display:none;}",void 0!=this.data.form_text_color&&""!=this.data.form_text_color&&this.el.find(".ig_form_container").css("color",this.data.form_text_color),this.el.addClass("ig_form_"+d).find(".ig_form_container").prepend('<style type="text/css">'+o+"</style>"),jQuery.each(this.el.find(".ig_form_container")||[],function(a,b){jQuery(b).find(".ig_form_els").first().addClass("ig_form_els_first").end().last().addClass("ig_form_els_last")})}}}},Icegram_Message_Type.prototype.render=function(){this.pre_render();var a=this.render_template();try{jQuery(this.root_container).append(a)}catch(b){}this.dom_id="icegram_message_"+this.data.id,this.el=jQuery("#"+this.dom_id),this.set_position();var c=window.icegram.get_powered_by(this.type);if(c.hasOwnProperty("link")&&c.hasOwnProperty("text")&&""!=c.text&&this.add_powered_by(c),void 0!=this.data.headline&&""!=this.data.headline||this.el.find(".ig_headline").hide(),void 0!=this.data.icon&&""!=this.data.icon||this.el.addClass("ig_no_icon").find(".ig_icon").remove(),void 0!=this.data.message&&""!=this.data.message||this.el.find(".ig_message").hide(),void 0!=this.data.label&&""!=this.data.label||this.el.find(".ig_button").hide(),this.embed_form(),void 0==this.data.use_theme_defaults||"yes"!=this.data.use_theme_defaults){if(void 0!=this.data.text_color&&""!=this.data.text_color&&(this.el.css("color",this.data.text_color),this.el.find(".ig_container").css("color",this.data.text_color)),void 0!=this.data.bg_color&&""!=this.data.bg_color&&(this.el.css("background-color",this.data.bg_color),this.el.find(".ig_container").css("background-color",this.data.bg_color)),void 0!=this.data.cta_bg_color&&""!=this.data.cta_bg_color){this.el.find('.ig_button, form input[type="submit"]').css("background-color",this.data.cta_bg_color);var d=window.icegram.hexToHsl(this.data.cta_bg_color);this.el.find('.ig_button, form input[type="submit"]').css("border-color","hsl("+d.h+","+(d.s-5)+"%,"+(d.l-8)+"%)")}void 0!=this.data.cta_text_color&&""!=this.data.cta_text_color&&this.el.find('.ig_button, form input[type="submit"]').css("color",this.data.cta_text_color)}this.data.use_custom_code&&this.data.custom_css&&this.el.prepend('<style id="ig_custom_css_'+this.data.id+'" type="text/css">'+this.data.custom_css.replace(/#ig_this_message/g,"#"+this.dom_id)+"</style>"),"string"==typeof this.data.link&&""!=this.data.link&&this.el.parent().find(".ig_cta, .ig_button").css("cursor","pointer"),this.post_render(),this.hide({},!0),this.set_up_show_trigger()},Icegram.prototype.formProcess=function(a,b){var c=jQuery("<div/>").html(b).find('input[name="fake_text"]').data("required_field",!0).end().find("input.rm_required_feild").data("required_field",!0).end().find(".gform_validation_container input").data("required_field",!0).end().find(".rm_captcha_input").data("keep_class",!0).end().find(".required_field").data("required_field",!0).end().find("input, label, select, textarea, button").not(".rm_captcha_input, .rm_captcha_verify").not("br");if(c.length>0){var d=jQuery('<div class="ig_embed_form_container ig_clear_fix"></div>'),e=jQuery("<div/>").html(b).find("form").removeAttr("class").removeAttr("style").addClass("ig_clear_fix").empty(),f=".",g=0;jQuery.each(c,function(a,b){var c=jQuery(b),e=jQuery('<div class="ig_form_els"></div>');if(c.removeAttr("style"),c.data("keep_class")||c.removeAttr("class"),(-1==c.attr("tabindex")||c.is('*[name*="[abs]"]')||c.data("required_field")||"data[email]"==c.attr("name")||"_mc4wp_required_but_not_really"==c.attr("name"))&&(c.addClass("ig_form_required_field").removeData("required_field"),g--),"hidden"!=c.attr("type")&&c.prop("disabled")!==!0||(c.addClass("ig_form_hidden_field"),g--),c.is("label"))f=c.not("input, select, textarea, button, span, br").text().replace(/\s+/g," ")||".";else if((c.is("input")||c.is("button")||c.is("textarea")||c.is("select"))&&!c.is("input[type=radio]")){if(c.removeAttr("id"),c.is("button")){var h=c.not("br, span, div").text().trim()||"";c.remove(),c=jQuery('<input type="submit" value="'+h+'">')}!c.is("input[type=submit]")&&!c.is("input[type=button]")||c.is(".ig_form_hidden_field, .ig_form_required_field")||c.addClass("ig_button"),(c.is("input[type=text]")||c.is("input[type=email]"))&&c.attr("size",25),label_class="ig_el_label ig_button_label","."!=f&&(label_class="ig_el_label",c.is("select")?jQuery('<option class="ig_el_placeholder">'+f+"</option>").prependTo(c):c.attr("placeholder",f)),jQuery('<label class="'+label_class+'">'+f+"</label>").appendTo(e),f=".",e.append(c),d.append(e),g++}else c.is("input[type=radio]")&&(label_class="ig_el_label ig_button_label","."!=f&&(label_class="ig_el_label"),jQuery('<label><span class="'+label_class+'">'+f+"</span></label>").prepend(c).appendTo(e),f=".",e.addClass("ig_form_el_radio"),d.append(e),g++)});var h=["","ig_full","ig_half","ig_third","ig_quater"];return g=4>g?g:4,d.find(".ig_form_required_field").length<=0&&d.append('<div class="ig_form_els"><input class="ig_form_required_field" type="text" tabindex="-1" value="" /></div>'),d.addClass(h[g]).find(".ig_form_required_field").parent().removeClass("ig_form_els").css({position:"absolute",left:"-5000px"}).end().end().find(".ig_form_hidden_field").parent().removeClass("ig_form_els").css({display:"none"}),e.append(d),jQuery("<div/>").append(e).html()}return null},Icegram_Message_Type.prototype.render_template=function(){return"function"!=typeof window.icegram.get_template_fn(this.type)&&window.icegram.set_template_fn(this.type,new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+this.template.replace(/[\r\t\n]/g," ").split("{{").join(" ").replace(/((^|\}\})[^\t]*)'/g,"$1\r").replace(/\t=(.*?)\}\}/g,"',$1,'").split(" ").join("');").split("}}").join("p.push('").split("\r").join("\\'")+"');}return p.join('');")),window.icegram.get_template_fn(this.type)(this.data)},Icegram_Message_Type.prototype.pre_render=function(){},Icegram_Message_Type.prototype.post_render=function(){},Icegram_Message_Type.prototype.set_up_show_trigger=function(){if(isNaN(this.data.delay_time))this.show();else if(this.data.delay_time>=0){var a=this;this.timer=setTimeout(function(){a.show()},1e3*this.data.delay_time)}},Icegram_Message_Type.prototype.set_template=function(a){this.template=a},Icegram_Message_Type.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram"><div class="ig_headline">{{=headline}}</div></div>'},Icegram_Message_Type.prototype.show=function(a,b){this.is_visible()||(this.animate("in"),this.pre_show(),this.el.show(a),this.el.addClass("ig_show").removeClass("ig_hide"),b!==!0&&this.track("shown"),this.post_show());var c=this;window.icegram.adjustFormContainerHeight(c)},Icegram_Message_Type.prototype.hide=function(a,b){if(this.is_visible()){var c=this;this.animate("out"),this.pre_hide(),setTimeout(function(){c.el.hasClass("ig_no_hide")||c.el.hide(a),c.el.addClass("ig_hide").removeClass("ig_show")},500),b!==!0&&this.track("closed"),this.post_hide()}},Icegram_Message_Type.prototype.set_position=function(){},Icegram_Message_Type.prototype.add_powered_by=function(a){},Icegram_Message_Type.prototype.pre_show=function(){},Icegram_Message_Type.prototype.post_show=function(){},Icegram_Message_Type.prototype.pre_hide=function(){},Icegram_Message_Type.prototype.post_hide=function(){},Icegram_Message_Type.prototype.track=function(a,b){"function"==typeof window.icegram.track&&(b=b||{},jQuery.extend(b,{message_id:this.data.id,campaign_id:this.data.campaign_id,expiry_time:this.data.expiry_time,expiry_time_clicked:this.data.expiry_time_clicked}),window.icegram.track(a,b))},Icegram_Message_Type.prototype.is_visible=function(){return this.el.hasClass("ig_show")},Icegram_Message_Type.prototype.toggle=function(a){this.is_visible()?this.hide(a):this.show(a)},Icegram_Message_Type.prototype.on_click=function(a){if(a.data=a.data||{self:this},jQuery(a.target).filter(".ig_close").length||jQuery(a.target).parents(".ig_close").length)return void a.data.self.hide();var b=jQuery(a.target).closest(".icegram").find("form:visible").first();(jQuery(a.target).filter(".ig_button, .ig_cta, :submit").length||jQuery(a.target).parents("button[type=submit]").length||jQuery(a.target).filter(".es_submit_button").length||jQuery(a.target).parents(".ig_button, .ig_cta").length&&!(b.find(".ig_button, input[type=button], input[type=submit], button[type=submit]").length>0))&&jQuery(a.target).not(".donot-track").length&&a.data.self.on_cta_click(a)},Icegram_Message_Type.prototype.on_resize=function(a){},Icegram_Message_Type.prototype.on_cta_click=function(a){a.data=a.data||{self:this};var b=jQuery(a.target).closest(".icegram").find("form:visible").first();return jQuery(b).length&&jQuery(b).find(".ig_form_required_field").length&&""!==jQuery(b).find(".ig_form_required_field").val()?(a.preventDefault(),void a.data.self.hide()):(a.data.self.track("clicked"),void(jQuery(b).length?jQuery(b).submit(function(a){jQuery(b).hasClass("ig_form_init_done")&&a.preventDefault()}):"string"==typeof a.data.self.data.link&&""!=a.data.self.data.link?(window.location.href=a.data.self.data.link,a.data.self.hide()):a.data.self.data.hide!==!1&&a.data.self.hide()))},Icegram_Message_Type.prototype.animate=function(a){if("undefined"!=typeof this.data.animation){var b=this.data.animation,c=this;"in"==a?"function"==typeof this.animations[b+"_in"]?this.animations[b+"_in"](c):this.el.hasClass("ig_anim_"+b+"_in")||(this.el.removeClass("ig_anim_"+b+"_out"),setTimeout(function(){c.el.addClass("ig_anim_"+b+"_in")},1)):"out"==a&&("function"==typeof this.animations[b+"_out"]?this.animations[b+"_out"](c):(this.el.removeClass("ig_anim_"+b+"_in"),setTimeout(function(){c.el.addClass("ig_anim_"+b+"_out")},1)))}},String.prototype.ucwords=function(){return this.toLowerCase().replace(/\b[a-z]/g,function(a){return a.toUpperCase()})},Icegram.prototype.adjustFormContainerHeight=function(a){var b="";if(a.el.hasClass("ig_form_left")||a.el.hasClass("ig_form_right")){b=a.el.hasClass("ig_form_left")?"left":"right";var c=a.el.find(".ig_data").outerHeight()>a.el.find(".ig_form_container.layout_"+b).outerHeight()?a.el.find(".ig_data").outerHeight():a.el.find(".ig_form_container.layout_"+b).outerHeight();a.el.find(".ig_form_container").outerHeight(c)}},Icegram.prototype.hexToRgb=function(a){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},Icegram.prototype.rgbToHsl=function(a,b,c){a/=255,b/=255,c/=255;var d,e,f=Math.max(a,b,c),g=Math.min(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i;break;case b:d=(c-a)/i+2;break;case c:d=(a-b)/i+4}h=Math.floor(100*h),e=Math.floor(100*e),d=Math.floor(60*d),0>d&&(d+=360)}return{h:d,s:e,l:h}},Icegram.prototype.hexToHsl=function(a){var b=window.icegram.hexToRgb(a);return window.icegram.rgbToHsl(b.r,b.g,b.b)},"function"!=typeof Object.create&&!function(){var a=function(){};Object.create=function(b){if(arguments.length>1)throw Error("Second argument not supported");if(null===b)throw Error("Cannot set a null [[Prototype]]");if("object"!=typeof b)throw TypeError("Argument must be an object");return a.prototype=b,new a}}();var es_responseHandler=function(a){if("undefined"!=typeof icegram){var b=((jQuery(a.target).closest("[id^=icegram_message_]")||{}).attr("id")||"").split("_").pop()||0,c=icegram.get_message_by_id(b)||void 0;"undefined"!=typeof c&&(jQuery(a.target).find(".es_msg_ig").remove(),"form_via_ajax"===c.data.cta&&"success"===a.detail.es_response?(""===c.data.response_text&&(c.data.response_text=a.detail.msg),c.el.trigger("form_success.ig_cta",[c])):"undefined"!=typeof c.data.use_form&&jQuery(a.target).append('<div class="es_msg es_msg_ig">'+a.detail.msg+"</div>"))}};document.addEventListener("es_response",es_responseHandler,!1),void 0!==typeof jQuery.cookie&&!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});;function Icegram_Message_Type_Action_Bar(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Action_Bar.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Action_Bar.prototype.constructor=Icegram_Message_Type_Action_Bar,Icegram_Message_Type_Action_Bar.prototype.get_template_default=function(){return'<div class="icegram action_bar_{{=id}}" ><div class="ig_action_bar ig_container ig_{{=theme}} ig_no_hide" id="icegram_message_{{=id}}"><div class="ig_content ig_clear_fix"><div class="ig_close" id="ig_close_{{=id}}"><span></span></div><div class="ig_form_container layout_left"></div><div class="ig_data ig_clear_fix"><div class="ig_headline">{{=headline}}</div><div class="ig_message">{{=message}}</div></div><div class="ig_button">{{=label}}</div><div class="ig_form_container layout_right layout_bottom"></div></div></div></div>'},Icegram_Message_Type_Action_Bar.prototype.post_render=function(){Icegram_Message_Type.prototype.post_render.apply(this,arguments),void 0!=this.data.use_theme_defaults&&"yes"==this.data.use_theme_defaults||void 0!=this.data.bg_color&&""!=this.data.bg_color&&this.el.find(".ig_close").css("background-color",this.data.bg_color),"21"!==this.data.position&&0==jQuery("#ig_body_pushdown").length&&jQuery("body").prepend('<div id="ig_body_pushdown"></div>')},Icegram_Message_Type_Action_Bar.prototype.set_position=function(){switch(this.data.position){case"21":this.el.addClass("ig_bottom");break;case"01":default:this.el.addClass("ig_top")}},Icegram_Message_Type_Action_Bar.prototype.add_powered_by=function(a){this.el.addClass("ig_has_pwby").find(".ig_content").before('<div class="ig_powered_by" ><a href="'+a.link+'" target="_blank"><img src="'+a.logo+'" title="'+a.text+'"/></a></div>')},Icegram_Message_Type_Action_Bar.prototype.on_click=function(a){return a.data=a.data||{self:this},jQuery(a.target).filter(".ig_show .ig_close, .ig_show .ig_close span").length?void a.data.self.hide():jQuery(a.target).filter(".ig_hide .ig_close, .ig_hide .ig_close span").length?void a.data.self.show():void Icegram_Message_Type.prototype.on_click.apply(this,arguments)},Icegram_Message_Type_Action_Bar.prototype.post_show=function(){if("21"!==this.data.position){var a=this.el.outerHeight()||0;jQuery("#ig_body_pushdown").css("display","block").animate({height:a},500),jQuery("*",document.body).not(".ig_action_bar, .ig_popup, .ig_messenger, .ig_inline, .ig_overlay, .ig_sidebar, .ig_tab, .ig_interstitial ,#ig_body_pushdown ").each(function(){var b=window.getComputedStyle(this,null);("fixed"===b.position||"absolute"===b.position&&("BODY"===this.parentNode.nodeName||"HEADER"===this.nodeName))&&!isNaN(parseInt(b.top,10))&&this.getBoundingClientRect().top<=a&&jQuery(this).data("ig_fx_top",b.top).animate({top:parseInt(b.top,10)+a+"px"},300)})}},Icegram_Message_Type_Action_Bar.prototype.pre_hide=function(){"21"!==this.data.position&&(jQuery("#ig_body_pushdown").animate({height:0},300).css("display","none"),jQuery("*",document.body).not(".ig_action_bar, .ig_popup, .ig_messenger, .ig_inline, .ig_overlay, .ig_sidebar, .ig_tab, .ig_interstitial ,#ig_body_pushdown ").each(function(){"undefined"!=typeof jQuery(this).data("ig_fx_top")&&jQuery(this).animate({top:jQuery(this).data("ig_fx_top")},200)}))};;function Icegram_Message_Type_Messenger(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Messenger.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Messenger.prototype.constructor=Icegram_Message_Type_Messenger,Icegram_Message_Type_Messenger.prototype.get_template_default=function(){return'<div class="icegram ig_messenger ig_{{=theme}} ig_container ig_cta" id="icegram_message_{{=id}}"><div class="ig_content"><div class="ig_close" id="ig_close_{{=id}}"></div><div class="ig_data"><div class="ig_headline">{{=headline}}</div><div class="ig_body"><img class="ig_icon" src="{{=icon}}"/><div class="ig_message">{{=message}}</div></div><div class="ig_footer"></div></div></div></div>'},Icegram_Message_Type_Messenger.prototype.set_position=function(){switch(this.data.position){case"20":this.el.addClass("ig_left ig_bottom");break;case"22":default:this.el.addClass("ig_right ig_bottom")}},Icegram_Message_Type_Messenger.prototype.add_powered_by=function(a){this.el.addClass("ig_has_pwby").find(".ig_content").after('<div class="ig_powered_by"><a href="'+a.link+'" target="_blank">'+a.text+"</a></div>")};;function Icegram_Message_Type_Popup(a){Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Popup.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Popup.prototype.constructor=Icegram_Message_Type_Popup,Icegram_Message_Type_Popup.prototype.get_template_default=function(){return'<div id="icegram_message_{{=id}}" class="icegram ig_popup ig_{{=theme}} ig_container mfp-hide"><div class="ig_close" id="popup_box_close_{{=id}}"></div><div class="ig_clear_fix" data={{=id}}><div class="ig_bg_overlay"></div><div class="ig_form_container layout_left"></div><div class="ig_data ig_clear_fix"><div class="ig_headline">{{=headline}}</div><div class="ig_content"><div class="ig_message ig_clear_fix">{{=message}}</div></div><div class="ig_button" >{{=label}}</div></div><div class="ig_form_container layout_right layout_bottom"></div></div></div>'},Icegram_Message_Type_Popup.prototype.post_render=function(){Icegram_Message_Type.prototype.post_render.apply(this,arguments),void 0!=this.data.use_theme_defaults&&"yes"==this.data.use_theme_defaults||void 0!=this.data.bg_color&&""!=this.data.bg_color&&this.el.find(".ig_bg_overlay").css("border-color",this.data.bg_color)},Icegram_Message_Type_Popup.prototype.show=function(a,b){if(!this.is_visible()){var c=this,d="#icegram_message_"+this.data.id;this.animate("in"),window.ig_popup=jQuery.magnificPopup,window.ig_popup.open({items:{src:d,type:"inline"},showCloseBtn:!1,callbacks:{close:function(){b!==!0&&c.track("closed"),c.el.removeClass("ig_show")},open:function(){window.icegram.adjustFormContainerHeight(c)}}}),c.el.addClass("ig_show").removeClass("ig_hide"),b!==!0&&this.track("shown")}},Icegram_Message_Type_Popup.prototype.add_powered_by=function(a){setTimeout(function(){jQuery(".mfp-wrap").append('<div class="ig_powered_by"><a href="'+a.link+'" target="_blank">'+a.text+"</a></div>")},1e3+1e3*this.data.delay_time)},Icegram_Message_Type_Popup.prototype.hide=function(a,b){if(this.is_visible()){var c="#icegram_message_"+this.data.id,d=this;this.animate("out"),setTimeout(function(){d.el.addClass("ig_hide").removeClass("ig_show"),jQuery.magnificPopup.close({items:{src:c,type:"inline"}})},500)}},"undefined"==typeof window.ig_popup&&!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),b.st.showCloseBtn&&(!b.st.closeBtnInside||b.currTemplate[b.currItem.type]===!0)&&b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),!d&&"loading"===a&&(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,H&&clearInterval(H),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){H&&clearInterval(H),H=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(H),c++,3===c?e(10):40===c?e(50):100===c&&e(500),void 0)},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:I(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(H&&clearInterval(H),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var J,K=function(){return void 0===J&&(J=void 0!==document.createElement("p").style.MozTransform),J};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return K()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var L="retina";a.magnificPopup.registerModule(L,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+L,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+L,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});;function Icegram_Message_Type_Toast(a){this.width=300,this.sticky=!1,this.duration=1e4,Icegram_Message_Type.apply(this,arguments)}Icegram_Message_Type_Toast.prototype=Object.create(Icegram_Message_Type.prototype),Icegram_Message_Type_Toast.prototype.constructor=Icegram_Message_Type_Toast,Icegram_Message_Type_Toast.prototype.get_template_default=function(){return'<li class="icegram ig_toast ig_container ig_{{=theme}} ig_cta" data="{{=id}}" id="icegram_message_{{=id}}"><div class="ig_wrapper"><div class="ig_content"><div class="ig_base"></div><div class="ig_line"></div><img class="ig_icon" src="{{=icon}}"/><div class="ig_headline">{{=headline}}</div><div class="ig_message">{{=message}}</div></div></div></li>'},Icegram_Message_Type_Toast.prototype.pre_render=function(){if("10"!=this.data.position&&"12"!=this.data.position||(this.data.position="20"),jQuery("ul#"+this.data.position).length)var a=jQuery("ul#"+this.data.position);else{var a=jQuery('<ul id="'+this.data.position+'"></ul>').addClass("ig_toast_block").appendTo(this.root_container).hide();a.width(this.width),"00"==this.data.position?a.css({top:"0",left:"0"}).addClass("ig_left").addClass("ig_top"):"01"==this.data.position?a.css({top:"0",left:"50%",margin:"5px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_top"):"02"==this.data.position?a.css({top:"0",right:"0"}).addClass("ig_right").addClass("ig_top"):"20"==this.data.position?a.css({bottom:"0",left:"0"}).addClass("ig_left").addClass("ig_bottom"):"21"==this.data.position?a.css({bottom:"0",left:"50%",margin:"5px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_bottom"):"22"==this.data.position?a.css({bottom:"0",right:"0"}).addClass("ig_right").addClass("ig_bottom"):"11"==this.data.position&&a.css({top:"50%",left:"50%",margin:"-"+this.width/2+"px 0 0 -"+this.width/2+"px"}).addClass("ig_center").addClass("ig_top")}this.root_container=a},Icegram_Message_Type_Toast.prototype.pre_show=function(){!this.root_container.hasClass("active")&&this.root_container.addClass("active").show()},Icegram_Message_Type_Toast.prototype.post_show=function(){var a=this;!this.sticky&&this.duration>0&&setTimeout(function(){a.hide(),a.root_container.children().length||a.root_container.removeClass("active").hide()},this.duration)};
icegram.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
- * Version: 1.10.11
7
  * Author: icegram
8
  * Author URI: https://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
@@ -34,7 +34,7 @@ class Icegram {
34
 
35
  function __construct() {
36
 
37
- $this->version = "1.10.11";
38
  $this->shortcode_instances = array();
39
  $this->mode = 'local';
40
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
@@ -51,7 +51,7 @@ class Icegram {
51
 
52
  add_action( 'admin_menu', array( &$this, 'admin_menus') );
53
  add_action( 'admin_init', array( &$this, 'welcome' ) );
54
- add_action( 'admin_init', array( &$this, 'dismiss_admin_notice' ) );
55
 
56
  add_action( 'admin_init', array( &$this, 'import_gallery_item' ) );
57
 
@@ -151,15 +151,15 @@ class Icegram {
151
  public function add_admin_notices(){
152
  $screen = get_current_screen();
153
  if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message','edit-ig_message','edit-ig_campaign' ), true ) ) return;
154
- include_once('ig-offer.php');
155
  }
156
  public function dismiss_admin_notice(){
157
- if(isset($_GET['ig_dismiss_admin_notice']) && $_GET['ig_dismiss_admin_notice'] == '1' && isset($_GET['ig_option_name'])){
158
- $option_name = sanitize_text_field($_GET['ig_option_name']);
159
- update_option($option_name.'_icegram', true);
160
- header("Location: https://www.icegram.com/pricing?utm_source=in-app&utm_medium=banner&utm_campaign=halloween2017");
161
- exit();
162
- }
163
  }
164
  public function klawoo_subscribe_form() {
165
  ?>
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 1.10.12
7
  * Author: icegram
8
  * Author URI: https://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
34
 
35
  function __construct() {
36
 
37
+ $this->version = "1.10.12";
38
  $this->shortcode_instances = array();
39
  $this->mode = 'local';
40
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
51
 
52
  add_action( 'admin_menu', array( &$this, 'admin_menus') );
53
  add_action( 'admin_init', array( &$this, 'welcome' ) );
54
+ // add_action( 'admin_init', array( &$this, 'dismiss_admin_notice' ) );
55
 
56
  add_action( 'admin_init', array( &$this, 'import_gallery_item' ) );
57
 
151
  public function add_admin_notices(){
152
  $screen = get_current_screen();
153
  if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message','edit-ig_message','edit-ig_campaign' ), true ) ) return;
154
+ include_once('ig-survey.php');
155
  }
156
  public function dismiss_admin_notice(){
157
+ // if(isset($_GET['ig_dismiss_admin_notice']) && $_GET['ig_dismiss_admin_notice'] == '1' && isset($_GET['ig_option_name'])){
158
+ // $option_name = sanitize_text_field($_GET['ig_option_name']);
159
+ // update_option($option_name.'_icegram', true);
160
+ // header("Location: https://www.icegram.com/pricing?utm_source=in-app&utm_medium=banner&utm_campaign=halloween2017");
161
+ // exit();
162
+ // }
163
  }
164
  public function klawoo_subscribe_form() {
165
  ?>
ig-offer.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- $screen = get_current_screen();
3
- if ( !in_array( $screen->id, array( 'ig_campaign', 'ig_message','edit-ig_message','edit-ig_campaign' ), true ) ) return;
4
- if( get_option('ig_offer_accepted_icegram') == 1 ) return;
5
- ?>
6
- <style type="text/css">
7
- .ig-offer-container {
8
- background-color: rgb(77,14,39) !important;
9
- margin-top: 1%;
10
- padding: 1em 1em 0.5em 1.6em;
11
- box-shadow: 0 0 7px 0 rgba(0, 0, 0, .2);
12
- color: rgb(200,195,210);
13
- font-size: 1.1em;
14
- height: auto;
15
- max-width: 35%;
16
- margin: 1% auto;
17
- text-align: center;
18
- }
19
- .ig-offer-wrapper {
20
- margin-bottom:0.4em;
21
- }
22
- .ig-btn-wrapper{
23
- margin: 2em 0;
24
- }
25
- </style>
26
- <div class="ig-offer-container wrap">
27
- <div class="ig-offer-wrapper">
28
- <div class="ig-offer-headline">
29
- <div class="ig-mainheadline"><img src="<?php echo $this->plugin_url ?>/assets/images/halloween.png"/></div>
30
- <div class="" style=" font-size: 1.5em;line-height: 1.4; margin: 1.6em 0;">
31
- BOO!!! It's the Halloween sale.<br/> Get <span style="color:#fff;font-weight:bold">flat 20% Off</span> on any Icegram plan. <br/><br/>
32
- Use coupon code <span style="color:#fff;font-weight:bold">HALLOWEEN17</span> during checkout!<br/>
33
- Offer ends on 31st October, 2017.
34
- </div>
35
- <div class="ig-btn-wrapper">
36
- <a href="?ig_dismiss_admin_notice=1&ig_option_name=ig_offer_accepted" class="btn" style="cursor:pointer;background: #e94e21;background-image: linear-gradient(to bottom, #e94e21, #ef3124);-webkit-border-radius: 28;-moz-border-radius: 28;border-radius: 27px;font-family: sans-serif;color: #ffffff;font-size: 2em;padding: 0.3em 1.2em;text-decoration: none;">SHOP NOW</a>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ig-survey.php CHANGED
@@ -14,13 +14,7 @@ if(!defined('IG_SURVEY_TDOMAIN')) define('IG_SURVEY_TDOMAIN', 'icegram');
14
 
15
  $date_diff = floor( ( strtotime($ig_current_date) - strtotime($ig_update_date) ) / (3600 * 24) );
16
  if($date_diff < 5) return;
17
-
18
- // $home_url = home_url();
19
- // $strlen = strlen($home_url);
20
- // $res = $strlen%10;
21
- // if( $res != 1 ){
22
- // return;
23
- // }
24
  $ig_data = Icegram::ig_get_survey_data();
25
  $publish_days_diff = human_time_diff(strtotime($ig_data['ig_last_publish_campaign']),strtotime($ig_current_date));
26
  $edit_days_diff = human_time_diff(strtotime($ig_data['ig_last_modified_campaign']),strtotime($ig_current_date));
14
 
15
  $date_diff = floor( ( strtotime($ig_current_date) - strtotime($ig_update_date) ) / (3600 * 24) );
16
  if($date_diff < 5) return;
17
+
 
 
 
 
 
 
18
  $ig_data = Icegram::ig_get_survey_data();
19
  $publish_days_diff = human_time_diff(strtotime($ig_data['ig_last_publish_campaign']),strtotime($ig_current_date));
20
  $edit_days_diff = human_time_diff(strtotime($ig_data['ig_last_modified_campaign']),strtotime($ig_current_date));
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: icegram, storeapps, niravmehta, sandhyam, ravioza, putler
3
  Donate link: https://www.icegram.com/
4
  Tags: popup, Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
- Tested up to: 4.8.1
7
- Stable tag: 1.10.11
8
  License: GPLv3
9
 
10
  The best WP popup plugin that let's you create a popup within seconds. Customize, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
@@ -217,6 +217,9 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
217
  5. Target your Icegram message using these display rules
218
 
219
  == Upgrade Notice ==
 
 
 
220
  = 1.10.11 =
221
  Added Halloween Gallery templates
222
 
@@ -408,6 +411,9 @@ Initial Release
408
 
409
 
410
  == Changelog ==
 
 
 
411
  = 1.10.11 =
412
  * New: Added Halloween Gallery templates
413
 
3
  Donate link: https://www.icegram.com/
4
  Tags: popup, Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
+ Tested up to: 4.8.3
7
+ Stable tag: 1.10.12
8
  License: GPLv3
9
 
10
  The best WP popup plugin that let's you create a popup within seconds. Customize, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
217
  5. Target your Icegram message using these display rules
218
 
219
  == Upgrade Notice ==
220
+ = 1.10.12 =
221
+ Compatibility with MailPoet 3
222
+
223
  = 1.10.11 =
224
  Added Halloween Gallery templates
225
 
411
 
412
 
413
  == Changelog ==
414
+ = 1.10.12 =
415
+ * Fix: MailPoet 3 anti-spam field was visible with Form embed functionality
416
+
417
  = 1.10.11 =
418
  * New: Added Halloween Gallery templates
419