!function(e){var t,n,o,i,r,a,d,c,s,u=Math.random().toString(36).substring(7),m=document.referrer,f=document.location.href,h=[],p=0,l=function(e){e&&h.push("_tk="+e)},g=function(e,t=null){if(e){var n=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");if(n){if("function"==typeof t)t(unescape(n[2]));return unescape(n[2])}return null}return document.cookie},w=function(){setTimeout(function(){v()},100)},v=function(){var r;if(e.target_id||(e.polling=!1),e.target_id){if(!(r=document.getElementById(e.target_id)))return void(e.polling&&p<100&&(p++,w()));if(r.getAttribute("ssformAdded"))return;r.setAttribute("ssformAdded",1)}"http:"===window.location.protocol&&h.push("_noSsl=1"),g("__ss_tk",l);var a=h.length?h.join("&"):"",c="instance="+u,m=["<iframe",'id="'+(s="ssf_"+n)+'"','data-form-id="'+n+'"','data-instance-id="'+u+'"','src="'+d+t+"/"+n+(""!==a?"?"+a+"&"+c:"?"+c)+'"','style="overflow-y: auto;"','frameborder="0"','height="'+(i||1e3)+'"','width="'+(o||500)+'"',"></iframe>"].join(" ");r?r.innerHTML=m:document.write(m),"function"!=typeof window.postMessage&&setInterval(function(){window.location.hash.match(/^#redirectURL=(.*)/)&&(window.top.location=RegExp.$1)},500)},_=function(e){var t=e.data;if(t&&"redirect"===t.action&&t.url){if("/"===t.url.charAt(0)){var o=document.createElement("a");if(o.href=window.top.location,"pages.services"===o.hostname){var i=o.pathname.split("/",2);2===i.length&&-1===t.url.indexOf(i[1])&&(t.url="/"+i[1]+t.url)}}window.top.location=t.url}else if(t&&t.formID&&t.formID===n&&(null===t.instanceID||void 0===t.instanceID||t.instanceID===u)){var r='[data-form-id="'+n+'"][data-instance-id="'+u+'"]';(c=document.querySelector(r))||(c=document.getElementById(s)),t.force?c.height=t.height||c.height:c.height=Math.max(t.height,c.height),c.parentNode&&(c.parentNode.style.minHeight=t.height+"px",c.parentNode.parentNode&&(c.parentNode.parentNode.style.minHeight=t.height+"px"))}};!function(){if(t=e.account,n=e.formID,o=e.width||"100%",i=200,r=e.domain,a=e.hidden,d="https://",t&&n&&r){if(d+=r?r+"/prospector/form/":"app.sharpspring.com/prospector/form/",a)for(var c in a)a.hasOwnProperty(c)&&h.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));var s=g("__ss_initial_referrer");s?h.push("rf__sb="+encodeURIComponent(s)):m&&h.push("rf__sb="+encodeURIComponent(m)),f&&h.push("agentreferrer__sb="+encodeURIComponent(f)),void 0!==window.addEventListener?window.addEventListener("message",_,!1):void 0!==window.attachEvent&&window.attachEvent("onmessage",_),"interactive"!==document.readyState&&"complete"!==document.readyState&&e.target_id?document.addEventListener?document.addEventListener("DOMContentLoaded",function(){w()}):document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&v()}):v()}else console&&console.warn&&console.warn("It seems that the embed code was not implemented correctly. ")}()}(ss_form);