text: !function(){function i(){}function a(e,t){this.path=e,"undefined"!=typeof t&&null!==t?(this.at_2x_path=t,this.perform_check=!1):(this.at_2x_path=e.replace(/\.\w+$/,function(e){return"@2x"+e}),this.perform_check=!0)}function r(e){this.el=e,this.path=new a(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var t=this;this.path.check_2x_variant(function(e){e&&t.swap()})}var e="undefined"==typeof exports?window:exports,t={check_mime_type:!0};e.Retina=i,i.configure=function(e){null==e&&(e={});for(var i in e)t[i]=e[i]},i.init=function(t){null==t&&(t=e);var i=t.onload||new Function;t.onload=function(){var a,o,e=document.getElementsByTagName("img"),t=[];for(a=0;a<e.length;a++)o=e[a],t.push(new r(o));i()}},i.isRetina=function(){var t="(-webkit-min-device-pixel-ratio: 1.5),                      (min--moz-device-pixel-ratio: 1.5),                      (-o-min-device-pixel-ratio: 3/2),                      (min-resolution: 1.5dppx)";return e.devicePixelRatio>1?!0:e.matchMedia&&e.matchMedia(t).matches?!0:!1},e.RetinaImagePath=a,a.confirmed_paths=[],a.prototype.is_external=function(){return!(!this.path.match(/^https?\:/i)||this.path.match("//"+document.domain))},a.prototype.check_2x_variant=function(e){var i,r=this;return this.is_external()?e(!1):this.perform_check||"undefined"==typeof this.at_2x_path||null===this.at_2x_path?this.at_2x_path in a.confirmed_paths?e(!0):(i=new XMLHttpRequest,i.open("HEAD",this.at_2x_path),i.onreadystatechange=function(){if(4!=i.readyState)return e(!1);if(i.status>=200&&i.status<=399){if(t.check_mime_type){var o=i.getResponseHeader("Content-Type");if(null==o||!o.match(/^image/i))return e(!1)}return a.confirmed_paths.push(r.at_2x_path),e(!0)}return e(!1)},i.send(),void 0):e(!0)},e.RetinaImage=r,r.prototype.swap=function(e){function i(){t.el.complete?(t.el.setAttribute("width",t.el.offsetWidth),t.el.setAttribute("height",t.el.offsetHeight),t.el.setAttribute("src",e)):setTimeout(i,5)}"undefined"==typeof e&&(e=this.path.at_2x_path);var t=this;i()},i.isRetina()&&i.init(e)}();