File: /home/eatingdisordersadvice.co.uk/public_html/ssl/main.js
var PF_VERSION="2014-07-14-121537937",pfMod=window.pfMod||function(e,t){var i=e.document,n=i.location.protocol,o={environment:"production",protocol:n,dir:"ltr",usingBM:!1,hosts:{cdn:"https:"==n?"https://d3nekkt1lmmhms.cloudfront.net":"http://cdn.printnicer.com",pf:n+"https://www.printfriendly.com",ds:n+"https://ds.printfriendly.com",ds_cdn:"https:"===n?"https://ds.printfriendly.com":"http://cdn.ds.printfriendly.com",pdf:n+"https://pdf.printfriendly.com",email:n+"https://email-srv.printfriendly.com",tracker:n+"https://log.printfriendly.com",page:e.location.host.split(":")[0]},domains:{page:e.location.host.split(":")[0].split("www.").pop()}},r={isReady:!1,readyBound:!1,addStyles:function(){var e="body * { z-index: 0 !important; }",t=document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e)),t.appendChild(i)},setWidthOfImages:function(){for(var e=document.getElementsByTagName("img"),t=0;t<e.length;t++){var i=e[t];-1===i.className.indexOf("hidden-originally")&&(i.width=i.width)}},convertRelativetoAbsolute:function(e){for(var t=document.getElementsByTagName(e),i=0;i<t.length;i++){var n=t[i];try{"img"===e?n.src=n.src:n.href=n.href}catch(o){}}},removeScripts:function(){for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++)("undefined"==typeof e[t].src||-1===e[t].src.indexOf("printfriendly"))&&e[t].parentNode&&(e[t].parentNode.removeChild(e[t]),t--)},processElements:function(){for(var t="|link|style|iframe|ins|noscript|object|embed|select|",i,n,o=document.body.getElementsByTagName("*"),r=0;r<o.length;r++)try{n=o[r],-1!==t.indexOf("|"+n.nodeName.toLowerCase()+"|")?(n.parentNode.removeChild(n),r--):(i="NA",i=n.currentStyle?n.currentStyle.display:e.getComputedStyle(n,null).getPropertyValue("display"),"none"===i&&(n.className+=" hidden-originally"))}catch(s){}},ready:function(){if(!r.isReady){if(!document.body)return setTimeout(r.ready,13);r.isReady=!0,r.readyFunc.call()}},doScrollCheck:function(){if(!r.isReady){try{document.documentElement.doScroll("left")}catch(e){return setTimeout(r.doScrollCheck,50)}r.detach(),r.ready()}},detach:function(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",r.completed,!1),e.removeEventListener("load",r.completed,!1)):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",r.completed),e.detachEvent("onload",r.completed))},completed:function(e){(document.addEventListener||"load"===e.type||"complete"===document.readyState)&&(r.detach(),r.ready())},bindReady:function(){if(!r.readyBound){if(r.readyBound=!0,"complete"===document.readyState)return r.ready();if(document.addEventListener)document.addEventListener("DOMContentLoaded",r.completed,!1),e.addEventListener("load",r.completed,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",r.completed),e.attachEvent("onload",r.completed);var t=!1;try{t=null==e.frameElement&&document.documentElement}catch(i){}t&&t.doScroll&&r.doScrollCheck()}}},domReady:function(e){this.readyFunc=e,this.bindReady()},canonicalize:function(e){if(e){var t=document.createElement("div");return t.innerHTML="<a></a>",t.firstChild.href=e,t.innerHTML=t.innerHTML,t.firstChild.href}return e}},s={headerImageUrl:e.pfHeaderImgUrl,headerTagline:e.pfHeaderTagline,imageDisplayStyle:e.pfImageDisplayStyle,customCSSURL:r.canonicalize(e.pfCustomCSS),disableClickToDel:e.pfdisableClickToDel,disablePDF:e.pfDisablePDF,disablePrint:e.pfDisablePrint,disableEmail:e.pfDisableEmail,hideImages:e.pfHideImages},a={version:PF_VERSION,initialized:!1,messages:[],errors:[],init:function(t){try{this.initialized=!0,this.configure(t),this.setVariables(),this.detectBrowser(),this.startIfNecessary(),e.print=this.start}catch(i){c.log(i)}},configure:function(e){if(this.config=o,e){this.config.environment="development";for(var t in e.hosts)this.config.hosts[t]=e.hosts[t]}},startIfNecessary:function(){(e.pfstyle||-1!=this.config.urls.page.indexOf("pfstyle=wp"))&&this.start()},start:function(){a.isRedirectNecessary()?a.redirect():r.domReady(function(){try{a.startTime=(new Date).getTime(),a.cacheBodyHTML(),a.createMask(),a.loadCore()}catch(e){c.log(e)}})},setVariables:function(){var t=this,i,o="production"===this.config.environment?this.version:Math.random();this.config.urls={js:{jquery:n+"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js",jqueryBackup:t.config.hosts.cdn+"/javascripts/common/jquery/1.11.0/jquery.min.js",core:t.config.hosts.cdn+"/versions/"+t.version+"/js/core.js?_="+o,algo:t.config.hosts.cdn+"/versions/"+t.version+"/js/algo.js?_="+o},css:{page:t.config.hosts.cdn+"/versions/"+t.version+"/css/main.css?_="+o},pdfMake:t.config.hosts.pdf+"/pdfs/make",email:t.config.hosts.email+"/email/new"};try{i=top.location.href}catch(r){i=e.location.href}this.config.urls.page=i,this.userSettings=s,!e.pfstyle||"bk"!==e.pfstyle&&"nbk"!==e.pfstyle&&"cbk"!==e.pfstyle||(this.config.usingBM=!0)},detectBrowser:function(){this.browser={};var e=navigator.appVersion;-1!==e.indexOf("MSIE")?(this.browser.version=parseFloat(e.split("MSIE")[1]),this.browser.isIE=!0):this.browser.isIE=!1},detectPlatforms:function(){var t=document.styleSheets,i=/wp-content/i,n=/blogger.com/i;if("wikihow.com"===this.config.domains.page)this.config.isWikiHow=!0;else if("wsite"===e.STYLE_PREFIX)this.config.isWeebly=!0;else for(var o=0;o<t.length;o++){if(null!==t[o].href&&-1!==t[o].href.search(i)){this.config.isWP=!0;break}if(null!==t[o].href&&-1!==t[o].href.search(n)){this.config.isBlogger=!0;break}}},createIframe:function(e){var t=e.createElement("iframe");return t.src="javascript:false",t.frameBorder="0",t.allowTransparency="true",t},loadHtmlInIframe:function(e,t,i){var n,o;try{o=t.contentWindow.document}catch(r){n=e.domain,t.src="javascript:var d=document.open();d.domain='"+n+"';void(0);",o=t.contentWindow.document}o.write(i),o.close()},redirect:function(){var e=["redirect=1","url="+encodeURIComponent(top.location.href)];for(var t in s)"undefined"!=typeof s[t]&&e.push(t+"="+encodeURIComponent(s[t]));top.location.replace(this.config.hosts.pf+"/print/?"+e.join("&"))},isRedirectNecessary:function(){try{return navigator.userAgent.match(/(iphone|ipad|ipod|android|opera.mini)/i)||this.browser.isIE&&this.browser.version<8||"undefined"!=typeof $&&$.jcarousel&&this.browser.isIE||this.browser.isIE&&this.browser.version<9&&"skinnytaste.com"===this.config.domains.page?!0:!1}catch(e){return!1}},createMask:function(){var e=document.createElement("div");e.innerHTML='<div id="pf-mask" style="z-index: 2147483627!important; position: fixed !important; top: 0pt !important; left: 0pt !important; background-color: rgb(0, 0, 0) !important; opacity: 0.8 !important;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80); height: 100% !important; width: 100% !important;"></div>',document.body.appendChild(e.firstChild)},cacheBodyHTML:function(){r.addStyles(),r.convertRelativetoAbsolute("a"),r.convertRelativetoAbsolute("img"),r.removeScripts(),r.processElements(),r.setWidthOfImages(),a.detectPlatforms(),a.bodyCache='<div id="'+document.body.id+'" class="'+document.body.className+' pf-body-cache">'+document.body.innerHTML+"</div>",a.browser.isIE&&(document.body.innerHTML="<p></p>")},refresh:function(){var t=a.config.urls.page.replace("pfstyle=wp","").replace(/#(.*)$/,"");try{return document.body.innerHTML='<div style="position:absolute; top:0; bottom:0; left:0; right:0; padding:10%; text-align:center; background:#333;"> </div>',-1===a.config.urls.page.indexOf("pfstyle")?e.top.location.reload():e.top.location.href=t,!1}catch(i){setTimeout(function(){e.top.location.replace(t)},100)}},removeDoubleSemiColon:function(e){return e.replace(/;{2}/g,";")},loadCore:function(){var e='<!DOCTYPE html><html><head><meta http-equiv="X-UA-Compatible" content="IE=edge" /><script src="'+this.config.urls.js.jquery+'"></script><script src="'+this.config.urls.js.core+'"></script><link media="screen" type="text/css" rel="stylesheet" href="'+this.config.urls.css.page+'"></head><body onload="core.init();"></body>',t=this.createIframe(document);t.id="pf-core",document.body.appendChild(t);var i=t.style.cssText+";width: 100% !important;max-width:100% !important;height: 100% !important; display: block !important; overflow: hidden !important; position: absolute !important; top: 0px !important; left: 0px !important; background-color: transparent !important; z-index: 2147483637!important";t.style.cssText=this.removeDoubleSemiColon(i),this.loadHtmlInIframe(document,t,e)}},c={_window:e.top,_doc:e.top.document,installInitiated:!1,validFile:/d3nekkt1lmmhms|printfriendly\.com|printnicer\.com|algo\.js|printfriendly\.js|core\.js/,setVars:function(){this._window.frames["pf-core"]&&this._window.frames["pf-core"].document&&(this._window=this._window.frames["pf-core"],this._doc=this._window.document)},install:function(){if(this.installInitiated)return!0;var t;t=e.JSON&&e.JSON.stringify?"https://cdn.ravenjs.com/1.1.11/raven.min.js":a.config.hosts.cdn+"/javascripts/raven/1.1.11/json_raven.min.js",this.installInitiated=!0,this.setVars();var i=this._doc.createElement("script"),n=this._doc.getElementsByTagName("script")[0];i.src=t,n.parentNode.appendChild(i),this.wait()},wait:function(){return this._window.Raven?(this.configure(),this.pushExistingErrors(),void 0):setTimeout(function(){c.wait()},100)},configure:function(){this._window.Raven.config("https://4b3437355eed4d3abf6ee3a5fea7aeca@app.getsentry.com/22091",{dataCallback:function(e){var t,i;try{t=e.stacktrace.frames[0],t.filename.match(c.validFile)&&"onload"!==t["function"]||e.stacktrace.frames.shift()}catch(n){}return e},shouldSendCallback:function(e){return e&&e.extra&&e.extra.file?!0:e&&e.culprit&&e.culprit.match(c.validFile)?!0:!1}}).install()},sendError:function(e,t){t="undefined"!=typeof t?{file:t.file,ignore:t.ignore}:{file:"printfriendly.js"},"production"===a.config.environment&&this._window.Raven.captureException(e,{extra:t})},pushExistingErrors:function(){for(var e=0;e<a.errors.length;e++)this.sendError(a.errors[e].err,a.errors[e].opts)},log:function(e,t){t=t||{file:"printfriendly.js"};try{this._window.Raven?this.sendError(e,t):(a.errors.push({err:e,opts:t}),this.install(),a.messages.push(e.name+" : "+e.message),a.messages.push(e.stack))}catch(i){}}};return a.exTracker=c,a}(window),priFri=pfMod;"algo"===window.name||"pf-core"===window.name||pfMod.initialized||pfMod.init(window.pfOptions);
//# sourceMappingURL=printfriendly.js.map