(function(){'use strict';var lastTime=0;var vendors=['webkit','moz'];for(var x=0;x0;}});} return;} var registry=[];function IntersectionObserverEntry(entry){this.time=entry.time;this.target=entry.target;this.rootBounds=entry.rootBounds;this.boundingClientRect=entry.boundingClientRect;this.intersectionRect=entry.intersectionRect||getEmptyRect();this.isIntersecting=!!entry.intersectionRect;var targetRect=this.boundingClientRect;var targetArea=targetRect.width*targetRect.height;var intersectionRect=this.intersectionRect;var intersectionArea=intersectionRect.width*intersectionRect.height;if(targetArea){this.intersectionRatio=intersectionArea/targetArea;}else{this.intersectionRatio=this.isIntersecting?1:0;}} function IntersectionObserver(callback,opt_options){var options=opt_options||{};if(typeof callback!='function'){throw new Error('callback must be a function');} if(options.root&&options.root.nodeType!=1){throw new Error('root must be an Element');} this._checkForIntersections=throttle(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT);this._callback=callback;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(options.rootMargin);this.thresholds=this._initThresholds(options.threshold);this.root=options.root||null;this.rootMargin=this._rootMarginValues.map(function(margin){return margin.value+margin.unit;}).join(' ');} IntersectionObserver.prototype.THROTTLE_TIMEOUT=100;IntersectionObserver.prototype.POLL_INTERVAL=null;IntersectionObserver.prototype.USE_MUTATION_OBSERVER=true;IntersectionObserver.prototype.observe=function(target){var isTargetAlreadyObserved=this._observationTargets.some(function(item){return item.element==target;});if(isTargetAlreadyObserved){return;} if(!(target&&target.nodeType==1)){throw new Error('target must be an Element');} this._registerInstance();this._observationTargets.push({element:target,entry:null});this._monitorIntersections();this._checkForIntersections();};IntersectionObserver.prototype.unobserve=function(target){this._observationTargets=this._observationTargets.filter(function(item){return item.element!=target;});if(!this._observationTargets.length){this._unmonitorIntersections();this._unregisterInstance();}};IntersectionObserver.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorIntersections();this._unregisterInstance();};IntersectionObserver.prototype.takeRecords=function(){var records=this._queuedEntries.slice();this._queuedEntries=[];return records;};IntersectionObserver.prototype._initThresholds=function(opt_threshold){var threshold=opt_threshold||[0];if(!Array.isArray(threshold))threshold=[threshold];return threshold.sort().filter(function(t,i,a){if(typeof t!='number'||isNaN(t)||t<0||t>1){throw new Error('threshold must be a number between 0 and 1 inclusively');} return t!==a[i-1];});};IntersectionObserver.prototype._parseRootMargin=function(opt_rootMargin){var marginString=opt_rootMargin||'0px';var margins=marginString.split(/\s+/).map(function(margin){var parts=/^(-?\d*\.?\d+)(px|%)$/.exec(margin);if(!parts){throw new Error('rootMargin must be specified in pixels or percent');} return{value:parseFloat(parts[1]),unit:parts[2]};});margins[1]=margins[1]||margins[0];margins[2]=margins[2]||margins[0];margins[3]=margins[3]||margins[1];return margins;};IntersectionObserver.prototype._monitorIntersections=function(){if(!this._monitoringIntersections){this._monitoringIntersections=true;if(this.POLL_INTERVAL){this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL);} else{addEvent(window,'resize',this._checkForIntersections,true);addEvent(document,'scroll',this._checkForIntersections,true);if(this.USE_MUTATION_OBSERVER&&'MutationObserver'in window){this._domObserver=new MutationObserver(this._checkForIntersections);this._domObserver.observe(document,{attributes:true,childList:true,characterData:true,subtree:true});}}}};IntersectionObserver.prototype._unmonitorIntersections=function(){if(this._monitoringIntersections){this._monitoringIntersections=false;clearInterval(this._monitoringInterval);this._monitoringInterval=null;removeEvent(window,'resize',this._checkForIntersections,true);removeEvent(document,'scroll',this._checkForIntersections,true);if(this._domObserver){this._domObserver.disconnect();this._domObserver=null;}}};IntersectionObserver.prototype._checkForIntersections=function(){var rootIsInDom=this._rootIsInDom();var rootRect=rootIsInDom?this._getRootRect():getEmptyRect();this._observationTargets.forEach(function(item){var target=item.element;var targetRect=getBoundingClientRect(target);var rootContainsTarget=this._rootContainsTarget(target);var oldEntry=item.entry;var intersectionRect=rootIsInDom&&rootContainsTarget&&this._computeTargetAndRootIntersection(target,rootRect);var newEntry=item.entry=new IntersectionObserverEntry({time:now(),target:target,boundingClientRect:targetRect,rootBounds:rootRect,intersectionRect:intersectionRect});if(!oldEntry){this._queuedEntries.push(newEntry);}else if(rootIsInDom&&rootContainsTarget){if(this._hasCrossedThreshold(oldEntry,newEntry)){this._queuedEntries.push(newEntry);}}else{if(oldEntry&&oldEntry.isIntersecting){this._queuedEntries.push(newEntry);}}},this);if(this._queuedEntries.length){this._callback(this.takeRecords(),this);}};IntersectionObserver.prototype._computeTargetAndRootIntersection=function(target,rootRect){if(window.getComputedStyle(target).display=='none')return;var targetRect=getBoundingClientRect(target);var intersectionRect=targetRect;var parent=getParentNode(target);var atRoot=false;while(!atRoot){var parentRect=null;var parentComputedStyle=parent.nodeType==1?window.getComputedStyle(parent):{};if(parentComputedStyle.display=='none')return;if(parent==this.root||parent==document){atRoot=true;parentRect=rootRect;}else{if(parent!=document.body&&parent!=document.documentElement&&parentComputedStyle.overflow!='visible'){parentRect=getBoundingClientRect(parent);}} if(parentRect){intersectionRect=computeRectIntersection(parentRect,intersectionRect);if(!intersectionRect)break;} parent=getParentNode(parent);} return intersectionRect;};IntersectionObserver.prototype._getRootRect=function(){var rootRect;if(this.root){rootRect=getBoundingClientRect(this.root);}else{var html=document.documentElement;var body=document.body;rootRect={top:0,left:0,right:html.clientWidth||body.clientWidth,width:html.clientWidth||body.clientWidth,bottom:html.clientHeight||body.clientHeight,height:html.clientHeight||body.clientHeight};} return this._expandRectByRootMargin(rootRect);};IntersectionObserver.prototype._expandRectByRootMargin=function(rect){var margins=this._rootMarginValues.map(function(margin,i){return margin.unit=='px'?margin.value:margin.value*(i%2?rect.width:rect.height)/100;});var newRect={top:rect.top-margins[0],right:rect.right+margins[1],bottom:rect.bottom+margins[2],left:rect.left-margins[3]};newRect.width=newRect.right-newRect.left;newRect.height=newRect.bottom-newRect.top;return newRect;};IntersectionObserver.prototype._hasCrossedThreshold=function(oldEntry,newEntry){var oldRatio=oldEntry&&oldEntry.isIntersecting?oldEntry.intersectionRatio||0:-1;var newRatio=newEntry.isIntersecting?newEntry.intersectionRatio||0:-1;if(oldRatio===newRatio)return;for(var i=0;i=0&&height>=0)&&{top:top,bottom:bottom,left:left,right:right,width:width,height:height};} function getBoundingClientRect(el){var rect;try{rect=el.getBoundingClientRect();}catch(err){} if(!rect)return getEmptyRect();if(!(rect.width&&rect.height)){rect={top:rect.top,right:rect.right,bottom:rect.bottom,left:rect.left,width:rect.right-rect.left,height:rect.bottom-rect.top};} return rect;} function getEmptyRect(){return{top:0,bottom:0,left:0,right:0,width:0,height:0};} function containsDeep(parent,child){var node=child;while(node){if(node==parent)return true;node=getParentNode(node);} return false;} function getParentNode(node){var parent=node.parentNode;if(parent&&parent.nodeType==11&&parent.host){return parent.host;} return parent;} window.IntersectionObserver=IntersectionObserver;window.IntersectionObserverEntry=IntersectionObserverEntry;}(window,document));if(!Object.assign){Object.defineProperty(Object,'assign',{enumerable:false,configurable:true,writable:true,value:function(target){'use strict';if(target===undefined||target===null){throw new TypeError('Cannot convert first argument to object');} var to=Object(target);for(var i=1;i0||entry.isIntersecting){observer.unobserve(entry.target);if(!isLoaded(entry.target)){load(entry.target);markAsLoaded(entry.target);loaded(entry.target);}}});};};var getElements=function getElements(selector){var root=arguments.length>1&&arguments[1]!==undefined?arguments[1]:document;if(selector instanceof Element){return[selector];} if(selector instanceof NodeList){return selector;} return root.querySelectorAll(selector);};function lozad(){var selector=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'.lozad';var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var _Object$assign=Object.assign({},defaultConfig,options),root=_Object$assign.root,rootMargin=_Object$assign.rootMargin,threshold=_Object$assign.threshold,load=_Object$assign.load,loaded=_Object$assign.loaded;var observer=void 0;if(typeof window!=='undefined'&&window.IntersectionObserver){observer=new IntersectionObserver(onIntersection(load,loaded),{root:root,rootMargin:rootMargin,threshold:threshold});} return{observe:function observe(){var elements=getElements(selector,root);for(var i=0;iiframe_bottom||iframe_top>top_window_bottom||top_window_left>iframe_right||iframe_left>top_window_right){return false;} if(top_window_top>iframe_top){viewport_top+=(top_window_top-iframe_top);} if(iframe_bottom>top_window_bottom){viewport_bottom-=(iframe_bottom-top_window_bottom);} if(top_window_left>iframe_left){viewport_left+=(top_window_left-iframe_left);} if(iframe_right>top_window_right){viewport_right-=(iframe_right-top_window_right);}} if(top+$element.height()>=viewport_top&&top-($element.data('appear-top-offset')||0)<=viewport_bottom&&left+$element.width()>=viewport_left&&left-($element.data('appear-left-offset')||0)<=viewport_right){return true;}else{return false;}};$.fn.extend({appear:function(options){var opts=$.extend({},defaults,options||{});var selector=this.selector||this;if(!check_binded){var on_check=function(){if(check_lock){return;} check_lock=true;setTimeout(process,opts.interval);};if(opts.support_seamless_iframes&&window.frameElement){$iframe=$(window.frameElement);handle_seamless_iframe=$iframe.attr('scrolling')==="no"||$iframe.is('[seamless]');} if(handle_seamless_iframe){iframe_offset=$iframe.offset();$(window.top).scroll(on_check).resize(on_check);}else{$(window).scroll(on_check).resize(on_check);} check_binded=true;} if(opts.force_process){setTimeout(process,opts.interval);} add_selector(selector);return $(selector);}});$.extend({force_appear:function(){if(check_binded){process();return true;} return false;}});})(function(){if(typeof module!=='undefined'){return require('jquery');}else{return jQuery;}}());(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){var inviewObjects=[],viewportSize,viewportOffset,d=document,w=window,win=$(w),documentElement=d.documentElement,timer,wait_timer=false;$.event.special.inview={add:function(data){inviewObjects.push({data:data,$element:$(this),element:this});if(!timer&&inviewObjects.length){timer=setInterval(checkInView,100);}},remove:function(data){for(var i=0;i=viewportOffset.top&&elementOffset.top+elementSize.height<=viewportOffset.top+viewportSize.height){if(!inView){$element.data('inview',true).trigger('inview',[true]);}}else if(inView){$element.data('inview',false).trigger('inview',[false]);}}else{if(typeof appearOffset!=="undefined"&&appearOffset==='none'&&!inView){appearOffset=0;} if(typeof appearOffset!=="undefined"&&appearOffset==='auto'&&!inView){appearOffset=elementSize.height*.5;} if(typeof appearOffset!=="undefined"&&appearOffset==='almost'&&!inView){appearOffset=elementSize.height*.75;} if(typeof appearOffset!=="undefined"&&appearOffset==='partial'&&!inView){appearOffset=elementSize.height*.33;} if(typeof appearOffset!=="undefined"&&appearOffset==='auto'&&inView||typeof appearOffset==="undefined"){appearOffset=0;} appearOffset=-Math.abs(appearOffset);if(elementOffset.top+elementSize.height>=viewportOffset.top&&elementOffset.top-(appearOffset||0)<=viewportOffset.top+viewportSize.height){if(!inView){$element.data('inview',true).trigger('inview',[true]);}}else if(inView){$element.data('inview',false).trigger('inview',[false]);}}}} $(w).on("scroll resize scrollstop",function(){viewportSize=viewportOffset=null;});})); /*! waitForImages jQuery Plugin - v2.4.0 - 2018-02-13 * https://github.com/alexanderdickson/waitForImages * Copyright (c) 2018 Alex Dickson; Licensed MIT */ ;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){var eventNamespace='waitForImages';var hasSrcset=(function(img){return img.srcset&&img.sizes;})(new Image());$.waitForImages={hasImageProperties:['backgroundImage','listStyleImage','borderImage','borderCornerImage','cursor'],hasImageAttributes:['srcset']};$.expr.pseudos['has-src']=function(obj){return $(obj).is('img[src][src!=""]');};$.expr.pseudos.uncached=function(obj){if(!$(obj).is(':has-src')){return false;} return!obj.complete;};$.fn.waitForImages=function(){var allImgsLength=0;var allImgsLoaded=0;var deferred=$.Deferred();var originalCollection=this;var allImgs=[];var hasImgProperties=$.waitForImages.hasImageProperties||[];var hasImageAttributes=$.waitForImages.hasImageAttributes||[];var matchUrl=/url\(\s*(['"]?)(.*?)\1\s*\)/g;var finishedCallback;var eachCallback;var waitForAll;if($.isPlainObject(arguments[0])){waitForAll=arguments[0].waitForAll;eachCallback=arguments[0].each;finishedCallback=arguments[0].finished;}else{if(arguments.length===1&&$.type(arguments[0])==='boolean'){waitForAll=arguments[0];}else{finishedCallback=arguments[0];eachCallback=arguments[1];waitForAll=arguments[2];}} finishedCallback=finishedCallback||$.noop;eachCallback=eachCallback||$.noop;waitForAll=!!waitForAll;if(!$.isFunction(finishedCallback)||!$.isFunction(eachCallback)){throw new TypeError('An invalid callback was supplied.');} this.each(function(){var obj=$(this);if(waitForAll){obj.find('*').addBack().each(function(){var element=$(this);if(element.is('img:has-src')&&!element.is('[srcset]')){allImgs.push({src:element.attr('src'),element:element[0]});} $.each(hasImgProperties,function(i,property){var propertyValue=element.css(property);var match;if(!propertyValue){return true;} while(match=matchUrl.exec(propertyValue)){allImgs.push({src:match[2],element:element[0]});}});$.each(hasImageAttributes,function(i,attribute){var attributeValue=element.attr(attribute);var attributeValues;if(!attributeValue){return true;} allImgs.push({src:element.attr('src'),srcset:element.attr('srcset'),element:element[0]});});});}else{obj.find('img:has-src').each(function(){allImgs.push({src:this.src,element:this});});}});allImgsLength=allImgs.length;allImgsLoaded=0;if(allImgsLength===0){finishedCallback.call(originalCollection);deferred.resolveWith(originalCollection);} $.each(allImgs,function(i,img){var image=new Image();var events='load.'+eventNamespace+' error.'+eventNamespace;$(image).one(events,function me(event){var eachArguments=[allImgsLoaded,allImgsLength,event.type=='load'];allImgsLoaded++;eachCallback.apply(img.element,eachArguments);deferred.notifyWith(img.element,eachArguments);$(this).off(events,me);if(allImgsLoaded==allImgsLength){finishedCallback.call(originalCollection[0]);deferred.resolveWith(originalCollection[0]);return false;}});if(hasSrcset&&img.srcset){image.srcset=img.srcset;image.sizes=img.sizes;} image.src=img.src;});return deferred.promise();};})); /*! * imagesLoaded PACKAGED v4.1.3 * JavaScript is all like "You images are done yet or what?" * MIT License */ (function(global,factory){if(typeof define=='function'&&define.amd){H define('ev-emitter/ev-emitter',factory);}else if(typeof module=='object'&&module.exports){module.exports=factory();}else{global.EvEmitter=factory();}}(typeof window!='undefined'?window:this,function(){function EvEmitter(){} var proto=EvEmitter.prototype;proto.on=function(eventName,listener){if(!eventName||!listener){return;} var events=this._events=this._events||{};var listeners=events[eventName]=events[eventName]||[];if(listeners.indexOf(listener)==-1){listeners.push(listener);} return this;};proto.once=function(eventName,listener){if(!eventName||!listener){return;} this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{};var onceListeners=onceEvents[eventName]=onceEvents[eventName]||{};onceListeners[listener]=true;return this;};proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;} var index=listeners.indexOf(listener);if(index!=-1){listeners.splice(index,1);} return this;};proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return;} var i=0;var listener=listeners[i];args=args||[];var onceListeners=this._onceEvents&&this._onceEvents[eventName];while(listener){var isOnce=onceListeners&&onceListeners[listener];if(isOnce){this.off(eventName,listener);delete onceListeners[listener];} listener.apply(this,args);i+=isOnce?0:1;listener=listeners[i];} return this;};proto.allOff=proto.removeAllListeners=function(){delete this._events;delete this._onceEvents;};return EvEmitter;})); /*! * imagesLoaded v4.1.3 * JavaScript is all like "You images are done yet or what?" * MIT License */ (function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['ev-emitter/ev-emitter'],function(EvEmitter){return factory(window,EvEmitter);});}else if(typeof module=='object'&&module.exports){module.exports=factory(window,require('ev-emitter'));}else{window.imagesLoaded=factory(window,window.EvEmitter);}})(typeof window!=='undefined'?window:this,function factory(window,EvEmitter){var $=window.jQuery;var console=window.console;function extend(a,b){for(var prop in b){a[prop]=b[prop];} return a;} function makeArray(obj){var ary=[];if(Array.isArray(obj)){ary=obj;}else if(typeof obj.length=='number'){for(var i=0;i"+css+"").attr({"class":"keyframe-style",id:id,type:"text/css"}).appendTo("head");};$.keyframe={debug:false,getVendorPrefix:function(){return vendorPrefix;},isSupported:function(){return animationSupport;},generate:function(frameData){var frameName=frameData.name||"";var css="@"+vendorPrefix+"keyframes "+frameName+" {";for(var key in frameData){if(key!=="name"&&key!=="media"&&key!=="complete"){css+=key+" {";for(var property in frameData[key]){css+=property+":"+frameData[key][property]+";";} css+="}";}} if(window.PrefixFree) css=PrefixFree.prefixCSS(css+"}");else css+="}";if(frameData.media){css="@media "+frameData.media+"{"+css+"}";} var $frameStyle=$("style#"+frameData.name);if($frameStyle.length>0){$frameStyle.html(css);var $elems=$("*").filter(function(){return this.style[animationString+"Name"]===frameName;});$elems.each(function(){var $el=$(this);var options=$el.data("keyframeOptions");$el.resetKeyframe(function(){$el.playKeyframe(options);});});}else{$createKeyframeStyleTag(frameName,css);}},define:function(frameData){if(frameData.length){for(var i=0;iimg._pfLastSize){img._pfLastSize=img.offsetWidth;sizes=img.sizes;img.sizes+=",100vw";setTimeout(function(){img.sizes=sizes;});}};var findPictureImgs=function(){var i;var imgs=document.querySelectorAll("picture > img, img[srcset][sizes]");for(i=0;i35);var curSrcProp="currentSrc";var regWDesc=/\s+\+?\d+(e\d+)?w/;var regSize=/(\([^)]+\))?\s*(.+)/;var setOptions=window.picturefillCFG;var 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)";var fsCss="font-size:100%!important;";var isVwDirty=true;var cssCache={};var sizeLengthCache={};var DPR=window.devicePixelRatio;var units={px:1,"in":96};var anchor=document.createElement("a");var alreadyRun=false;var regexLeadingSpaces=/^[ \t\n\r\u000c]+/,regexLeadingCommasOrSpaces=/^[, \t\n\r\u000c]+/,regexLeadingNotSpaces=/^[^ \t\n\r\u000c]+/,regexTrailingCommas=/[,]+$/,regexNonNegativeInteger=/^\d+$/,regexFloatingPoint=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;var on=function(obj,evt,fn,capture){if(obj.addEventListener){obj.addEventListener(evt,fn,capture||false);}else if(obj.attachEvent){obj.attachEvent("on"+evt,fn);}};var memoize=function(fn){var cache={};return function(input){if(!(input in cache)){cache[input]=fn(input);} return cache[input];};};function isSpace(c){return(c==="\u0020"||c==="\u0009"||c==="\u000A"||c==="\u000C"||c==="\u000D");} var evalCSS=(function(){var regLength=/^([\d\.]+)(em|vw|px)$/;var replace=function(){var args=arguments,index=0,string=args[0];while(++index in args){string=string.replace(args[index],args[++index]);} return string;};var buildStr=memoize(function(css){return"return "+replace((css||"").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\.&=|><\+\-\*\(\)\/])).*/ig,"")+";";});return function(css,length){var parsedLength;if(!(css in cssCache)){cssCache[css]=false;if(length&&(parsedLength=css.match(regLength))){cssCache[css]=parsedLength[1]*units[parsedLength[2]];}else{try{cssCache[css]=new Function("e",buildStr(css))(units);}catch(e){}}} return cssCache[css];};})();var setResolution=function(candidate,sizesattr){if(candidate.w){candidate.cWidth=pf.calcListLength(sizesattr||"100vw");candidate.res=candidate.w/candidate.cWidth;}else{candidate.res=candidate.d;} return candidate;};var picturefill=function(opt){var elements,i,plen;var options=opt||{};if(options.elements&&options.elements.nodeType===1){if(options.elements.nodeName.toUpperCase()==="IMG"){options.elements=[options.elements];}else{options.context=options.elements;options.elements=null;}} elements=options.elements||pf.qsa((options.context||document),(options.reevaluate||options.reselect)?pf.sel:pf.selShort);if((plen=elements.length)){pf.setupRun(options);alreadyRun=true;for(i=0;i2.7){meanDensity=dprValue+1;}else{tooMuch=higherValue-dprValue;bonusFactor=Math.pow(lowerValue-0.6,1.5);bonus=tooMuch*bonusFactor;if(isCached){bonus+=0.1*bonusFactor;} meanDensity=lowerValue+bonus;}}else{meanDensity=(dprValue>1)?Math.sqrt(lowerValue*higherValue):lowerValue;} return meanDensity>dprValue;} function applyBestCandidate(img){var srcSetCandidates;var matchingSet=pf.getSet(img);var evaluated=false;if(matchingSet!=="pending"){evaluated=evalId;if(matchingSet){srcSetCandidates=pf.setRes(matchingSet);pf.applySetCandidate(srcSetCandidates,img);}} img[pf.ns].evaled=evaluated;} function ascendingSort(a,b){return a.res-b.res;} function setSrcToCur(img,src,set){var candidate;if(!set&&src){set=img[pf.ns].sets;set=set&&set[set.length-1];} candidate=getCandidateForSrc(src,set);if(candidate){src=pf.makeUrl(src);img[pf.ns].curSrc=src;img[pf.ns].curCan=candidate;if(!candidate.res){setResolution(candidate,candidate.set.sizes);}} return candidate;} function getCandidateForSrc(src,set){var i,candidate,candidates;if(src&&set){candidates=pf.parseSet(set);src=pf.makeUrl(src);for(i=0;i=inputLength){return candidates;} url=collectCharacters(regexLeadingNotSpaces);descriptors=[];if(url.slice(-1)===","){url=url.replace(regexTrailingCommas,"");parseDescriptors();}else{tokenize();}}} function parseSizes(strValue){var 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;var regexCssCalc=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;var i;var unparsedSizesList;var unparsedSizesListLength;var unparsedSize;var lastComponentValue;var size;function parseComponentValues(str){var chrctr;var component="";var componentArray=[];var listArray=[];var parenDepth=0;var pos=0;var inComment=false;function pushComponent(){if(component){componentArray.push(component);component="";}} function pushComponentArray(){if(componentArray[0]){listArray.push(componentArray);componentArray=[];}} while(true){chrctr=str.charAt(pos);if(chrctr===""){pushComponent();pushComponentArray();return listArray;}else if(inComment){if((chrctr==="*")&&(str[pos+1]==="/")){inComment=false;pos+=2;pushComponent();continue;}else{pos+=1;continue;}}else if(isSpace(chrctr)){if((str.charAt(pos-1)&&isSpace(str.charAt(pos-1)))||!component){pos+=1;continue;}else if(parenDepth===0){pushComponent();pos+=1;continue;}else{chrctr=" ";}}else if(chrctr==="("){parenDepth+=1;}else if(chrctr===")"){parenDepth-=1;}else if(chrctr===","){pushComponent();pushComponentArray();pos+=1;continue;}else if((chrctr==="/")&&(str.charAt(pos+1)==="*")){inComment=true;pos+=2;continue;} component=component+chrctr;pos+=1;}} function isValidNonNegativeSourceSizeValue(s){if(regexCssLengthWithUnits.test(s)&&(parseFloat(s)>=0)){return true;} if(regexCssCalc.test(s)){return true;} if((s==="0")||(s==="-0")||(s==="+0")){return true;} return false;} unparsedSizesList=parseComponentValues(strValue);unparsedSizesListLength=unparsedSizesList.length;for(i=0;idpr);if(!abortCurSrc){curCan.cached=true;if(curCan.res>=dpr){bestCandidate=curCan;}}} if(!bestCandidate){candidates.sort(ascendingSort);length=candidates.length;bestCandidate=candidates[length-1];for(i=0;i=dpr){j=i-1;if(candidates[j]&&(abortCurSrc||curSrc!==pf.makeUrl(candidate.url))&&chooseLowRes(candidates[j].res,candidate.res,dpr,candidates[j].cached)){bestCandidate=candidates[j];}else{bestCandidate=candidate;} break;}}} if(bestCandidate){candidateSrc=pf.makeUrl(bestCandidate.url);imageData.curSrc=candidateSrc;imageData.curCan=bestCandidate;if(candidateSrc!==curSrc){pf.setSrc(img,bestCandidate);} pf.setSize(img);}};pf.setSrc=function(img,bestCandidate){var origWidth;img.src=bestCandidate.url;if(bestCandidate.set.type==="image/svg+xml"){origWidth=img.style.width;img.style.width=(img.offsetWidth+1)+"px";if(img.offsetWidth+1){img.style.width=origWidth;}}};pf.getSet=function(img){var i,set,supportsType;var match=false;var sets=img[pf.ns].sets;for(i=0;i1;if(queue){duration/=2;} settings.offset=both(settings.offset);settings.over=both(settings.over);return this.each(function(){if(target===null)return;var win=isWin(this),elem=win?this.contentWindow||window:this,$elem=$(elem),targ=target,attr={},toff;switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break;} targ=win?$(targ):$(targ,elem);case'object':if(targ.length===0)return;if(targ.is||targ.style){toff=(targ=$(targ)).offset();}} var offset=$.isFunction(settings.offset)&&settings.offset(elem,targ)||settings.offset;$.each(settings.axis.split(''),function(i,axis){var Pos=axis==='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,prev=$elem[key](),max=$scrollTo.max(elem,axis);if(toff){attr[key]=toff[pos]+(win?0:prev-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css('margin'+Pos),10)||0;attr[key]-=parseInt(targ.css('border'+Pos+'Width'),10)||0;} attr[key]+=offset[pos]||0;if(settings.over[pos]){attr[key]+=targ[axis==='x'?'width':'height']()*settings.over[pos];}}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)==='%'?parseFloat(val)/100*max:val;} if(settings.limit&&/^\d+$/.test(attr[key])){attr[key]=attr[key]<=0?0:Math.min(attr[key],max);} if(!i&&settings.axis.length>1){if(prev===attr[key]){attr={};}else if(queue){animate(settings.onAfterFirst);attr={};}}});animate(settings.onAfter);function animate(callback){var opts=$.extend({},settings,{queue:true,duration:duration,complete:callback&&function(){callback.call(elem,targ,settings);}});$elem.animate(attr,opts);}});};$scrollTo.max=function(elem,axis){var Dim=axis==='x'?'Width':'Height',scroll='scroll'+Dim;if(!isWin(elem)) return elem[scroll]-$(elem)[Dim.toLowerCase()]();var size='client'+Dim,doc=elem.ownerDocument||elem.document,html=doc.documentElement,body=doc.body;return Math.max(html[scroll],body[scroll])-Math.min(html[size],body[size]);};function both(val){return $.isFunction(val)||$.isPlainObject(val)?val:{top:val,left:val};} $.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(t){return $(t.elem)[t.prop]();},set:function(t){var curr=this.get(t);if(t.options.interrupt&&t._last&&t._last!==curr){return $(t.elem).stop();} var next=Math.round(t.now);if(curr!==next){$(t.elem)[t.prop](next);t._last=this.get(t);}}};return $scrollTo;}); /*! * jQuery.utresize * @author UnitedThemes * @version 1.0 * */ (function($,sr){"use strict";var debounce=function(func,threshold,execAsap){var timeout='';return function debounced(){var obj=this,args=arguments;function delayed(){if(!execAsap){func.apply(obj,args);} timeout=null;} if(timeout){clearTimeout(timeout);}else if(execAsap){func.apply(obj,args);} timeout=setTimeout(delayed,threshold||100);};};jQuery.fn[sr]=function(fn){return fn?this.bind('resize',debounce(fn)):this.trigger(sr);};})(jQuery,'utresize');jQuery.fn.isOnScreen=function(){var win=jQuery(window);var viewport={top:win.scrollTop(),left:win.scrollLeft()};viewport.right=viewport.left+win.width();viewport.bottom=viewport.top+win.height();var bounds=this.offset();bounds.right=bounds.left+this.outerWidth();bounds.bottom=bounds.top+this.outerHeight();return(!(viewport.rightbounds.right||viewport.bottombounds.bottom));}; /*! * jQuery.utresize_faster * @author UnitedThemes * @version 1.0 * */ (function($,sr){"use strict";var debounce=function(func,threshold,execAsap){var timeout='';return function debounced(){var obj=this,args=arguments;function delayed(){if(!execAsap){func.apply(obj,args);} timeout=null;} if(timeout){clearTimeout(timeout);}else if(execAsap){func.apply(obj,args);} timeout=setTimeout(delayed,threshold||50);};};jQuery.fn[sr]=function(fn){return fn?this.bind('resize',debounce(fn)):this.trigger(sr);};})(jQuery,'utresize_fast');(function(factory){if(typeof define==="function"&&define.amd){define(['jquery'],function($){return factory($);});}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require('jquery'));}else{factory(jQuery);}})(function($){$.easing['jswing']=$.easing['swing'];var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=(2*PI)/3,c5=(2*PI)/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x;}else if(x<2/d1){return n1*(x-=(1.5/d1))*x+0.75;}else if(x<2.5/d1){return n1*(x-=(2.25/d1))*x+0.9375;}else{return n1*(x-=(2.625/d1))*x+0.984375;}} $.extend($.easing,{def:'easeOutQuad',swing:function(x){return $.easing[$.easing.def](x);},easeInQuad:function(x){return x*x;},easeOutQuad:function(x){return 1-(1-x)*(1-x);},easeInOutQuad:function(x){return x<0.5?2*x*x:1-pow(-2*x+2,2)/2;},easeInCubic:function(x){return x*x*x;},easeOutCubic:function(x){return 1-pow(1-x,3);},easeInOutCubic:function(x){return x<0.5?4*x*x*x:1-pow(-2*x+2,3)/2;},easeInQuart:function(x){return x*x*x*x;},easeOutQuart:function(x){return 1-pow(1-x,4);},easeInOutQuart:function(x){return x<0.5?8*x*x*x*x:1-pow(-2*x+2,4)/2;},easeInQuint:function(x){return x*x*x*x*x;},easeOutQuint:function(x){return 1-pow(1-x,5);},easeInOutQuint:function(x){return x<0.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2;},easeInSine:function(x){return 1-cos(x*PI/2);},easeOutSine:function(x){return sin(x*PI/2);},easeInOutSine:function(x){return-(cos(PI*x)-1)/2;},easeInExpo:function(x){return x===0?0:pow(2,10*x-10);},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x);},easeInOutExpo:function(x){return x===0?0:x===1?1:x<0.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2;},easeInCirc:function(x){return 1-sqrt(1-pow(x,2));},easeOutCirc:function(x){return sqrt(1-pow(x-1,2));},easeInOutCirc:function(x){return x<0.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2;},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4);},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-0.75)*c4)+1;},easeInOutElastic:function(x){return x===0?0:x===1?1:x<0.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1;},easeInBack:function(x){return c3*x*x*x-c1*x*x;},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2);},easeInOutBack:function(x){return x<0.5?(pow(2*x,2)*((c2+1)*2*x-c2))/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2;},easeInBounce:function(x){return 1-bounceOut(1-x);},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<0.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2;}});}); /*! * Lazy Load - jQuery plugin for lazy loading images * * Copyright (c) 2007-2015 Mika Tuupola * * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php * * Project home: * http://www.appelsiini.net/projects/lazyload * * Version: 1.9.7 * */ (function($,window,document,undefined){var $window=$(window);$.fn.lazyload=function(options){var elements=this;var $container;var settings={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:window,data_attribute:"original",skip_invisible:false,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};function update(){var counter=0;elements.each(function(){var $this=$(this);if(settings.skip_invisible&&!$this.is(":visible")){return;} if($.abovethetop(this,settings)||$.leftofbegin(this,settings)){}else if(!$.belowthefold(this,settings)&&!$.rightoffold(this,settings)){$this.trigger("appear");counter=0;}else{if(++counter>settings.failure_limit){return false;}}});} if(options){if(undefined!==options.failurelimit){options.failure_limit=options.failurelimit;delete options.failurelimit;} if(undefined!==options.effectspeed){options.effect_speed=options.effectspeed;delete options.effectspeed;} $.extend(settings,options);} $container=(settings.container===undefined||settings.container===window)?$window:$(settings.container);if(0===settings.event.indexOf("scroll")){$container.bind(settings.event,function(){return update();});} this.each(function(){var self=this;var $self=$(self);self.loaded=false;if($self.attr("src")===undefined||$self.attr("src")===false){if($self.is("img")){$self.attr("src",settings.placeholder);}} $self.one("appear",function(){if(!this.loaded){if(settings.appear){var elements_left=elements.length;settings.appear.call(self,elements_left,settings);} $("").bind("load",function(){var original=$self.attr("data-"+settings.data_attribute);$self.hide();if($self.is("img")){$self.attr("src",original);}else{$self.css({"background-image":"url('"+original+"')","background-size":"cover","background-position":"center center"});} self.loaded=true;var temp=$.grep(elements,function(element){return!element.loaded;});elements=$(temp);if(settings.load){var elements_left=elements.length;settings.load.call(self,elements_left,settings);}}).attr("src",$self.attr("data-"+settings.data_attribute));}});if(0!==settings.event.indexOf("scroll")){$self.bind(settings.event,function(){if(!self.loaded){$self.trigger("appear");}});}});$window.bind("resize",function(){update();});if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)){$window.bind("pageshow",function(event){if(event.originalEvent&&event.originalEvent.persisted){elements.each(function(){$(this).trigger("appear");});}});} $(document).ready(function(){update();});return this;};$.belowthefold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=(window.innerHeight?window.innerHeight:$window.height())+$window.scrollTop();}else{fold=$(settings.container).offset().top+$(settings.container).height();} return fold<=$(element).offset().top-settings.threshold;};$.rightoffold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.width()+$window.scrollLeft();}else{fold=$(settings.container).offset().left+$(settings.container).width();} return fold<=$(element).offset().left-settings.threshold;};$.abovethetop=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrollTop();}else{fold=$(settings.container).offset().top;} return fold>=$(element).offset().top+settings.threshold+$(element).height();};$.leftofbegin=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrollLeft();}else{fold=$(settings.container).offset().left;} return fold>=$(element).offset().left+settings.threshold+$(element).width();};$.inviewport=function(element,settings){return!$.rightoffold(element,settings)&&!$.leftofbegin(element,settings)&&!$.belowthefold(element,settings)&&!$.abovethetop(element,settings);};$.extend($.expr[":"],{"below-the-fold":function(a){return $.belowthefold(a,{threshold:0});},"above-the-top":function(a){return!$.belowthefold(a,{threshold:0});},"right-of-screen":function(a){return $.rightoffold(a,{threshold:0});},"left-of-screen":function(a){return!$.rightoffold(a,{threshold:0});},"in-viewport":function(a){return $.inviewport(a,{threshold:0});},"above-the-fold":function(a){return!$.belowthefold(a,{threshold:0});},"right-of-fold":function(a){return $.rightoffold(a,{threshold:0});},"left-of-fold":function(a){return!$.rightoffold(a,{threshold:0});}});})(jQuery,window,document); /*! * jQuery Waypoints - v2.0.5 * Copyright (c) 2011-2014 Caleb Troughton * Licensed under the MIT license. * https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt */ (function(){var __indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i=0;allWaypoints={horizontal:{},vertical:{}};contextCounter=1;contexts={};contextKey='waypoints-context-id';resizeEvent='resize.waypoints';scrollEvent='scroll.waypoints';waypointCounter=1;waypointKey='waypoints-waypoint-ids';wp='waypoint';wps='waypoints';Context=(function(){function Context($element){var _this=this;this.$element=$element;this.element=$element[0];this.didResize=false;this.didScroll=false;this.id='context'+contextCounter++;this.oldScroll={x:$element.scrollLeft(),y:$element.scrollTop()};this.waypoints={horizontal:{},vertical:{}};this.element[contextKey]=this.id;contexts[this.id]=this;$element.bind(scrollEvent,function(){var scrollHandler;if(!(_this.didScroll||isTouch)){_this.didScroll=true;scrollHandler=function(){_this.doScroll();return _this.didScroll=false;};return window.setTimeout(scrollHandler,$[wps].settings.scrollThrottle);}});$element.bind(resizeEvent,function(){var resizeHandler;if(!_this.didResize){_this.didResize=true;resizeHandler=function(){$[wps]('refresh');return _this.didResize=false;};return window.setTimeout(resizeHandler,$[wps].settings.resizeThrottle);}});} Context.prototype.doScroll=function(){var axes,_this=this;axes={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:'right',backward:'left'},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:'down',backward:'up'}};if(isTouch&&(!axes.vertical.oldScroll||!axes.vertical.newScroll)){$[wps]('refresh');} $.each(axes,function(aKey,axis){var direction,isForward,triggered;triggered=[];isForward=axis.newScroll>axis.oldScroll;direction=isForward?axis.forward:axis.backward;$.each(_this.waypoints[aKey],function(wKey,waypoint){var _ref,_ref1;if((axis.oldScroll<(_ref=waypoint.offset)&&_ref<=axis.newScroll)){return triggered.push(waypoint);}else if((axis.newScroll<(_ref1=waypoint.offset)&&_ref1<=axis.oldScroll)){return triggered.push(waypoint);}});triggered.sort(function(a,b){return a.offset-b.offset;});if(!isForward){triggered.reverse();} return $.each(triggered,function(i,waypoint){if(waypoint.options.continuous||i===triggered.length-1){return waypoint.trigger([direction]);}});});return this.oldScroll={x:axes.horizontal.newScroll,y:axes.vertical.newScroll};};Context.prototype.refresh=function(){var axes,cOffset,isWin,_this=this;isWin=$.isWindow(this.element);cOffset=this.$element.offset();this.doScroll();axes={horizontal:{contextOffset:isWin?0:cOffset.left,contextScroll:isWin?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:'right',backward:'left',offsetProp:'left'},vertical:{contextOffset:isWin?0:cOffset.top,contextScroll:isWin?0:this.oldScroll.y,contextDimension:isWin?$[wps]('viewportHeight'):this.$element.height(),oldScroll:this.oldScroll.y,forward:'down',backward:'up',offsetProp:'top'}};return $.each(axes,function(aKey,axis){return $.each(_this.waypoints[aKey],function(i,waypoint){var adjustment,elementOffset,oldOffset,_ref,_ref1;adjustment=waypoint.options.offset;oldOffset=waypoint.offset;elementOffset=$.isWindow(waypoint.element)?0:waypoint.$element.offset()[axis.offsetProp];if($.isFunction(adjustment)){adjustment=adjustment.apply(waypoint.element);}else if(typeof adjustment==='string'){adjustment=parseFloat(adjustment);if(waypoint.options.offset.indexOf('%')>-1){adjustment=Math.ceil(axis.contextDimension*adjustment/100);}} waypoint.offset=elementOffset-axis.contextOffset+axis.contextScroll-adjustment;if((waypoint.options.onlyOnScroll&&(oldOffset!=null))||!waypoint.enabled){return;} if(oldOffset!==null&&(oldOffset<(_ref=axis.oldScroll)&&_ref<=waypoint.offset)){return waypoint.trigger([axis.backward]);}else if(oldOffset!==null&&(oldOffset>(_ref1=axis.oldScroll)&&_ref1>=waypoint.offset)){return waypoint.trigger([axis.forward]);}else if(oldOffset===null&&axis.oldScroll>=waypoint.offset){return waypoint.trigger([axis.forward]);}});});};Context.prototype.checkEmpty=function(){if($.isEmptyObject(this.waypoints.horizontal)&&$.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([resizeEvent,scrollEvent].join(' '));return delete contexts[this.id];}};return Context;})();Waypoint=(function(){function Waypoint($element,context,options){var idList,_ref;if(options.offset==='bottom-in-view'){options.offset=function(){var contextHeight;contextHeight=$[wps]('viewportHeight');if(!$.isWindow(context.element)){contextHeight=context.$element.height();} return contextHeight-$(this).outerHeight();};} this.$element=$element;this.element=$element[0];this.axis=options.horizontal?'horizontal':'vertical';this.callback=options.handler;this.context=context;this.enabled=options.enabled;this.id='waypoints'+waypointCounter++;this.offset=null;this.options=options;context.waypoints[this.axis][this.id]=this;allWaypoints[this.axis][this.id]=this;idList=(_ref=this.element[waypointKey])!=null?_ref:[];idList.push(this.id);this.element[waypointKey]=idList;} Waypoint.prototype.trigger=function(args){if(!this.enabled){return;} if(this.callback!=null){this.callback.apply(this.element,args);} if(this.options.triggerOnce){return this.destroy();}};Waypoint.prototype.disable=function(){return this.enabled=false;};Waypoint.prototype.enable=function(){this.context.refresh();return this.enabled=true;};Waypoint.prototype.destroy=function(){delete allWaypoints[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty();};Waypoint.getWaypointsByElement=function(element){var all,ids;ids=element[waypointKey];if(!ids){return[];} all=$.extend({},allWaypoints.horizontal,allWaypoints.vertical);return $.map(ids,function(id){return all[id];});};return Waypoint;})();methods={init:function(f,options){var _ref;options=$.extend({},$.fn[wp].defaults,options);if((_ref=options.handler)==null){options.handler=f;} this.each(function(){var $this,context,contextElement,_ref1;$this=$(this);contextElement=(_ref1=options.context)!=null?_ref1:$.fn[wp].defaults.context;if(!$.isWindow(contextElement)){contextElement=$this.closest(contextElement);} contextElement=$(contextElement);context=contexts[contextElement[0][contextKey]];if(!context){context=new Context(contextElement);} return new Waypoint($this,context,options);});$[wps]('refresh');return this;},disable:function(){return methods._invoke.call(this,'disable');},enable:function(){return methods._invoke.call(this,'enable');},destroy:function(){return methods._invoke.call(this,'destroy');},prev:function(axis,selector){return methods._traverse.call(this,axis,selector,function(stack,index,waypoints){if(index>0){return stack.push(waypoints[index-1]);}});},next:function(axis,selector){return methods._traverse.call(this,axis,selector,function(stack,index,waypoints){if(indexcontext.oldScroll.y;});},left:function(contextSelector){if(contextSelector==null){contextSelector=window;} return jQMethods._filter(contextSelector,'horizontal',function(context,waypoint){return waypoint.offset<=context.oldScroll.x;});},right:function(contextSelector){if(contextSelector==null){contextSelector=window;} return jQMethods._filter(contextSelector,'horizontal',function(context,waypoint){return waypoint.offset>context.oldScroll.x;});},enable:function(){return jQMethods._invoke('enable');},disable:function(){return jQMethods._invoke('disable');},destroy:function(){return jQMethods._invoke('destroy');},extendFn:function(methodName,f){return methods[methodName]=f;},_invoke:function(method){var waypoints;waypoints=$.extend({},allWaypoints.vertical,allWaypoints.horizontal);return $.each(waypoints,function(key,waypoint){waypoint[method]();return true;});},_filter:function(selector,axis,test){var context,waypoints;context=contexts[$(selector)[0][contextKey]];if(!context){return[];} waypoints=[];$.each(context.waypoints[axis],function(i,waypoint){if(test(context,waypoint)){return waypoints.push(waypoint);}});waypoints.sort(function(a,b){return a.offset-b.offset;});return $.map(waypoints,function(waypoint){return waypoint.element;});}};$[wps]=function(){var args,method;method=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];if(jQMethods[method]){return jQMethods[method].apply(null,args);}else{return jQMethods.aggregate.call(null,method);}};$[wps].settings={resizeThrottle:100,scrollThrottle:30};return $w.on('load.waypoints',function(){return $[wps]('refresh');});});}).call(this);(function(root,factory){if(typeof define==="function"&&define.amd){define(factory);}else if(typeof exports==="object"){module.exports=factory();}else{root.ResizeSensor=factory();}}(this,function(){var requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(fn){return window.setTimeout(fn,20);};function forEachElement(elements,callback){var elementsType=Object.prototype.toString.call(elements);var isCollectionTyped=('[object Array]'===elementsType||('[object NodeList]'===elementsType)||('[object HTMLCollection]'===elementsType)||('undefined'!==typeof jQuery&&elements instanceof jQuery)||('undefined'!==typeof Elements&&elements instanceof Elements));var i=0,j=elements.length;if(isCollectionTyped){for(;i