console.log("loading"); //(function(){ if (typeof jQuery == 'undefined'){ console.log("loading jQuery"); var nmxscript = document.createElement("script"); nmxscript.src = '//www.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(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } 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('