/*! Holder - client side image placeholders Version 2.5.2+2mg3u © 2015 Ivan Malopinsky - http://imsky.co Site: http://holderjs.com Issues: https://github.com/imsky/holder/issues License: http://opensource.org/licenses/MIT */ !function(a,b,c){b[a]=c}("onDomReady",this,function(a){"use strict";function b(a){if(!v){if(!g.body)return e(b);for(v=!0;a=w.shift();)e(a)}}function c(a){(t||a.type===i||g[m]===l)&&(d(),b())}function d(){t?(g[s](q,c,j),a[s](i,c,j)):(g[o](r,c),a[o](k,c))}function e(a,b){setTimeout(a,+b>=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v},f}(this)),document.querySelectorAll||(document.querySelectorAll=function(a){var b,c=document.createElement("style"),d=[];for(document.documentElement.firstChild.appendChild(c),document._qsa=[],c.styleSheet.cssText=a+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),c.parentNode.removeChild(c);document._qsa.length;)b=document._qsa.shift(),b.style.removeAttribute("x-qsa"),d.push(b);return document._qsa=null,d}),document.querySelector||(document.querySelector=function(a){var b=document.querySelectorAll(a);return b.length?b[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(a){return a=String(a).replace(/^|\s+/g,"."),document.querySelectorAll(a)}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw TypeError("Object.keys called on non-object");var b,c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c}),function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.atob=a.atob||function(a){a=String(a);var c,d=0,e=[],f=0,g=0;if(a=a.replace(/\s/g,""),a.length%4===0&&(a=a.replace(/=+$/,"")),a.length%4===1)throw Error("InvalidCharacterError");if(/[^+/0-9A-Za-z]/.test(a))throw Error("InvalidCharacterError");for(;d>16&255)),e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f)),g=0,f=0),d+=1;return 12===g?(f>>=4,e.push(String.fromCharCode(255&f))):18===g&&(f>>=2,e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f))),e.join("")},a.btoa=a.btoa||function(a){a=String(a);var c,d,e,f,g,h,i,j=0,k=[];if(/[^\x00-\xFF]/.test(a))throw Error("InvalidCharacterError");for(;j>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,j===a.length+2?(h=64,i=64):j===a.length+1&&(i=64),k.push(b.charAt(f),b.charAt(g),b.charAt(h),b.charAt(i));return k.join("")}}(this),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(a){var b=this.__proto__||this.constructor.prototype;return a in this&&(!(a in b)||b[a]!==this[a])}),window.requestAnimationFrame||(window.webkitRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return webkitRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=webkitCancelAnimationFrame}(this):window.mozRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return mozRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=mozCancelAnimationFrame}(this):!function(a){a.requestAnimationFrame=function(b){return a.setTimeout(b,1e3/60)},a.cancelAnimationFrame=a.clearTimeout}(this)),function(a,b){a.augment=b()}(this,function(){var a=function(){},b=Array.prototype.slice,c=function(c,d){var e=a.prototype="function"==typeof c?c.prototype:c,f=new a,g=d.apply(f,b.call(arguments,2).concat(e));if("object"==typeof g)for(var h in g)f[h]=g[h];if(!f.hasOwnProperty("constructor"))return f;var i=f.constructor;return i.prototype=f,i};return c.defclass=function(a){var b=a.constructor;return b.prototype=a,b},c.extend=function(a,b){return c(a,function(a){return this.uber=a,b})},c}),function(a,b){function c(a,b,c,f){var g=d(c.substr(c.lastIndexOf(a.domain)),a);g&&e({mode:null,el:f,flags:g,engineSettings:b})}function d(a,b){for(var c={theme:s(G.settings.themes.gray,null),stylesheets:b.stylesheets,holderURL:[]},d=!1,e=String.fromCharCode(11),f=a.replace(/([^\\])\//g,"$1"+e).split(e),g=/%[0-9a-f]{2}/gi,h=f.length,i=0;h>i;i++){var j=f[i];if(j.match(g))try{j=decodeURIComponent(j)}catch(k){j=f[i]}var l=!1;if(G.flags.dimensions.match(j))d=!0,c.dimensions=G.flags.dimensions.output(j),l=!0;else if(G.flags.fluid.match(j))d=!0,c.dimensions=G.flags.fluid.output(j),c.fluid=!0,l=!0;else if(G.flags.textmode.match(j))c.textmode=G.flags.textmode.output(j),l=!0;else if(G.flags.colors.match(j)){var m=G.flags.colors.output(j);c.theme=s(c.theme,m),l=!0}else if(b.themes[j])b.themes.hasOwnProperty(j)&&(c.theme=s(b.themes[j],null)),l=!0;else if(G.flags.font.match(j))c.font=G.flags.font.output(j),l=!0;else if(G.flags.auto.match(j))c.auto=!0,l=!0;else if(G.flags.text.match(j))c.text=G.flags.text.output(j),l=!0;else if(G.flags.size.match(j))c.size=G.flags.size.output(j),l=!0;else if(G.flags.random.match(j)){null==G.vars.cache.themeKeys&&(G.vars.cache.themeKeys=Object.keys(b.themes));var n=G.vars.cache.themeKeys[0|Math.random()*G.vars.cache.themeKeys.length];c.theme=s(b.themes[n],null),l=!0}l&&c.holderURL.push(j)}return c.holderURL.unshift(b.domain),c.holderURL=c.holderURL.join("/"),d?c:!1}function e(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,g=d.dimensions,h=d.theme,k=g.width+"x"+g.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.text&&(h.text=d.text,"object"===c.nodeName.toLowerCase())){for(var l=h.text.split("\\n"),m=0;m1){var l=0,m=0,n=a.width*G.setup.lineWrapRatio,o=0;k=new e.Group("line"+o);for(var p=0;p=n||r===!0)&&(b(g,k,l,g.properties.leading),l=0,m+=g.properties.leading,o+=1,k=new e.Group("line"+o),k.y=m),r!==!0&&(j.moveTo(l,0),l+=i.spaceWidth+q.width,k.add(j))}b(g,k,l,g.properties.leading);for(var s in g.children)k=g.children[s],k.moveTo((g.width-k.width)/2,null,null);g.moveTo((a.width-g.width)/2,(a.height-g.height)/2,null),(a.height-g.height)/2<0&&g.moveTo(null,0,null)}else j=new e.Text(a.text),k=new e.Group("line0"),k.add(j),g.add(k),g.moveTo((a.width-i.boundingBox.width)/2,(a.height-i.boundingBox.height)/2,null);return d}function h(a,b,c){var d=parseInt(a,10),e=parseInt(b,10),f=Math.max(d,e),g=Math.min(d,e),h=.8*Math.min(g,f*G.defaults.scale);return Math.round(Math.max(c,h))}function i(a){var b;b=null==a||null==a.nodeType?G.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var g=e.holderData.flags,h=k(e);if(h){if(!e.holderData.resizeUpdate)continue;if(g.fluid&&g.auto){var i=e.holderData.fluidConfig;switch(i.mode){case"width":h.height=h.width/i.ratio;break;case"height":h.width=h.height*i.ratio}}var j={mode:"image",holderSettings:{dimensions:h,theme:g.theme,flags:g},el:e,engineSettings:e.holderData.engineSettings};"exact"==g.textmode&&(g.exactDimensions=h,j.holderSettings.dimensions=g.dimensions),f(j)}else n(e)}}}function j(a){if(a.holderData){var b=k(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else n(a)}}function k(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1}function l(){for(var a,c=[],d=Object.keys(G.vars.invisibleImages),e=0,f=d.length;f>e;e++)a=G.vars.invisibleImages[d[e]],k(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete G.vars.invisibleImages[d[e]]);c.length&&F.run({images:c}),b.requestAnimationFrame(l)}function m(){G.vars.visibilityCheckStarted||(b.requestAnimationFrame(l),G.vars.visibilityCheckStarted=!0)}function n(a){a.holderData.invisibleId||(G.vars.invisibleId+=1,G.vars.invisibleImages["i"+G.vars.invisibleId]=a,a.holderData.invisibleId=G.vars.invisibleId)}function o(a,b){return null==b?C.createElement(a):C.createElementNS(b,a)}function p(a,b){for(var c in b)a.setAttribute(c,b[c])}function q(a,b,c){if(null==a){a=o("svg",A);var d=o("defs",A);a.appendChild(d)}a.webkitMatchesSelector&&a.setAttribute("xmlns",A);for(var e=0;e","application/xml"),h=f.length-1;h>=0;h--){var i=g.createProcessingInstruction("xml-stylesheet",'href="'+f[h]+'" rel="stylesheet"');g.insertBefore(i,g.firstChild)}var j=g.createProcessingInstruction("xml",'version="1.0" encoding="UTF-8" standalone="yes"');g.insertBefore(j,g.firstChild),g.removeChild(g.documentElement),e=d.serializeToString(g)}var k=d.serializeToString(a);return k=k.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),e+k}}function s(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(null!=b)for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);return c}function t(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);return b.join(";")}function u(a){G.vars.debounceTimer||a.call(this),G.vars.debounceTimer&&b.clearTimeout(G.vars.debounceTimer),G.vars.debounceTimer=b.setTimeout(function(){G.vars.debounceTimer=null,a.call(this)},G.setup.debounce)}function v(){u(function(){i(null)})}function w(a){var c=null;return"string"==typeof a?c=C.querySelectorAll(a):b.NodeList&&a instanceof b.NodeList?c=a:b.Node&&a instanceof b.Node?c=[a]:b.HTMLCollection&&a instanceof b.HTMLCollection?c=a:a instanceof Array?c=a:null===a&&(c=[]),c}function x(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.onload=function(){b.call(this,!0)},c.src=a}function y(a){for(var b=[],c=0,d=a.length-1;d>=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["&#",c,";"].join(""):a[d]);return b.join("")}function z(a){return a.replace(/&#(\d+);/g,function(a,b){return String.fromCharCode(b)})}var A="http://www.w3.org/2000/svg",B=8,C=b.document,D="2.5.2",E="\nCreated with Holder.js "+D+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n",F={version:D,addTheme:function(a,b){return null!=a&&null!=b&&(G.settings.themes[a]=b),delete G.vars.cache.themeKeys,this},addImage:function(a,b){var c=C.querySelectorAll(b);if(c.length)for(var d=0,e=c.length;e>d;d++){var f=o("img");p(f,{"data-src":a}),c[d].appendChild(f)}return this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&i(a))},run:function(a){a=a||{};var f={};G.vars.preempted=!0;var g=s(G.settings,a);f.renderer=g.renderer?g.renderer:G.setup.renderer,-1===G.setup.renderers.join(",").indexOf(f.renderer)&&(f.renderer=G.setup.supportsSVG?"svg":G.setup.supportsCanvas?"canvas":"html");var h=w(g.images),i=w(g.bgnodes),j=w(g.stylenodes),k=w(g.objects);f.stylesheets=[],f.svgXMLStylesheet=!0,f.noFontFallback=g.noFontFallback?g.noFontFallback:!1;for(var l=0;l1){c.nodeValue="";for(var v=0;v