\").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,\"position\"),l=m(a),n={};\"static\"===k&&(a.style.position=\"relative\"),h=l.offset(),f=m.css(a,\"top\"),i=m.css(a,\"left\"),j=(\"absolute\"===k||\"fixed\"===k)&&m.inArray(\"auto\",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),\"using\"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return\"fixed\"===m.css(d,\"position\")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],\"html\")||(c=a.offset()),c.top+=m.css(a[0],\"borderTopWidth\",!0),c.left+=m.css(a[0],\"borderLeftWidth\",!0)),{top:b.top-c.top-m.css(d,\"marginTop\",!0),left:b.left-c.left-m.css(d,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,\"html\")&&\"static\"===m.css(a,\"position\"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each([\"top\",\"left\"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+\"px\":c):void 0})}),m.each({Height:\"height\",Width:\"width\"},function(a,b){m.each({padding:\"inner\"+a,content:b,\"\":\"outer\"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||\"boolean\"!=typeof d),g=c||(d===!0||e===!0?\"margin\":\"border\");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement[\"client\"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body[\"scroll\"+a],e[\"scroll\"+a],b.body[\"offset\"+a],e[\"offset\"+a],e[\"client\"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,\"function\"==typeof define&&define.amd&&define(\"jquery\",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});\n//# sourceMappingURL=jquery.min.map","window.SUB = window.SUB || {};\r\n\r\nSUB.el = {\r\n\thtml : $('html')\r\n};\r\n\r\n$(function() {\r\n\tSUB.checkMobile();\r\n\tSUB.nav.init();\r\n\tSUB.Tracking.init();\r\n\t$(window).resize(\r\n\t\t_.throttle(SUB.checkMobile, 250)\r\n\t);\r\n});\r\n\r\nSUB.checkMobile= function(){\r\n\t// add \"mobile\" class if it's a mobile phone\r\n\t// used to create the \"rotate your phone\" message\r\n\t// if mobile user is viewing site in landscape orientation\r\n\tif(jQuery.browser.mobile){\r\n\t\tSUB.el.html.addClass('mobile');\r\n\t} else{\r\n\t\tSUB.el.html.removeClass('mobile');\r\n\t}\r\n};\r\n\r\n\r\nSUB.nav = {\r\n\tinit : function(){\r\n\t\tvar $header = $('header');\r\n\t\t$header.find('.mobile_nav').click(function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tvar $nav =$header.find('span.nav');\r\n\t\t\t$nav.toggleClass('open');\r\n\t\t})\r\n\t}\r\n};\r\n\r\n\r\nSUB.Tracking = {\r\n\tinit: function () {\r\n\t\t// link tracking (finds and tracks links with class=\"track category|action|label\" applied)\r\n\t\t$(\"body\").on(\"click\", \"a.track\", function (e) {\r\n\t\t\tvar ev = getEventString(this.className),\r\n\t\t\t\ttarget = null,\r\n\t\t\t\tcallback = null,\r\n\t\t\t\thref = null;\r\n\t\t\tif (ev) {\r\n\t\t\t\tif (this.className.match(/action/)) { // use \"action\" rather than \"event\" tracking\r\n\t\t\t\t\tev = \"/\" + ev.replace(/\\|/g, \"/\");\r\n\t\t\t\t}\r\n\t\t\t\ttarget = this.target;\r\n\t\t\t\tif (!target || target.match(/^_(self)|(top)$/i) ) {\r\n\t\t\t\t\thref = $(e.target).closest(\"a\")[0].href;\r\n\t\t\t\t\tcallback = function () {\r\n\t\t\t\t\t\tif ( !href.match(/#$/) ) {\r\n\t\t\t\t\t\t\tif ( target.match(/^_top$/i) ) {\r\n\t\t\t\t\t\t\t\ttop.location.href = href;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlocation.href = href;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\tBGC.track(ev, callback);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfunction getEventString (s) {\r\n\t\t\tvar ev = \"\";\r\n\t\t\ts = s.split(\" \");\r\n\t\t\t$.each(s, function () {\r\n\t\t\t\tif (this.indexOf(\"|\") > -1) {\r\n\t\t\t\t\tev = this.toString();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn ev;\r\n\t\t};\r\n\t}//end init()\r\n};\r\n\r\n\r\n\r\nSUB.videoPrep = {\r\n\tinit : function(){\r\n\t\tvar $videoLinks = $('.video_link'),\r\n\t\t\t$videoClose = $('#video_close'),\r\n\t\t\t$overlay = $('#video_overlay');\r\n\r\n\t// if Youtube is not already loaded,\r\n\t\tif (!window['YT']){\r\n\t\t\t// load YouTube iFrame API asynchronously: https://developers.google.com/youtube/iframe_api_reference\r\n\t\t\tvar tag = document.createElement('script');\r\n\r\n\t\t\ttag.src = \"https://www.youtube.com/iframe_api\";\r\n\t\t\tvar firstScriptTag = document.getElementsByTagName('script')[0];\r\n\t\t\tfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\r\n\t\t}\r\n\r\n\t// respond to Youtube onready event\r\n\t\tfunction onYouTubeIframeAPIReady() {\r\n\t\t\t// respond to published events\r\n\t\t\tvar handle = $.subscribe('expandRequested', function (el) {\r\n\t\t\t\t$('iframe[src*=\"www.youtube.com/embed/\"]').each(function(i) {\r\n\t\t\t\t\tthis.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}', '*');\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\t$videoLinks.each(function(){\r\n\t\t\tvar $this = $(this);\r\n\t\t\t$this.click(function(e){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tSUB.video($this.attr('data-ytid'), $this.attr('data-playlist'));\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t$videoClose.click(function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tSUB.overlay(false, 'close_button');\r\n\t\t});\r\n\r\n\t\t$overlay.click(function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\tSUB.overlay(false, 'overlay_click');\r\n\t\t});\r\n\r\n\t}\r\n};\r\n\r\n\r\nSUB.video = function(ytID, playlist){\r\n\tvar $container = $('#video_container'),\r\n\t\t$iframeTarget = $container.find('.iframe_target'),\r\n\t\tid_string = 'vid_' + ytID;\r\n\r\n\t$iframeTarget.attr('id', id_string);\r\n\tSUB.ytSetup(id_string, ytID, playlist, 1, false, false, true);\r\n\r\n\tSUB.overlay(true, ytID);\r\n};\r\n\r\nSUB.overlay = function(open, trackingString){\r\n\tvar $overlay = $('#video_overlay'),\r\n\t\t$container = $('#video_container'),\r\n\t\taction = \"\";\r\n\tif(open === true){\r\n\t\t$overlay.fadeIn(100);\r\n\t\taction = \"launch_overlay\";\r\n\t} else{\r\n\t\t$overlay.hide(1);\r\n\t\taction = \"close_overlay\";\r\n\t\t$container.append('
').find('iframe').remove(); // wipe out target's html, destroy player\r\n\t}\r\n\t//GTM tracking\r\n\tdataLayer.push({event: 'event', category: 'video', action: action, label: trackingString});\r\n};\r\n\r\nSUB.ytSetup = function(id_string, ytID, playlist, autoPlay, allowRelated, loop, modestBranding){\r\n\r\n\t// otherwise, set up as single player\r\n\tvar newVideo = new YT.Player(id_string, {\r\n\t\theight: '100%',\r\n\t\twidth: '100%',\r\n\t\tvideoId: ytID,\r\n\t\tevents: {\r\n\t\t\t'onStateChange': SUB.ytTrack\r\n\t\t},\r\n\t\tplayerVars:{\r\n\t\t\tautoplay: autoPlay,\r\n\t\t\tenablejsapi : 1,\r\n\t\t\tloop: loop,\r\n\t\t\tmodestbranding: modestBranding,\r\n\t\t\tplaylist: playlist,\r\n\t\t\trel: allowRelated\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\nSUB.ytTrack= function(e){\r\n\t/*\r\n\t YT.PlayerState.ENDED\r\n\t YT.PlayerState.PLAYING\r\n\t YT.PlayerState.PAUSED\r\n\t YT.PlayerState.BUFFERING\r\n\t YT.PlayerState.CUED\r\n\t */\r\n\r\n\tvar video = e.target.getVideoData();\r\n\r\n\tif(e.data === YT.PlayerState.PLAYING){\r\n\t\tdataLayer.push({event: 'event', category: 'video', action: 'start', label:$('.iframe_target').attr('data-ytid')});\r\n\t} else if (e.data === YT.PlayerState.ENDED){\r\n\t\tdataLayer.push({event: 'event', category: 'video', action: 'finish', label:$('.iframe_target').attr('data-ytid')});\r\n\t}\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","\r\n// BGC.js.min // contains Tom Deater's race condition hack\r\n// create our namespace\r\n\r\nvar BGC = BGC || {};\r\n\r\nBGC.config = {\r\n firebugURL: \"http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js\",\r\n\r\n gaURL: ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\") + \"google-analytics.com/ga.js\",\r\n\r\n debug: false\r\n};\r\n\r\n// console logging (loads firebug lite if needed)\r\n\r\nBGC.log = function () {\r\n if (BGC.config.debug || window.location.hash.match(/debug/i)) {\r\n try {\r\n if (typeof loadFirebugConsole === \"function\" && typeof console === \"undefined\") {\r\n window.loadFirebugConsole();\r\n }\r\n console.log.apply(this, arguments);\r\n } catch (err) {\r\n BGC.log._arg.push(arguments);\r\n if (!BGC.loadscript[BGC.config.firebugURL]) {\r\n BGC.loadscript(BGC.config.firebugURL, function () {\r\n try {\r\n var a;\r\n firebug.init();\r\n while ((a = BGC.log._arg.shift())) {\r\n BGC.log(a);\r\n }\r\n } catch (err) {}\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nBGC.log._arg = [];\r\n\r\n\r\n\r\n// Override BGC.track functions to use Google Tag Manager, code by Sean McMillan\r\n// Cut out other BGC.track associated functions and vars; no longer used.\r\n// no need to init with GTM; jQuery tracking code setup is in tracking-init.js\r\n\r\nwindow.BGC = window.BGC || {};\r\n\r\nwindow.dataLayer = window.dataLayer || [];\r\n\r\nBGC.track=function(str,callback){\r\n\tif (!str || str.match(/\\//)) {\r\n\t\t// natural (null) or virtual pageView ('action/foo/bar')\r\n\t\tstr = str || location.pathname + location.search;\r\n\t\tdataLayer.push({\r\n\t\t\tevent: 'pageview',\r\n\t\t\turl: str\r\n\t\t});\r\n\t} else if (str.match(/\\|/)) {\r\n\t\t// event (foo|click|bar)\r\n\t\tstr = str.split('|');\r\n\r\n\t\tif (str.length === 3) {\r\n\t\t\tdataLayer.push({\r\n\t\t\t\tevent: 'event',\r\n\t\t\t\tcategory: str[0],\r\n\t\t\t\taction: str[1],\r\n\t\t\t\tlabel: str[2]\r\n\t\t\t});\r\n\t\t} else if (str.length === 4) {\r\n\t\t\tdataLayer.push({\r\n\t\t\t\tevent: 'event',\r\n\t\t\t\tcategory: str[0],\r\n\t\t\t\taction: str[1],\r\n\t\t\t\tlabel: str[2],\r\n\t\t\t\tvalue: parseInt(str[3], 10)\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthrow new Error('Invalid event tracking string', str.join('|'));\r\n\t\t}\r\n\t} else {\r\n\t\tthrow new Error('Invalid event tracking string', str);\r\n\t}\r\n\r\n\tif (typeof callback === 'function') {\r\n\t\twindow.setTimeout(callback, 500);\r\n\t}\r\n};\r\n\r\n\r\n\r\n// on-demand script loading\r\n\r\nBGC.loadscript = function (url, callback) {\r\n if (!BGC.loadscript[url]) {\r\n BGC.loadscript[url] = \"loading\";\r\n var done = false, head = document.getElementsByTagName('head')[0], script = document.createElement('script');\r\n script.setAttribute('type', 'text/javascript');\r\n script.setAttribute('async', true);\r\n script.setAttribute('src', url);\r\n script.onload = script.onreadystatechange = script.onerror = function () {\r\n BGC.log(url, \"readystate\", this.readyState);\r\n if (!done && (!this.readyState || this.readyState == \"loaded\" || this.readyState == \"complete\")) {\r\n done = true;\r\n BGC.loadscript[url] = \"complete\";\r\n if (typeof callback === \"function\") {\r\n callback();\r\n }\r\n script.onload = script.onreadystatechange = script.onerror = null;\r\n head.removeChild(script);\r\n }\r\n };\r\n\r\n head.appendChild(script);\r\n }\r\n};\r\n\r\n// client-side caching, see http://www.dustindiaz.com/javascript-cache-provider/\r\nBGC.CacheProvider = function () {\r\n this._cache = {};\r\n};\r\n\r\ntry {\r\n BGC.CacheProvider.hasLocalStorage = ('localStorage' in window) && window['localStorage'] !== null && typeof Storage !== 'undefined';\r\n} catch (ex) {\r\n BGC.CacheProvider.hasLocalStorage = false;\r\n}\r\n\r\nif (BGC.CacheProvider.hasLocalStorage) {\r\n Storage.prototype.setObject = function (key, value) {\r\n this.setItem( key, JSON.stringify(value) );\r\n };\r\n\r\n Storage.prototype.getObject = function (key) {\r\n return JSON.parse( this.getItem(key) );\r\n };\r\n}\r\n\r\nBGC.CacheProvider.prototype = {\r\n\r\n /**\r\n * {String} k - the key\r\n * {Boolean} local - get this from local storage?\r\n * {Boolean} o - is the value you put in local storage an object?\r\n */\r\n get: function (k, local, o) {\r\n if (local && BGC.CacheProvider.hasLocalStorage) {\r\n var action = o ? 'getObject' : 'getItem';\r\n return localStorage[action](k) || undefined;\r\n } else {\r\n return this._cache[k] || undefined;\r\n }\r\n },\r\n\r\n /**\r\n * {String} k - the key\r\n * {Object} v - any kind of value you want to store\r\n * however only objects and strings are allowed in local storage\r\n * {Boolean} local - put this in local storage\r\n */\r\n set: function (k, v, local) {\r\n if (local && BGC.CacheProvider.hasLocalStorage) {\r\n if (typeof v !== 'string') {\r\n // make assumption if it's not a string, then we're storing an object\r\n localStorage.setObject(k, v);\r\n } else {\r\n try {\r\n localStorage.setItem(k, v);\r\n } catch (ex) {\r\n if (ex.name == 'QUOTA_EXCEEDED_ERR') {\r\n // developer needs to figure out what to start invalidating\r\n throw new Exception(v);\r\n return;\r\n }\r\n }\r\n }\r\n } else {\r\n // put in our local object\r\n this._cache[k] = v;\r\n }\r\n // return our newly cached item\r\n return v;\r\n },\r\n\r\n /**\r\n * {String} k - the key\r\n * {Boolean} local - put this in local storage\r\n * {Boolean} o - is this an object you want to put in local storage?\r\n */\r\n clear: function (k, local, o) {\r\n if (local && BGC.CacheProvider.hasLocalStorage) {\r\n localStorage.removeItem(k);\r\n }\r\n // delete in both caches - doesn't hurt.\r\n delete this._cache[k];\r\n }\r\n\r\n};\r\n\r\n// cookie, querystring, and dom utilities\r\n\r\nBGC.cookie = function (name, value, options) { // adapted from http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/\r\n if (typeof value != 'undefined') { // name and value given, set cookie\r\n options = options || BGC.cookie.options;\r\n if (!isNaN(options)) { // options can be an object, or a number representing days to expiration\r\n options = {\r\n expires: options * 1 // coerce to number in case we've received a string from Flash\r\n };\r\n }\r\n if (value === null) {\r\n value = '';\r\n options.expires = -1;\r\n }\r\n var expires = '';\r\n if (options.expires && (!isNaN(options.expires) || options.expires.toUTCString)) {\r\n var date;\r\n if (!isNaN(options.expires)) {\r\n date = new Date();\r\n date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));\r\n } else {\r\n date = options.expires;\r\n }\r\n expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE\r\n }\r\n var path = options.path ? '; path=' + options.path : '';\r\n var domain = options.domain ? '; domain=' + options.domain : '';\r\n var secure = options.secure ? '; secure' : '';\r\n document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');\r\n } else { // only name given, get cookie\r\n var cookieValue = null;\r\n if (document.cookie && document.cookie !== '') {\r\n var cookies = document.cookie.split(';');\r\n for (var i = 0, l = cookies.length; i < l; i++) {\r\n var cookie = cookies[i].replace(/^\\s+|\\s+$/g, \"\");\r\n // Does this cookie string begin with the name we want?\r\n if (cookie.substring(0, name.length + 1) == (name + '=')) {\r\n cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\r\n break;\r\n }\r\n }\r\n }\r\n return cookieValue;\r\n }\r\n};\r\n\r\n// extending cookie object to make it possible to set cookie options from Flash externalInterface\r\n\r\nBGC.cookie.options = {};\r\n\r\nBGC.cookie.setOption = function (name, value) {\r\n BGC.cookie.options[name] = value;\r\n};\r\n\r\nBGC.cookie.clearOptions = function () {\r\n BGC.cookie.options = {};\r\n};\r\n\r\nBGC.query = (function () {\r\n var qString, queryStart, query, parts, bits, subbits, returnVals = {};\r\n qString = window.location.toString();\r\n queryStart = qString.indexOf('?');\r\n if (queryStart === -1) {\r\n return returnVals;\r\n }\r\n query = qString.substring(queryStart + 1, qString.length);\r\n parts = query.split(\"&\");\r\n for (var i = 0; i < parts.length; i++) {\r\n bits = parts[i].split(\"=\");\r\n if (bits[1]) {\r\n subbits = bits[1].split(\"#\");\r\n returnVals[bits[0].toLowerCase()] = subbits[0]; // query properties are lowercase!\r\n }\r\n }\r\n return returnVals;\r\n}) ();\r\n\r\nBGC.getPageSize = function () {\r\n var x = Math.max(document.documentElement.scrollWidth || document.body.scrollWidth, document.body.offsetWidth);\r\n var y = Math.max(document.documentElement.scrollHeight || document.body.scrollHeight, document.body.offsetHeight);\r\n return {\"x\": x, \"y\": y};\r\n};\r\n\r\nBGC.getViewportSize = function () {\r\n var x = self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\r\n var y = self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\r\n return {\"x\": x, \"y\": y};\r\n};\r\n\r\nBGC.getScrollOffset = function () {\r\n var x = self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft;\r\n var y = self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;\r\n return {\"x\": x, \"y\": y};\r\n};\r\n\r\nBGC.getElemPosition = function (el) {\r\n var x = 0, y = 0;\r\n if (el.offsetParent) {\r\n do {\r\n x += el.offsetLeft;\r\n y += el.offsetTop;\r\n } while ((el = el.offsetParent));\r\n }\r\n return {\"x\": x, \"y\": y};\r\n};\r\n\r\nBGC.popup = function (URL, windowName, width, height) {\r\n var options = \"scrollbars,resizable,menubar,toolbar,status\";\r\n if (width && height) {\r\n var w = screen.availWidth;\r\n var h = screen.availHeight;\r\n var leftPos = Math.round( (w - width) / 2 );\r\n var topPos = Math.round( (h - height) / 2 );\r\n var centerOnScreen = \"top=\" + topPos + \",left=\" + leftPos + \",width=\" + width + \",height=\" + height;\r\n var options = centerOnScreen + \",\" + options;\r\n }\r\n var msgWindow = window.open(URL, windowName, options);\r\n if(!msgWindow) {\r\n return false;\r\n } else {\r\n msgWindow.focus();\r\n }\r\n return true;\r\n};","/*!\n * VERSION: 1.7.5\n * DATE: 2015-02-26\n * UPDATES AND DOCS AT: http://greensock.com\n *\n * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.\n * This work is subject to the terms at http://greensock.com/standard-license or for\n * Club GreenSock members, the software agreement that was issued with your membership.\n * \n * @author: Jack Doyle, jack@greensock.com\n **/\nvar _gsScope=\"undefined\"!=typeof module&&module.exports&&\"undefined\"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){\"use strict\";var t=document.documentElement,e=window,i=function(i,r){var s=\"x\"===r?\"Width\":\"Height\",n=\"scroll\"+s,o=\"client\"+s,a=document.body;return i===e||i===t||i===a?Math.max(t[n],a[n])-(e[\"inner\"+s]||t[o]||a[o]):i[n]-i[\"offset\"+s]},r=_gsScope._gsDefine.plugin({propName:\"scrollTo\",API:2,version:\"1.7.5\",init:function(t,r,s){return this._wdw=t===e,this._target=t,this._tween=s,\"object\"!=typeof r&&(r={y:r}),this.vars=r,this._autoKill=r.autoKill!==!1,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=r.x?(this._addTween(this,\"x\",this.x,\"max\"===r.x?i(t,\"x\"):r.x,\"scrollTo_x\",!0),this._overwriteProps.push(\"scrollTo_x\")):this.skipX=!0,null!=r.y?(this._addTween(this,\"y\",this.y,\"max\"===r.y?i(t,\"y\"):r.y,\"scrollTo_y\",!0),this._overwriteProps.push(\"scrollTo_y\")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var r=this._wdw||!this.skipX?this.getX():this.xPrev,s=this._wdw||!this.skipY?this.getY():this.yPrev,n=s-this.yPrev,o=r-this.xPrev;this._autoKill&&(!this.skipX&&(o>7||-7>o)&&i(this._target,\"x\")>r&&(this.skipX=!0),!this.skipY&&(n>7||-7>n)&&i(this._target,\"y\")>s&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[]))),this._wdw?e.scrollTo(this.skipX?r:this.x,this.skipY?s:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),s=r.prototype;r.max=i,s.getX=function(){return this._wdw?null!=e.pageXOffset?e.pageXOffset:null!=t.scrollLeft?t.scrollLeft:document.body.scrollLeft:this._target.scrollLeft},s.getY=function(){return this._wdw?null!=e.pageYOffset?e.pageYOffset:null!=t.scrollTop?t.scrollTop:document.body.scrollTop:this._target.scrollTop},s._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();","/**\n * jQuery.browser.mobile (http://detectmobilebrowser.com/)\n *\n * jQuery.browser.mobile will be true if the browser is a mobile device\n *\n **/\n(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera);","/*!\n * imagesLoaded PACKAGED v3.2.0\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n/*!\n * EventEmitter v4.2.6 - git.io/ee\n * Oliver Caldwell\n * MIT license\n * @preserve\n */\n\n(function () {\n\t'use strict';\n\n\t/**\n\t * Class for managing events.\n\t * Can be extended to provide event functionality in other classes.\n\t *\n\t * @class EventEmitter Manages event registering and emitting.\n\t */\n\tfunction EventEmitter() {}\n\n\t// Shortcuts to improve speed and size\n\tvar proto = EventEmitter.prototype;\n\tvar exports = this;\n\tvar originalGlobalValue = exports.EventEmitter;\n\n\t/**\n\t * Finds the index of the listener for the event in it's storage array.\n\t *\n\t * @param {Function[]} listeners Array of listeners to search through.\n\t * @param {Function} listener Method to look for.\n\t * @return {Number} Index of the specified listener, -1 if not found\n\t * @api private\n\t */\n\tfunction indexOfListener(listeners, listener) {\n\t\tvar i = listeners.length;\n\t\twhile (i--) {\n\t\t\tif (listeners[i].listener === listener) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\t/**\n\t * Alias a method while keeping the context correct, to allow for overwriting of target method.\n\t *\n\t * @param {String} name The name of the target method.\n\t * @return {Function} The aliased method\n\t * @api private\n\t */\n\tfunction alias(name) {\n\t\treturn function aliasClosure() {\n\t\t\treturn this[name].apply(this, arguments);\n\t\t};\n\t}\n\n\t/**\n\t * Returns the listener array for the specified event.\n\t * Will initialise the event object and listener arrays if required.\n\t * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n\t * Each property in the object response is an array of listener functions.\n\t *\n\t * @param {String|RegExp} evt Name of the event to return the listeners from.\n\t * @return {Function[]|Object} All listener functions for the event.\n\t */\n\tproto.getListeners = function getListeners(evt) {\n\t\tvar events = this._getEvents();\n\t\tvar response;\n\t\tvar key;\n\n\t\t// Return a concatenated array of all matching events if\n\t\t// the selector is a regular expression.\n\t\tif (typeof evt === 'object') {\n\t\t\tresponse = {};\n\t\t\tfor (key in events) {\n\t\t\t\tif (events.hasOwnProperty(key) && evt.test(key)) {\n\t\t\t\t\tresponse[key] = events[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tresponse = events[evt] || (events[evt] = []);\n\t\t}\n\n\t\treturn response;\n\t};\n\n\t/**\n\t * Takes a list of listener objects and flattens it into a list of listener functions.\n\t *\n\t * @param {Object[]} listeners Raw listener objects.\n\t * @return {Function[]} Just the listener functions.\n\t */\n\tproto.flattenListeners = function flattenListeners(listeners) {\n\t\tvar flatListeners = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < listeners.length; i += 1) {\n\t\t\tflatListeners.push(listeners[i].listener);\n\t\t}\n\n\t\treturn flatListeners;\n\t};\n\n\t/**\n\t * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n\t *\n\t * @param {String|RegExp} evt Name of the event to return the listeners from.\n\t * @return {Object} All listener functions for an event in an object.\n\t */\n\tproto.getListenersAsObject = function getListenersAsObject(evt) {\n\t\tvar listeners = this.getListeners(evt);\n\t\tvar response;\n\n\t\tif (listeners instanceof Array) {\n\t\t\tresponse = {};\n\t\t\tresponse[evt] = listeners;\n\t\t}\n\n\t\treturn response || listeners;\n\t};\n\n\t/**\n\t * Adds a listener function to the specified event.\n\t * The listener will not be added if it is a duplicate.\n\t * If the listener returns true then it will be removed after it is called.\n\t * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to attach the listener to.\n\t * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.addListener = function addListener(evt, listener) {\n\t\tvar listeners = this.getListenersAsObject(evt);\n\t\tvar listenerIsWrapped = typeof listener === 'object';\n\t\tvar key;\n\n\t\tfor (key in listeners) {\n\t\t\tif (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n\t\t\t\tlisteners[key].push(listenerIsWrapped ? listener : {\n\t\t\t\t\tlistener: listener,\n\t\t\t\t\tonce: false\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of addListener\n\t */\n\tproto.on = alias('addListener');\n\n\t/**\n\t * Semi-alias of addListener. It will add a listener that will be\n\t * automatically removed after it's first execution.\n\t *\n\t * @param {String|RegExp} evt Name of the event to attach the listener to.\n\t * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.addOnceListener = function addOnceListener(evt, listener) {\n\t\treturn this.addListener(evt, {\n\t\t\tlistener: listener,\n\t\t\tonce: true\n\t\t});\n\t};\n\n\t/**\n\t * Alias of addOnceListener.\n\t */\n\tproto.once = alias('addOnceListener');\n\n\t/**\n\t * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n\t * You need to tell it what event names should be matched by a regex.\n\t *\n\t * @param {String} evt Name of the event to create.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.defineEvent = function defineEvent(evt) {\n\t\tthis.getListeners(evt);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Uses defineEvent to define multiple events.\n\t *\n\t * @param {String[]} evts An array of event names to define.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.defineEvents = function defineEvents(evts) {\n\t\tfor (var i = 0; i < evts.length; i += 1) {\n\t\t\tthis.defineEvent(evts[i]);\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Removes a listener function from the specified event.\n\t * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to remove the listener from.\n\t * @param {Function} listener Method to remove from the event.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.removeListener = function removeListener(evt, listener) {\n\t\tvar listeners = this.getListenersAsObject(evt);\n\t\tvar index;\n\t\tvar key;\n\n\t\tfor (key in listeners) {\n\t\t\tif (listeners.hasOwnProperty(key)) {\n\t\t\t\tindex = indexOfListener(listeners[key], listener);\n\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\tlisteners[key].splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of removeListener\n\t */\n\tproto.off = alias('removeListener');\n\n\t/**\n\t * Adds listeners in bulk using the manipulateListeners method.\n\t * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n\t * You can also pass it a regular expression to add the array of listeners to all events that match it.\n\t * Yeah, this function does quite a bit. That's probably a bad thing.\n\t *\n\t * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n\t * @param {Function[]} [listeners] An optional array of listener functions to add.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.addListeners = function addListeners(evt, listeners) {\n\t\t// Pass through to manipulateListeners\n\t\treturn this.manipulateListeners(false, evt, listeners);\n\t};\n\n\t/**\n\t * Removes listeners in bulk using the manipulateListeners method.\n\t * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n\t * You can also pass it an event name and an array of listeners to be removed.\n\t * You can also pass it a regular expression to remove the listeners from all events that match it.\n\t *\n\t * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n\t * @param {Function[]} [listeners] An optional array of listener functions to remove.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.removeListeners = function removeListeners(evt, listeners) {\n\t\t// Pass through to manipulateListeners\n\t\treturn this.manipulateListeners(true, evt, listeners);\n\t};\n\n\t/**\n\t * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n\t * The first argument will determine if the listeners are removed (true) or added (false).\n\t * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n\t * You can also pass it an event name and an array of listeners to be added/removed.\n\t * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n\t *\n\t * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n\t * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n\t * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n\t\tvar i;\n\t\tvar value;\n\t\tvar single = remove ? this.removeListener : this.addListener;\n\t\tvar multiple = remove ? this.removeListeners : this.addListeners;\n\n\t\t// If evt is an object then pass each of it's properties to this method\n\t\tif (typeof evt === 'object' && !(evt instanceof RegExp)) {\n\t\t\tfor (i in evt) {\n\t\t\t\tif (evt.hasOwnProperty(i) && (value = evt[i])) {\n\t\t\t\t\t// Pass the single listener straight through to the singular method\n\t\t\t\t\tif (typeof value === 'function') {\n\t\t\t\t\t\tsingle.call(this, i, value);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Otherwise pass back to the multiple function\n\t\t\t\t\t\tmultiple.call(this, i, value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// So evt must be a string\n\t\t\t// And listeners must be an array of listeners\n\t\t\t// Loop over it and pass each one to the multiple method\n\t\t\ti = listeners.length;\n\t\t\twhile (i--) {\n\t\t\t\tsingle.call(this, evt, listeners[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Removes all listeners from a specified event.\n\t * If you do not specify an event then all listeners will be removed.\n\t * That means every event will be emptied.\n\t * You can also pass a regex to remove all events that match it.\n\t *\n\t * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.removeEvent = function removeEvent(evt) {\n\t\tvar type = typeof evt;\n\t\tvar events = this._getEvents();\n\t\tvar key;\n\n\t\t// Remove different things depending on the state of evt\n\t\tif (type === 'string') {\n\t\t\t// Remove all listeners for the specified event\n\t\t\tdelete events[evt];\n\t\t}\n\t\telse if (type === 'object') {\n\t\t\t// Remove all events matching the regex.\n\t\t\tfor (key in events) {\n\t\t\t\tif (events.hasOwnProperty(key) && evt.test(key)) {\n\t\t\t\t\tdelete events[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Remove all listeners in all events\n\t\t\tdelete this._events;\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of removeEvent.\n\t *\n\t * Added to mirror the node API.\n\t */\n\tproto.removeAllListeners = alias('removeEvent');\n\n\t/**\n\t * Emits an event of your choice.\n\t * When emitted, every listener attached to that event will be executed.\n\t * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n\t * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n\t * So they will not arrive within the array on the other side, they will be separate.\n\t * You can also pass a regular expression to emit to all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n\t * @param {Array} [args] Optional array of arguments to be passed to each listener.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.emitEvent = function emitEvent(evt, args) {\n\t\tvar listeners = this.getListenersAsObject(evt);\n\t\tvar listener;\n\t\tvar i;\n\t\tvar key;\n\t\tvar response;\n\n\t\tfor (key in listeners) {\n\t\t\tif (listeners.hasOwnProperty(key)) {\n\t\t\t\ti = listeners[key].length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\t// If the listener returns true then it shall be removed from the event\n\t\t\t\t\t// The function is executed either with a basic call or an apply if there is an args array\n\t\t\t\t\tlistener = listeners[key][i];\n\n\t\t\t\t\tif (listener.once === true) {\n\t\t\t\t\t\tthis.removeListener(evt, listener.listener);\n\t\t\t\t\t}\n\n\t\t\t\t\tresponse = listener.listener.apply(this, args || []);\n\n\t\t\t\t\tif (response === this._getOnceReturnValue()) {\n\t\t\t\t\t\tthis.removeListener(evt, listener.listener);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * Alias of emitEvent\n\t */\n\tproto.trigger = alias('emitEvent');\n\n\t/**\n\t * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n\t * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n\t *\n\t * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n\t * @param {...*} Optional additional arguments to be passed to each listener.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.emit = function emit(evt) {\n\t\tvar args = Array.prototype.slice.call(arguments, 1);\n\t\treturn this.emitEvent(evt, args);\n\t};\n\n\t/**\n\t * Sets the current value to check against when executing listeners. If a\n\t * listeners return value matches the one set here then it will be removed\n\t * after execution. This value defaults to true.\n\t *\n\t * @param {*} value The new value to check for when executing listeners.\n\t * @return {Object} Current instance of EventEmitter for chaining.\n\t */\n\tproto.setOnceReturnValue = function setOnceReturnValue(value) {\n\t\tthis._onceReturnValue = value;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Fetches the current value to check against when executing listeners. If\n\t * the listeners return value matches this one then it should be removed\n\t * automatically. It will return true by default.\n\t *\n\t * @return {*|Boolean} The current value to check for or the default, true.\n\t * @api private\n\t */\n\tproto._getOnceReturnValue = function _getOnceReturnValue() {\n\t\tif (this.hasOwnProperty('_onceReturnValue')) {\n\t\t\treturn this._onceReturnValue;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t/**\n\t * Fetches the events object and creates one if required.\n\t *\n\t * @return {Object} The events storage object.\n\t * @api private\n\t */\n\tproto._getEvents = function _getEvents() {\n\t\treturn this._events || (this._events = {});\n\t};\n\n\t/**\n\t * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n\t *\n\t * @return {Function} Non conflicting EventEmitter class.\n\t */\n\tEventEmitter.noConflict = function noConflict() {\n\t\texports.EventEmitter = originalGlobalValue;\n\t\treturn EventEmitter;\n\t};\n\n\t// Expose the class either via AMD, CommonJS or the global object\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine('eventEmitter/EventEmitter',[],function () {\n\t\t\treturn EventEmitter;\n\t\t});\n\t}\n\telse if (typeof module === 'object' && module.exports){\n\t\tmodule.exports = EventEmitter;\n\t}\n\telse {\n\t\tthis.EventEmitter = EventEmitter;\n\t}\n}.call(this));\n\n/*!\n * eventie v1.0.4\n * event binding helper\n * eventie.bind( elem, 'click', myFn )\n * eventie.unbind( elem, 'click', myFn )\n */\n\n/*jshint browser: true, undef: true, unused: true */\n/*global define: false */\n\n( function( window ) {\n\n\n\n\tvar docElem = document.documentElement;\n\n\tvar bind = function() {};\n\n\tfunction getIEEvent( obj ) {\n\t\tvar event = window.event;\n\t\t// add event.target\n\t\tevent.target = event.target || event.srcElement || obj;\n\t\treturn event;\n\t}\n\n\tif ( docElem.addEventListener ) {\n\t\tbind = function( obj, type, fn ) {\n\t\t\tobj.addEventListener( type, fn, false );\n\t\t};\n\t} else if ( docElem.attachEvent ) {\n\t\tbind = function( obj, type, fn ) {\n\t\t\tobj[ type + fn ] = fn.handleEvent ?\n\t\t\t\tfunction() {\n\t\t\t\t\tvar event = getIEEvent( obj );\n\t\t\t\t\tfn.handleEvent.call( fn, event );\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tvar event = getIEEvent( obj );\n\t\t\t\t\tfn.call( obj, event );\n\t\t\t\t};\n\t\t\tobj.attachEvent( \"on\" + type, obj[ type + fn ] );\n\t\t};\n\t}\n\n\tvar unbind = function() {};\n\n\tif ( docElem.removeEventListener ) {\n\t\tunbind = function( obj, type, fn ) {\n\t\t\tobj.removeEventListener( type, fn, false );\n\t\t};\n\t} else if ( docElem.detachEvent ) {\n\t\tunbind = function( obj, type, fn ) {\n\t\t\tobj.detachEvent( \"on\" + type, obj[ type + fn ] );\n\t\t\ttry {\n\t\t\t\tdelete obj[ type + fn ];\n\t\t\t} catch ( err ) {\n\t\t\t\t// can't delete window object properties\n\t\t\t\tobj[ type + fn ] = undefined;\n\t\t\t}\n\t\t};\n\t}\n\n\tvar eventie = {\n\t\tbind: bind,\n\t\tunbind: unbind\n\t};\n\n// transport\n\tif ( typeof define === 'function' && define.amd ) {\n\t\t// AMD\n\t\tdefine( 'eventie/eventie',eventie );\n\t} else {\n\t\t// browser global\n\t\twindow.eventie = eventie;\n\t}\n\n})( this );\n\n/*!\n * imagesLoaded v3.2.0\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n( function( window, factory ) { 'use strict';\n\t// universal module definition\n\n\t/*global define: false, module: false, require: false */\n\n\tif ( typeof define == 'function' && define.amd ) {\n\t\t// AMD\n\t\tdefine( [\n\t\t\t'eventEmitter/EventEmitter',\n\t\t\t'eventie/eventie'\n\t\t], function( EventEmitter, eventie ) {\n\t\t\treturn factory( window, EventEmitter, eventie );\n\t\t});\n\t} else if ( typeof module == 'object' && module.exports ) {\n\t\t// CommonJS\n\t\tmodule.exports = factory(\n\t\t\twindow,\n\t\t\trequire('wolfy87-eventemitter'),\n\t\t\trequire('eventie')\n\t\t);\n\t} else {\n\t\t// browser global\n\t\twindow.imagesLoaded = factory(\n\t\t\twindow,\n\t\t\twindow.EventEmitter,\n\t\t\twindow.eventie\n\t\t);\n\t}\n\n})( window,\n\n// -------------------------- factory -------------------------- //\n\n\tfunction factory( window, EventEmitter, eventie ) {\n\n\n\n\t\tvar $ = window.jQuery;\n\t\tvar console = window.console;\n\n// -------------------------- helpers -------------------------- //\n\n// extend objects\n\t\tfunction extend( a, b ) {\n\t\t\tfor ( var prop in b ) {\n\t\t\t\ta[ prop ] = b[ prop ];\n\t\t\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tvar objToString = Object.prototype.toString;\n\t\tfunction isArray( obj ) {\n\t\t\treturn objToString.call( obj ) == '[object Array]';\n\t\t}\n\n// turn element or nodeList into an array\n\t\tfunction makeArray( obj ) {\n\t\t\tvar ary = [];\n\t\t\tif ( isArray( obj ) ) {\n\t\t\t\t// use object if already an array\n\t\t\t\tary = obj;\n\t\t\t} else if ( typeof obj.length == 'number' ) {\n\t\t\t\t// convert nodeList to array\n\t\t\t\tfor ( var i=0; i < obj.length; i++ ) {\n\t\t\t\t\tary.push( obj[i] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// array of single index\n\t\t\t\tary.push( obj );\n\t\t\t}\n\t\t\treturn ary;\n\t\t}\n\n\t\t// -------------------------- imagesLoaded -------------------------- //\n\n\t\t/**\n\t\t * @param {Array, Element, NodeList, String} elem\n\t\t * @param {Object or Function} options - if function, use as callback\n\t\t * @param {Function} onAlways - callback function\n\t\t */\n\t\tfunction ImagesLoaded( elem, options, onAlways ) {\n\t\t\t// coerce ImagesLoaded() without new, to be new ImagesLoaded()\n\t\t\tif ( !( this instanceof ImagesLoaded ) ) {\n\t\t\t\treturn new ImagesLoaded( elem, options, onAlways );\n\t\t\t}\n\t\t\t// use elem as selector string\n\t\t\tif ( typeof elem == 'string' ) {\n\t\t\t\telem = document.querySelectorAll( elem );\n\t\t\t}\n\n\t\t\tthis.elements = makeArray( elem );\n\t\t\tthis.options = extend( {}, this.options );\n\n\t\t\tif ( typeof options == 'function' ) {\n\t\t\t\tonAlways = options;\n\t\t\t} else {\n\t\t\t\textend( this.options, options );\n\t\t\t}\n\n\t\t\tif ( onAlways ) {\n\t\t\t\tthis.on( 'always', onAlways );\n\t\t\t}\n\n\t\t\tthis.getImages();\n\n\t\t\tif ( $ ) {\n\t\t\t\t// add jQuery Deferred object\n\t\t\t\tthis.jqDeferred = new $.Deferred();\n\t\t\t}\n\n\t\t\t// HACK check async to allow time to bind listeners\n\t\t\tvar _this = this;\n\t\t\tsetTimeout( function() {\n\t\t\t\t_this.check();\n\t\t\t});\n\t\t}\n\n\t\tImagesLoaded.prototype = new EventEmitter();\n\n\t\tImagesLoaded.prototype.options = {};\n\n\t\tImagesLoaded.prototype.getImages = function() {\n\t\t\tthis.images = [];\n\n\t\t\t// filter & find items if we have an item selector\n\t\t\tfor ( var i=0; i < this.elements.length; i++ ) {\n\t\t\t\tvar elem = this.elements[i];\n\t\t\t\tthis.addElementImages( elem );\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @param {Node} element\n\t\t */\n\t\tImagesLoaded.prototype.addElementImages = function( elem ) {\n\t\t\t// filter siblings\n\t\t\tif ( elem.nodeName == 'IMG' ) {\n\t\t\t\tthis.addImage( elem );\n\t\t\t}\n\t\t\t// get background image on element\n\t\t\tif ( this.options.background === true ) {\n\t\t\t\tthis.addElementBackgroundImages( elem );\n\t\t\t}\n\n\t\t\t// find children\n\t\t\t// no non-element nodes, #143\n\t\t\tvar nodeType = elem.nodeType;\n\t\t\tif ( !nodeType || !elementNodeTypes[ nodeType ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar childImgs = elem.querySelectorAll('img');\n\t\t\t// concat childElems to filterFound array\n\t\t\tfor ( var i=0; i < childImgs.length; i++ ) {\n\t\t\t\tvar img = childImgs[i];\n\t\t\t\tthis.addImage( img );\n\t\t\t}\n\n\t\t\t// get child background images\n\t\t\tif ( typeof this.options.background == 'string' ) {\n\t\t\t\tvar children = elem.querySelectorAll( this.options.background );\n\t\t\t\tfor ( i=0; i < children.length; i++ ) {\n\t\t\t\t\tvar child = children[i];\n\t\t\t\t\tthis.addElementBackgroundImages( child );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar elementNodeTypes = {\n\t\t\t1: true,\n\t\t\t9: true,\n\t\t\t11: true\n\t\t};\n\n\t\tImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {\n\t\t\tvar style = getStyle( elem );\n\t\t\t// get url inside url(\"...\")\n\t\t\tvar reURL = /url\\(['\"]*([^'\"\\)]+)['\"]*\\)/gi;\n\t\t\tvar matches = reURL.exec( style.backgroundImage );\n\t\t\twhile ( matches !== null ) {\n\t\t\t\tvar url = matches && matches[1];\n\t\t\t\tif ( url ) {\n\t\t\t\t\tthis.addBackground( url, elem );\n\t\t\t\t}\n\t\t\t\tmatches = reURL.exec( style.backgroundImage );\n\t\t\t}\n\t\t};\n\n\t\t// IE8\n\t\tvar getStyle = window.getComputedStyle || function( elem ) {\n\t\t\treturn elem.currentStyle;\n\t\t};\n\n\t\t/**\n\t\t * @param {Image} img\n\t\t */\n\t\tImagesLoaded.prototype.addImage = function( img ) {\n\t\t\tvar loadingImage = new LoadingImage( img );\n\t\t\tthis.images.push( loadingImage );\n\t\t};\n\n\t\tImagesLoaded.prototype.addBackground = function( url, elem ) {\n\t\t\tvar background = new Background( url, elem );\n\t\t\tthis.images.push( background );\n\t\t};\n\n\t\tImagesLoaded.prototype.check = function() {\n\t\t\tvar _this = this;\n\t\t\tthis.progressedCount = 0;\n\t\t\tthis.hasAnyBroken = false;\n\t\t\t// complete if no images\n\t\t\tif ( !this.images.length ) {\n\t\t\t\tthis.complete();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onProgress( image, elem, message ) {\n\t\t\t\t// HACK - Chrome triggers event before object properties have changed. #83\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t_this.progress( image, elem, message );\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor ( var i=0; i < this.images.length; i++ ) {\n\t\t\t\tvar loadingImage = this.images[i];\n\t\t\t\tloadingImage.once( 'progress', onProgress );\n\t\t\t\tloadingImage.check();\n\t\t\t}\n\t\t};\n\n\t\tImagesLoaded.prototype.progress = function( image, elem, message ) {\n\t\t\tthis.progressedCount++;\n\t\t\tthis.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;\n\t\t\t// progress event\n\t\t\tthis.emit( 'progress', this, image, elem );\n\t\t\tif ( this.jqDeferred && this.jqDeferred.notify ) {\n\t\t\t\tthis.jqDeferred.notify( this, image );\n\t\t\t}\n\t\t\t// check if completed\n\t\t\tif ( this.progressedCount == this.images.length ) {\n\t\t\t\tthis.complete();\n\t\t\t}\n\n\t\t\tif ( this.options.debug && console ) {\n\t\t\t\tconsole.log( 'progress: ' + message, image, elem );\n\t\t\t}\n\t\t};\n\n\t\tImagesLoaded.prototype.complete = function() {\n\t\t\tvar eventName = this.hasAnyBroken ? 'fail' : 'done';\n\t\t\tthis.isComplete = true;\n\t\t\tthis.emit( eventName, this );\n\t\t\tthis.emit( 'always', this );\n\t\t\tif ( this.jqDeferred ) {\n\t\t\t\tvar jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';\n\t\t\t\tthis.jqDeferred[ jqMethod ]( this );\n\t\t\t}\n\t\t};\n\n\t\t// -------------------------- -------------------------- //\n\n\t\tfunction LoadingImage( img ) {\n\t\t\tthis.img = img;\n\t\t}\n\n\t\tLoadingImage.prototype = new EventEmitter();\n\n\t\tLoadingImage.prototype.check = function() {\n\t\t\t// If complete is true and browser supports natural sizes,\n\t\t\t// try to check for image status manually.\n\t\t\tvar isComplete = this.getIsImageComplete();\n\t\t\tif ( isComplete ) {\n\t\t\t\t// report based on naturalWidth\n\t\t\t\tthis.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If none of the checks above matched, simulate loading on detached element.\n\t\t\tthis.proxyImage = new Image();\n\t\t\teventie.bind( this.proxyImage, 'load', this );\n\t\t\teventie.bind( this.proxyImage, 'error', this );\n\t\t\t// bind to image as well for Firefox. #191\n\t\t\teventie.bind( this.img, 'load', this );\n\t\t\teventie.bind( this.img, 'error', this );\n\t\t\tthis.proxyImage.src = this.img.src;\n\t\t};\n\n\t\tLoadingImage.prototype.getIsImageComplete = function() {\n\t\t\treturn this.img.complete && this.img.naturalWidth !== undefined;\n\t\t};\n\n\t\tLoadingImage.prototype.confirm = function( isLoaded, message ) {\n\t\t\tthis.isLoaded = isLoaded;\n\t\t\tthis.emit( 'progress', this, this.img, message );\n\t\t};\n\n\t\t// ----- events ----- //\n\n\t\t// trigger specified handler for event type\n\t\tLoadingImage.prototype.handleEvent = function( event ) {\n\t\t\tvar method = 'on' + event.type;\n\t\t\tif ( this[ method ] ) {\n\t\t\t\tthis[ method ]( event );\n\t\t\t}\n\t\t};\n\n\t\tLoadingImage.prototype.onload = function() {\n\t\t\tthis.confirm( true, 'onload' );\n\t\t\tthis.unbindEvents();\n\t\t};\n\n\t\tLoadingImage.prototype.onerror = function() {\n\t\t\tthis.confirm( false, 'onerror' );\n\t\t\tthis.unbindEvents();\n\t\t};\n\n\t\tLoadingImage.prototype.unbindEvents = function() {\n\t\t\teventie.unbind( this.proxyImage, 'load', this );\n\t\t\teventie.unbind( this.proxyImage, 'error', this );\n\t\t\teventie.unbind( this.img, 'load', this );\n\t\t\teventie.unbind( this.img, 'error', this );\n\t\t};\n\n\t\t// -------------------------- Background -------------------------- //\n\n\t\tfunction Background( url, element ) {\n\t\t\tthis.url = url;\n\t\t\tthis.element = element;\n\t\t\tthis.img = new Image();\n\t\t}\n\n\t\t// inherit LoadingImage prototype\n\t\tBackground.prototype = new LoadingImage();\n\n\t\tBackground.prototype.check = function() {\n\t\t\teventie.bind( this.img, 'load', this );\n\t\t\teventie.bind( this.img, 'error', this );\n\t\t\tthis.img.src = this.url;\n\t\t\t// check if image is already complete\n\t\t\tvar isComplete = this.getIsImageComplete();\n\t\t\tif ( isComplete ) {\n\t\t\t\tthis.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n\t\t\t\tthis.unbindEvents();\n\t\t\t}\n\t\t};\n\n\t\tBackground.prototype.unbindEvents = function() {\n\t\t\teventie.unbind( this.img, 'load', this );\n\t\t\teventie.unbind( this.img, 'error', this );\n\t\t};\n\n\t\tBackground.prototype.confirm = function( isLoaded, message ) {\n\t\t\tthis.isLoaded = isLoaded;\n\t\t\tthis.emit( 'progress', this, this.element, message );\n\t\t};\n\n\t\t// -------------------------- jQuery -------------------------- //\n\n\t\tImagesLoaded.makeJQueryPlugin = function( jQuery ) {\n\t\t\tjQuery = jQuery || window.jQuery;\n\t\t\tif ( !jQuery ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// set local variable\n\t\t\t$ = jQuery;\n\t\t\t// $().imagesLoaded()\n\t\t\t$.fn.imagesLoaded = function( options, callback ) {\n\t\t\t\tvar instance = new ImagesLoaded( this, options, callback );\n\t\t\t\treturn instance.jqDeferred.promise( $(this) );\n\t\t\t};\n\t\t};\n\t\t// try making plugin\n\t\tImagesLoaded.makeJQueryPlugin();\n\n\t\t// -------------------------- -------------------------- //\n\n\t\treturn ImagesLoaded;\n\n\t});\n","// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if(\"number\"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i=\"constructor\";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION=\"1.8.3\";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w(\"length\"),k=function(n){var t=O(n);return\"number\"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),(\"number\"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),\"value\")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])
i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError(\"Bind must be called on a function\");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error(\"bindAll must be passed function names\");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=\"\"+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable(\"toString\"),I=[\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case\"[object RegExp]\":case\"[object String]\":return\"\"+n==\"\"+t;case\"[object Number]\":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case\"[object Date]\":case\"[object Boolean]\":return+n===+t}var i=\"[object Array]\"===u;if(!i){if(\"object\"!=typeof n||\"object\"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&\"constructor\"in n&&\"constructor\"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return\"[object Array]\"===s.call(n)},m.isObject=function(n){var t=typeof n;return\"function\"===t||\"object\"===t&&!!n},m.each([\"Arguments\",\"Function\",\"String\",\"Number\",\"Date\",\"RegExp\",\"Error\"],function(n){m[\"is\"+n]=function(t){return s.call(t)===\"[object \"+n+\"]\"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,\"callee\")}),\"function\"!=typeof/./&&\"object\"!=typeof Int8Array&&(m.isFunction=function(n){return\"function\"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||\"[object Boolean]\"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"`\":\"`\"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r=\"(?:\"+m.keys(n).join(\"|\")+\")\",e=RegExp(r),u=RegExp(r,\"g\");return function(n){return n=null==n?\"\":\"\"+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+\"\";return n?n+t:t},m.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g};var K=/(.)^/,z={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},D=/\\\\|'|\\r|\\n|\\u2028|\\u2029/g,L=function(n){return\"\\\\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join(\"|\")+\"|$\",\"g\"),u=0,i=\"__p+='\";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+=\"'+\\n((__t=(\"+r+\"))==null?'':_.escape(__t))+\\n'\":e?i+=\"'+\\n((__t=(\"+e+\"))==null?'':__t)+\\n'\":o&&(i+=\"';\\n\"+o+\"\\n__p+='\"),t}),i+=\"';\\n\",t.variable||(i=\"with(obj||{}){\\n\"+i+\"}\\n\"),i=\"var __t,__p='',__j=Array.prototype.join,\"+\"print=function(){__p+=__j.call(arguments,'');};\\n\"+i+\"return __p;\\n\";try{var o=new Function(t.variable||\"obj\",\"_\",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||\"obj\";return c.source=\"function(\"+f+\"){\\n\"+i+\"}\",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),\"shift\"!==n&&\"splice\"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each([\"concat\",\"join\",\"slice\"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return\"\"+this._wrapped},\"function\"==typeof define&&define.amd&&define(\"underscore\",[],function(){return m})}).call(this);\n//# sourceMappingURL=underscore-min.map","/*! Picturefill - v3.0.1\n * http://scottjehl.github.io/picturefill\n * Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt;\n * License: MIT\n */\n\n(function( window, document, undefined ) {\n\t// Enable strict mode\n\t\"use strict\";\n\n\t// HTML shim|v it for old IE (IE9 will still need the HTML video tag workaround)\n\tdocument.createElement( \"picture\" );\n\n\tvar warn, eminpx, alwaysCheckWDescriptor, evalId;\n\t// local object for method references and testing exposure\n\tvar pf = {};\n\tvar noop = function() {};\n\tvar image = document.createElement( \"img\" );\n\tvar getImgAttr = image.getAttribute;\n\tvar setImgAttr = image.setAttribute;\n\tvar removeImgAttr = image.removeAttribute;\n\tvar docElem = document.documentElement;\n\tvar types = {};\n\tvar cfg = {\n\t\t//resource selection:\n\t\talgorithm: \"\"\n\t};\n\tvar srcAttr = \"data-pfsrc\";\n\tvar srcsetAttr = srcAttr + \"set\";\n\t// ua sniffing is done for undetectable img loading features,\n\t// to do some non crucial perf optimizations\n\tvar ua = navigator.userAgent;\n\tvar supportAbort = (/rident/).test(ua) || ((/ecko/).test(ua) && ua.match(/rv\\:(\\d+)/) && RegExp.$1 > 35 );\n\tvar curSrcProp = \"currentSrc\";\n\tvar regWDesc = /\\s+\\+?\\d+(e\\d+)?w/;\n\tvar regSize = /(\\([^)]+\\))?\\s*(.+)/;\n\tvar setOptions = window.picturefillCFG;\n\t/**\n\t * Shortcut property for https://w3c.github.io/webappsec/specs/mixedcontent/#restricts-mixed-content ( for easy overriding in tests )\n\t */\n\t// baseStyle also used by getEmValue (i.e.: width: 1em is important)\n\tvar baseStyle = \"position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)\";\n\tvar fsCss = \"font-size:100%!important;\";\n\tvar isVwDirty = true;\n\n\tvar cssCache = {};\n\tvar sizeLengthCache = {};\n\tvar DPR = window.devicePixelRatio;\n\tvar units = {\n\t\tpx: 1,\n\t\t\"in\": 96\n\t};\n\tvar anchor = document.createElement( \"a\" );\n\t/**\n\t * alreadyRun flag used for setOptions. is it true setOptions will reevaluate\n\t * @type {boolean}\n\t */\n\tvar alreadyRun = false;\n\n\t// Reusable, non-\"g\" Regexes\n\n\t// (Don't use \\s, to avoid matching non-breaking space.)\n\tvar regexLeadingSpaces = /^[ \\t\\n\\r\\u000c]+/,\n\t\tregexLeadingCommasOrSpaces = /^[, \\t\\n\\r\\u000c]+/,\n\t\tregexLeadingNotSpaces = /^[^ \\t\\n\\r\\u000c]+/,\n\t\tregexTrailingCommas = /[,]+$/,\n\t\tregexNonNegativeInteger = /^\\d+$/,\n\n\t// ( Positive or negative or unsigned integers or decimals, without or without exponents.\n\t// Must include at least one digit.\n\t// According to spec tests any decimal point must be followed by a digit.\n\t// No leading plus sign is allowed.)\n\t// https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number\n\t\tregexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;\n\n\tvar on = function(obj, evt, fn, capture) {\n\t\tif ( obj.addEventListener ) {\n\t\t\tobj.addEventListener(evt, fn, capture || false);\n\t\t} else if ( obj.attachEvent ) {\n\t\t\tobj.attachEvent( \"on\" + evt, fn);\n\t\t}\n\t};\n\n\t/**\n\t * simple memoize function:\n\t */\n\n\tvar memoize = function(fn) {\n\t\tvar cache = {};\n\t\treturn function(input) {\n\t\t\tif ( !(input in cache) ) {\n\t\t\t\tcache[ input ] = fn(input);\n\t\t\t}\n\t\t\treturn cache[ input ];\n\t\t};\n\t};\n\n\t// UTILITY FUNCTIONS\n\n\t// Manual is faster than RegEx\n\t// http://jsperf.com/whitespace-character/5\n\tfunction isSpace(c) {\n\t\treturn (c === \"\\u0020\" || // space\n\t\t\tc === \"\\u0009\" || // horizontal tab\n\t\t\tc === \"\\u000A\" || // new line\n\t\t\tc === \"\\u000C\" || // form feed\n\t\t\tc === \"\\u000D\"); // carriage return\n\t}\n\n\t/**\n\t * gets a mediaquery and returns a boolean or gets a css length and returns a number\n\t * @param css mediaqueries or css length\n\t * @returns {boolean|number}\n\t *\n\t * based on: https://gist.github.com/jonathantneal/db4f77009b155f083738\n\t */\n\tvar evalCSS = (function() {\n\n\t\tvar regLength = /^([\\d\\.]+)(em|vw|px)$/;\n\t\tvar replace = function() {\n\t\t\tvar args = arguments, index = 0, string = args[0];\n\t\t\twhile (++index in args) {\n\t\t\t\tstring = string.replace(args[index], args[++index]);\n\t\t\t}\n\t\t\treturn string;\n\t\t};\n\n\t\tvar buildStr = memoize(function(css) {\n\n\t\t\treturn \"return \" + replace((css || \"\").toLowerCase(),\n\t\t\t\t// interpret `and`\n\t\t\t\t/\\band\\b/g, \"&&\",\n\n\t\t\t\t// interpret `,`\n\t\t\t\t/,/g, \"||\",\n\n\t\t\t\t// interpret `min-` as >=\n\t\t\t\t/min-([a-z-\\s]+):/g, \"e.$1>=\",\n\n\t\t\t\t// interpret `max-` as <=\n\t\t\t\t/max-([a-z-\\s]+):/g, \"e.$1<=\",\n\n\t\t\t\t//calc value\n\t\t\t\t/calc([^)]+)/g, \"($1)\",\n\n\t\t\t\t// interpret css values\n\t\t\t\t/(\\d+[\\.]*[\\d]*)([a-z]+)/g, \"($1 * e.$2)\",\n\t\t\t\t//make eval less evil\n\t\t\t\t/^(?!(e.[a-z]|[0-9\\.&=|><\\+\\-\\*\\(\\)\\/])).*/ig, \"\"\n\t\t\t) + \";\";\n\t\t});\n\n\t\treturn function(css, length) {\n\t\t\tvar parsedLength;\n\t\t\tif (!(css in cssCache)) {\n\t\t\t\tcssCache[css] = false;\n\t\t\t\tif (length && (parsedLength = css.match( regLength ))) {\n\t\t\t\t\tcssCache[css] = parsedLength[ 1 ] * units[parsedLength[ 2 ]];\n\t\t\t\t} else {\n\t\t\t\t\t/*jshint evil:true */\n\t\t\t\t\ttry{\n\t\t\t\t\t\tcssCache[css] = new Function(\"e\", buildStr(css))(units);\n\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t/*jshint evil:false */\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn cssCache[css];\n\t\t};\n\t})();\n\n\tvar setResolution = function( candidate, sizesattr ) {\n\t\tif ( candidate.w ) { // h = means height: || descriptor.type === 'h' do not handle yet...\n\t\t\tcandidate.cWidth = pf.calcListLength( sizesattr || \"100vw\" );\n\t\t\tcandidate.res = candidate.w / candidate.cWidth ;\n\t\t} else {\n\t\t\tcandidate.res = candidate.d;\n\t\t}\n\t\treturn candidate;\n\t};\n\n\t/**\n\t *\n\t * @param opt\n\t */\n\tvar picturefill = function( opt ) {\n\t\tvar elements, i, plen;\n\n\t\tvar options = opt || {};\n\n\t\tif ( options.elements && options.elements.nodeType === 1 ) {\n\t\t\tif ( options.elements.nodeName.toUpperCase() === \"IMG\" ) {\n\t\t\t\toptions.elements = [ options.elements ];\n\t\t\t} else {\n\t\t\t\toptions.context = options.elements;\n\t\t\t\toptions.elements = null;\n\t\t\t}\n\t\t}\n\n\t\telements = options.elements || pf.qsa( (options.context || document), ( options.reevaluate || options.reselect ) ? pf.sel : pf.selShort );\n\n\t\tif ( (plen = elements.length) ) {\n\n\t\t\tpf.setupRun( options );\n\t\t\talreadyRun = true;\n\n\t\t\t// Loop through all elements\n\t\t\tfor ( i = 0; i < plen; i++ ) {\n\t\t\t\tpf.fillImg(elements[ i ], options);\n\t\t\t}\n\n\t\t\tpf.teardownRun( options );\n\t\t}\n\t};\n\n\t/**\n\t * outputs a warning for the developer\n\t * @param {message}\n\t * @type {Function}\n\t */\n\twarn = ( window.console && console.warn ) ?\n\t\tfunction( message ) {\n\t\t\tconsole.warn( message );\n\t\t} :\n\t\tnoop\n\t;\n\n\tif ( !(curSrcProp in image) ) {\n\t\tcurSrcProp = \"src\";\n\t}\n\n\t// Add support for standard mime types.\n\ttypes[ \"image/jpeg\" ] = true;\n\ttypes[ \"image/gif\" ] = true;\n\ttypes[ \"image/png\" ] = true;\n\n\tfunction detectTypeSupport( type, typeUri ) {\n\t\t// based on Modernizr's lossless img-webp test\n\t\t// note: asynchronous\n\t\tvar image = new window.Image();\n\t\timage.onerror = function() {\n\t\t\ttypes[ type ] = false;\n\t\t\tpicturefill();\n\t\t};\n\t\timage.onload = function() {\n\t\t\ttypes[ type ] = image.width === 1;\n\t\t\tpicturefill();\n\t\t};\n\t\timage.src = typeUri;\n\t\treturn \"pending\";\n\t}\n\n\t// test svg support\n\ttypes[ \"image/svg+xml\" ] = document.implementation.hasFeature( \"http://wwwindow.w3.org/TR/SVG11/feature#Image\", \"1.1\" );\n\n\t/**\n\t * updates the internal vW property with the current viewport width in px\n\t */\n\tfunction updateMetrics() {\n\n\t\tisVwDirty = false;\n\t\tDPR = window.devicePixelRatio;\n\t\tcssCache = {};\n\t\tsizeLengthCache = {};\n\n\t\tpf.DPR = DPR || 1;\n\n\t\tunits.width = Math.max(window.innerWidth || 0, docElem.clientWidth);\n\t\tunits.height = Math.max(window.innerHeight || 0, docElem.clientHeight);\n\n\t\tunits.vw = units.width / 100;\n\t\tunits.vh = units.height / 100;\n\n\t\tevalId = [ units.height, units.width, DPR ].join(\"-\");\n\n\t\tunits.em = pf.getEmValue();\n\t\tunits.rem = units.em;\n\t}\n\n\tfunction chooseLowRes( lowerValue, higherValue, dprValue, isCached ) {\n\t\tvar bonusFactor, tooMuch, bonus, meanDensity;\n\n\t\t//experimental\n\t\tif (cfg.algorithm === \"saveData\" ){\n\t\t\tif ( lowerValue > 2.7 ) {\n\t\t\t\tmeanDensity = dprValue + 1;\n\t\t\t} else {\n\t\t\t\ttooMuch = higherValue - dprValue;\n\t\t\t\tbonusFactor = Math.pow(lowerValue - 0.6, 1.5);\n\n\t\t\t\tbonus = tooMuch * bonusFactor;\n\n\t\t\t\tif (isCached) {\n\t\t\t\t\tbonus += 0.1 * bonusFactor;\n\t\t\t\t}\n\n\t\t\t\tmeanDensity = lowerValue + bonus;\n\t\t\t}\n\t\t} else {\n\t\t\tmeanDensity = (dprValue > 1) ?\n\t\t\t\tMath.sqrt(lowerValue * higherValue) :\n\t\t\t\tlowerValue;\n\t\t}\n\n\t\treturn meanDensity > dprValue;\n\t}\n\n\tfunction applyBestCandidate( img ) {\n\t\tvar srcSetCandidates;\n\t\tvar matchingSet = pf.getSet( img );\n\t\tvar evaluated = false;\n\t\tif ( matchingSet !== \"pending\" ) {\n\t\t\tevaluated = evalId;\n\t\t\tif ( matchingSet ) {\n\t\t\t\tsrcSetCandidates = pf.setRes( matchingSet );\n\t\t\t\tpf.applySetCandidate( srcSetCandidates, img );\n\t\t\t}\n\t\t}\n\t\timg[ pf.ns ].evaled = evaluated;\n\t}\n\n\tfunction ascendingSort( a, b ) {\n\t\treturn a.res - b.res;\n\t}\n\n\tfunction setSrcToCur( img, src, set ) {\n\t\tvar candidate;\n\t\tif ( !set && src ) {\n\t\t\tset = img[ pf.ns ].sets;\n\t\t\tset = set && set[set.length - 1];\n\t\t}\n\n\t\tcandidate = getCandidateForSrc(src, set);\n\n\t\tif ( candidate ) {\n\t\t\tsrc = pf.makeUrl(src);\n\t\t\timg[ pf.ns ].curSrc = src;\n\t\t\timg[ pf.ns ].curCan = candidate;\n\n\t\t\tif ( !candidate.res ) {\n\t\t\t\tsetResolution( candidate, candidate.set.sizes );\n\t\t\t}\n\t\t}\n\t\treturn candidate;\n\t}\n\n\tfunction getCandidateForSrc( src, set ) {\n\t\tvar i, candidate, candidates;\n\t\tif ( src && set ) {\n\t\t\tcandidates = pf.parseSet( set );\n\t\t\tsrc = pf.makeUrl(src);\n\t\t\tfor ( i = 0; i < candidates.length; i++ ) {\n\t\t\t\tif ( src === pf.makeUrl(candidates[ i ].url) ) {\n\t\t\t\t\tcandidate = candidates[ i ];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn candidate;\n\t}\n\n\tfunction getAllSourceElements( picture, candidates ) {\n\t\tvar i, len, source, srcset;\n\n\t\t// SPEC mismatch intended for size and perf:\n\t\t// actually only source elements preceding the img should be used\n\t\t// also note: don't use qsa here, because IE8 sometimes doesn't like source as the key part in a selector\n\t\tvar sources = picture.getElementsByTagName( \"source\" );\n\n\t\tfor ( i = 0, len = sources.length; i < len; i++ ) {\n\t\t\tsource = sources[ i ];\n\t\t\tsource[ pf.ns ] = true;\n\t\t\tsrcset = source.getAttribute( \"srcset\" );\n\n\t\t\t// if source does not have a srcset attribute, skip\n\t\t\tif ( srcset ) {\n\t\t\t\tcandidates.push( {\n\t\t\t\t\tsrcset: srcset,\n\t\t\t\t\tmedia: source.getAttribute( \"media\" ),\n\t\t\t\t\ttype: source.getAttribute( \"type\" ),\n\t\t\t\t\tsizes: source.getAttribute( \"sizes\" )\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Srcset Parser\n\t * By Alex Bell | MIT License\n\t *\n\t * @returns Array [{url: _, d: _, w: _, h:_, set:_(????)}, ...]\n\t *\n\t * Based super duper closely on the reference algorithm at:\n\t * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute\n\t */\n\n\t\t// 1. Let input be the value passed to this algorithm.\n\t\t// (TO-DO : Explain what \"set\" argument is here. Maybe choose a more\n\t\t// descriptive & more searchable name. Since passing the \"set\" in really has\n\t\t// nothing to do with parsing proper, I would prefer this assignment eventually\n\t\t// go in an external fn.)\n\tfunction parseSrcset(input, set) {\n\n\t\tfunction collectCharacters(regEx) {\n\t\t\tvar chars,\n\t\t\t\tmatch = regEx.exec(input.substring(pos));\n\t\t\tif (match) {\n\t\t\t\tchars = match[ 0 ];\n\t\t\t\tpos += chars.length;\n\t\t\t\treturn chars;\n\t\t\t}\n\t\t}\n\n\t\tvar inputLength = input.length,\n\t\t\turl,\n\t\t\tdescriptors,\n\t\t\tcurrentDescriptor,\n\t\t\tstate,\n\t\t\tc,\n\n\t\t// 2. Let position be a pointer into input, initially pointing at the start\n\t\t// of the string.\n\t\t\tpos = 0,\n\n\t\t// 3. Let candidates be an initially empty source set.\n\t\t\tcandidates = [];\n\n\t\t/**\n\t\t * Adds descriptor properties to a candidate, pushes to the candidates array\n\t\t * @return undefined\n\t\t */\n\t\t\t// (Declared outside of the while loop so that it's only created once.\n\t\t\t// (This fn is defined before it is used, in order to pass JSHINT.\n\t\t\t// Unfortunately this breaks the sequencing of the spec comments. :/ )\n\t\tfunction parseDescriptors() {\n\n\t\t\t// 9. Descriptor parser: Let error be no.\n\t\t\tvar pError = false,\n\n\t\t\t// 10. Let width be absent.\n\t\t\t// 11. Let density be absent.\n\t\t\t// 12. Let future-compat-h be absent. (We're implementing it now as h)\n\t\t\t\tw, d, h, i,\n\t\t\t\tcandidate = {},\n\t\t\t\tdesc, lastChar, value, intVal, floatVal;\n\n\t\t\t// 13. For each descriptor in descriptors, run the appropriate set of steps\n\t\t\t// from the following list:\n\t\t\tfor (i = 0 ; i < descriptors.length; i++) {\n\t\t\t\tdesc = descriptors[ i ];\n\n\t\t\t\tlastChar = desc[ desc.length - 1 ];\n\t\t\t\tvalue = desc.substring(0, desc.length - 1);\n\t\t\t\tintVal = parseInt(value, 10);\n\t\t\t\tfloatVal = parseFloat(value);\n\n\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t// a U+0077 LATIN SMALL LETTER W character\n\t\t\t\tif (regexNonNegativeInteger.test(value) && (lastChar === \"w\")) {\n\n\t\t\t\t\t// If width and density are not both absent, then let error be yes.\n\t\t\t\t\tif (w || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes.\n\t\t\t\t\t// Otherwise, let width be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {w = intVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid floating-point number followed by\n\t\t\t\t\t// a U+0078 LATIN SMALL LETTER X character\n\t\t\t\t} else if (regexFloatingPoint.test(value) && (lastChar === \"x\")) {\n\n\t\t\t\t\t// If width, density and future-compat-h are not all absent, then let error\n\t\t\t\t\t// be yes.\n\t\t\t\t\tif (w || d || h) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing floating-point number values to the descriptor.\n\t\t\t\t\t// If the result is less than zero, let error be yes. Otherwise, let density\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (floatVal < 0) {pError = true;} else {d = floatVal;}\n\n\t\t\t\t\t// If the descriptor consists of a valid non-negative integer followed by\n\t\t\t\t\t// a U+0068 LATIN SMALL LETTER H character\n\t\t\t\t} else if (regexNonNegativeInteger.test(value) && (lastChar === \"h\")) {\n\n\t\t\t\t\t// If height and density are not both absent, then let error be yes.\n\t\t\t\t\tif (h || d) {pError = true;}\n\n\t\t\t\t\t// Apply the rules for parsing non-negative integers to the descriptor.\n\t\t\t\t\t// If the result is zero, let error be yes. Otherwise, let future-compat-h\n\t\t\t\t\t// be the result.\n\t\t\t\t\tif (intVal === 0) {pError = true;} else {h = intVal;}\n\n\t\t\t\t\t// Anything else, Let error be yes.\n\t\t\t\t} else {pError = true;}\n\t\t\t} // (close step 13 for loop)\n\n\t\t\t// 15. If error is still no, then append a new image source to candidates whose\n\t\t\t// URL is url, associated with a width width if not absent and a pixel\n\t\t\t// density density if not absent. Otherwise, there is a parse error.\n\t\t\tif (!pError) {\n\t\t\t\tcandidate.url = url;\n\n\t\t\t\tif (w) { candidate.w = w;}\n\t\t\t\tif (d) { candidate.d = d;}\n\t\t\t\tif (h) { candidate.h = h;}\n\t\t\t\tif (!h && !d && !w) {candidate.d = 1;}\n\t\t\t\tif (candidate.d === 1) {set.has1x = true;}\n\t\t\t\tcandidate.set = set;\n\n\t\t\t\tcandidates.push(candidate);\n\t\t\t}\n\t\t} // (close parseDescriptors fn)\n\n\t\t/**\n\t\t * Tokenizes descriptor properties prior to parsing\n\t\t * Returns undefined.\n\t\t * (Again, this fn is defined before it is used, in order to pass JSHINT.\n\t\t * Unfortunately this breaks the logical sequencing of the spec comments. :/ )\n\t\t */\n\t\tfunction tokenize() {\n\n\t\t\t// 8.1. Descriptor tokeniser: Skip whitespace\n\t\t\tcollectCharacters(regexLeadingSpaces);\n\n\t\t\t// 8.2. Let current descriptor be the empty string.\n\t\t\tcurrentDescriptor = \"\";\n\n\t\t\t// 8.3. Let state be in descriptor.\n\t\t\tstate = \"in descriptor\";\n\n\t\t\twhile (true) {\n\n\t\t\t\t// 8.4. Let c be the character at position.\n\t\t\t\tc = input.charAt(pos);\n\n\t\t\t\t// Do the following depending on the value of state.\n\t\t\t\t// For the purpose of this step, \"EOF\" is a special character representing\n\t\t\t\t// that position is past the end of input.\n\n\t\t\t\t// In descriptor\n\t\t\t\tif (state === \"in descriptor\") {\n\t\t\t\t\t// Do the following, depending on the value of c:\n\n\t\t\t\t\t// Space character\n\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t// descriptors and let current descriptor be the empty string.\n\t\t\t\t\t// Set state to after descriptor.\n\t\t\t\t\tif (isSpace(c)) {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t\tcurrentDescriptor = \"\";\n\t\t\t\t\t\t\tstate = \"after descriptor\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// U+002C COMMA (,)\n\t\t\t\t\t\t// Advance position to the next character in input. If current descriptor\n\t\t\t\t\t\t// is not empty, append current descriptor to descriptors. Jump to the step\n\t\t\t\t\t\t// labeled descriptor parser.\n\t\t\t\t\t} else if (c === \",\") {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// U+0028 LEFT PARENTHESIS (()\n\t\t\t\t\t\t// Append c to current descriptor. Set state to in parens.\n\t\t\t\t\t} else if (c === \"\\u0028\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in parens\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t\t// descriptors. Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\t\t\t\t\t// (end \"in descriptor\"\n\n\t\t\t\t\t// In parens\n\t\t\t\t} else if (state === \"in parens\") {\n\n\t\t\t\t\t// U+0029 RIGHT PARENTHESIS ())\n\t\t\t\t\t// Append c to current descriptor. Set state to in descriptor.\n\t\t\t\t\tif (c === \")\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in descriptor\";\n\n\t\t\t\t\t\t// EOF\n\t\t\t\t\t\t// Append current descriptor to descriptors. Jump to the step labeled\n\t\t\t\t\t\t// descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\n\t\t\t\t\t// After descriptor\n\t\t\t\t} else if (state === \"after descriptor\") {\n\n\t\t\t\t\t// Do the following, depending on the value of c:\n\t\t\t\t\t// Space character: Stay in this state.\n\t\t\t\t\tif (isSpace(c)) {\n\n\t\t\t\t\t\t// EOF: Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Anything else\n\t\t\t\t\t\t// Set state to in descriptor. Set position to the previous character in input.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = \"in descriptor\";\n\t\t\t\t\t\tpos -= 1;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Advance position to the next character in input.\n\t\t\t\tpos += 1;\n\n\t\t\t\t// Repeat this step.\n\t\t\t} // (close while true loop)\n\t\t}\n\n\t\t// 4. Splitting loop: Collect a sequence of characters that are space\n\t\t// characters or U+002C COMMA characters. If any U+002C COMMA characters\n\t\t// were collected, that is a parse error.\n\t\twhile (true) {\n\t\t\tcollectCharacters(regexLeadingCommasOrSpaces);\n\n\t\t\t// 5. If position is past the end of input, return candidates and abort these steps.\n\t\t\tif (pos >= inputLength) {\n\t\t\t\treturn candidates; // (we're done, this is the sole return path)\n\t\t\t}\n\n\t\t\t// 6. Collect a sequence of characters that are not space characters,\n\t\t\t// and let that be url.\n\t\t\turl = collectCharacters(regexLeadingNotSpaces);\n\n\t\t\t// 7. Let descriptors be a new empty list.\n\t\t\tdescriptors = [];\n\n\t\t\t// 8. If url ends with a U+002C COMMA character (,), follow these substeps:\n\t\t\t//\t\t(1). Remove all trailing U+002C COMMA characters from url. If this removed\n\t\t\t// more than one character, that is a parse error.\n\t\t\tif (url.slice(-1) === \",\") {\n\t\t\t\turl = url.replace(regexTrailingCommas, \"\");\n\t\t\t\t// (Jump ahead to step 9 to skip tokenization and just push the candidate).\n\t\t\t\tparseDescriptors();\n\n\t\t\t\t//\tOtherwise, follow these substeps:\n\t\t\t} else {\n\t\t\t\ttokenize();\n\t\t\t} // (close else of step 8)\n\n\t\t\t// 16. Return to the step labeled splitting loop.\n\t\t} // (Close of big while loop.)\n\t}\n\n\t/*\n\t * Sizes Parser\n\t *\n\t * By Alex Bell | MIT License\n\t *\n\t * Non-strict but accurate and lightweight JS Parser for the string value
\n\t *\n\t * Reference algorithm at:\n\t * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-sizes-attribute\n\t *\n\t * Most comments are copied in directly from the spec\n\t * (except for comments in parens).\n\t *\n\t * Grammar is:\n\t * = # [ , ]? | \n\t * = \n\t * = \n\t * http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#attr-img-sizes\n\t *\n\t * E.g. \"(max-width: 30em) 100vw, (max-width: 50em) 70vw, 100vw\"\n\t * or \"(min-width: 30em), calc(30vw - 15px)\" or just \"30vw\"\n\t *\n\t * Returns the first valid with a media condition that evaluates to true,\n\t * or \"100vw\" if all valid media conditions evaluate to false.\n\t *\n\t */\n\n\tfunction parseSizes(strValue) {\n\n\t\t// (Percentage CSS lengths are not allowed in this case, to avoid confusion:\n\t\t// https://html.spec.whatwg.org/multipage/embedded-content.html#valid-source-size-list\n\t\t// CSS allows a single optional plus or minus sign:\n\t\t// http://www.w3.org/TR/CSS2/syndata.html#numbers\n\t\t// CSS is ASCII case-insensitive:\n\t\t// http://www.w3.org/TR/CSS2/syndata.html#characters )\n\t\t// Spec allows exponential notation for type:\n\t\t// http://dev.w3.org/csswg/css-values/#numbers\n\t\tvar regexCssLengthWithUnits = /^(?:[+-]?[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i;\n\n\t\t// (This is a quick and lenient test. Because of optional unlimited-depth internal\n\t\t// grouping parens and strict spacing rules, this could get very complicated.)\n\t\tvar regexCssCalc = /^calc\\((?:[0-9a-z \\.\\+\\-\\*\\/\\(\\)]+)\\)$/i;\n\n\t\tvar i;\n\t\tvar unparsedSizesList;\n\t\tvar unparsedSizesListLength;\n\t\tvar unparsedSize;\n\t\tvar lastComponentValue;\n\t\tvar size;\n\n\t\t// UTILITY FUNCTIONS\n\n\t\t// (Toy CSS parser. The goals here are:\n\t\t// 1) expansive test coverage without the weight of a full CSS parser.\n\t\t// 2) Avoiding regex wherever convenient.\n\t\t// Quick tests: http://jsfiddle.net/gtntL4gr/3/\n\t\t// Returns an array of arrays.)\n\t\tfunction parseComponentValues(str) {\n\t\t\tvar chrctr;\n\t\t\tvar component = \"\";\n\t\t\tvar componentArray = [];\n\t\t\tvar listArray = [];\n\t\t\tvar parenDepth = 0;\n\t\t\tvar pos = 0;\n\t\t\tvar inComment = false;\n\n\t\t\tfunction pushComponent() {\n\t\t\t\tif (component) {\n\t\t\t\t\tcomponentArray.push(component);\n\t\t\t\t\tcomponent = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction pushComponentArray() {\n\t\t\t\tif (componentArray[0]) {\n\t\t\t\t\tlistArray.push(componentArray);\n\t\t\t\t\tcomponentArray = [];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// (Loop forwards from the beginning of the string.)\n\t\t\twhile (true) {\n\t\t\t\tchrctr = str.charAt(pos);\n\n\t\t\t\tif (chrctr === \"\") { // ( End of string reached.)\n\t\t\t\t\tpushComponent();\n\t\t\t\t\tpushComponentArray();\n\t\t\t\t\treturn listArray;\n\t\t\t\t} else if (inComment) {\n\t\t\t\t\tif ((chrctr === \"*\") && (str[pos + 1] === \"/\")) { // (At end of a comment.)\n\t\t\t\t\t\tinComment = false;\n\t\t\t\t\t\tpos += 2;\n\t\t\t\t\t\tpushComponent();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpos += 1; // (Skip all characters inside comments.)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (isSpace(chrctr)) {\n\t\t\t\t\t// (If previous character in loop was also a space, or if\n\t\t\t\t\t// at the beginning of the string, do not add space char to\n\t\t\t\t\t// component.)\n\t\t\t\t\tif ( (str.charAt(pos - 1) && isSpace( str.charAt(pos - 1) ) ) || !component ) {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (parenDepth === 0) {\n\t\t\t\t\t\tpushComponent();\n\t\t\t\t\t\tpos +=1;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// (Replace any space character with a plain space for legibility.)\n\t\t\t\t\t\tchrctr = \" \";\n\t\t\t\t\t}\n\t\t\t\t} else if (chrctr === \"(\") {\n\t\t\t\t\tparenDepth += 1;\n\t\t\t\t} else if (chrctr === \")\") {\n\t\t\t\t\tparenDepth -= 1;\n\t\t\t\t} else if (chrctr === \",\") {\n\t\t\t\t\tpushComponent();\n\t\t\t\t\tpushComponentArray();\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if ( (chrctr === \"/\") && (str.charAt(pos + 1) === \"*\") ) {\n\t\t\t\t\tinComment = true;\n\t\t\t\t\tpos += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tcomponent = component + chrctr;\n\t\t\t\tpos += 1;\n\t\t\t}\n\t\t}\n\n\t\tfunction isValidNonNegativeSourceSizeValue(s) {\n\t\t\tif (regexCssLengthWithUnits.test(s) && (parseFloat(s) >= 0)) {return true;}\n\t\t\tif (regexCssCalc.test(s)) {return true;}\n\t\t\t// ( http://www.w3.org/TR/CSS2/syndata.html#numbers says:\n\t\t\t// \"-0 is equivalent to 0 and is not a negative number.\" which means that\n\t\t\t// unitless zero and unitless negative zero must be accepted as special cases.)\n\t\t\tif ((s === \"0\") || (s === \"-0\") || (s === \"+0\")) {return true;}\n\t\t\treturn false;\n\t\t}\n\n\t\t// When asked to parse a sizes attribute from an element, parse a\n\t\t// comma-separated list of component values from the value of the element's\n\t\t// sizes attribute (or the empty string, if the attribute is absent), and let\n\t\t// unparsed sizes list be the result.\n\t\t// http://dev.w3.org/csswg/css-syntax/#parse-comma-separated-list-of-component-values\n\n\t\tunparsedSizesList = parseComponentValues(strValue);\n\t\tunparsedSizesListLength = unparsedSizesList.length;\n\n\t\t// For each unparsed size in unparsed sizes list:\n\t\tfor (i = 0; i < unparsedSizesListLength; i++) {\n\t\t\tunparsedSize = unparsedSizesList[i];\n\n\t\t\t// 1. Remove all consecutive s from the end of unparsed size.\n\t\t\t// ( parseComponentValues() already omits spaces outside of parens. )\n\n\t\t\t// If unparsed size is now empty, that is a parse error; continue to the next\n\t\t\t// iteration of this algorithm.\n\t\t\t// ( parseComponentValues() won't push an empty array. )\n\n\t\t\t// 2. If the last component value in unparsed size is a valid non-negative\n\t\t\t// , let size be its value and remove the component value\n\t\t\t// from unparsed size. Any CSS function other than the calc() function is\n\t\t\t// invalid. Otherwise, there is a parse error; continue to the next iteration\n\t\t\t// of this algorithm.\n\t\t\t// http://dev.w3.org/csswg/css-syntax/#parse-component-value\n\t\t\tlastComponentValue = unparsedSize[unparsedSize.length - 1];\n\n\t\t\tif (isValidNonNegativeSourceSizeValue(lastComponentValue)) {\n\t\t\t\tsize = lastComponentValue;\n\t\t\t\tunparsedSize.pop();\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 3. Remove all consecutive s from the end of unparsed\n\t\t\t// size. If unparsed size is now empty, return size and exit this algorithm.\n\t\t\t// If this was not the last item in unparsed sizes list, that is a parse error.\n\t\t\tif (unparsedSize.length === 0) {\n\t\t\t\treturn size;\n\t\t\t}\n\n\t\t\t// 4. Parse the remaining component values in unparsed size as a\n\t\t\t// . If it does not parse correctly, or it does parse\n\t\t\t// correctly but the evaluates to false, continue to the\n\t\t\t// next iteration of this algorithm.\n\t\t\t// (Parsing all possible compound media conditions in JS is heavy, complicated,\n\t\t\t// and the payoff is unclear. Is there ever an situation where the\n\t\t\t// media condition parses incorrectly but still somehow evaluates to true?\n\t\t\t// Can we just rely on the browser/polyfill to do it?)\n\t\t\tunparsedSize = unparsedSize.join(\" \");\n\t\t\tif (!(pf.matchesMedia( unparsedSize ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 5. Return size and exit this algorithm.\n\t\t\treturn size;\n\t\t}\n\n\t\t// If the above algorithm exhausts unparsed sizes list without returning a\n\t\t// size value, return 100vw.\n\t\treturn \"100vw\";\n\t}\n\n\t// namespace\n\tpf.ns = (\"pf\" + new Date().getTime()).substr(0, 9);\n\n\t// srcset support test\n\tpf.supSrcset = \"srcset\" in image;\n\tpf.supSizes = \"sizes\" in image;\n\tpf.supPicture = !!window.HTMLPictureElement;\n\n\tif (pf.supSrcset && pf.supPicture && !pf.supSizes) {\n\t\t(function(image2) {\n\t\t\timage.srcset = \"data:,a\";\n\t\t\timage2.src = \"data:,a\";\n\t\t\tpf.supSrcset = image.complete === image2.complete;\n\t\t\tpf.supPicture = pf.supSrcset && pf.supPicture;\n\t\t})(document.createElement(\"img\"));\n\t}\n\n\t// using pf.qsa instead of dom traversing does scale much better,\n\t// especially on sites mixing responsive and non-responsive images\n\tpf.selShort = \"picture>img,img[srcset]\";\n\tpf.sel = pf.selShort;\n\tpf.cfg = cfg;\n\n\tif ( pf.supSrcset ) {\n\t\tpf.sel += \",img[\" + srcsetAttr + \"]\";\n\t}\n\n\t/**\n\t * Shortcut property for `devicePixelRatio` ( for easy overriding in tests )\n\t */\n\tpf.DPR = (DPR || 1 );\n\tpf.u = units;\n\n\t// container of supported mime types that one might need to qualify before using\n\tpf.types = types;\n\n\talwaysCheckWDescriptor = pf.supSrcset && !pf.supSizes;\n\n\tpf.setSize = noop;\n\n\t/**\n\t * Gets a string and returns the absolute URL\n\t * @param src\n\t * @returns {String} absolute URL\n\t */\n\n\tpf.makeUrl = memoize(function(src) {\n\t\tanchor.href = src;\n\t\treturn anchor.href;\n\t});\n\n\t/**\n\t * Gets a DOM element or document and a selctor and returns the found matches\n\t * Can be extended with jQuery/Sizzle for IE7 support\n\t * @param context\n\t * @param sel\n\t * @returns {NodeList}\n\t */\n\tpf.qsa = function(context, sel) {\n\t\treturn context.querySelectorAll(sel);\n\t};\n\n\t/**\n\t * Shortcut method for matchMedia ( for easy overriding in tests )\n\t * wether native or pf.mMQ is used will be decided lazy on first call\n\t * @returns {boolean}\n\t */\n\tpf.matchesMedia = function() {\n\t\tif ( window.matchMedia && (matchMedia( \"(min-width: 0.1em)\" ) || {}).matches ) {\n\t\t\tpf.matchesMedia = function( media ) {\n\t\t\t\treturn !media || ( matchMedia( media ).matches );\n\t\t\t};\n\t\t} else {\n\t\t\tpf.matchesMedia = pf.mMQ;\n\t\t}\n\n\t\treturn pf.matchesMedia.apply( this, arguments );\n\t};\n\n\t/**\n\t * A simplified matchMedia implementation for IE8 and IE9\n\t * handles only min-width/max-width with px or em values\n\t * @param media\n\t * @returns {boolean}\n\t */\n\tpf.mMQ = function( media ) {\n\t\treturn media ? evalCSS(media) : true;\n\t};\n\n\t/**\n\t * Returns the calculated length in css pixel from the given sourceSizeValue\n\t * http://dev.w3.org/csswg/css-values-3/#length-value\n\t * intended Spec mismatches:\n\t * * Does not check for invalid use of CSS functions\n\t * * Does handle a computed length of 0 the same as a negative and therefore invalid value\n\t * @param sourceSizeValue\n\t * @returns {Number}\n\t */\n\tpf.calcLength = function( sourceSizeValue ) {\n\n\t\tvar value = evalCSS(sourceSizeValue, true) || false;\n\t\tif (value < 0) {\n\t\t\tvalue = false;\n\t\t}\n\n\t\treturn value;\n\t};\n\n\t/**\n\t * Takes a type string and checks if its supported\n\t */\n\n\tpf.supportsType = function( type ) {\n\t\treturn ( type ) ? types[ type ] : true;\n\t};\n\n\t/**\n\t * Parses a sourceSize into mediaCondition (media) and sourceSizeValue (length)\n\t * @param sourceSizeStr\n\t * @returns {*}\n\t */\n\tpf.parseSize = memoize(function( sourceSizeStr ) {\n\t\tvar match = ( sourceSizeStr || \"\" ).match(regSize);\n\t\treturn {\n\t\t\tmedia: match && match[1],\n\t\t\tlength: match && match[2]\n\t\t};\n\t});\n\n\tpf.parseSet = function( set ) {\n\t\tif ( !set.cands ) {\n\t\t\tset.cands = parseSrcset(set.srcset, set);\n\t\t}\n\t\treturn set.cands;\n\t};\n\n\t/**\n\t * returns 1em in css px for html/body default size\n\t * function taken from respondjs\n\t * @returns {*|number}\n\t */\n\tpf.getEmValue = function() {\n\t\tvar body;\n\t\tif ( !eminpx && (body = document.body) ) {\n\t\t\tvar div = document.createElement( \"div\" ),\n\t\t\t\toriginalHTMLCSS = docElem.style.cssText,\n\t\t\t\toriginalBodyCSS = body.style.cssText;\n\n\t\t\tdiv.style.cssText = baseStyle;\n\n\t\t\t// 1em in a media query is the value of the default font size of the browser\n\t\t\t// reset docElem and body to ensure the correct value is returned\n\t\t\tdocElem.style.cssText = fsCss;\n\t\t\tbody.style.cssText = fsCss;\n\n\t\t\tbody.appendChild( div );\n\t\t\teminpx = div.offsetWidth;\n\t\t\tbody.removeChild( div );\n\n\t\t\t//also update eminpx before returning\n\t\t\teminpx = parseFloat( eminpx, 10 );\n\n\t\t\t// restore the original values\n\t\t\tdocElem.style.cssText = originalHTMLCSS;\n\t\t\tbody.style.cssText = originalBodyCSS;\n\n\t\t}\n\t\treturn eminpx || 16;\n\t};\n\n\t/**\n\t * Takes a string of sizes and returns the width in pixels as a number\n\t */\n\tpf.calcListLength = function( sourceSizeListStr ) {\n\t\t// Split up source size list, ie ( max-width: 30em ) 100%, ( max-width: 50em ) 50%, 33%\n\t\t//\n\t\t// or (min-width:30em) calc(30% - 15px)\n\t\tif ( !(sourceSizeListStr in sizeLengthCache) || cfg.uT ) {\n\t\t\tvar winningLength = pf.calcLength( parseSizes( sourceSizeListStr ) );\n\n\t\t\tsizeLengthCache[ sourceSizeListStr ] = !winningLength ? units.width : winningLength;\n\t\t}\n\n\t\treturn sizeLengthCache[ sourceSizeListStr ];\n\t};\n\n\t/**\n\t * Takes a candidate object with a srcset property in the form of url/\n\t * ex. \"images/pic-medium.png 1x, images/pic-medium-2x.png 2x\" or\n\t * \"images/pic-medium.png 400w, images/pic-medium-2x.png 800w\" or\n\t * \"images/pic-small.png\"\n\t * Get an array of image candidates in the form of\n\t * {url: \"/foo/bar.png\", resolution: 1}\n\t * where resolution is http://dev.w3.org/csswg/css-values-3/#resolution-value\n\t * If sizes is specified, res is calculated\n\t */\n\tpf.setRes = function( set ) {\n\t\tvar candidates;\n\t\tif ( set ) {\n\n\t\t\tcandidates = pf.parseSet( set );\n\n\t\t\tfor ( var i = 0, len = candidates.length; i < len; i++ ) {\n\t\t\t\tsetResolution( candidates[ i ], set.sizes );\n\t\t\t}\n\t\t}\n\t\treturn candidates;\n\t};\n\n\tpf.setRes.res = setResolution;\n\n\tpf.applySetCandidate = function( candidates, img ) {\n\t\tif ( !candidates.length ) {return;}\n\t\tvar candidate,\n\t\t\ti,\n\t\t\tj,\n\t\t\tlength,\n\t\t\tbestCandidate,\n\t\t\tcurSrc,\n\t\t\tcurCan,\n\t\t\tcandidateSrc,\n\t\t\tabortCurSrc;\n\n\t\tvar imageData = img[ pf.ns ];\n\t\tvar dpr = pf.DPR;\n\n\t\tcurSrc = imageData.curSrc || img[curSrcProp];\n\n\t\tcurCan = imageData.curCan || setSrcToCur(img, curSrc, candidates[0].set);\n\n\t\t// if we have a current source, we might either become lazy or give this source some advantage\n\t\tif ( curCan && curCan.set === candidates[ 0 ].set ) {\n\n\t\t\t// if browser can abort image request and the image has a higher pixel density than needed\n\t\t\t// and this image isn't downloaded yet, we skip next part and try to save bandwidth\n\t\t\tabortCurSrc = (supportAbort && !img.complete && curCan.res - 0.1 > dpr);\n\n\t\t\tif ( !abortCurSrc ) {\n\t\t\t\tcurCan.cached = true;\n\n\t\t\t\t// if current candidate is \"best\", \"better\" or \"okay\",\n\t\t\t\t// set it to bestCandidate\n\t\t\t\tif ( curCan.res >= dpr ) {\n\t\t\t\t\tbestCandidate = curCan;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( !bestCandidate ) {\n\n\t\t\tcandidates.sort( ascendingSort );\n\n\t\t\tlength = candidates.length;\n\t\t\tbestCandidate = candidates[ length - 1 ];\n\n\t\t\tfor ( i = 0; i < length; i++ ) {\n\t\t\t\tcandidate = candidates[ i ];\n\t\t\t\tif ( candidate.res >= dpr ) {\n\t\t\t\t\tj = i - 1;\n\n\t\t\t\t\t// we have found the perfect candidate,\n\t\t\t\t\t// but let's improve this a little bit with some assumptions ;-)\n\t\t\t\t\tif (candidates[ j ] &&\n\t\t\t\t\t\t(abortCurSrc || curSrc !== pf.makeUrl( candidate.url )) &&\n\t\t\t\t\t\tchooseLowRes(candidates[ j ].res, candidate.res, dpr, candidates[ j ].cached)) {\n\n\t\t\t\t\t\tbestCandidate = candidates[ j ];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbestCandidate = candidate;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( bestCandidate ) {\n\n\t\t\tcandidateSrc = pf.makeUrl( bestCandidate.url );\n\n\t\t\timageData.curSrc = candidateSrc;\n\t\t\timageData.curCan = bestCandidate;\n\n\t\t\tif ( candidateSrc !== curSrc ) {\n\t\t\t\tpf.setSrc( img, bestCandidate );\n\t\t\t}\n\t\t\tpf.setSize( img );\n\t\t}\n\t};\n\n\tpf.setSrc = function( img, bestCandidate ) {\n\t\tvar origWidth;\n\t\timg.src = bestCandidate.url;\n\n\t\t// although this is a specific Safari issue, we don't want to take too much different code paths\n\t\tif ( bestCandidate.set.type === \"image/svg+xml\" ) {\n\t\t\torigWidth = img.style.width;\n\t\t\timg.style.width = (img.offsetWidth + 1) + \"px\";\n\n\t\t\t// next line only should trigger a repaint\n\t\t\t// if... is only done to trick dead code removal\n\t\t\tif ( img.offsetWidth + 1 ) {\n\t\t\t\timg.style.width = origWidth;\n\t\t\t}\n\t\t}\n\t};\n\n\tpf.getSet = function( img ) {\n\t\tvar i, set, supportsType;\n\t\tvar match = false;\n\t\tvar sets = img [ pf.ns ].sets;\n\n\t\tfor ( i = 0; i < sets.length && !match; i++ ) {\n\t\t\tset = sets[i];\n\n\t\t\tif ( !set.srcset || !pf.matchesMedia( set.media ) || !(supportsType = pf.supportsType( set.type )) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( supportsType === \"pending\" ) {\n\t\t\t\tset = supportsType;\n\t\t\t}\n\n\t\t\tmatch = set;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn match;\n\t};\n\n\tpf.parseSets = function( element, parent, options ) {\n\t\tvar srcsetAttribute, imageSet, isWDescripor, srcsetParsed;\n\n\t\tvar hasPicture = parent && parent.nodeName.toUpperCase() === \"PICTURE\";\n\t\tvar imageData = element[ pf.ns ];\n\n\t\tif ( imageData.src === undefined || options.src ) {\n\t\t\timageData.src = getImgAttr.call( element, \"src\" );\n\t\t\tif ( imageData.src ) {\n\t\t\t\tsetImgAttr.call( element, srcAttr, imageData.src );\n\t\t\t} else {\n\t\t\t\tremoveImgAttr.call( element, srcAttr );\n\t\t\t}\n\t\t}\n\n\t\tif ( imageData.srcset === undefined || options.srcset || !pf.supSrcset || element.srcset ) {\n\t\t\tsrcsetAttribute = getImgAttr.call( element, \"srcset\" );\n\t\t\timageData.srcset = srcsetAttribute;\n\t\t\tsrcsetParsed = true;\n\t\t}\n\n\t\timageData.sets = [];\n\n\t\tif ( hasPicture ) {\n\t\t\timageData.pic = true;\n\t\t\tgetAllSourceElements( parent, imageData.sets );\n\t\t}\n\n\t\tif ( imageData.srcset ) {\n\t\t\timageSet = {\n\t\t\t\tsrcset: imageData.srcset,\n\t\t\t\tsizes: getImgAttr.call( element, \"sizes\" )\n\t\t\t};\n\n\t\t\timageData.sets.push( imageSet );\n\n\t\t\tisWDescripor = (alwaysCheckWDescriptor || imageData.src) && regWDesc.test(imageData.srcset || \"\");\n\n\t\t\t// add normal src as candidate, if source has no w descriptor\n\t\t\tif ( !isWDescripor && imageData.src && !getCandidateForSrc(imageData.src, imageSet) && !imageSet.has1x ) {\n\t\t\t\timageSet.srcset += \", \" + imageData.src;\n\t\t\t\timageSet.cands.push({\n\t\t\t\t\turl: imageData.src,\n\t\t\t\t\td: 1,\n\t\t\t\t\tset: imageSet\n\t\t\t\t});\n\t\t\t}\n\n\t\t} else if ( imageData.src ) {\n\t\t\timageData.sets.push( {\n\t\t\t\tsrcset: imageData.src,\n\t\t\t\tsizes: null\n\t\t\t} );\n\t\t}\n\n\t\timageData.curCan = null;\n\t\timageData.curSrc = undefined;\n\n\t\t// if img has picture or the srcset was removed or has a srcset and does not support srcset at all\n\t\t// or has a w descriptor (and does not support sizes) set support to false to evaluate\n\t\timageData.supported = !( hasPicture || ( imageSet && !pf.supSrcset ) || isWDescripor );\n\n\t\tif ( srcsetParsed && pf.supSrcset && !imageData.supported ) {\n\t\t\tif ( srcsetAttribute ) {\n\t\t\t\tsetImgAttr.call( element, srcsetAttr, srcsetAttribute );\n\t\t\t\telement.srcset = \"\";\n\t\t\t} else {\n\t\t\t\tremoveImgAttr.call( element, srcsetAttr );\n\t\t\t}\n\t\t}\n\n\t\tif (imageData.supported && !imageData.srcset && ((!imageData.src && element.src) || element.src !== pf.makeUrl(imageData.src))) {\n\t\t\tif (imageData.src === null) {\n\t\t\t\telement.removeAttribute(\"src\");\n\t\t\t} else {\n\t\t\t\telement.src = imageData.src;\n\t\t\t}\n\t\t}\n\n\t\timageData.parsed = true;\n\t};\n\n\tpf.fillImg = function(element, options) {\n\t\tvar imageData;\n\t\tvar extreme = options.reselect || options.reevaluate;\n\n\t\t// expando for caching data on the img\n\t\tif ( !element[ pf.ns ] ) {\n\t\t\telement[ pf.ns ] = {};\n\t\t}\n\n\t\timageData = element[ pf.ns ];\n\n\t\t// if the element has already been evaluated, skip it\n\t\t// unless `options.reevaluate` is set to true ( this, for example,\n\t\t// is set to true when running `picturefill` on `resize` ).\n\t\tif ( !extreme && imageData.evaled === evalId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !imageData.parsed || options.reevaluate ) {\n\t\t\tpf.parseSets( element, element.parentNode, options );\n\t\t}\n\n\t\tif ( !imageData.supported ) {\n\t\t\tapplyBestCandidate( element );\n\t\t} else {\n\t\t\timageData.evaled = evalId;\n\t\t}\n\t};\n\n\tpf.setupRun = function() {\n\t\tif ( !alreadyRun || isVwDirty || (DPR !== window.devicePixelRatio) ) {\n\t\t\tupdateMetrics();\n\t\t}\n\t};\n\n\t// If picture is supported, well, that's awesome.\n\tif ( pf.supPicture ) {\n\t\tpicturefill = noop;\n\t\tpf.fillImg = noop;\n\t} else {\n\n\t\t// Set up picture polyfill by polling the document\n\t\t(function() {\n\t\t\tvar isDomReady;\n\t\t\tvar regReady = window.attachEvent ? /d$|^c/ : /d$|^c|^i/;\n\n\t\t\tvar run = function() {\n\t\t\t\tvar readyState = document.readyState || \"\";\n\n\t\t\t\ttimerId = setTimeout(run, readyState === \"loading\" ? 200 : 999);\n\t\t\t\tif ( document.body ) {\n\t\t\t\t\tpf.fillImgs();\n\t\t\t\t\tisDomReady = isDomReady || regReady.test(readyState);\n\t\t\t\t\tif ( isDomReady ) {\n\t\t\t\t\t\tclearTimeout( timerId );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar timerId = setTimeout(run, document.body ? 9 : 99);\n\n\t\t\t// Also attach picturefill on resize and readystatechange\n\t\t\t// http://modernjavascript.blogspot.com/2013/08/building-better-debounce.html\n\t\t\tvar debounce = function(func, wait) {\n\t\t\t\tvar timeout, timestamp;\n\t\t\t\tvar later = function() {\n\t\t\t\t\tvar last = (new Date()) - timestamp;\n\n\t\t\t\t\tif (last < wait) {\n\t\t\t\t\t\ttimeout = setTimeout(later, wait - last);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttimeout = null;\n\t\t\t\t\t\tfunc();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\treturn function() {\n\t\t\t\t\ttimestamp = new Date();\n\n\t\t\t\t\tif (!timeout) {\n\t\t\t\t\t\ttimeout = setTimeout(later, wait);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t\tvar lastClientWidth = docElem.clientHeight;\n\t\t\tvar onResize = function() {\n\t\t\t\tisVwDirty = Math.max(window.innerWidth || 0, docElem.clientWidth) !== units.width || docElem.clientHeight !== lastClientWidth;\n\t\t\t\tlastClientWidth = docElem.clientHeight;\n\t\t\t\tif ( isVwDirty ) {\n\t\t\t\t\tpf.fillImgs();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\ton( window, \"resize\", debounce(onResize, 99 ) );\n\t\t\ton( document, \"readystatechange\", run );\n\t\t})();\n\t}\n\n\tpf.picturefill = picturefill;\n\t//use this internally for easy monkey patching/performance testing\n\tpf.fillImgs = picturefill;\n\tpf.teardownRun = noop;\n\n\t/* expose methods for testing */\n\tpicturefill._ = pf;\n\n\twindow.picturefillCFG = {\n\t\tpf: pf,\n\t\tpush: function(args) {\n\t\t\tvar name = args.shift();\n\t\t\tif (typeof pf[name] === \"function\") {\n\t\t\t\tpf[name].apply(pf, args);\n\t\t\t} else {\n\t\t\t\tcfg[name] = args[0];\n\t\t\t\tif (alreadyRun) {\n\t\t\t\t\tpf.fillImgs( { reselect: true } );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\twhile (setOptions && setOptions.length) {\n\t\twindow.picturefillCFG.push(setOptions.shift());\n\t}\n\n\t/* expose picturefill */\n\twindow.picturefill = picturefill;\n\n\t/* expose picturefill */\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// CommonJS, just export\n\t\tmodule.exports = picturefill;\n\t} else if ( typeof define === \"function\" && define.amd ) {\n\t\t// AMD support\n\t\tdefine( \"picturefill\", function() { return picturefill; } );\n\t}\n\n\t// IE8 evals this sync, so it must be the last thing we do\n\tif ( !pf.supPicture ) {\n\t\ttypes[ \"image/webp\" ] = detectTypeSupport(\"image/webp\", \"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==\" );\n\t}\n\n} )( window, document );"],"sourceRoot":"/source/"}