	<style>
        .tm-avoidSelection{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tm-modal{position:fixed;top:50%;left:50%;width:50%;max-width:500px;min-width:320px;height:auto;z-index:999999999;visibility:hidden;transform:translateX(-50%) translateY(-50%);-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%)}.tm-title{max-height:90px;margin:0;text-align:center;font-size:2.4em;height:90px}.tm-content{position:relative;margin:0 auto 20px;max-height:300px;overflow-y:auto;overflow-x:hidden;padding:0 2em}.tm-center{padding-left:25%;padding-right:25%}.tm-XButton:active,.tm-XButton:hover{transform:scale(1.5,1.5);-webkit-transform:scale(1.5,1.5);-ms-transform:scale(1.5,1.5);-o-transform:scale(1.5,1.5);-moz-transform:scale(1.5,1.5);-ms-transform-origin:center center;-webkit-transform-origin:center center;transform-origin:center center}.tm-XButton{backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;transition:transform .8s;-webkit-transition:-webkit-transform .8s;-moz-transition:-moz-transform .8s;-ms-transition:-ms-transform .8s;-o-transition:-o-transform .8s;position:absolute;top:10px;left:15px;width:28px;height:28px;line-height:28px;cursor:pointer}.tm-XButton:after{font-family:Verdana!important;font-size:29px;display:block;content:"×"}@media (max-width:768px){.tm-title{box-shadow:0 4px 8px -5px rgba(0,0,0,.8)}.tm-modal{width:100%;height:100%;left:50%!important;top:50%!important;max-width:100%}.tm-content{color:#5c7d98;position:relative;margin:0 auto;height:100%;max-height:100%;overflow-y:scroll;padding:15px 40px 30px}.tm-content:after{padding-bottom:120px;content:"";display:block}}.tm-showModal{visibility:visible}.tm-overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:1040;opacity:0;background:rgba(0,0,0,.8);-webkit-transition:-webkit-transform .3s,opacity .3s,visibility .3s;-moz-transition:-webkit-transform .3s,opacity .3s,visibility .3s;-ms-transition:-webkit-transform .3s,opacity .3s,visibility .3s;-o-transition:-webkit-transform .3s,opacity .3s,visibility .3s;transition:-webkit-transform .3s,opacity .3s,visibility .3s;backface-visibility:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden}.tm-showModal~.tm-overlay{opacity:1;visibility:visible}.tm-wrapper{height:100%;box-shadow:0 0 5px rgba(0,0,0,.8);background-color:#FFF;overflow:hidden;color:#5c7d98}.tm-MainContainer{-webkit-overflow-scrolling:touch;-webkit-transition:-webkit-transform .5s;-moz-transition:-moz-transform .5s;-o-transition:-o-transform .5s;transition:transform .5s;-ms-transition:-ms-transform .5s;-ms-transform-origin:center top;-webkit-transform-origin:center top;transform-origin:center top}.tm-MainContainer.tm-effect{-webkit-transform:scale(.8);-moz-transform:scale(.8);-o-transform:scale(.8);-ms-transform:scale(.8);transform:scale(.8)}.tm-effect .tm-wrapper{-webkit-transform:translateY(-20%);-moz-transform:translateY(-20%);-o-transform:translateY(-20%);-ms-transform:translateY(-20%);transform:translateY(-20%);opacity:0;-webkit-transition:-webkit-transform .5s,opacity .5s,visibility .5s;-moz-transition:-moz-transform .5s,opacity .5s,visibility .5s;-o-transition:-o-transform .5s,opacity .5s,visibility .5s;transition:transform .5s,opacity .5s,visibility .5s;-ms-transition:-ms-transform .5s,opacity .5s,visibility .5s}.tm-showModal.tm-effect .tm-wrapper{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1}.tm-modal h3{max-height:90px;margin:0;font-size:24px;text-align:center;padding-top:34px}.tm-content>p{margin-top:20px}.tm-content button{display:block;margin:0 auto;font-size:.8em}
	</style>
	<div class="tm-modal tm-effect" id="delete-surgeon-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 class="tm-title-text">Delete this surgeon?</h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
    				<p>
						<input type="hidden" id="hidden_delete_surgeon_id" value="">
    					<input value="Submit" type="submit" onclick="delete_surgeon_function()">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<div class="tm-modal tm-effect" id="cancel-return-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 class="tm-title-text">Cancel the return for this item?</h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
    				<p>
						<input type="hidden" id="hidden_cancel_return_id" value="">
    					<input value="Submit" type="submit" onclick="cancel_return_function()">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<div class="tm-modal tm-effect" id="confirm-return-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 class="tm-title-text">Mark this item as returned?</h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
    				<p>
						<input type="hidden" id="hidden_return_id" value="">
    					<input value="Submit" type="submit" onclick="confirm_return_function()">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<div class="tm-modal tm-effect" id="enter-code-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 class="tm-title-text" style="font-size: 20px;">Enter your Surgeon Code</h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
    				<p>
    					<input id="entered_code" style="width: 100%;" class="tm-emptyOnClose" placeholder="Code" required="" type="text">
    				</p>
    				<p>
    					<input value="Submit Code" type="submit" onclick="enter_code_modal_submit()" style="margin-right: 10px;">
						<input value="Lookup by Name" type="submit" onclick="enter_name_and_zip_function()" style="margin-left: 10px;">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<div class="tm-modal tm-effect" id="enter-name-and-zip-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 class="tm-title-text" style="font-size: 20px;">Enter your Surgeon's Name and Zip Code</h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
    				<p>
    					<input id="entered_name" style="width: 100%;" class="tm-emptyOnClose" placeholder="Name" required="" type="text">
    					<input id="entered_zip" style="width: 100%;" class="tm-emptyOnClose" placeholder="Zip Code" required="" type="text">
    				</p>
    				<p>
    					<input value="Submit" type="submit" onclick="enter_name_and_zip_modal_submit()">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<div class="tm-modal tm-effect" id="no-surgeon-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 class="tm-title-text" style="font-size: 20px;">No Surgeon with that Code found</h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
    				<p>
    					<input id="try_again_code" style="width: 100%;" class="tm-emptyOnClose" placeholder="Code" required="" type="text">
    				</p>
    				<p>
    					<input value="Try Again" type="submit" onclick="try_again_modal_submit()">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<div class="tm-modal tm-effect" id="no-surgeon-name-and-zip-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 class="tm-title-text" style="font-size: 20px;">No Surgeon with that Name and Zip Code found</h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
    				<p>
    					<input id="try_again_name" style="width: 100%;" class="tm-emptyOnClose" placeholder="Name" required="" type="text">
    					<input id="try_again_zip" style="width: 100%;" class="tm-emptyOnClose" placeholder="Zip Code" required="" type="text">
    				</p>
    				<p>
    					<input value="Try Again" type="submit" onclick="try_again_name_and_zip_modal_submit()">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<div class="tm-modal tm-effect" id="verify-surgeon-modal">
    	<div class="tm-wrapper">
    		<div class="tm-title">
    			<span class="tm-XButton tm-closeButton"></span>
    			<h3 id="verify-surgeon-name" class="tm-title-text" style="padding: 8px; margin-top: 40px; font-size: 20px;"></h3>
    		</div>
    		<div class="tm-content">
    			<div style="text-align:center;">
					<p>
    					<input style="margin: 8px;" value="Re-Enter" type="submit" onclick="try_again_function()">
    					<input style="margin: 8px;" value="Yes" type="submit" onclick="verify_surgeon_modal_submit()">
    				</p>
    			</div>
    		</div>
    	</div>
    </div>
	<script>
	    var TomloprodModalSurgeon=function(){"use strict";function a(a,b,c){[].forEach.call(a,function(a){a.style[b]=c})}function b(a,b){return a.classList?a.classList.contains(b):new RegExp("(^| )"+b+"( |$)","gi").test(a.className)}function c(a){try{if(a.getAttribute("data-tm-modal"))return a}catch(a){return a}for(;!a.getAttribute("data-tm-modal");)return c(a.parentNode)}function d(a,b){a.classList?a.classList.add(b):a.className+=" "+b}function e(a,b){var c=0,d=a.length;for(c=0;c<d;c+=1)if(a[c].toString()===b.toString())return c;return-1}function f(a,b){a.classList?a.classList.remove(b):"undefined"!=typeof a.className&&(a.className=a.className.replace(new RegExp("(^|\\b)"+b.split(" ").join("|")+"(\\b|$)","gi")," "))}function g(a,b,c){a.style.left=b+"px",a.style.top=c+"px",r&&console.info("TomloprodModalSurgeon: Dragging. Coord X: "+b+"px | Coord Y: "+c+"px")}function h(a){a=a||window.event,27===a.keyCode&&TomloprodModalSurgeon.closeModal()}function i(a){if(a.target!==document.body){var d=c(a.target);d instanceof Element&&b(d,"tm-trigger")&&"undefined"!=typeof d&&(TomloprodModalSurgeon.openModal(d.getAttribute("data-tm-modal")),a.preventDefault())}}function j(b){for(var c=null,d=0;d<TomloprodModalSurgeon.modal.attributes.length;d++)if(c=TomloprodModalSurgeon.modal.attributes[d],/^data-/.test(c.nodeName))switch(c.nodeName){case"data-tm-content":TomloprodModalSurgeon.modal.getElementsByClassName("tm-content")[0].innerHTML=c.nodeValue;break;case"data-tm-title":TomloprodModalSurgeon.modal.getElementsByClassName("tm-title-text")[0].innerHTML=c.nodeValue;break;case"data-tm-bgcolor":a(TomloprodModalSurgeon.modal.getElementsByClassName("tm-wrapper"),"backgroundColor",c.nodeValue);break;case"data-tm-textcolor":a(TomloprodModalSurgeon.modal.getElementsByClassName("tm-content"),"color",c.nodeValue),a(TomloprodModalSurgeon.modal.getElementsByClassName("tm-wrapper"),"color",c.nodeValue);break;case"data-tm-closetimer":s=setTimeout(TomloprodModalSurgeon.closeModal,c.nodeValue)}if("undefined"!=typeof b){var e=null;if("undefined"!=typeof b)for(e in b)if("undefined"!=typeof b[e])switch(e){case"title":TomloprodModalSurgeon.modal.getElementsByClassName("tm-title-text")[0].innerHTML=b[e];break;case"borderRadius":a(document.getElementsByClassName("tm-wrapper"),"-webkit-border-radius",b[e]),a(document.getElementsByClassName("tm-wrapper"),"-moz-border-radius",b[e]),a(document.getElementsByClassName("tm-wrapper"),"border-radius",b[e]);break;case"content":TomloprodModalSurgeon.modal.getElementsByClassName("tm-content")[0].innerHTML=b[e];break;case"bgColor":a(TomloprodModalSurgeon.modal.getElementsByClassName("tm-wrapper"),"backgroundColor",b[e]);break;case"textColor":a(TomloprodModalSurgeon.modal.getElementsByClassName("tm-content"),"color",b[e]),a(TomloprodModalSurgeon.modal.getElementsByClassName("tm-wrapper"),"color",b[e]);break;case"closeTimer":s=setTimeout(TomloprodModalSurgeon.closeModal,b[e])}}}var k=null,l=!0,m=!0,n=!0,o=!1,p={},q=[],r=!1,s=null,t=null;return{modal:[],isOpen:!1,openModal:function(a,c){TomloprodModalSurgeon.isOpen?TomloprodModalSurgeon.closeModal():(TomloprodModalSurgeon.modal=document.getElementById(a),TomloprodModalSurgeon.modal?(q&&d(q,"tm-effect"),j(c),m&&b(TomloprodModalSurgeon.modal,"tm-draggable")&&(TomloprodModalSurgeon.modal.setAttribute("onmousedown","TomloprodModalSurgeon.startDragging(this,event);"),TomloprodModalSurgeon.modal.setAttribute("onmouseup","TomloprodModalSurgeon.stopDragging(this);")),d(TomloprodModalSurgeon.modal,"tm-showModal"),k=TomloprodModalSurgeon.modal.querySelector(".tm-closeButton"),k.addEventListener?k.addEventListener("click",TomloprodModalSurgeon.closeModal,!1):k.attachEvent&&k.attachEvent("onclick",TomloprodModalSurgeon.closeModal),n&&!o&&(document.querySelector(".tm-overlay").addEventListener?document.querySelector(".tm-overlay").addEventListener("click",TomloprodModalSurgeon.closeModal,!1):document.querySelector(".tm-overlay").attachEvent&&document.querySelector(".tm-overlay").attachEvent("onclick",TomloprodModalSurgeon.closeModal)),l&&(document.onkeyup=h),TomloprodModalSurgeon.isOpen=!0,TomloprodModalSurgeon.fire("opened")):r&&console.error("TomloprodModalSurgeon: Cannot find the indicated modal window."))},registerHandler:function(a,b){var c=!0;p[a]?e(p[a],b)===-1?p[a].push(b):(c=!1,console.error("TomloprodModalSurgeon: The event ''"+a+"'' already contain one handler with the next function:\n\n "+b)):p[a]=[b],r&&c&&console.info("TomloprodModalSurgeon: There are one new handler registered to the event ''"+a+"'':\n\n "+b+". \n\nTotal handlers of ''"+a+"'' event: "+p[a].length)},removeHandler:function(a,b){if(!p[a])return!1;if(b=b||!1){var c=e(p[a],b);return c>-1&&(p[a].splice(c,1),r&&console.info("TomloprodModalSurgeon: The handlers with the name ''"+a+"'' have been deleted successfully. ("+b+")"),!0)}delete p[a],r&&console.info("TomloprodModalSurgeon: The handler ''"+a+"'' has been deleted successfully. ("+b+")")},fire:function(a){if(!p[a])return r&&console.info("TomloprodModalSurgeon: There aren't any handlers registered for ''"+a+"''"),!1;var b;for(b=0;b<p[a].length;b+=1)p[a][b].apply(window,Array.prototype.slice.call(arguments,1))},create:function(a){if(null===t){t="tm-create"+Math.floor(Date.now()/1e3);var b=document.createElement("DIV");b.id=t,b.className="tm-modal tm-effect tm-draggable";var c=document.createElement("DIV");c.className="tm-wrapper",b.appendChild(c);var d=document.createElement("DIV");d.className="tm-title",c.appendChild(d);var e=document.createElement("SPAN");e.className="tm-XButton tm-closeButton",d.appendChild(e);var f=document.createElement("H3");f.className="tm-title-text",d.appendChild(f);var g=document.createElement("DIV");g.className="tm-content",c.appendChild(g),document.body.insertBefore(b,document.body.firstChild)}TomloprodModalSurgeon.openModal(t,a)},start:function(b){var c=document.createElement("DIV");c.className="tm-overlay",document.body.appendChild(c);var e=null;if("undefined"!=typeof b)for(e in b)if("undefined"!=typeof b[e])switch(e){case"draggable":m=b[e];break;case"bgColor":a(document.getElementsByClassName("tm-wrapper"),"backgroundColor",b[e]);break;case"borderRadius":a(document.getElementsByClassName("tm-wrapper"),"-webkit-border-radius",b[e]),a(document.getElementsByClassName("tm-wrapper"),"-moz-border-radius",b[e]),a(document.getElementsByClassName("tm-wrapper"),"border-radius",b[e]);break;case"textColor":a(document.getElementsByClassName("tm-content"),"color",b[e]),a(document.getElementsByClassName("tm-wrapper"),"color",b[e]);break;case"closeOnOverlay":n=b[e];break;case"overlayColor":document.querySelector(".tm-overlay").style.backgroundColor=b[e];break;case"removeOverlay":b[e]&&(o=b[e],c=document.querySelector(".tm-overlay"),c&&c.parentNode.removeChild(document.querySelector(".tm-overlay")));break;case"showMessages":r=b[e];break;case"closeOnEsc":l=b[e];break;case"idMainContainer":q=document.getElementById(b[e]),d(q,"tm-MainContainer")}document.addEventListener?document.addEventListener("click",i):document.attachEvent&&document.attachEvent("onclick",i)},stop:function(){document.onclick=null;for(var a=document.getElementsByTagName("A"),b=0;b<a.length;b++){var c=a[b];c.onclick=null}},closeModal:function(a){if("undefined"!=typeof a&&a.stopPropagation(),window.clearTimeout(s),f(q,"tm-effect"),f(TomloprodModalSurgeon.modal,"tm-showModal"),k.removeEventListener("click",TomloprodModalSurgeon.closeModal,!1),TomloprodModalSurgeon.isOpen){var b=TomloprodModalSurgeon.modal.querySelectorAll(".tm-emptyOnClose"),c=0;for(c=0;c<b.length;c+=1)"INPUT"===b[c].tagName?b[c].value="":b[c].innerHTML=""}TomloprodModalSurgeon.stopDragging(TomloprodModalSurgeon.modal),TomloprodModalSurgeon.modal=[],TomloprodModalSurgeon.isOpen=!1,TomloprodModalSurgeon.fire("closed")},startDragging:function(a,b){b=b||window.event,a.style.cursor="move";var c=a.offsetTop,e=a.offsetLeft,f=TomloprodModalSurgeon.modal.offsetWidth/2,h=TomloprodModalSurgeon.modal.offsetHeight/2,i=parseInt(window.innerWidth,10),j=parseInt(window.innerHeight,10),k=b.clientX-e,l=b.clientY-c;document.onmousemove=function(b){b=b||window.event;var c=b.clientX-k,e=b.clientY-l;c<f&&(c=f),c+f>i&&(c=i-f),e<h&&(e=h),e+h>j&&(e=j-h),d(document.getElementsByTagName("body")[0],"tm-avoidSelection"),d(TomloprodModalSurgeon.modal,"tm-avoidSelection"),g(a,c,e)}},stopDragging:function(a){"undefined"!=typeof a.style&&(a.style.cursor="default",f(document.getElementsByTagName("body")[0],"tm-avoidSelection"),f(TomloprodModalSurgeon.modal,"tm-avoidSelection"),TomloprodModalSurgeon.fire("stopDragging"),document.onmousemove=function(){})}}}();

	    TomloprodModalSurgeon.start({
	        closeOut: true,
	        showMessages: false
	    });
	</script>
	<script>
		var saved_surgeon_code;

		function select_current_surgeon() {
			window.location = 'https://' + window.location.hostname + '/wp-admin/admin.php?page=surgeon-top-level-handle&selected_surgeon_id=' + jQuery('#current-surgeon-select').val();
		}

		function delete_surgeon_function() {
			window.location = 'https://' + window.location.hostname + '/wp-admin/admin.php?page=surgeon_manage_handle&action=delete&id=' + jQuery('#hidden_delete_surgeon_id').val();
		}

		function delete_surgeon(surgeon_id) {
			TomloprodModalSurgeon.openModal('delete-surgeon-modal');
			jQuery('#hidden_delete_surgeon_id').val(surgeon_id);
		}

		function cancel_return_function() {
			window.location = 'https://' + window.location.hostname + '/wp-admin/admin.php?page=surgeon-top-level-handle&action=cancel_return&id=' + jQuery('#hidden_cancel_return_id').val();
		}

		function cancel_return(return_id) {
			TomloprodModalSurgeon.openModal('cancel-return-modal');
			jQuery('#hidden_cancel_return_id').val(return_id);
		}

		function confirm_return_function() {
			window.location = 'https://' + window.location.hostname + '/wp-admin/admin.php?page=surgeon-top-level-handle&action=return&id=' + jQuery('#hidden_return_id').val();
		}

		function confirm_return(return_id) {
			TomloprodModalSurgeon.openModal('confirm-return-modal');
			jQuery('#hidden_return_id').val(return_id);
		}

		function enter_code_function() {
			TomloprodModalSurgeon.openModal('enter-code-modal');
		}
		function enter_name_and_zip_function() {
			TomloprodModalSurgeon.closeModal();
			TomloprodModalSurgeon.openModal('enter-name-and-zip-modal');
		}

		function enter_code_modal_submit() {
			console.log(jQuery('#entered_code').val());
			var data = {
				'action': 'get_surgeon_name_from_code',
				'surgeon_code': jQuery('#entered_code').val()
			};
			jQuery.post('https://' + window.location.hostname + '/wp-admin/admin-ajax.php', data, function(response) {
					TomloprodModalSurgeon.closeModal();
					if (response.data && response.code) {
						saved_surgeon_code = response.code;
						jQuery('#verify-surgeon-name').html('Great! NightLift has been recommeneded to you by ' + response.data + '. Is this your doctor?');
						TomloprodModalSurgeon.openModal('verify-surgeon-modal');
					} else {
						TomloprodModalSurgeon.openModal('no-surgeon-modal');
					}
			});
		}

		function enter_name_and_zip_modal_submit() {
			console.log(jQuery('#entered_name').val());
			console.log(jQuery('#entered_zip').val());
			var data = {
				'action': 'get_surgeon_name_from_name_and_zip',
				'surgeon_name': jQuery('#entered_name').val(),
				'surgeon_zip': jQuery('#entered_zip').val(),
			};
			jQuery.post('https://' + window.location.hostname + '/wp-admin/admin-ajax.php', data, function(response) {
					TomloprodModalSurgeon.closeModal();
					if (response.data && response.code) {
						saved_surgeon_code = response.code;
						jQuery('#verify-surgeon-name').html('Great! NightLift has been recommeneded to you by ' + response.data + '. Is this your doctor?');
						TomloprodModalSurgeon.openModal('verify-surgeon-modal');
					} else {
						TomloprodModalSurgeon.openModal('no-surgeon-name-and-zip-modal');
					}
			});
		}

		function try_again_modal_submit() {
			var data = {
				'action': 'get_surgeon_name_from_code',
				'surgeon_code': jQuery('#try_again_code').val()
			};
			jQuery.post('https://' + window.location.hostname + '/wp-admin/admin-ajax.php', data, function(response) {
					TomloprodModalSurgeon.closeModal();
					if (response.data) {
						saved_surgeon_code = response.code;
						jQuery('#verify-surgeon-name').html('Great! NightLift has been recommeneded to you by ' + response.data + '. Is this your doctor?');
						TomloprodModalSurgeon.openModal('verify-surgeon-modal');
					} else {
						TomloprodModalSurgeon.openModal('no-surgeon-modal');
					}
			});
		}

		function try_again_name_and_zip_modal_submit() {
			var data = {
				'action': 'get_surgeon_name_from_name_and_zip',
				'surgeon_name': jQuery('#try_again_name').val(),
				'surgeon_zip': jQuery('#try_again_zip').val(),
			};
			jQuery.post('https://' + window.location.hostname + '/wp-admin/admin-ajax.php', data, function(response) {
					TomloprodModalSurgeon.closeModal();
					if (response.data) {
						saved_surgeon_code = response.code;
						jQuery('#verify-surgeon-name').html('Great! NightLift has been recommeneded to you by ' + response.data + '. Is this your doctor?');
						TomloprodModalSurgeon.openModal('verify-surgeon-modal');
					} else {
						TomloprodModalSurgeon.openModal('no-surgeon-name-and-zip-modal');
					}
			});
		}

		function try_again_function() {
			TomloprodModalSurgeon.closeModal();
			TomloprodModalSurgeon.openModal('enter-code-modal');
		}

		function verify_surgeon_modal_submit() {
			var data = {
				'action': 'verify_surgeon_name',
				'surgeon_code': saved_surgeon_code
			};
			jQuery.post('https://' + window.location.hostname + '/wp-admin/admin-ajax.php', data, function(response) {
					TomloprodModalSurgeon.closeModal();
					go_to_shop();
			});
		}

		function generate_surgeon_card(id) {
			console.log(id);
			var data = {
				'action': 'get_surgeon_card',
				'surgeon_id': id
			};
			jQuery.post('https://' + window.location.hostname + '/wp-admin/admin-ajax.php', data, function(response) {
				if (response.data == "success") {
					window.open('https://' + window.location.hostname + '/card/' + response.file_name);
				}
			});
		}

		function go_to_shop() {
			window.location = 'https://' + window.location.hostname + "/the-collection/";
		}

		function try_to_setup_enter_code_node() {
			setTimeout(function() {
				var enter_code_element = document.querySelector('#menu-item-6099');
				var enter_code_element_two = document.querySelector('[id="form-coupon-enter-code"]');
				var enter_code_element_side = document.querySelector('[title="enter-code-side"]');
				console.log('trying...');
				if (enter_code_element && enter_code_element_side) {
					console.log('found');
					enter_code_element.onclick = enter_code_function;
					enter_code_element_side.onclick = enter_code_function;
					if (enter_code_element_two) {enter_code_element_two.onclick = enter_code_function;}
				} else {
					try_to_setup_enter_code_node();
				}
			}, 1000);
		}

		try_to_setup_enter_code_node();
	</script>
	<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.nightlift.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://www.nightlift.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://www.nightlift.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://www.nightlift.com/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://www.nightlift.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://www.nightlift.com/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://www.nightlift.com/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap><sitemap><loc>https://www.nightlift.com/wp-sitemap-taxonomies-pa_size-1.xml</loc></sitemap><sitemap><loc>https://www.nightlift.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
