/* $ SameHeight plugin */
(function($){
jQuery.fn.sameHeight = function(opt) {
var options = jQuery.extend({
skipClass: 'same-height-ignore',
leftEdgeClass: 'same-height-left',
rightEdgeClass: 'same-height-right',
elements: '>*',
flexible: false,
multiLine: false,
useMinHeight: false,
biggestHeight: false
},opt);
return this.each(function(){
var holder = jQuery(this), postResizeTimer, ignoreResize;
var elements = holder.find(options.elements).not('.' + options.skipClass);
if(!elements.length) return;
// resize handler
function doResize() {
elements.css(options.useMinHeight && supportMinHeight ? 'minHeight' : 'height', '');
if(options.multiLine) {
// resize elements row by row
resizeElementsByRows(elements, options);
} else {
// resize elements by holder
resizeElements(elements, holder, options);
}
}
doResize();
// handle flexible layout / font resize
var delayedResizeHandler = function() {
if(!ignoreResize) {
ignoreResize = true;
doResize();
clearTimeout(postResizeTimer);
postResizeTimer = setTimeout(function() {
doResize();
setTimeout(function(){
ignoreResize = false;
}, 10);
}, 100);
}
};
// handle flexible/responsive layout
if(options.flexible) {
jQuery(window).bind('resize orientationchange fontresize refreshOnOpen', delayedResizeHandler);
}
// handle complete page load including images and fonts
jQuery(window).bind('load', delayedResizeHandler);
});
};
// detect css min-height support
var supportMinHeight = typeof document.documentElement.style.maxHeight !== 'undefined';
// get elements by rows
function resizeElementsByRows(boxes, options) {
var currentRow = jQuery(), maxHeight, maxCalcHeight = 0, firstOffset = boxes.eq(0).offset().top;
boxes.each(function(ind){
var curItem = jQuery(this);
if(curItem.offset().top === firstOffset) {
currentRow = currentRow.add(this);
} else {
maxHeight = getMaxHeight(currentRow);
maxCalcHeight = Math.max(maxCalcHeight, resizeElements(currentRow, maxHeight, options));
currentRow = curItem;
firstOffset = curItem.offset().top;
}
});
if(currentRow.length) {
maxHeight = getMaxHeight(currentRow);
maxCalcHeight = Math.max(maxCalcHeight, resizeElements(currentRow, maxHeight, options));
}
if(options.biggestHeight) {
boxes.css(options.useMinHeight && supportMinHeight ? 'minHeight' : 'height', maxCalcHeight);
}
}
// calculate max element height
function getMaxHeight(boxes) {
var maxHeight = 0;
boxes.each(function(){
maxHeight = Math.max(maxHeight, jQuery(this).outerHeight());
});
return maxHeight;
}
// resize helper function
function resizeElements(boxes, parent, options) {
var calcHeight;
var parentHeight = typeof parent === 'number' ? parent : parent.height();
boxes.removeClass(options.leftEdgeClass).removeClass(options.rightEdgeClass).each(function(i){
var element = jQuery(this);
var depthDiffHeight = 0;
var isBorderBox = element.css('boxSizing') === 'border-box' || element.css('-moz-box-sizing') === 'border-box' || element.css('-webkit-box-sizing') === 'border-box';
if(typeof parent !== 'number') {
element.parents().each(function(){
var tmpParent = jQuery(this);
if(parent.is(this)) {
return false;
} else {
depthDiffHeight += tmpParent.outerHeight() - tmpParent.height();
}
});
}
calcHeight = parentHeight - depthDiffHeight;
calcHeight -= isBorderBox ? 0 : element.outerHeight() - element.height();
if(calcHeight > 0) {
element.css(options.useMinHeight && supportMinHeight ? 'minHeight' : 'height', calcHeight);
}
});
boxes.filter(':first').addClass(options.leftEdgeClass);
boxes.filter(':last').addClass(options.rightEdgeClass);
return calcHeight;
}
}(jQuery));
(function($) {
$('#promo-bar .container .button-close').on('click', function(event) {
event.preventDefault();
$('#promo-bar').removeClass('active');
$('#promo-bar').slideUp();
});
if($('.img-slider').length) {
$('.img-slider').slick({
dots: true,
infinite: true,
autoplay: true,
autoplaySpeed: 7500,
speed: 300,
fade: true,
cssEase: 'linear',
arrows: false,
slidesToShow: 1,
slidesToScroll: 1
});
}
if($('.gallery-slider-area').length) {
$('.gallery-slider-area').slick({
dots: true,
infinite: true,
autoplay: true,
autoplaySpeed: 7500,
speed: 300,
fade: true,
cssEase: 'linear',
arrows: false,
slidesToShow: 1,
slidesToScroll: 1
});
$('.gallery-box').on('click', function(){
$(this).closest('.gallery-slider-area')
.slick('slickNext')
.slick('slickPlay');
});
}
$('.content-box-slider').on('click', function(){
console.log('content slider click');
$(this).closest('.img-slider')
.slick('slickNext')
.slick('slickPlay');
});
if($('.i-slider').length) {
var sizes = $(".i-slider .i-item").length;
var item = $(".i-slider").html();
$(".i-slider").prepend(item).append(item).prepend(item).append(item);
$('.i-slider').slick({
dots: false,
infinite: true,
speed: 500,
arrows: true,
initialSlide: sizes*2,
slidesToShow: 3,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
}
},
{
breakpoint: 640,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
},
]
});
}
if($('.lst-inform').length){
$('.lst-inform').sameHeight({
elements: '.block',
flexible: true,
multiLine: true,
useMinHeight: true
});
}
$('.m-nav-link').click(function(){
$(this).toggleClass('active');
$('#nav ul').stop().fadeToggle(400);
return false;
});
// page init
jQuery(function(){
initAnchors();
initLightbox();
initCustomForms();
});
if(!('ontouchstart' in document.documentElement)){
$('html').addClass('no-touch');
}
// initialize custom form elements
function initCustomForms() {
jcf.setOptions('Select', {
wrapNative: false,
});
jcf.replaceAll('.custom-form');
jcf.replaceAll('#join-form');
jcf.replaceAll('.pricing-form');
jcf.replaceAll('.consultation-form');
}
// initialize smooth anchor links
function initAnchors() {
new SmoothScroll({
anchorLinks: 'a.anchors[href^="#"]:not([href="#"])',
activeClasses: 'parent'
});
}
/*!
* SmoothScroll module
*/
;(function($, exports) {
// private variables
var page,
win = $(window),
activeBlock, activeWheelHandler,
wheelEvents = ('onwheel' in document || document.documentMode >= 9 ? 'wheel' : 'mousewheel DOMMouseScroll');
// animation handlers
function scrollTo(offset, options, callback) {
// initialize variables
var scrollBlock;
if (document.body) {
if (typeof options === 'number') {
options = { duration: options };
} else {
options = options || {};
}
page = page || $('html, body');
scrollBlock = options.container || page;
} else {
return;
}
// treat single number as scrollTop
if (typeof offset === 'number') {
offset = { top: offset };
}
// handle mousewheel/trackpad while animation is active
if (activeBlock && activeWheelHandler) {
activeBlock.off(wheelEvents, activeWheelHandler);
}
if (options.wheelBehavior && options.wheelBehavior !== 'none') {
activeWheelHandler = function(e) {
if (options.wheelBehavior === 'stop') {
scrollBlock.off(wheelEvents, activeWheelHandler);
scrollBlock.stop();
} else if (options.wheelBehavior === 'ignore') {
e.preventDefault();
}
};
activeBlock = scrollBlock.on(wheelEvents, activeWheelHandler);
}
// start scrolling animation
scrollBlock.stop().animate({
scrollLeft: offset.left,
scrollTop: offset.top
}, options.duration, function() {
if (activeWheelHandler) {
scrollBlock.off(wheelEvents, activeWheelHandler);
}
if ($.isFunction(callback)) {
callback();
}
});
}
// smooth scroll contstructor
function SmoothScroll(options) {
this.options = $.extend({
anchorLinks: 'a[href^="#"]', // selector or jQuery object
container: null, // specify container for scrolling (default - whole page)
extraOffset: null, // function or fixed number
activeClasses: null, // null, "link", "parent"
easing: 'swing', // easing of scrolling
animMode: 'duration', // or "speed" mode
animDuration: 800, // total duration for scroll (any distance)
animSpeed: 1500, // pixels per second
anchorActiveClass: 'anchor-active',
sectionActiveClass: 'section-active',
wheelBehavior: 'stop', // "stop", "ignore" or "none"
useNativeAnchorScrolling: false // do not handle click in devices with native smooth scrolling
}, options);
this.init();
}
SmoothScroll.prototype = {
init: function() {
this.initStructure();
this.attachEvents();
},
initStructure: function() {
var self = this;
this.container = this.options.container ? $(this.options.container) : $('html,body');
this.scrollContainer = this.options.container ? this.container : win;
this.anchorLinks = jQuery(this.options.anchorLinks).filter(function() {
return document.getElementById(this.getAttribute('href').slice(1));
});
},
getAnchorTarget: function(link) {
// get target block from link href
var targetId = $(link).attr('href');
return $(targetId.length > 1 ? targetId : 'html');
},
getTargetOffset: function(block) {
// get target offset
var blockOffset = block.offset().top;
if (this.options.container) {
blockOffset -= this.container.offset().top - this.container.prop('scrollTop');
}
// handle extra offset
if (typeof this.options.extraOffset === 'number') {
blockOffset -= this.options.extraOffset;
} else if (typeof this.options.extraOffset === 'function') {
blockOffset -= this.options.extraOffset(block);
}
return { top: blockOffset };
},
attachEvents: function() {
var self = this;
// handle active classes
if (this.options.activeClasses && this.anchorLinks.length) {
// cache structure
this.anchorData = [];
for (var i = 0; i < this.anchorLinks.length; i++) {
var link = jQuery(this.anchorLinks[i]),
targetBlock = self.getAnchorTarget(link),
anchorDataItem;
$.each(self.anchorData, function(index, item) {
if (item.block[0] === targetBlock[0]) {
anchorDataItem = item;
}
});
if (anchorDataItem) {
anchorDataItem.link = anchorDataItem.link.add(link);
} else {
self.anchorData.push({
link: link,
block: targetBlock
});
}
};
// add additional event handlers
this.resizeHandler = function() {
self.recalculateOffsets();
};
this.scrollHandler = function() {
self.refreshActiveClass();
};
this.recalculateOffsets();
this.scrollContainer.on('scroll', this.scrollHandler);
win.on('resize', this.resizeHandler);
}
// handle click event
this.clickHandler = function(e) {
self.onClick(e);
};
if (!this.options.useNativeAnchorScrolling) {
this.anchorLinks.on('click', this.clickHandler);
}
},
recalculateOffsets: function() {
var self = this;
$.each(this.anchorData, function(index, data) {
data.offset = self.getTargetOffset(data.block);
data.height = data.block.outerHeight();
});
this.refreshActiveClass();
},
refreshActiveClass: function() {
var self = this,
foundFlag = false,
containerHeight = this.container.prop('scrollHeight'),
viewPortHeight = this.scrollContainer.height(),
scrollTop = this.options.container ? this.container.prop('scrollTop') : win.scrollTop();
// user function instead of default handler
if (this.options.customScrollHandler) {
this.options.customScrollHandler.call(this, scrollTop, this.anchorData);
return;
}
// sort anchor data by offsets
this.anchorData.sort(function(a, b) {
return a.offset.top - b.offset.top;
});
function toggleActiveClass(anchor, block, state) {
anchor.toggleClass(self.options.anchorActiveClass, state);
block.toggleClass(self.options.sectionActiveClass, state);
}
// default active class handler
$.each(this.anchorData, function(index) {
var reverseIndex = self.anchorData.length - index - 1,
data = self.anchorData[reverseIndex],
anchorElement = (self.options.activeClasses === 'parent' ? data.link.parent() : data.link);
if (scrollTop >= containerHeight - viewPortHeight) {
// handle last section
if (reverseIndex === self.anchorData.length - 1) {
toggleActiveClass(anchorElement, data.block, true);
} else {
toggleActiveClass(anchorElement, data.block, false);
}
} else {
// handle other sections
if (!foundFlag && (scrollTop >= data.offset.top - 1 || reverseIndex === 0)) {
foundFlag = true;
toggleActiveClass(anchorElement, data.block, true);
} else {
toggleActiveClass(anchorElement, data.block, false);
}
}
});
},
calculateScrollDuration: function(offset) {
var distance;
if (this.options.animMode === 'speed') {
distance = Math.abs(this.scrollContainer.scrollTop() - offset.top);
return (distance / this.options.animSpeed) * 1000;
} else {
return this.options.animDuration;
}
},
onClick: function(e) {
var targetBlock = this.getAnchorTarget(e.currentTarget),
targetOffset = this.getTargetOffset(targetBlock);
e.preventDefault();
scrollTo(targetOffset, {
container: this.container,
wheelBehavior: this.options.wheelBehavior,
duration: this.calculateScrollDuration(targetOffset)
});
},
destroy: function() {
if (this.options.activeClasses) {
win.off('resize', this.resizeHandler);
this.scrollContainer.off('scroll', this.scrollHandler);
}
this.anchorLinks.off('click', this.clickHandler);
}
};
// public API
$.extend(SmoothScroll, {
scrollTo: function(blockOrOffset, durationOrOptions, callback) {
scrollTo(blockOrOffset, durationOrOptions, callback);
}
});
// export module
exports.SmoothScroll = SmoothScroll;
}(jQuery, this));
// fancybox modal popup init
function initLightbox() {
jQuery('a.lightbox, a[rel*="lightbox"]').fancybox({
helpers: {
overlay: {
css: {
background: 'rgba(2, 23, 44, 0.7)'
}
}
},
afterLoad: function(current, previous) {
// handle custom close button in inline modal
if(current.href.indexOf('#') === 0) {
jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){
e.preventDefault();
jQuery.fancybox.close();
});
}
},
padding: 0
});
}
})(jQuery);
jQuery(window).scroll(function(){
var sticky = jQuery('#sticky-header');
scroll = jQuery(window).scrollTop();
if ( scroll >= 80 )
sticky.addClass('active');
else
sticky.removeClass('active');
});
/*!
* JavaScript Custom Forms
*
* Copyright 2014-2015 PSD2HTML - http://psd2html.com/jcf
* Released under the MIT license (LICENSE.txt)
*
* Version: 1.1.3
*/
;(function(root, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require('jquery'));
} else {
root.jcf = factory(jQuery);
}
}(this, function($) {
'use strict';
// define version
var version = '1.1.3';
// private variables
var customInstances = [];
// default global options
var commonOptions = {
optionsKey: 'jcf',
dataKey: 'jcf-instance',
rtlClass: 'jcf-rtl',
focusClass: 'jcf-focus',
pressedClass: 'jcf-pressed',
disabledClass: 'jcf-disabled',
hiddenClass: 'jcf-hidden',
resetAppearanceClass: 'jcf-reset-appearance',
unselectableClass: 'jcf-unselectable'
};
// detect device type
var isTouchDevice = ('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch,
isWinPhoneDevice = /Windows Phone/.test(navigator.userAgent);
commonOptions.isMobileDevice = !!(isTouchDevice || isWinPhoneDevice);
var isIOS = /(iPad|iPhone).*OS ([0-9_]*) .*/.exec(navigator.userAgent);
if(isIOS) isIOS = parseFloat(isIOS[2].replace(/_/g, '.'));
commonOptions.ios = isIOS;
// create global stylesheet if custom forms are used
var createStyleSheet = function() {
var styleTag = $('").appendTo("head")})})(window,document,jQuery);
/*! Picturefill - v3.0.1 - 2015-09-30
* http://scottjehl.github.io/picturefill
* Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
*/
!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<41&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||_(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;cc;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;el?m=!0:c=l):W.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(S),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(T),m>=l)return n;g=c(U),h=[],","===g.slice(-1)?(g=g.replace(V,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=function(){},u=b.createElement("img"),v=u.getAttribute,w=u.setAttribute,x=u.removeAttribute,y=b.documentElement,z={},A={algorithm:""},B="data-pfsrc",C=B+"set",D=navigator.userAgent,E=/rident/.test(D)||/ecko/.test(D)&&D.match(/rv\:(\d+)/)&&RegExp.$1>35,F="currentSrc",G=/\s+\+?\d+(e\d+)?w/,H=/(\([^)]+\))?\s*(.+)/,I=a.picturefillCFG,J="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)",K="font-size:100%!important;",L=!0,M={},N={},O=a.devicePixelRatio,P={px:1,"in":96},Q=b.createElement("a"),R=!1,S=/^[ \t\n\r\u000c]+/,T=/^[, \t\n\r\u000c]+/,U=/^[^ \t\n\r\u000c]+/,V=/[,]+$/,W=/^\d+$/,X=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Y=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},Z=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},$=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=Z(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in M))if(M[b]=!1,d&&(e=b.match(a)))M[b]=e[1]*P[e[2]];else try{M[b]=new Function("e",c(b))(P)}catch(f){}return M[b]}}(),_=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},aa=function(a){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),R=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}};o=a.console&&console.warn?function(a){console.warn(a)}:t,F in u||(F="src"),z["image/jpeg"]=!0,z["image/gif"]=!0,z["image/png"]=!0,z["image/svg+xml"]=b.implementation.hasFeature("http://wwwindow.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in u,s.supSizes="sizes"in u,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){u.srcset="data:,a",a.src="data:,a",s.supSrcset=u.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=A,s.supSrcset&&(s.sel+=",img["+C+"]"),s.DPR=O||1,s.u=P,s.types=z,q=s.supSrcset&&!s.supSizes,s.setSize=t,s.makeUrl=Z(function(a){return Q.href=a,Q.href}),s.qsa=function(a,b){return a.querySelectorAll(b)},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?$(a):!0},s.calcLength=function(a){var b=$(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?z[a]:!0},s.parseSize=Z(function(a){var b=(a||"").match(H);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=y.style.cssText,e=a.style.cssText;c.style.cssText=J,y.style.cssText=K,a.style.cssText=K,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),y.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in N)||A.uT){var b=s.calcLength(n(a));N[a]=b?b:P.width}return N[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)_(b[c],a.sizes)}return b},s.setRes.res=_,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[F],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=E&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;bf?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=y.clientHeight,i=function(){L=Math.max(a.innerWidth||0,y.clientWidth)!==P.width||y.clientHeight!==h,h=y.clientHeight,L&&s.fillImgs()};Y(a,"resize",g(i,99)),Y(b,"readystatechange",e)}(),s.picturefill=aa,s.fillImgs=aa,s.teardownRun=t,aa._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(A[b]=a[0],R&&s.fillImgs({reselect:!0}))}};for(;I&&I.length;)a.picturefillCFG.push(I.shift());a.picturefill=aa,"object"==typeof module&&"object"==typeof module.exports?module.exports=aa:"function"==typeof define&&define.amd&&define("picturefill",function(){return aa}),s.supPicture||(z["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);