console.log("loading"); //(function(){ if (typeof jQuery == 'undefined'){ console.log("loading jQuery"); var nmxscript = document.createElement("script"); nmxscript.src = '//ws.nutramax.biz/js/jquery.js'; document.head.appendChild(nmxscript); } //})(); function showPostStoryThankyou(formSelector){ jQuery(formSelector).hide(); jQuery("#thankyou, .thankyou").show(); document.location = "/#thankyou"; jQuery('html, body').scrollTo(jQuery('#thankyou'), 300); } function showPostStoryForm(formSelector){ jQuery(formSelector).show(); jQuery("#thankyou, .thankyou").hide(); document.location = "/#yourstory"; jQuery('html, body').scrollTo(jQuery('#yourstory'), 300); } function setCookie(cname,cvalue,exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*60*1000)); var expires = "expires=" + d.toGMTString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function getCookie(c_name) { var cookie = document.cookie.replace(/; /g, ";") + ";"; var cookie = document.cookie; if (cookie.length > 0) { c_start = cookie.indexOf(c_name + "="); if (c_start != -1) { c_start = c_start + c_name.length + 1; c_end = cookie.indexOf(";", c_start); if (c_end == -1) c_end = cookie.length; return unescape(cookie.substring(c_start, c_end)); } } return ""; } if (!jQuery(".consumer-email-signup-form").length){ if(jQuery("#consumer-email-signup-form-script[button='true']").length && !jQuery(".consumer-email-signup-form-btn").length){ console.log("added success stories submit form button"); jQuery("#consumer-email-signup-form-script").after('
Subscribe
'); } else{ console.log("added success stories submit form"); } jQuery("#consumer-email-signup-form-script").before(''); if (!jQuery("#consumer-email-signup-form-script[button='true']").length){ jQuery(".consumer-email-signup-form").removeAttr("style"); } if (jQuery(".consumer-email-signup-form-btn").length){ jQuery(".consumer-email-signup-form-btn").removeAttr("target").removeAttr("href").find("*").removeAttr("target").removeAttr("href"); } } jQuery('.form-popup-close-btn').on('click touch', function(){ jQuery(".consumer-email-signup-form.popup").removeClass("active"); jQuery("body").removeClass("consumer-email-signup-form-active"); }); var product = ""; var formlocation = ""; jQuery(document).ready(function(){ jQuery(".consumer-email-signup-form").addClass("nmx-bs"); if (jQuery(".consumer-email-signup-form-btn").length){ jQuery(".consumer-email-signup-form").prependTo("body").addClass("popup"); jQuery(".consumer-email-signup-form-btn").click(function(){ OpenEmailSignupFormPopup(); }); } else{ console.log("no button"); } jQuery("head").append(''); jQuery("head").append(''); jQuery("head").append('