'); is_agreed = false; } } else { is_agreed = true; } if (isvalidName == true && isvalidEmail == true && is_agreed == true) { jQuery(".AjaxLoader").show(); jQuery('#mysuccess_msg').html(''); jQuery('#mysuccess_msg').hide(); jQuery('#myerror_msg').html(''); jQuery('#myerror_msg').hide(); var name = ""; if (jQuery('#yourname').length > 0) { name = jQuery("#yourname").val(); } var nonce = '7cffbe8b56'; var url = 'https://gibbers.co.uk/wp-content/plugins/email-subscribe/'; var email = jQuery("#youremail").val(); var str = "action=store_email&email=" + email + '&name=' + name + '&is_agreed=' + is_agreed + '&sec_string=' + nonce; jQuery.ajax({ type: "POST", url: 'https://gibbers.co.uk/wp-admin/admin-ajax.php', data: str, async: true, success: function (msg) { if (msg != '') { var result = msg.split("|"); if (result[0] == 'success') { jQuery(".AjaxLoader").hide(); jQuery('#mysuccess_msg').html(result[1]); jQuery('#mysuccess_msg').show(); setTimeout(function () { jQuery.fancybox_ns.close(); }, 2000); } else { jQuery(".AjaxLoader").hide(); jQuery('#myerror_msg').html(result[1]); jQuery('#myerror_msg').show(); } } } }); } } var interval_60930ffc5d363 = setInterval(function() { if(document.readyState === 'complete') { clearInterval(interval_60930ffc5d363); /* if ( jQuery.browser.msie && jQuery.browser.version >= 9 ) { jQuery.support.noCloneEvent = true }*/ var htmlpopup = jQuery("#formFormEmail").html(); jQuery("#formFormEmail").remove(); jQuery('body').on('click', '.shownewsletterbox', function () { jQuery.fancybox_ns({ 'overlayColor': '#000000', 'hideOnOverlayClick': false, 'padding': 10, 'autoScale': true, 'showCloseButton': true, 'content': htmlpopup, 'transitionIn': 'fade', 'transitionOut': 'elastic', 'width': 560, 'height': 360 }); }); jQuery(document).ready(function () { if (readCookie('newsLatterPopup') == null) { setTimeout(function(){ jQuery.fancybox_ns({ 'overlayColor': '#000000', 'hideOnOverlayClick': false, 'padding': 10, 'autoScale': true, 'showCloseButton': true, 'content': htmlpopup, 'transitionIn': 'fade', 'transitionOut': 'elastic', 'width': 560, 'height': 360 }); createCookie('newsLatterPopup', 'donotshow', 1); },1500); } }); } }, 100);