/home/arranoyd/magicraft/wp-content/plugins/convertplug/modules/info_bar/assets/js/info_bar.min.js
!function(a){"use strict";function b(){var a="none";return jQuery(".cp-info-bar").each(function(b,c){var d=jQuery(this).hasClass("priority_infobar");return d?a=jQuery(this):void 0}),a}function c(a){return"/"===a.substr(-1)?a.substr(0,a.length-1):a}function d(a){if("undefined"!=typeof a){a=a.split("|");var b=!1,c=!1,d=!1;c=DetectTierTablet(),d=DetectTierIphone(),jQuery.each(a,function(){var a=jQuery(this).selector;("desktop"==a&&!d&&!c||"tablet"==a&&c||"mobile"==a&&d)&&(b=!0)})}else b=!1;return b}function e(a){if("undefined"!=typeof a){a=a.split("|");var b=!1,c=!1,d=!1,e=!1,f=!1,g=!1;c=q.Win(),d=q.Mac(),f=q.Linux(),e=q.Unix(),g=q.Android(),jQuery.each(a,function(){var a=jQuery(this).selector;("win"==a&&c||"mac"==a&&d||"linux"==a&&f||"unix"==a&&e||"android"==a&&g)&&(b=!0)})}return b}function f(a){if("undefined"!=typeof a){a=a.split("|");var b=!1,c=!1,d=!1,e=!1,f=!1;c=r.Chrome(),d=r.Mozilla(),e=r.Safari(),f=r.IE(),jQuery.each(a,function(){var a=jQuery(this).selector;(c&&"chrome"==a||d&&"mozilla"==a||e&&"safari"==a||f&&"ie"==a)&&(b=!0)})}return b}function g(a){var b={action:"smile_update_impressions",impression:!0,styles:a,option:"smile_info_bar_styles"};jQuery.ajax({url:smile_ajax.url,data:b,type:"POST",dataType:"HTML",success:function(a){}})}function h(a,b,c){var d=jQuery("#cp-push-down-support").val(),e=jQuery("#cp-top-offset-container").val(),f=jQuery("#wpadminbar").outerHeight(),g=a.outerHeight();if(""==e)var h=jQuery("body").offset().top,i={margin_top:jQuery("body").css("margin-top"),top:jQuery("body").css("top")};else var h=jQuery(e).offset().top,i={margin_top:jQuery(e).css("margin-top"),top:jQuery(e).css("top")};var j=JSON.stringify(i);jQuery("#cp-top-offset-container").attr("data-offset_def_settings",j);var k=g+h-f,l=g+h,m=jQuery(d).outerHeight(),n=l-m;return c&&(n=f+g,k=g),1==b?jQuery(d).stop().animate({top:n+"px"},1200):jQuery(d).css("top",n+"px"),k}function i(){jQuery(".cp-overlay").each(function(){var a=jQuery(this).data("placeholder-color"),b=jQuery(this).data("class"),c=a,d="."+b+" ::-webkit-input-placeholder {color: "+c+"!important;} ."+b+" :-moz-placeholder {color: "+c+"!important;} ."+b+" ::-moz-placeholder {color: "+c+"!important;}";jQuery("<style type='text/css'>"+d+"</style>").appendTo("head")})}function j(a){var b=parseInt(jQuery(a).outerHeight()),c=jQuery(window).outerWidth();r.IE()&&(c>768?jQuery(a).find(".cp-info-bar-body").css({height:b+"px"}):jQuery(a).find(".cp-info-bar-body").css({height:"auto"}))}function k(a){var b=jQuery(a).data("class");jQuery(a).find("li").each(function(){if(0==jQuery(this).parents(".cp_social_networks").length){var a=jQuery(this).parents("div").attr("class").split(" ")[0],c=jQuery(this).index()+1,d=jQuery(this).find(".cp_font").css("font-size"),e=jQuery(this).find("span").css("color"),f=jQuery(this).parent(),f=f[0].nodeName.toLowerCase(),g="";"ul"==f?(g=jQuery(this).closest("ul").css("list-style-type"),"none"==g&&jQuery(this).closest("ul").css("list-style-type","disc")):(g=jQuery(this).closest("ol").css("list-style-type"),"none"==g&&jQuery(this).closest("ol").css("list-style-type","decimal")),jQuery(this).find("span").each(function(){var a=jQuery(this).css("color");a.length>0&&(e=a)});var h="";jQuery(".cp-li-color-css-"+c).remove(),jQuery(".cp-li-font-css-"+c).remove(),d&&(h="font-size:"+d,jQuery("head").append('<style class="cp-li-font-css'+c+'">.'+b+" ."+a+" li:nth-child("+c+"){ "+h+"}</style>")),e&&jQuery("head").append('<style class="cp-li-color-css'+c+'">.'+b+" ."+a+" li:nth-child("+c+"){ color: "+e+";}</style>")}})}function l(a){setTimeout(function(){var b=(a.data("toggle"),a.data("toggle-visible")||null),c=!1;m(a,c,b)},300)}function m(a,b,c){var d=a.data("push-down")||null,e=a.data("animate-push-page"),f=jQuery("#cp-top-offset-container").val();if(d&&!c&&a.hasClass("cp-pos-top")){var g=h(a,e,b);1==e?""==f?jQuery("body").stop().animate({marginTop:g+"px"},900):jQuery(f).stop().animate({marginTop:g+"px"},900):""==f?jQuery("body").css("margin-top",g+"px"):jQuery(f).css("margin-top",g+"px")}}function n(){jQuery(".cp-info-bar").each(function(a,b){var c=jQuery(b);c.find(".cp-ifb-toggle-btn").click(function(){var a=jQuery(this),b=jQuery(this).closest(".cp-info-bar"),d="smile-slideInDown",e=b.data("exit-animation"),f=b.data("entry-animation"),h=b.find(".cp-info-bar-body"),i=b.data("toggle-visible"),j=b.data("impression-added"),k=b.data("info_bar-id");if(1==i&&"undefined"==typeof j){var l=[k];g(l),b.data("impression-added","true")}var n=!1,o=null;m(b,n,o),b.removeClass(f),b.removeClass(e),b.hasClass("cp-pos-bottom")&&(d="smile-slideInUp");var p=b.attr("class");a.removeClass("cp-ifb-show smile-animated "+d),b.attr("class",p),b.attr("class",p+" smile-animated "+f),b.removeClass("cp-ifb-hide"),a.addClass("cp-ifb-hide"),h.addClass("cp-flex"),b.find(".ib-close").css({visibility:"visible"});var n=!0;m(c,n)}),c.find(".ib-close").click(function(){var a=jQuery(this).parents(".cp-info-bar"),b=a.find(".cp-ifb-toggle-btn"),c=a.find(".cp-info-bar-body"),d="smile-slideInDown",e=a.data("exit-animation"),f=a.data("entry-animation"),g=a.data("toggle"),h=a.find(".form-main").attr("class");if(1==g){a.hasClass("cp-pos-bottom")&&(d="smile-slideInUp"),a.removeClass(f);var i=a.attr("class");a.attr("class",i+" "+e),setTimeout(function(){b.removeClass("cp-ifb-hide"),b.addClass("cp-ifb-show smile-animated "+d),a.removeClass("smile-animated"),a.removeClass(e),a.addClass("cp-ifb-hide"),c.removeClass("cp-flex"),a.find(".ib-close").css({visibility:"hidden"}),"undefined"!=typeof h&&(a.find("#smile-optin-form")[0].reset(),a.find(".cp-form-processing-wrap").css("display","none"),a.find(".cp-form-processing").removeAttr("style"),a.find(".cp-msg-on-submit").removeAttr("style"),a.find(".cp-m-success").remove(),a.find(".cp-m-error").remove())},1500)}})})}function o(b){var c=b,d=a(window),e=d.scrollTop(),f=e+d.height(),g=c.offset().top,h=g+c.height();return f>=h&&g>=e}function p(){jQuery(".cp-info_bar-inline-end").each(function(a){var b=jQuery(this),c=o(b),d=jQuery(this).data("style");if(c){var e=Array();jQuery("[data-info_bar-style="+d+"]").hasClass("impression_counted")||(e.push(d),g(e)),jQuery("[data-info_bar-style="+d+"]").each(function(){jQuery(this).addClass("impression_counted")})}})}!function(a){a.fn.fitText=function(b,c){var d=b||1,e=a.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},c);return this.each(function(){var b=a(this),c=function(){b.css("font-size",Math.max(Math.min(b.width()/(10*d),parseFloat(e.maxFontSize)),parseFloat(e.minFontSize)))};c(),a(window).on("resize.fittext orientationchange.fittext",c)})}}(jQuery),jQuery.fn.isReferrer=function(a,b,d){var e=!0;b=c(b.replace(/.*?:\/\//g,""));var f=a.split(",");return jQuery.each(f,function(a,f){f=c(f),b=b.replace("www.","");var g=b.split(".");f.match(/./gim).length,g[0];f=c(f.replace(/.*?:\/\//g,"")),f=f.replace("www.","");var h=f.split("*");-1!==b.indexOf("t.co")&&(b="twitter.com"),-1!==b.indexOf("plus.google.co")?b="plus.google.com":-1!==b.indexOf("google.co")&&(b="google.com");var i=h[0];if(i=c(i),"display"==d){if(-1!==f.indexOf("*"))return i==b?(e=!0,!1):-1!==b.indexOf(i)?(e=!0,!1):(e=!1,!1);if(f==b)return e=!0,!1;e=!1}else if("hide"==d){if(-1!==f.indexOf("*"))return i==b?(e=!1,!1):-1!==b.indexOf(i)?(e=!1,!1):(e=!0,!1);if(f==b)return e=!1,!1;if(-1!==b.indexOf(i))return e=!1,!1;e=!0}}),e};var q={Win:function(){return-1!=navigator.appVersion.indexOf("Win")},Mac:function(){return-1!=navigator.appVersion.indexOf("Mac")},Unix:function(){return-1!=navigator.appVersion.indexOf("X11")},Linux:function(){return-1!=navigator.appVersion.indexOf("Linux")},Android:function(){return navigator.userAgent.match(/Android/i)},Any:function(){return q.Win()||q.Mac()||q.Unix()||q.Linux()}},r={Chrome:function(){return jQuery.browser.chrome&&parseInt(jQuery.browser.version)>43},Mozilla:function(){return jQuery.browser.mozilla&&parseInt(jQuery.browser.version)>12},Safari:function(){return jQuery.browser.safari},IE:function(){return jQuery.browser.mozilla&&11==parseInt(jQuery.browser.version)||jQuery.browser.chrome&&parseInt(jQuery.browser.version)<=43||jQuery.browser.msie}};jQuery.fn.windowSize=function(){var a=this.find(".cp-content-container"),b=this.find(".cp-info-bar"),c=this.find(".cp-info-bar-content"),d=this.find(".cp-info-bar-body");b.removeAttr("style"),c.removeAttr("style"),a.removeAttr("style"),d.removeAttr("style");var e=jQuery(window).width()+30,f=jQuery(window).height();jQuery(this).find("iframe").css("width",e),a.css({"max-width":e+"px",width:"100%",height:f+"px",padding:"0",margin:"0 auto"}),c.css({"max-width":e+"px",width:"100%"}),b.css({"max-width":e+"px",width:"100%",left:"0",right:"0"}),d.css({"max-width":e+"px",width:"100%",height:f+"px"})},jQuery.fn.isScheduled=function(){var a=new Date(gmt),b=this.data("timezonename"),c=this.data("tz-offset"),d=(a.toGMTString(),a.toLocaleString()),e=this.data("scheduled"),f=new Date,g=f.getTime()+6e4*f.getTimezoneOffset(),h=new Date(g+36e5*c);if("undefined"!=typeof e&&1==e){var i=this.data("start"),j=this.data("end");return i=Date.parse(i),j=Date.parse(j),d="system"==b?Date.parse(f):Date.parse(h),d>=i&&j>=d}return!0};var s=function(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+24*c*60*60*1e3);var e="; expires="+d.toGMTString()}else var e="";document.cookie=a+"="+b+e+"; path=/"},t=function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(b))return e.substring(b.length,e.length)}return null},u=function(a){if(a.hasClass("cp-pos-top"))a.css("top","0");else if(a.hasClass("ib-fixed"))a.css("top","auto");else{var b=a.data("toggle"),c=jQuery("body").parent("html").height(),d=a.find(".cp-ifb-toggle-btn").outerHeight(),e=a.find(".cp-info-bar-body").outerHeight();1==b&&(c=c-e+d),a.hasClass("cp-info-bar-inline")||a.css("top",c+"px"),a.css("min-height",e+"px")}if(jQuery("body").hasClass("admin-bar")&&a.hasClass("cp-pos-top")){var f=jQuery("#wpadminbar").outerHeight();a.hasClass("cp-info-bar-inline")||a.css("top",f+"px")}},v=function(a){s(a,"",-1)};jQuery(window).load(function(){Array();jQuery(".cp-info-bar").each(function(a){var b=(jQuery(this).data("class-id"),jQuery(this).data("dev-mode"),jQuery(this).data("info_bar-id")),c="temp_"+b;v(c),j(this),k(this)})}),jQuery(window).resize(function(){jQuery(".cp-info-bar").each(function(a){u(jQuery(this))})}),jQuery(window).load(function(){var a=Array();jQuery(".cp-ib-onload").each(function(b){var c=jQuery(this),h=(jQuery(this).data("exit-intent"),jQuery(this).data("dev-mode")),i=jQuery(this).data("info_bar-id"),j=(jQuery(this).attr("id"),"temp_"+i),k=(jQuery(this).data("option"),jQuery(this).data("info_bar-style")),m=jQuery(this),n=jQuery(this).data("onload-delay");n=1e3*n;var o=jQuery(this).data("load-on-refresh"),p=jQuery(this).data("hide-on-devices"),q=d(p),r=jQuery(this).data("hide-on-os"),w=(e(r),jQuery(this).data("hide-on-browser")),x=(f(w),100*jQuery(window).scrollTop()/(jQuery(document).height()-jQuery(window).height()),jQuery(this).data("onscroll-value"),jQuery(this).data("toggle-visible"));u(m);var y=!1,z=m.isScheduled();if("disabled"==o){var A=t(i+"-refresh");A?y=!0:(s(i+"-refresh",!0,1),y=!1)}else y=!0,v(i+"-refresh");var B=t(i),C=t(j);j?"enabled"==h&&C&&(B=!0):s(j,!0,1),q&&(y=!1);var D=jQuery(this).data("push-down");D=parseInt(D);var E=jQuery(this),F="";setTimeout(function(){F=E.outerHeight()},100);var G=c.data("referrer-domain"),H=c.data("referrer-check"),I=document.referrer.toLowerCase();console.log("referrer url :-"+I);var J=!1;J="undefined"!=typeof G&&""!==G?m.isReferrer(G,I,H):!0,!B&&n&&y&&z&&J&&setTimeout(function(){if(jQuery(".ib-display").length<=0){if(m.show(),m.hasClass("impression_counted")||(a.push(k),0!==a.length&&"undefined"==typeof x&&(g(a),jQuery("[data-info_bar-style="+k+"]").each(function(a){jQuery(this).addClass("impression_counted")}))),m.hasClass("cp-pos-top")){if(jQuery("body").hasClass("admin-bar")){var b=jQuery("#wpadminbar").outerHeight();m.css("top",b+"px")}}else{var c=m.find(".cp-info-bar-body").outerHeight();m.css("min-height",c+"px")}l(m),jQuery(document).trigger("resize"),m.addClass("ib-display"),setTimeout(function(){var a=m.find(".cp-submit").data("animation");m.find(".cp-submit").addClass(a)},2e3)}},parseInt(n)),"enabled"==h&&v(i)})}),jQuery(document).scroll(function(a){p();var b=100*jQuery(window).scrollTop()/(jQuery(document).height()-jQuery(window).height()),c=b.toFixed(0),h=Array();jQuery(".cp-ib-onload").each(function(a){var b=jQuery(this),i=(jQuery(this).data("exit-intent"),jQuery(this).data("class"),jQuery(this).data("dev-mode")),j=jQuery(this).data("info_bar-id"),k="temp_"+j,m=(jQuery(this).data("option"),jQuery(this).data("info_bar-style")),n=jQuery(this),o=jQuery(this).data("onscroll-value"),p=jQuery(this).data("hide-on-devices"),q=d(p),r=jQuery(this).data("hide-on-os"),u=(e(r),jQuery(this).data("hide-on-browser")),w=(f(u),jQuery(this).data("toggle-visible"));"enabled"==i&&v(j);var x=t(j),y=t(k);k?"enabled"==i&&y&&(x=!0):s(k,!0,1);var z=n.isScheduled();q&&(x=o=z=!1);var A=jQuery(this).data("push-down");A=parseInt(A);var B=(jQuery(this).outerHeight(),b.data("referrer-domain")),C=b.data("referrer-check"),D=document.referrer.toLowerCase(),E=!1;if(E="undefined"!=typeof B&&""!==B?n.isReferrer(B,D,C):!0,!x&&o&&z&&E&&jQuery(".ib-display").length<=0&&c>=o){if(l(n),n.hasClass("impression_counted")||(h.push(m),0!==h.length&&"undefined"==typeof w&&(g(h),jQuery("[data-info_bar-style="+m+"]").each(function(a){jQuery(this).addClass("impression_counted")}))),n.show(),n.hasClass("cp-pos-top")){if(jQuery("body").hasClass("admin-bar")){var F=jQuery("#wpadminbar").outerHeight();n.css("top",F+"px")}}else{var G=n.find(".cp-info-bar-body").outerHeight();n.css("min-height",G+"px")}n.addClass("ib-display"),setTimeout(function(){var a=n.find(".cp-submit").data("animation");n.find(".cp-submit").addClass(a)},2e3)}})}),jQuery(document).scroll(function(a){var b=jQuery(window).scrollTop(),c=Array();jQuery(".ib-after-post").each(function(a){var h=jQuery(this),i=(jQuery(this).data("exit-intent"),jQuery(this).data("class"),jQuery(this).data("dev-mode")),j=jQuery(this).data("after-content-value"),k=jQuery(this).data("info_bar-id"),m="temp_"+k,n=(jQuery(this).data("option"),jQuery(this).data("info_bar-style")),o=jQuery(this),p=jQuery(".cp-load-after-post").offset().top-30,q=jQuery(this).data("hide-on-devices"),r=d(q),u=jQuery(this).data("hide-on-os"),w=(e(u),jQuery(this).data("hide-on-browser")),x=(f(w),jQuery(this).data("toggle-visible"));"enabled"==i&&v(k);var y=t(k),z=t(m);m?"enabled"==i&&z&&(y=!0):s(m,!0,1);var A=o.isScheduled();p-=jQuery(window).height()*j/100,r&&(y=p=A=!1);var B=jQuery(this).data("push-down");B=parseInt(B);var B=(jQuery(this).outerHeight(),jQuery(this).data("push-down"));B=parseInt(B);var C=(jQuery(this).outerHeight(),h.data("referrer-domain")),D=h.data("referrer-check"),E=document.referrer.toLowerCase(),F=!1;if(F="undefined"!=typeof C&&""!==C?o.isReferrer(C,E,D):!0,!y&&p&&A&&F&&jQuery(".ib-display").length<=0&&b>=p){if(l(o),o.show(),o.hasClass("cp-pos-top")){if(jQuery("body").hasClass("admin-bar")){var G=jQuery("#wpadminbar").outerHeight();o.css("top",G+"px")}}else{var H=o.find(".cp-info-bar-body").outerHeight();o.css("min-height",H+"px")}o.addClass("ib-display"),o.hasClass("impression_counted")||(c.push(n),0!==c.length&&"undefined"==typeof x&&(g(c),jQuery("[data-info_bar-style="+n+"]").each(function(a){jQuery(this).addClass("impression_counted")}))),setTimeout(function(){var a=o.find(".ib-subscribe").data("animation");o.find(".ib-subscribe").addClass(a)},2e3)}})}),jQuery(document).on("mouseleave",function(a){var c=Array(),h=b();jQuery(".cp-ib-onload").each(function(b){var i=jQuery(this);if("none"!==h){var j=h;i=j}var k=i.data("exit-intent"),m=(i.data("class-id"),i.data("dev-mode")),n=i.data("info_bar-id"),o="temp_"+n,p=(i.data("option"),i.data("info_bar-style")),j=i,q=i.data("hide-on-devices"),r=d(q),u=i.data("hide-on-os"),w=(e(u),i.data("hide-on-browser")),x=(f(w),jQuery(this).data("toggle-visible"));"enabled"==m&&v(n);var y=t(n),z=t(o);o?"enabled"==m&&z&&(y=!0):s(o,!0,1);var A=!1,B=i.data("inactive-time");"undefined"!=typeof B&&(A=!0);var C=i.data("push-down");C=parseInt(C);var D=(i.outerHeight(),j.isScheduled());r&&(k=D=!1);var E=i.data("referrer-domain"),F=i.data("referrer-check"),G=document.referrer.toLowerCase(),H=!1;if(H="undefined"!=typeof E&&""!==E?j.isReferrer(E,G,F):!0,!y&&H&&"enabled"==k&&D&&a.clientY<=0&&jQuery(".ib-display").length<=0){if(l(j),j.show(),j.hasClass("cp-pos-top")){if(jQuery("body").hasClass("admin-bar")){var I=jQuery("#wpadminbar").outerHeight();j.css("top",I+"px")}}else{var J=j.find(".cp-info-bar-body").outerHeight();j.css("min-height",J+"px")}jQuery(document).trigger("playYoutube"),j.addClass("ib-display"),j.hasClass("impression_counted")||(c.push(p),0!==c.length&&"undefined"==typeof x&&(g(c),jQuery("[data-info_bar-style="+p+"]").each(function(a){jQuery(this).addClass("impression_counted")}))),setTimeout(function(){var a=j.find(".cp-submit").data("animation");j.find(".cp-submit").addClass(a)},2e3)}})}),jQuery(document).ready(function(){jQuery(".blinking-cursor").remove(),n(),p(),jQuery(".cp-info-bar").each(function(a){if(jQuery("body").hasClass("admin-bar")){var b=jQuery("#wpadminbar").outerHeight();jQuery(this).hasClass("cp-pos-top")&&!jQuery(this).hasClass("cp-info-bar-inline")&&jQuery(this).css("top",b+"px")}var c=jQuery(this).data("inactive-time");"undefined"!=typeof c&&(c=1e3*c,jQuery(document).idleTimer({timeout:c,idle:!0}))}),jQuery(".ib-close").click(function(a){a.preventDefault();var b=jQuery(this).parents(".cp-info-bar");jQuery(document).trigger("cp_close_info_bar",[b])})}),jQuery(document).on("cp_close_info_bar",function(a,b){var c=b.data("entry-animation"),d=b.data("exit-animation"),e=b.data("closed-cookie-time"),f=b.data("info_bar-id"),g=b.data("animate-push-page"),h="temp_"+f,i=b.data("push-down")||null;if(b.hasClass("cp-ifb-with-toggle")||(b.removeClass(c),b.addClass(d)),b.hasClass("cp-pos-top")){if(i){var j=jQuery("#cp-top-offset-container").val(),k=jQuery("#cp-top-offset-container").data("offset_def_settings"),l=k.margin_top,m=k.top;1==g?""==j?jQuery("body").animate({marginTop:l,top:m}):jQuery(j).animate({"margin-top":l,top:m}):""==j?jQuery("body").css({"margin-top":l,top:m}):jQuery(j).css({"margin-top":l,top:m})}if(1==jQuery(".ib-display").length){var n=jQuery("#wpadminbar").outerHeight(),o=jQuery("#cp-push-down-support").val();jQuery("#wpadminbar").length?1==g?jQuery(o).animate({top:n},1e3):jQuery(o).css("top",n):1==g?jQuery(o).animate({top:"0px"},1e3):jQuery(o).css("top","0px")}}s(h,!0,1),e&&s(f,!0,e),"cp-overlay-none"!==d?setTimeout(function(){b.hasClass("cp-ifb-with-toggle")||(b.hide(),b.removeClass("ib-display"),b.removeClass(d),b.addClass(c)),jQuery("html").css("overflow-x","auto")},2500):setTimeout(function(){b.hasClass("cp-ifb-with-toggle")||(b.hide(),b.removeClass("ib-display"),d="cp-overlay-none",b.removeClass(d),b.addClass(c)),jQuery("html").css("overflow-x","auto")},100)}),jQuery(document).on("idle.idleTimer",function(a,c,h){var i=Array(),j=b();jQuery(".cp-ib-onload").each(function(a){var b=jQuery(this);if("none"!==j){var c=j;b=c}var h=(b.data("class-id"),b.data("dev-mode")),k=b.data("info_bar-id"),m="temp_"+k,n=(b.data("option"),b.data("info_bar-style")),c=b,o=b.data("hide-on-devices"),p=d(o),q=b.data("hide-on-os"),r=(e(q),b.data("hide-on-browser")),u=(f(r),jQuery(this).data("toggle-visible"));"enabled"==h&&v(k);var w=t(k),x=t(m);m?"enabled"==h&&x&&(w=!0):s(m,!0,1);var y=!1,z=b.data("inactive-time");"undefined"!=typeof z&&(y=!0);var A=b.data("push-down");A=parseInt(A);b.outerHeight();p&&(y=!1);var B=b.data("referrer-domain"),C=b.data("referrer-check"),D=document.referrer.toLowerCase(),E=!1;if(E="undefined"!=typeof B&&""!==B?c.isReferrer(B,D,C):!0,!w&&y&&E&&jQuery(".ib-display").length<=0){if(l(c),c.show(),c.hasClass("cp-pos-top")){if(jQuery("body").hasClass("admin-bar")){var F=jQuery("#wpadminbar").height();c.css("top",F+"px")}}else{var G=c.find(".cp-info-bar-body").outerHeight();c.css("min-height",G+"px")}c.addClass("ib-display"),c.hasClass("impression_counted")||(i.push(n),0!==i.length&&"undefined"==typeof u&&(g(i),jQuery("[data-info_bar-style="+n+"]").each(function(a){jQuery(this).addClass("impression_counted")}))),setTimeout(function(){var a=c.find(".cp-submit").data("animation");c.find(".cp-submit").addClass(a)},2e3)}})}),jQuery(document).ready(function(){var a={};jQuery.each(jQuery(".cp-info-bar"),function(){var b=jQuery(this),c=jQuery(this).data("custom-class");"undefined"!=typeof c&&""!==c&&(c=c.split(" "),jQuery.each(c,function(c,d){"undefined"!=typeof d&&""!==d&&(a[d]=b)}))}),jQuery.each(a,function(a,b){""!=a&&"undefined"!=a&&null!=a&&jQuery("."+a).click(function(a){var c=b,d=Array();if(!c.hasClass("cp-form-submit-success")){var e=(c.data("exit-intent"),c.data("custom-class"),c.data("info_bar-id"),c.data("option")),f=c.data("info_bar-style"),h=c,i={action:"smile_update_impressions",impression:!0,style_id:f,option:e},j=c.data("push-down");j=parseInt(j);c.outerHeight();if(jQuery(".ib-display").length<=0){if(l(h),h.show(),h.hasClass("cp-pos-top")){if(jQuery("body").hasClass("admin-bar")){var k=jQuery("#wpadminbar").outerHeight();h.css("top",k+"px")}}else{var m=h.find(".cp-info-bar-body").outerHeight();h.css("min-height",m+"px")}h.addClass("ib-display"),h.hasClass("impression_counted")||(d.push(f),0!==d.length&&(g(d),jQuery("[data-info_bar-style="+f+"]").each(function(a){jQuery(this).addClass("impression_counted")}))),setTimeout(function(){var a=h.find(".ib-subscribe").data("animation");h.find(".ib-subscribe").addClass(a)},2e3),jQuery.ajax({url:smile_ajax.url,data:i,type:"POST",dataType:"HTML",success:function(a){}})}}})})}),jQuery(document).ready(i),jQuery(document).on("ib_conversion_done",function(a,b){if(!jQuery(b).parents(".cp-form-container").find(".cp-email").length>0){var c=jQuery(b).parents(".cp-form-container").find('[name="only_conversion"]').length;c>0&&jQuery(b).addClass("disabled")}})}(jQuery),function(a){"use strict";function b(a){var b=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return b.test(a)}function c(a,c){return c.trim()?a.hasClass("cp-email")?!b(c):a.hasClass("cp-textfeild")?0==/^[a-zA-Z0-9- ]*$/.test(c):!1:!0}function d(a){var d=jQuery(a),f=d.serialize(),g=jQuery(a).parents(".global_info_bar_container").find(".cp-msg-on-submit"),h=(jQuery(a).parents(".global_info_bar_container").find(".cp-form-container"),jQuery(a).parents(".global_info_bar_container").find(".cp-form-processing")),i=jQuery(a).parents(".global_info_bar_container"),j=jQuery(a).parents(".global_info_bar_container").find(".cp-form-processing-wrap"),k=jQuery(a).parents(".global_info_bar_container"),l=i.find(".cp-tooltip-icon").data("classes"),m=jQuery(".ib-close"),n=i.data("conversion-cookie-time"),o=i.data("info_bar-id"),p=jQuery(a).parents(".global_info_bar_container").data("redirect-lead-data"),q="",r=!0;d.find(".cp-input").each(function(a){var b=jQuery(this);if(!b.hasClass("cp-submit-button")){var d=b.attr("name"),e=b.val(),f=d.replace(/param/gi,function(a){return""});f=f.replace("[",""),f=f.replace("]",""),q+=0!=a?"&":"",q+=f+"="+e;var g=!!b.attr("required");g&&(c(b,e)?(r=!1,b.addClass("cp-input-error")):b.removeClass("cp-input-error"))}});var s=0,t="";d.find("select, textarea, input").each(function(a,c){if(jQuery(c).prop("required"))if(jQuery(c).val())if(jQuery(c).hasClass("cp-email")){var d=jQuery(c).val();if(b(d))jQuery(c).removeClass("cp-error");else{jQuery(c).addClass("cp-error"),s++;var e=jQuery(c).attr("name")||"";console.log(e+" is required \n")}}else jQuery(c).removeClass("cp-error");else s++,jQuery(c).addClass("cp-error"),e=jQuery(c).attr("name"),t+=e+" is required \n"}),s>0?console.log(t):(j.show(),g.fadeOut(120,function(){jQuery(this).show().css({visibility:"hidden"}),m.show().css({visibility:"hidden"})}),h.hide().css({visibility:"visible"}).fadeIn(100),jQuery.ajax({url:smile_ajax.url,data:f,type:"POST",dataType:"HTML",success:function(b){n&&e(o,!0,n);var c=jQuery.parseJSON(b),f="";if("undefined"!=typeof c.status&&null!=c.status&&(f=c.status),c.email_status?d.find(".cp-email").removeClass("cp-error"):(d.find(".cp-email").addClass("cp-error"),d.find(".cp-email").focus()),"undefined"!=typeof c.message&&null!=c.message&&(g.hide().css({visibility:"visible"}).fadeIn(120),m.hide().css({visibility:"visible"}).fadeIn(120),g.html('<div class="cp-m-'+f+'">'+c.message+"</div>"),k.addClass("cp-form-submit-"+f)),"undefined"!=typeof c.action&&null!=c.action&&(h.fadeOut(100,function(){jQuery(this).show().css({visibility:"hidden"})}),g.hide().css({visibility:"visible"}).fadeIn(120),m.hide().css({visibility:"visible"}).fadeIn(120),"success"===f))if(jQuery("head").append('<style class="cp-tooltip-css">.tip.'+l+"{display:none }</style>"),"redirect"===c.action){j.hide(),i.hide();var r=c.url,s="";s=r.indexOf("?")>-1?"&":"?";var t=r+s+decodeURI(q);1==p?window.location=t:window.location=c.url}else if(j.show(),jQuery(a).find("a").length>0){var u=jQuery(a).find("a").attr("href"),v=jQuery(a).find("a").attr("target");""!=v&&"undefined"!=typeof v||(v="_self"),""==u&&"#"==u||window.open(u,v)}},error:function(a){j.hide(),h.fadeOut(100,function(){jQuery(this).show().css({visibility:"hidden"})})}}))}var e=function(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+24*c*60*60*1e3);var e="; expires="+d.toGMTString()}else var e="";document.cookie=a+"="+b+e+"; path=/"};jQuery(document).ready(function(){jQuery(".cp-info-bar-container").find("#smile-optin-form").each(function(a,b){jQuery(b).find("input").keypress(function(a){13==a.which&&(a.preventDefault(),d(b))}),jQuery(b).find(".btn-subscribe").click(function(a){if(a.preventDefault,!jQuery(this).hasClass("disabled")){d(b),jQuery(document).trigger("ib_conversion_done",[this]);var c=jQuery(this).attr("data-redirect-link")||"",e=jQuery(this).attr("data-redirect-link-target")||"_blank";"undefined"!=c&&""!=c&&window.open(c,e)}a.preventDefault()})}),jQuery(document).on("click",".cp-form-submit-error",function(a){var b=jQuery(this).find(".cp-form-processing-wrap"),c=jQuery(this).find(".cp-tooltip-icon").data("classes"),d=jQuery(this).find(".cp-msg-on-submit");jQuery(this).find(".cp-form-processing");b.hide(),jQuery(this).removeClass("cp-form-submit-error"),d.html(""),d.removeAttr("style"),jQuery("head").append('<style class="cp-tooltip-css">.tip.'+c+"{display:block }</style>")})})}(jQuery);