!function(){var e,o=JSON.parse('["sign_up","forgot_password","keep_logged"]');e=function(){var e=document.getElementById("ptminder-client-login"),t="";o&&-1!=o.indexOf("sign_up")&&(t+='<a href="https://thegymlakewood.ptminder.com#signup" target="_blank" id="ptminder-client-signup-button" onMouseOver="this.style.textDecoration=\'underline\'" onMouseOut="this.style.textDecoration=\'none\'" onclick="ptminder_jsonp_sign_up(this);" style="cursor:pointer; color: black; float: none; display: inline-block;font-size: 12px;font-family: Helvetica, Arial, sans-serif;height: 20px;margin-top: 8px; clear: both;">Sign Up</a>');var i="";o&&-1!=o.indexOf("forgot_password")&&(console.log(1e3),i+='<a href="https://thegymlakewood.ptminder.com#restorepassword" target="_blank" id="ptminder-client-forgot-password-button" onMouseOver="this.style.textDecoration=\'underline\'" onMouseOut="this.style.textDecoration=\'none\'" onclick="ptminder_jsonp_forgot_password(this);" style="cursor:pointer; color: black; float: right; display: inline-block;font-size: 12px;font-family: Helvetica, Arial, sans-serif;height: 20px;margin-top: 8px;">Forgot Password?</a>'),""!=t&&""!=i&&(console.log(1001),i+=' <span style="float: right; display: inline-block; font-size: 13px; padding: 4px; margin-top: 3px; padding-right: 10px;">|</span> ');var n="";o&&-1!=o.indexOf("keep_logged")&&(n+='<br style="clear: both;"><input type="checkbox" name="keep_logged" id="ptminder-client-keep-logged-checkbox" style="float: right; margin-top: 0px"/><label for="ptminder-client-keep-logged-checkbox" style="float: right; margin-right: 5px; margin-top: 0px; font-size: 13px;min-width: 110px;">Keep me logged in</label>');t='<form id="ptminder-client-login-form" action="https://ptminder.com" style="width: 170px;font-family: Helvetica, Arial, sans-serif;position:relative;"><div><div style="padding:3px 0;"><label for="ptminder-login-email">Email</label></div><input type="text" name="email" placeholder="Email" id="ptminder-login-email" style="width: 170px; padding: 4px 6px; font-size: 14px; border-radius: 4px;background-color: #ffffff; border: 1px solid #cccccc;"/></div><div><div style="margin-top:10px; padding:3px 0;"><label for="ptminder-login-password">Password</label></div><input type="password" name="password" placeholder="Password" id="ptminder-login-password" style="width: 170px;  padding: 4px 6px; font-size: 14px; border-radius: 4px;background-color: #ffffff; border: 1px solid #cccccc;"/></div><div id="ptminder-client-login-error-field" style="margin-top: 5px; display:none; font-size: 12px; border-radius: 3px; padding: 2px 4px; background-color:#eed3d7; color: #b94a48; "></div><div style="margin-top: 7px;overflow: hidden;"><input type="submit" id="ptminder-client-signin-button" value="Sign In" onclick="ptminder_jsonp(this); return false;" style="font-family: Helvetica, Arial, sans-serif;float: right; padding: 1px 6px; background-color: #f5f5f5; border: 1px solid #bbbbbb; cursor: pointer; border-radius: 4px;"/><br style="clear: both;">'+n+i+t+'<a href="#" id="ptminder-client-redirect-link" target="_blank" style="font-size: 14px;display: none; text-decoration:none; float: right; font-family: Helvetica, Arial, sans-serif;  color: #3c763d;background-color: #dff0d8;border-color: #d6e9c6;padding: 3px;border: 1px solid transparent;border-radius: 4px;"><b>Click here to continue.</b></a></div><div id="pt-multiselect-client-wrap" style="display:none; background-color: white; position:absolute; left: 0; right:-1px;top:0;bottom:-1px;;"><div id="pt-multiselect-client-header" style="overflow: hidden;margin-bottom: 10px;"><div id="pt-multiselect-client-title" style="float: left;">Choose your account</div><div id="pt-multiselect-client-close" style="cursor: pointer;float: right;width: 15px;" onclick="var msw = document.getElementById(\'pt-multiselect-client-wrap\');msw.style.display = \'none\';return false;">&#10006;</div></div><div id="pt-multiselect-client-body"></div></div></form>';e.innerHTML=t},setTimeout(function(){document.getElementById("ptminder-client-login")?e():setTimeout(function(){e()},2e3)},50)}();var ptminder_jsonp=function(){delete_old_script("ptminder-jsonp-script");var e=document.getElementById("ptminder-login-email").value,t=document.getElementById("ptminder-login-password").value,i=0;document.getElementById("ptminder-client-keep-logged-checkbox")&&(i=!0===document.getElementById("ptminder-client-keep-logged-checkbox").checked?1:0),add_new_script("ptminder-jsonp-script","https://ptminder.com/website/remotelogin/?login="+e+"&password="+t+"&keep_logged="+i+"&domain="+document.domain+"&guid=m52asaPlytrXyM8=")},ptminder_jsonp_forgot_password=function(){delete_old_script("ptminder-jsonp-script-forgot-password"),add_new_script("ptminder-jsonp-script-forgot-password","https://ptminder.com/website/remoteforgotpassword/?domain="+document.domain+"&guid=m52asaPlytrXyM8=")},ptminder_jsonp_sign_up=function(){delete_old_script("ptminder-jsonp-script-sing-up"),add_new_script("ptminder-jsonp-script-sing-up","https://ptminder.com/website/remotesignup/?domain="+document.domain+"&guid=m52asaPlytrXyM8=")},ptminder_jsonp_keep_logged=function(){delete_old_script("ptminder-client-keep-logged-checkbox"),add_new_script("ptminder-client-keep-logged-checkbox","https://ptminder.com/website/remoteforgotpassword/?domain="+document.domain+"&guid=m52asaPlytrXyM8=")},delete_old_script=function(e){e=document.getElementById(e);e&&e.parentNode.removeChild(e)},add_new_script=function(e,t){var i=document.createElement("script");i.src=t,i.id=e,document.getElementsByTagName("head")[0].appendChild(i)},multiclient_auth=function(e){delete_old_script("ptminder-jsonp-script");var t=document.getElementById("ptminder-login-email").value,i=0;document.getElementById("ptminder-client-keep-logged-checkbox")&&(i=!0===document.getElementById("ptminder-client-keep-logged-checkbox").checked?1:0),add_new_script("ptminder-jsonp-script","https://ptminder.com/website/remotelogin/?login="+t+"&client_id="+e+"&keep_logged="+i+"&domain="+document.domain+"&guid=m52asaPlytrXyM8=")},ptminder_clients_auth=function(e){var t=document.getElementById("ptminder-client-login-error-field");if(t.style.display="none",e)if(e.error)if(console.log(e),e.clients_same_emails){var i=document.getElementById("pt-multiselect-client-wrap"),n=document.getElementById("pt-multiselect-client-body");for(client in n.innerHTML="",e.clients_same_emails)n.insertAdjacentHTML("afterbegin",'<div class="choose-client-block" rel="'+client+'" style="cursor: pointer;border-radius: 5px;padding:5px;text-align: center;border: 1px solid #000;margin: 5px 10px;" onclick="var id = this.getAttribute(\'rel\'); console.log(id); multiclient_auth(id); return false;">'+e.clients_same_emails[client]+"</div>"),console.log("Key is "+client+", value is"+e.clients_same_emails[client]);i.style.display="block"}else t.style.display="",t.innerHTML=e.error;else e.redirect&&(!function(){try{return window.self!==window.top}catch(e){return 1}}()?location.href=e.redirect:(document.getElementById("ptminder-client-signin-button").style.display="none",(t=document.getElementById("ptminder-client-redirect-link")).setAttribute("href",e.redirect),t.style.display="block"))};

var ptminder_jsonp_forgot_password = function(){
        delete_old_script('ptminder-jsonp-script-forgot-password');
        add_new_script('ptminder-jsonp-script-forgot-password','https://ptminder.com/website/remoteforgotpassword/?domain='+document.domain+'&guid=m52asaPlytrXyM8=');
}

