!function e(t,n,o){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n||e)},u,u.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,i=void 0,r=s.language(),l=function(e,t,n){return"object"!==(void 0===e?"undefined":o(e))||"number"!=typeof t||"number"!=typeof n?e:[function(){return arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 0===(arguments.length<=0?void 0:arguments[0])||1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])||11===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])||12===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])>2&&(arguments.length<=0?void 0:arguments[0])<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])%100>0&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])>=2&&(arguments.length<=0?void 0:arguments[0])<=4?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%100==1?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100==2?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100==3||(arguments.length<=0?void 0:arguments[0])%100==4?arguments.length<=4?void 0:arguments[4]:arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])>2&&(arguments.length<=0?void 0:arguments[0])<7?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])>6&&(arguments.length<=0?void 0:arguments[0])<11?arguments.length<=4?void 0:arguments[4]:arguments.length<=5?void 0:arguments[5]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100>=3&&(arguments.length<=0?void 0:arguments[0])%100<=10?arguments.length<=4?void 0:arguments[4]:(arguments.length<=0?void 0:arguments[0])%100>=11?arguments.length<=5?void 0:arguments[5]:arguments.length<=6?void 0:arguments[6]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])%100>1&&(arguments.length<=0?void 0:arguments[0])%100<11?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100>10&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10==2?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 11!==(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:8!==(arguments.length<=0?void 0:arguments[0])&&11!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:3===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]}][n].apply(null,[t].concat(e))};return void 0!==s[r]&&(n=s[r][e],null!==t&&"number"==typeof t&&(i=s[r]["mejs.plural-form"],n=l.apply(null,[n,t,i]))),!n&&s.en&&(n=s.en[e],null!==t&&"number"==typeof t&&(i=s.en["mejs.plural-form"],n=l.apply(null,[n,t,i]))),n=n||e,null!==t&&"number"==typeof t&&(n=n.replace("%1",t)),(0,a.escapeHTML)(n)}return e},i.default.i18n=s,"undefined"!=typeof mejsL10n&&i.default.i18n.language(mejsL10n.language,mejsL10n.strings),n.default=s},{15:15,27:27,7:7}],6:[function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=o(e(3)),s=o(e(2)),l=o(e(7)),d=e(27),u=e(28),c=e(8),f=e(25),p=function e(t,n,o){var p=this;i(this,e);var m=this;o=Array.isArray(o)?o:null,m.defaults={renderers:[],fakeNodeName:"mediaelementwrapper",pluginPath:"build/",shimScriptAccess:"sameDomain"},n=Object.assign(m.defaults,n),m.mediaElement=s.default.createElement(n.fakeNodeName);var h=t,v=!1;if("string"==typeof t?m.mediaElement.originalNode=s.default.getElementById(t):(m.mediaElement.originalNode=t,h=t.id),void 0===m.mediaElement.originalNode||null===m.mediaElement.originalNode)return null;m.mediaElement.options=n,h=h||"mejs_"+Math.random().toString().slice(2),m.mediaElement.originalNode.setAttribute("id",h+"_from_mejs");var g=m.mediaElement.originalNode.tagName.toLowerCase();["video","audio"].indexOf(g)>-1&&!m.mediaElement.originalNode.getAttribute("preload")&&m.mediaElement.originalNode.setAttribute("preload","none"),m.mediaElement.originalNode.parentNode.insertBefore(m.mediaElement,m.mediaElement.originalNode),m.mediaElement.appendChild(m.mediaElement.originalNode);var y=function(e,t){if("https:"===a.default.location.protocol&&0===e.indexOf("http:")&&f.IS_IOS&&l.default.html5media.mediaTypes.indexOf(t)>-1){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var t=(a.default.URL||a.default.webkitURL).createObjectURL(this.response);return m.mediaElement.originalNode.setAttribute("src",t),t}return e},n.open("GET",e),n.responseType="blob",n.send()}return e},E=void 0;if(null!==o)E=o;else if(null!==m.mediaElement.originalNode)switch(E=[],m.mediaElement.originalNode.nodeName.toLowerCase()){case"iframe":E.push({type:"",src:m.mediaElement.originalNode.getAttribute("src")});break;case"audio":case"video":var b=m.mediaElement.originalNode.children.length,S=m.mediaElement.originalNode.getAttribute("src");if(S){var x=m.mediaElement.originalNode,w=(0,u.formatType)(S,x.getAttribute("type"));E.push({type:w,src:y(S,w)})}for(var P=0;P2?t[0]:t[0].src;if(void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&n.mediaElement.renderer.name===e)return n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.show(),n.mediaElement.renderer.setSrc(o),!0;void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&(n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.hide());var i=n.mediaElement.renderers[e],r=null;if(void 0!==i&&null!==i)return i.show(),i.setSrc(o),n.mediaElement.renderer=i,n.mediaElement.rendererName=e,!0;for(var a=n.mediaElement.options.renderers.length?n.mediaElement.options.renderers:c.renderer.order,s=0,l=a.length;s1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;if(t=t.length?t:this.order,!n){var o=[/^(html5|native)/i,/^flash/i,/iframe$/i],i=function(e){for(var t=0,n=o.length;t',t.addControlElement(o,"fullscreen"),o.addEventListener("click",function(){d.HAS_TRUE_NATIVE_FULLSCREEN&&d.IS_FULLSCREEN||e.isFullScreen?e.exitFullScreen():e.enterFullScreen()}),e.fullscreenBtn=o,t.options.keyActions.push({keys:[70],action:function(e,t,n,o){o.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),t.exitFullscreenCallback=function(n){27===(n.which||n.keyCode||0)&&(d.HAS_TRUE_NATIVE_FULLSCREEN&&d.IS_FULLSCREEN||t.isFullScreen)&&e.exitFullScreen()},t.globalBind("keydown",t.exitFullscreenCallback),t.normalHeight=0,t.normalWidth=0,d.HAS_TRUE_NATIVE_FULLSCREEN){e.globalBind(d.FULLSCREEN_EVENT_NAME,function(){e.isFullScreen&&(d.isFullScreen()?(e.isNativeFullScreen=!0,e.setControlsSize()):(e.isNativeFullScreen=!1,e.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=this,t=null!==e.media.rendererName&&/(native|html5)/i.test(e.media.rendererName),n="";return d.HAS_TRUE_NATIVE_FULLSCREEN&&t?n="native-native":d.HAS_TRUE_NATIVE_FULLSCREEN&&!t?n="plugin-native":e.usePluginFullScreen&&d.SUPPORT_POINTER_EVENTS&&(n="plugin-click"),e.fullscreenMode=n,n},enterFullScreen:function(){var e=this,t=null!==e.media.rendererName&&/(html5|native)/i.test(e.media.rendererName),n=getComputedStyle(e.getElement(e.container));if(!1===e.options.useFakeFullscreen&&d.IS_IOS&&d.HAS_IOS_FULLSCREEN&&"function"==typeof e.media.originalNode.webkitEnterFullscreen&&e.media.originalNode.canPlayType((0,f.getTypeFromFile)(e.media.getSrc())))e.media.originalNode.webkitEnterFullscreen();else{if((0,c.addClass)(r.default.documentElement,e.options.classPrefix+"fullscreen"),(0,c.addClass)(e.getElement(e.container),e.options.classPrefix+"container-fullscreen"),e.normalHeight=parseFloat(n.height),e.normalWidth=parseFloat(n.width),"native-native"!==e.fullscreenMode&&"plugin-native"!==e.fullscreenMode||(d.requestFullScreen(e.getElement(e.container)),e.isInIframe&&setTimeout(function t(){if(e.isNativeFullScreen){var n=i.default.innerWidth||r.default.documentElement.clientWidth||r.default.body.clientWidth,o=screen.width;Math.abs(o-n)>.002*o?e.exitFullScreen():setTimeout(t,500)}},1e3)),e.getElement(e.container).style.width="100%",e.getElement(e.container).style.height="100%",e.containerSizeTimeout=setTimeout(function(){e.getElement(e.container).style.width="100%",e.getElement(e.container).style.height="100%",e.setControlsSize()},500),t)e.node.style.width="100%",e.node.style.height="100%";else for(var o=e.getElement(e.container).querySelectorAll("embed, object, video"),a=o.length,s=0;s',p.addEventListener("click",function(){a.paused?a.play():a.pause()});var m=p.querySelector("button");a.addControlElement(p,"playpause"),r("pse"),o.addEventListener("loadedmetadata",function(){-1===o.rendererName.indexOf("flash")&&r("pse")}),o.addEventListener("play",function(){r("play")}),o.addEventListener("playing",function(){r("play")}),o.addEventListener("pause",function(){r("pse")}),o.addEventListener("ended",function(){e.options.loop||((0,d.removeClass)(p,a.options.classPrefix+"pause"),(0,d.removeClass)(p,a.options.classPrefix+"play"),(0,d.addClass)(p,a.options.classPrefix+"replay"),m.setAttribute("title",c),m.setAttribute("aria-label",c))})}})},{16:16,2:2,26:26,27:27,5:5}],11:[function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=o(e(2)),r=e(16),a=o(r),s=o(e(5)),l=e(25),d=e(30),u=e(26);Object.assign(r.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(a.default.prototype,{buildprogress:function(e,t,n,o){var a=0,c=!1,f=!1,p=this,m=e.options.autoRewind,h=e.options.enableProgressTooltip?'00:00':"",v=i.default.createElement("div");v.className=p.options.classPrefix+"time-rail",v.innerHTML=''+h+"",p.addControlElement(v,"progress"),p.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&e.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer()),e.getElement(e.container).querySelector("."+r.config.classPrefix+"time-total").focus();var t=Math.max(e.currentTime-e.options.defaultSeekBackwardInterval(e),0);e.setCurrentTime(t)}}},{keys:[39,228],action:function(e){if(!isNaN(e.duration)&&e.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer()),e.getElement(e.container).querySelector("."+r.config.classPrefix+"time-total").focus();var t=Math.min(e.currentTime+e.options.defaultSeekForwardInterval(e),e.duration);e.setCurrentTime(t)}}}),p.rail=t.querySelector("."+p.options.classPrefix+"time-rail"),p.total=t.querySelector("."+p.options.classPrefix+"time-total"),p.loaded=t.querySelector("."+p.options.classPrefix+"time-loaded"),p.current=t.querySelector("."+p.options.classPrefix+"time-current"),p.handle=t.querySelector("."+p.options.classPrefix+"time-handle"),p.timefloat=t.querySelector("."+p.options.classPrefix+"time-float"),p.timefloatcurrent=t.querySelector("."+p.options.classPrefix+"time-float-current"),p.slider=t.querySelector("."+p.options.classPrefix+"time-slider"),p.hovered=t.querySelector("."+p.options.classPrefix+"time-hovered"),p.buffer=t.querySelector("."+p.options.classPrefix+"time-buffering"),p.newTime=0,p.forcedHandlePause=!1,p.setTransformStyle=function(e,t){e.style.transform=t,e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t},p.buffer.style.display="none";var g=function(t){var n=getComputedStyle(p.total),o=(0,u.offset)(p.total),i=p.total.offsetWidth,r=void 0!==n.webkitTransform?"webkitTransform":void 0!==n.mozTransform?"mozTransform ":void 0!==n.oTransform?"oTransform":void 0!==n.msTransform?"msTransform":"transform",a="WebKitCSSMatrix"in window?"WebKitCSSMatrix":"MSCSSMatrix"in window?"MSCSSMatrix":"CSSMatrix"in window?"CSSMatrix":void 0,s=0,f=0,m=0,h=void 0;if(h=t.originalEvent&&t.originalEvent.changedTouches?t.originalEvent.changedTouches[0].pageX:t.changedTouches?t.changedTouches[0].pageX:t.pageX,p.getDuration()){if(hi+o.left&&(h=i+o.left),m=h-o.left,s=m/i,p.newTime=s<=.02?0:s*p.getDuration(),c&&null!==p.getCurrentTime()&&p.newTime.toFixed(4)!==p.getCurrentTime().toFixed(4)&&(p.setCurrentRailHandle(p.newTime),p.updateCurrent(p.newTime)),!l.IS_IOS&&!l.IS_ANDROID){if(m<0&&(m=0),p.options.useSmoothHover&&null!==a&&void 0!==window[a]){var v=new window[a](getComputedStyle(p.handle)[r]).m41,g=m/parseFloat(getComputedStyle(p.total).width)-v/parseFloat(getComputedStyle(p.total).width);p.hovered.style.left=v+"px",p.setTransformStyle(p.hovered,"scaleX("+g+")"),p.hovered.setAttribute("pos",m),g>=0?(0,u.removeClass)(p.hovered,"negative"):(0,u.addClass)(p.hovered,"negative")}if(p.timefloat){var y=p.timefloat.offsetWidth/2,E=mejs.Utils.offset(p.getElement(p.container)),b=getComputedStyle(p.timefloat);f=h-E.left=p.getElement(p.container).offsetWidth-y?p.total.offsetWidth-y:m,(0,u.hasClass)(p.getElement(p.container),p.options.classPrefix+"long-video")&&(f+=parseFloat(b.marginLeft)/2+p.timefloat.offsetWidth/2),p.timefloat.style.left=f+"px",p.timefloatcurrent.innerHTML=(0,d.secondsToTimeCode)(p.newTime,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat),p.timefloat.style.display="block"}}}else l.IS_IOS||l.IS_ANDROID||!p.timefloat||(f=p.timefloat.offsetWidth+i>=p.getElement(p.container).offsetWidth?p.timefloat.offsetWidth/2:0,p.timefloat.style.left=f+"px",p.timefloat.style.left=f+"px",p.timefloat.style.display="block")},y=function(){var t=p.getCurrentTime(),n=s.default.t("mejs.time-slider"),i=(0,d.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat),r=p.getDuration();p.slider.setAttribute("role","slider"),p.slider.tabIndex=0,o.paused?(p.slider.setAttribute("aria-label",n),p.slider.setAttribute("aria-valuemin",0),p.slider.setAttribute("aria-valuemax",r),p.slider.setAttribute("aria-valuenow",t),p.slider.setAttribute("aria-valuetext",i)):(p.slider.removeAttribute("aria-label"),p.slider.removeAttribute("aria-valuemin"),p.slider.removeAttribute("aria-valuemax"),p.slider.removeAttribute("aria-valuenow"),p.slider.removeAttribute("aria-valuetext"))},E=function(){new Date-a>=1e3&&p.play()},b=function(){c&&null!==p.getCurrentTime()&&p.newTime.toFixed(4)!==p.getCurrentTime().toFixed(4)&&(p.setCurrentTime(p.newTime),p.setCurrentRail(),p.updateCurrent(p.newTime)),p.forcedHandlePause&&(p.slider.focus(),p.play()),p.forcedHandlePause=!1};p.slider.addEventListener("focus",function(){e.options.autoRewind=!1}),p.slider.addEventListener("blur",function(){e.options.autoRewind=m}),p.slider.addEventListener("keydown",function(t){if(new Date-a>=1e3&&(f=p.paused),p.options.keyActions.length){var n=t.which||t.keyCode||0,i=p.getDuration(),r=e.options.defaultSeekForwardInterval(o),s=e.options.defaultSeekBackwardInterval(o),d=p.getCurrentTime(),u=p.getElement(p.container).querySelector("."+p.options.classPrefix+"volume-slider");if(38===n||40===n){u&&(u.style.display="block"),p.isVideo&&(p.showControls(),p.startControlsTimer());var c=38===n?Math.min(p.volume+.1,1):Math.max(p.volume-.1,0),m=c<=0;return p.setVolume(c),void p.setMuted(m)}switch(u&&(u.style.display="none"),n){case 37:p.getDuration()!==1/0&&(d-=s);break;case 39:p.getDuration()!==1/0&&(d+=r);break;case 36:d=0;break;case 35:d=i;break;case 13:case 32:return void(l.IS_FIREFOX&&(p.paused?p.play():p.pause()));default:return}d=d<0?0:d>=i?i:Math.floor(d),a=new Date,f||e.pause(),d0&&n.buffered.end&&t.getDuration()?o=n.buffered.end(n.buffered.length-1)/t.getDuration():n&&void 0!==n.bytesTotal&&n.bytesTotal>0&&void 0!==n.bufferedBytes?o=n.bufferedBytes/n.bytesTotal:e&&e.lengthComputable&&0!==e.total&&(o=e.loaded/e.total),null!==o&&(o=Math.min(1,Math.max(0,o)),t.loaded&&t.setTransformStyle(t.loaded,"scaleX("+o+")"))},setCurrentRailHandle:function(e){var t=this;t.setCurrentRailMain(t,e)},setCurrentRail:function(){var e=this;e.setCurrentRailMain(e)},setCurrentRailMain:function(e,t){if(void 0!==e.getCurrentTime()&&e.getDuration()){var n=void 0===t?e.getCurrentTime():t;if(e.total&&e.handle){var o=parseFloat(getComputedStyle(e.total).width),i=Math.round(o*n/e.getDuration()),r=i-Math.round(e.handle.offsetWidth/2);if(r=r<0?0:r,e.setTransformStyle(e.current,"scaleX("+i/o+")"),e.setTransformStyle(e.handle,"translateX("+r+"px)"),e.options.useSmoothHover&&!(0,u.hasClass)(e.hovered,"no-hover")){var a=parseInt(e.hovered.getAttribute("pos"),10),s=(a=isNaN(a)?0:a)/o-r/o;e.hovered.style.left=r+"px",e.setTransformStyle(e.hovered,"scaleX("+s+")"),s>=0?(0,u.removeClass)(e.hovered,"negative"):(0,u.addClass)(e.hovered,"negative")}}}}})},{16:16,2:2,25:25,26:26,30:30,5:5}],12:[function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=o(e(2)),r=e(16),a=o(r),s=e(30),l=e(26);Object.assign(r.config,{duration:0,timeAndDurationSeparator:" | "}),Object.assign(a.default.prototype,{buildcurrent:function(e,t,n,o){var r=this,a=i.default.createElement("div");a.className=r.options.classPrefix+"time",a.setAttribute("role","timer"),a.setAttribute("aria-live","off"),a.innerHTML=''+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"",r.addControlElement(a,"current"),e.updateCurrent(),r.updateTimeCallback=function(){r.controlsAreVisible&&e.updateCurrent()},o.addEventListener("timeupdate",r.updateTimeCallback)},cleancurrent:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,o){var r=this;if(t.lastChild.querySelector("."+r.options.classPrefix+"currenttime"))t.querySelector("."+r.options.classPrefix+"time").innerHTML+=r.options.timeAndDurationSeparator+''+(0,s.secondsToTimeCode)(r.options.duration,r.options.alwaysShowHours,r.options.showTimecodeFrameCount,r.options.framesPerSecond,r.options.secondsDecimalLength,r.options.timeFormat)+"";else{t.querySelector("."+r.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+r.options.classPrefix+"currenttime").parentNode,r.options.classPrefix+"currenttime-container");var a=i.default.createElement("div");a.className=r.options.classPrefix+"time "+r.options.classPrefix+"duration-container",a.innerHTML=''+(0,s.secondsToTimeCode)(r.options.duration,r.options.alwaysShowHours,r.options.showTimecodeFrameCount,r.options.framesPerSecond,r.options.secondsDecimalLength,r.options.timeFormat)+"",r.addControlElement(a,"duration")}r.updateDurationCallback=function(){r.controlsAreVisible&&e.updateDuration()},o.addEventListener("timeupdate",r.updateDurationCallback)},cleanduration:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this,t=e.getCurrentTime();isNaN(t)&&(t=0);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);n.length>5?(0,l.addClass)(e.getElement(e.container),e.options.classPrefix+"long-video"):(0,l.removeClass)(e.getElement(e.container),e.options.classPrefix+"long-video"),e.getElement(e.controls).querySelector("."+e.options.classPrefix+"currenttime")&&(e.getElement(e.controls).querySelector("."+e.options.classPrefix+"currenttime").innerText=n)},updateDuration:function(){var e=this,t=e.getDuration();(isNaN(t)||t===1/0||t<0)&&(e.media.duration=e.options.duration=t=0),e.options.duration>0&&(t=e.options.duration);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);n.length>5?(0,l.addClass)(e.getElement(e.container),e.options.classPrefix+"long-video"):(0,l.removeClass)(e.getElement(e.container),e.options.classPrefix+"long-video"),e.getElement(e.controls).querySelector("."+e.options.classPrefix+"duration")&&t>0&&(e.getElement(e.controls).querySelector("."+e.options.classPrefix+"duration").innerHTML=n)}})},{16:16,2:2,26:26,30:30}],13:[function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=o(e(2)),r=o(e(7)),a=o(e(5)),s=e(16),l=o(s),d=e(30),u=e(27),c=e(26);Object.assign(s.config,{startLanguage:"",tracksText:null,chaptersText:null,tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),Object.assign(l.default.prototype,{hasChapters:!1,buildtracks:function(e,t,n,o){if(this.findTracks(),e.tracks.length||e.trackFiles&&0!==!e.trackFiles.length){var r=this,s=r.options.tracksAriaLive?' role="log" aria-live="assertive" aria-atomic="false"':"",l=(0,u.isString)(r.options.tracksText)?r.options.tracksText:a.default.t("mejs.captions-subtitles"),d=(0,u.isString)(r.options.chaptersText)?r.options.chaptersText:a.default.t("mejs.captions-chapters"),f=null===e.trackFiles?e.tracks.length:e.trackFiles.length;if(r.domNode.textTracks)for(var p=r.domNode.textTracks.length-1;p>=0;p--)r.domNode.textTracks[p].mode="hidden";r.cleartracks(e),e.captions=i.default.createElement("div"),e.captions.className=r.options.classPrefix+"captions-layer "+r.options.classPrefix+"layer",e.captions.innerHTML='
',e.captions.style.display="none",n.insertBefore(e.captions,n.firstChild),e.captionsText=e.captions.querySelector("."+r.options.classPrefix+"captions-text"),e.captionsButton=i.default.createElement("div"),e.captionsButton.className=r.options.classPrefix+"button "+r.options.classPrefix+"captions-button",e.captionsButton.innerHTML='
",r.addControlElement(e.captionsButton,"tracks"),e.captionsButton.querySelector("."+r.options.classPrefix+"captions-selector-input").disabled=!1,e.chaptersButton=i.default.createElement("div"),e.chaptersButton.className=r.options.classPrefix+"button "+r.options.classPrefix+"chapters-button",e.chaptersButton.innerHTML='
    ';for(var m=0,h=0;h"},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(var n=0,o=e.tracks.length;n-1)return e.captionsText.innerHTML=function(e){var t=i.default.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),o=n.length;o--;)n[o].remove();for(var r=t.getElementsByTagName("*"),a=0,s=r.length;a-1&&e.showSlide(n)}},drawChapters:function(e){var t=this,n=e.entries.length;if(n){t.chaptersButton.querySelector("ul").innerHTML="";for(var o=0;o";for(var i=t.chaptersButton.querySelectorAll('input[type="radio"]'),r=t.chaptersButton.querySelectorAll("."+t.options.classPrefix+"chapters-selector-label"),a=0,s=i.length;a>1,r=e[i].start,a=e[i].stop,t>=r&&tt&&(o=i-1)}return-1}}),r.default.language={codes:{af:"mejs.afrikaans",sq:"mejs.albanian",ar:"mejs.arabic",be:"mejs.belarusian",bg:"mejs.bulgarian",ca:"mejs.catalan",zh:"mejs.chinese","zh-cn":"mejs.chinese-simplified","zh-tw":"mejs.chines-traditional",hr:"mejs.croatian",cs:"mejs.czech",da:"mejs.danish",nl:"mejs.dutch",en:"mejs.english",et:"mejs.estonian",fl:"mejs.filipino",fi:"mejs.finnish",fr:"mejs.french",gl:"mejs.galician",de:"mejs.german",el:"mejs.greek",ht:"mejs.haitian-creole",iw:"mejs.hebrew",hi:"mejs.hindi",hu:"mejs.hungarian",is:"mejs.icelandic",id:"mejs.indonesian",ga:"mejs.irish",it:"mejs.italian",ja:"mejs.japanese",ko:"mejs.korean",lv:"mejs.latvian",lt:"mejs.lithuanian",mk:"mejs.macedonian",ms:"mejs.malay",mt:"mejs.maltese",no:"mejs.norwegian",fa:"mejs.persian",pl:"mejs.polish",pt:"mejs.portuguese",ro:"mejs.romanian",ru:"mejs.russian",sr:"mejs.serbian",sk:"mejs.slovak",sl:"mejs.slovenian",es:"mejs.spanish",sw:"mejs.swahili",sv:"mejs.swedish",tl:"mejs.tagalog",th:"mejs.thai",tr:"mejs.turkish",uk:"mejs.ukrainian",vi:"mejs.vietnamese",cy:"mejs.welsh",yi:"mejs.yiddish"}},r.default.TrackFormatParser={webvtt:{pattern:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],o=void 0,i=void 0,r=void 0,a=0,s=t.length;a=0&&""!==t[a-1]&&(r=t[a-1]),i=t[++a],a++;""!==t[a]&&a$1"),n.push({identifier:r,start:0===(0,d.convertSMPTEtoSeconds)(o[1])?.2:(0,d.convertSMPTEtoSeconds)(o[1]),stop:(0,d.convertSMPTEtoSeconds)(o[3]),text:i,settings:o[5]})}r=""}return n}},dfxp:{parse:function(e){var t=(e=$(e).filter("tt")).firstChild,n=t.querySelectorAll("p"),o=e.getElementById(""+t.attr("style")),i=[],r=void 0;if(o.length){o.removeAttribute("id");var a=o.attributes;if(a.length){r={};for(var s=0,l=a.length;s$1"),i.push(p)}return i}}}},{16:16,2:2,26:26,27:27,30:30,5:5,7:7}],14:[function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=o(e(2)),r=e(16),a=o(r),s=o(e(5)),l=e(25),d=e(27),u=e(26);Object.assign(r.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(a.default.prototype,{buildvolume:function(e,t,n,o){if(!l.IS_ANDROID&&!l.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,c=a.isVideo?a.options.videoVolume:a.options.audioVolume,f=(0,d.isString)(a.options.muteText)?a.options.muteText:s.default.t("mejs.mute"),p=(0,d.isString)(a.options.unmuteText)?a.options.unmuteText:s.default.t("mejs.unmute"),m=(0,d.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:s.default.t("mejs.volume-help-text"),h=i.default.createElement("div");if(h.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",h.innerHTML="horizontal"===c?'':''+m+'
    ',a.addControlElement(h,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider");(t||e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider").matches(":focus"))&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),n>0&&e.setMuted(!1)}},{keys:[40],action:function(e){var t=e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider");t&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.max(e.volume-.1,0);e.setVolume(n),n<=.1&&e.setMuted(!0)}},{keys:[77],action:function(e){e.getElement(e.container).querySelector("."+r.config.classPrefix+"volume-slider").style.display="block",e.isVideo&&(e.showControls(),e.startControlsTimer()),e.media.muted?e.setMuted(!1):e.setMuted(!0)}}),"horizontal"===c){var v=i.default.createElement("a");v.className=a.options.classPrefix+"horizontal-volume-slider",v.href="javascript:void(0);",v.setAttribute("aria-label",s.default.t("mejs.volume-slider")),v.setAttribute("aria-valuemin",0),v.setAttribute("aria-valuemax",100),v.setAttribute("role","slider"),v.innerHTML+=''+m+'
    ',h.parentNode.insertBefore(v,h.nextSibling)}var g=!1,y=!1,E=!1,b=function(){var e=Math.floor(100*o.volume);S.setAttribute("aria-valuenow",e),S.setAttribute("aria-valuetext",e+"%")},S="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),x="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),w="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),P="vertical"===c?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),T=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,u.removeClass)(h,a.options.classPrefix+"mute"),(0,u.addClass)(h,a.options.classPrefix+"unmute");var t=h.firstElementChild;t.setAttribute("title",p),t.setAttribute("aria-label",p)}else{(0,u.removeClass)(h,a.options.classPrefix+"unmute"),(0,u.addClass)(h,a.options.classPrefix+"mute");var n=h.firstElementChild;n.setAttribute("title",f),n.setAttribute("aria-label",f)}var o=100*e+"%",i=getComputedStyle(P);"vertical"===c?(w.style.bottom=0,w.style.height=o,P.style.bottom=o,P.style.marginBottom=-parseFloat(i.height)/2+"px"):(w.style.left=0,w.style.width=o,P.style.left=o,P.style.marginLeft=-parseFloat(i.width)/2+"px")}},C=function(e){var t=(0,u.offset)(x),n=getComputedStyle(x);E=!0;var o=null;if("vertical"===c){var i=parseFloat(n.height);if(o=(i-(e.pageY-t.top))/i,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);o=(e.pageX-t.left)/r}o=Math.max(0,o),o=Math.min(o,1),T(o),a.setMuted(0===o),a.setVolume(o),e.preventDefault(),e.stopPropagation()},k=function(){a.muted?(T(0),(0,u.removeClass)(h,a.options.classPrefix+"mute"),(0,u.addClass)(h,a.options.classPrefix+"unmute")):(T(o.volume),(0,u.removeClass)(h,a.options.classPrefix+"unmute"),(0,u.addClass)(h,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==c||(S.style.display="none")}),h.addEventListener("mouseenter",function(e){e.target===h&&(S.style.display="block",y=!0,e.preventDefault(),e.stopPropagation())}),h.addEventListener("focusin",function(){S.style.display="block",y=!0}),h.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==c||(S.style.display="none")}),h.addEventListener("mouseleave",function(){y=!1,g||"vertical"!==c||(S.style.display="none")}),h.addEventListener("focusout",function(){y=!1}),h.addEventListener("keydown",function(e){if(a.options.keyActions.length){var t=e.which||e.keyCode||0,n=o.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}g=!1,T(n),o.setVolume(n),e.preventDefault(),e.stopPropagation()}}),h.querySelector("button").addEventListener("click",function(){o.setMuted(!o.muted);var e=(0,d.createEvent)("volumechange",o);o.dispatchEvent(e)}),S.addEventListener("dragstart",function(){return!1}),S.addEventListener("mouseover",function(){y=!0}),S.addEventListener("focusin",function(){S.style.display="block",y=!0}),S.addEventListener("focusout",function(){y=!1,g||"vertical"!==c||(S.style.display="none")}),S.addEventListener("mousedown",function(e){C(e),a.globalBind("mousemove.vol",function(e){var t=e.target;g&&(t===S||t.closest("vertical"===c?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&C(e)}),a.globalBind("mouseup.vol",function(){g=!1,y||"vertical"!==c||(S.style.display="none")}),g=!0,e.preventDefault(),e.stopPropagation()}),o.addEventListener("volumechange",function(e){g||k(),b()});var _=!1;o.addEventListener("rendererready",function(){E||setTimeout(function(){_=!0,(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()},250)}),o.addEventListener("loadedmetadata",function(){setTimeout(function(){E||_||((0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()),_=!1},250)}),(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),e.options.startVolume=0,k()),a.getElement(a.container).addEventListener("controlsresize",function(){k()})}}})},{16:16,2:2,25:25,26:26,27:27,5:5}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],16:[function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n
    ',e.getElement(e.container).addEventListener("focus",function(t){if(!e.controlsAreVisible&&!e.hasFocus&&e.controlsEnabled){e.showControls(!0);var n=(0,m.isNodeAfter)(t.relatedTarget,e.getElement(e.container))?"."+e.options.classPrefix+"controls ."+e.options.classPrefix+"button:last-child > button":"."+e.options.classPrefix+"playpause-button > button";e.getElement(e.container).querySelector(n).focus()}}),e.node.parentNode.insertBefore(e.getElement(e.container),e.node),e.options.features.length||e.options.useDefaultControls||(e.getElement(e.container).style.background="transparent",e.getElement(e.container).querySelector("."+e.options.classPrefix+"controls").style.display="none"),e.isVideo&&"fill"===e.options.stretching&&!g.hasClass(e.getElement(e.container).parentNode,e.options.classPrefix+"fill-container")){e.outerContainer=e.media.parentNode;var r=l.default.createElement("div");r.className=e.options.classPrefix+"fill-container",e.getElement(e.container).parentNode.insertBefore(r,e.getElement(e.container)),r.appendChild(e.getElement(e.container))}if(p.IS_ANDROID&&g.addClass(e.getElement(e.container),e.options.classPrefix+"android"),p.IS_IOS&&g.addClass(e.getElement(e.container),e.options.classPrefix+"ios"),p.IS_IPAD&&g.addClass(e.getElement(e.container),e.options.classPrefix+"ipad"),p.IS_IPHONE&&g.addClass(e.getElement(e.container),e.options.classPrefix+"iphone"),g.addClass(e.getElement(e.container),e.isVideo?e.options.classPrefix+"video":e.options.classPrefix+"audio"),p.IS_SAFARI&&!p.IS_IOS){g.addClass(e.getElement(e.container),e.options.classPrefix+"hide-cues");for(var a=e.node.cloneNode(),s=e.node.children,c=[],h=[],y=0,E=s.length;y0||e.options[S+"Width"].toString().indexOf("%")>-1?e.width=e.options[S+"Width"]:""!==e.node.style.width&&null!==e.node.style.width?e.width=e.node.style.width:e.node.getAttribute("width")?e.width=e.node.getAttribute("width"):e.width=e.options["default"+x+"Width"],e.options[S+"Height"]>0||e.options[S+"Height"].toString().indexOf("%")>-1?e.height=e.options[S+"Height"]:""!==e.node.style.height&&null!==e.node.style.height?e.height=e.node.style.height:e.node.getAttribute("height")?e.height=e.node.getAttribute("height"):e.height=e.options["default"+x+"Height"],e.initialAspectRatio=e.height>=e.width?e.width/e.height:e.height/e.width,e.setPlayerSize(e.width,e.height),t.pluginWidth=e.width,t.pluginHeight=e.height}if(d.default.MepDefaults=t,new u.default(e.media,t,e.mediaFiles),void 0!==e.getElement(e.container)&&e.options.features.length&&e.controlsAreVisible&&!e.options.hideVideoControlsOnLoad){var w=(0,m.createEvent)("controlsshown",e.getElement(e.container));e.getElement(e.container).dispatchEvent(w)}}},{key:"showControls",value:function(e){var t=this;if(e=void 0===e||e,!t.controlsAreVisible&&t.isVideo){if(e)!function(){g.fadeIn(t.getElement(t.controls),200,function(){g.removeClass(t.getElement(t.controls),t.options.classPrefix+"offscreen");var e=(0,m.createEvent)("controlsshown",t.getElement(t.container));t.getElement(t.container).dispatchEvent(e)});for(var e=t.getElement(t.container).querySelectorAll("."+t.options.classPrefix+"control"),n=0,o=e.length;n0)||n.isVideo&&!n.options.hideVideoControlsOnLoad&&!n.readyState||n.ended)){if(e)!function(){g.fadeOut(n.getElement(n.controls),200,function(){g.addClass(n.getElement(n.controls),n.options.classPrefix+"offscreen"),n.getElement(n.controls).style.display="";var e=(0,m.createEvent)("controlshidden",n.getElement(n.container));n.getElement(n.container).dispatchEvent(e)});for(var e=n.getElement(n.container).querySelectorAll("."+n.options.classPrefix+"control"),t=0,o=e.length;t0&&e.currentMediaTime>0&&(e.setCurrentTime(e.currentMediaTime),p.IS_IOS||p.IS_ANDROID||e.play())})}},{key:"_meReady",value:function(e,t){var n=this,o=t.getAttribute("autoplay"),i=!(void 0===o||null===o||"false"===o),r=null!==e.rendererName&&/(native|html5)/i.test(n.media.rendererName);if(n.getElement(n.controls)&&n.enableControls(),n.getElement(n.container)&&n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play")&&(n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play").style.display=""),!n.created){if(n.created=!0,n.media=e,n.domNode=t,!(p.IS_ANDROID&&n.options.AndroidUseNativeControls||p.IS_IPAD&&n.options.iPadUseNativeControls||p.IS_IPHONE&&n.options.iPhoneUseNativeControls)){if(!n.isVideo&&!n.options.features.length&&!n.options.useDefaultControls)return i&&r&&n.play(),void(n.options.success&&("string"==typeof n.options.success?s.default[n.options.success](n.media,n.domNode,n):n.options.success(n.media,n.domNode,n)));if(n.featurePosition={},n._setDefaultPlayer(),n.buildposter(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildkeyboard(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildoverlays(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.options.useDefaultControls){var a=["playpause","current","progress","duration","tracks","volume","fullscreen"];n.options.features=a.concat(n.options.features.filter(function(e){return-1===a.indexOf(e)}))}n.buildfeatures(n,n.getElement(n.controls),n.getElement(n.layers),n.media);var u=(0,m.createEvent)("controlsready",n.getElement(n.container));n.getElement(n.container).dispatchEvent(u),n.setPlayerSize(n.width,n.height),n.setControlsSize(),n.isVideo&&(n.clickToPlayPauseCallback=function(){if(n.options.clickToPlayPause){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");n.paused&&t?n.pause():n.paused?n.play():n.pause(),e.setAttribute("aria-pressed",!t),n.getElement(n.container).focus()}},n.createIframeLayer(),n.media.addEventListener("click",n.clickToPlayPauseCallback),!p.IS_ANDROID&&!p.IS_IOS||n.options.alwaysShowControls?(n.getElement(n.container).addEventListener("mouseenter",function(){n.controlsEnabled&&(n.options.alwaysShowControls||(n.killControlsTimer("enter"),n.showControls(),n.startControlsTimer(n.options.controlsTimeoutMouseEnter)))}),n.getElement(n.container).addEventListener("mousemove",function(){n.controlsEnabled&&(n.controlsAreVisible||n.showControls(),n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseEnter))}),n.getElement(n.container).addEventListener("mouseleave",function(){n.controlsEnabled&&(n.paused||n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseLeave))})):n.node.addEventListener("touchstart",function(){n.controlsAreVisible?n.hideControls(!1):n.controlsEnabled&&n.showControls(!1)},!!p.SUPPORT_PASSIVE_EVENT&&{passive:!0}),n.options.hideVideoControlsOnLoad&&n.hideControls(!1),n.options.enableAutosize&&n.media.addEventListener("loadedmetadata",function(e){var t=void 0!==e?e.detail.target||e.target:n.media;n.options.videoHeight<=0&&!n.domNode.getAttribute("height")&&!n.domNode.style.height&&null!==t&&!isNaN(t.videoHeight)&&(n.setPlayerSize(t.videoWidth,t.videoHeight),n.setControlsSize(),n.media.setSize(t.videoWidth,t.videoHeight))})),n.media.addEventListener("play",function(){n.hasFocus=!0;for(var e in d.default.players)if(d.default.players.hasOwnProperty(e)){var t=d.default.players[e];t.id===n.id||!n.options.pauseOtherPlayers||t.paused||t.ended||(t.pause(),t.hasFocus=!1)}p.IS_ANDROID||p.IS_IOS||n.options.alwaysShowControls||!n.isVideo||n.hideControls()}),n.media.addEventListener("ended",function(){if(n.options.autoRewind)try{n.setCurrentTime(0),setTimeout(function(){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-loading");e&&e.parentNode&&(e.parentNode.style.display="none")},20)}catch(e){}"function"==typeof n.media.renderer.stop?n.media.renderer.stop():n.pause(),n.setProgressRail&&n.setProgressRail(),n.setCurrentRail&&n.setCurrentRail(),n.options.loop?n.play():!n.options.alwaysShowControls&&n.controlsEnabled&&n.showControls()}),n.media.addEventListener("loadedmetadata",function(){(0,h.calculateTimeFormat)(n.getDuration(),n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.isFullScreen||(n.setPlayerSize(n.width,n.height),n.setControlsSize())});var c=null;n.media.addEventListener("timeupdate",function(){isNaN(n.getDuration())||c===n.getDuration()||(c=n.getDuration(),(0,h.calculateTimeFormat)(c,n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.setControlsSize())}),n.getElement(n.container).addEventListener("click",function(e){g.addClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive")}),n.getElement(n.container).addEventListener("focusin",function(e){g.removeClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive"),!n.isVideo||p.IS_ANDROID||p.IS_IOS||!n.controlsEnabled||n.options.alwaysShowControls||(n.killControlsTimer("enter"),n.showControls(),n.startControlsTimer(n.options.controlsTimeoutMouseEnter))}),n.getElement(n.container).addEventListener("focusout",function(e){setTimeout(function(){e.relatedTarget&&n.keyboardAction&&!e.relatedTarget.closest("."+n.options.classPrefix+"container")&&(n.keyboardAction=!1,!n.isVideo||n.options.alwaysShowControls||n.paused||n.startControlsTimer(n.options.controlsTimeoutMouseLeave))},0)}),setTimeout(function(){n.setPlayerSize(n.width,n.height),n.setControlsSize()},0),n.globalResizeCallback=function(){n.isFullScreen||p.HAS_TRUE_NATIVE_FULLSCREEN&&l.default.webkitIsFullScreen||n.setPlayerSize(n.width,n.height),n.setControlsSize()},n.globalBind("resize",n.globalResizeCallback)}i&&r&&n.play(),n.options.success&&("string"==typeof n.options.success?s.default[n.options.success](n.media,n.domNode,n):n.options.success(n.media,n.domNode,n))}}},{key:"_handleError",value:function(e,t,n){var o=this,i=o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-play");i&&(i.style.display="none"),o.options.error&&o.options.error(e,t,n),o.getElement(o.container).querySelector("."+o.options.classPrefix+"cannotplay")&&o.getElement(o.container).querySelector("."+o.options.classPrefix+"cannotplay").remove();var r=l.default.createElement("div");r.className=o.options.classPrefix+"cannotplay",r.style.width="100%",r.style.height="100%";var a="function"==typeof o.options.customError?o.options.customError(o.media,o.media.originalNode):o.options.customError,s="";if(!a){var u=o.media.originalNode.getAttribute("poster");if(u&&(s=''+d.default.i18n.t('),e.message&&(a="

    "+e.message+"

    "),e.urls)for(var c=0,f=e.urls.length;c'+d.default.i18n.t("mejs.download-file")+": "+p.src+""}}a&&o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error")&&(r.innerHTML=a,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").innerHTML=""+s+r.outerHTML,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").parentNode.style.display="block"),o.controlsEnabled&&o.disableControls()}},{key:"setPlayerSize",value:function(e,t){var n=this;if(!n.options.setDimensions)return!1;switch(void 0!==e&&(n.width=e),void 0!==t&&(n.height=t),n.options.stretching){case"fill":n.isVideo?n.setFillMode():n.setDimensions(n.width,n.height);break;case"responsive":n.setResponsiveMode();break;case"none":n.setDimensions(n.width,n.height);break;default:!0===n.hasFluidMode()?n.setResponsiveMode():n.setDimensions(n.width,n.height)}}},{key:"hasFluidMode",value:function(){var e=this;return-1!==e.height.toString().indexOf("%")||e.node&&e.node.style.maxWidth&&"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width||e.node&&e.node.currentStyle&&"100%"===e.node.currentStyle.maxWidth}},{key:"setResponsiveMode",value:function(){var e=this,t=function(){for(var t=void 0,n=e.getElement(e.container);n;){try{if(p.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&s.default.self!==s.default.top&&null!==s.default.frameElement)return s.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&g.visible(t))return t;n=t}return null}(),n=t?getComputedStyle(t,null):getComputedStyle(l.default.body,null),o=e.isVideo?e.media.videoWidth&&e.media.videoWidth>0?e.media.videoWidth:e.node.getAttribute("width")?e.node.getAttribute("width"):e.options.defaultVideoWidth:e.options.defaultAudioWidth,i=e.isVideo?e.media.videoHeight&&e.media.videoHeight>0?e.media.videoHeight:e.node.getAttribute("height")?e.node.getAttribute("height"):e.options.defaultVideoHeight:e.options.defaultAudioHeight,r=function(){var t=1;return e.isVideo?(t=e.media.videoWidth&&e.media.videoWidth>0&&e.media.videoHeight&&e.media.videoHeight>0?e.height>=e.width?e.media.videoWidth/e.media.videoHeight:e.media.videoHeight/e.media.videoWidth:e.initialAspectRatio,(isNaN(t)||t<.01||t>100)&&(t=1),t):t}(),a=parseFloat(n.height),d=void 0,u=parseFloat(n.width);if(d=e.isVideo?"100%"===e.height?parseFloat(u*i/o,10):e.height>=e.width?parseFloat(u/r,10):parseFloat(u*r,10):i,isNaN(d)&&(d=a),e.getElement(e.container).parentNode.length>0&&"body"===e.getElement(e.container).parentNode.tagName.toLowerCase()&&(u=s.default.innerWidth||l.default.documentElement.clientWidth||l.default.body.clientWidth,d=s.default.innerHeight||l.default.documentElement.clientHeight||l.default.body.clientHeight),d&&u){e.getElement(e.container).style.width=u+"px",e.getElement(e.container).style.height=d+"px",e.node.style.width="100%",e.node.style.height="100%",e.isVideo&&e.media.setSize&&e.media.setSize(u,d);for(var c=e.getElement(e.layers).children,f=0,m=c.length;fimg");a&&(a.style.display="");for(var d=e.getElement(e.container).querySelectorAll("object, embed, iframe, video"),u=e.height,c=e.width,f=i,m=u*i/c,h=c*r/u,v=r,y=h>i==!1,E=y?Math.floor(f):Math.floor(h),b=y?Math.floor(m):Math.floor(v),S=y?i+"px":E+"px",x=y?b+"px":r+"px",w=0,P=d.length;w-1?e:parseFloat(e)+"px",t=(0,m.isString)(t)&&t.indexOf("%")>-1?t:parseFloat(t)+"px",n.getElement(n.container).style.width=e,n.getElement(n.container).style.height=t;for(var o=n.getElement(n.layers).children,i=0,r=o.length;i-1&&!l.default.getElementById(e.media.id+"-iframe-overlay")){var t=l.default.createElement("div"),n=l.default.getElementById(e.media.id+"_"+e.media.rendererName);t.id=e.media.id+"-iframe-overlay",t.className=e.options.classPrefix+"iframe-overlay",t.addEventListener("click",function(t){e.options.clickToPlayPause&&(e.paused?e.play():e.pause(),t.preventDefault(),t.stopPropagation())}),n.parentNode.insertBefore(t,n)}}},{key:"resetSize",value:function(){var e=this;setTimeout(function(){e.setPlayerSize(e.width,e.height),e.setControlsSize()},50)}},{key:"setPoster",value:function(e){var t=this;if(t.getElement(t.container)){var n=t.getElement(t.container).querySelector("."+t.options.classPrefix+"poster");n||((n=l.default.createElement("div")).className=t.options.classPrefix+"poster "+t.options.classPrefix+"layer",t.getElement(t.layers).appendChild(n));var o=n.querySelector("img");!o&&e&&((o=l.default.createElement("img")).className=t.options.classPrefix+"poster-img",o.width="100%",o.height="100%",n.style.display="",n.appendChild(o)),e?(o.setAttribute("src",e),n.style.backgroundImage='url("'+e+'")',n.style.display=""):o?(n.style.backgroundImage="none",n.style.display="none",o.remove()):n.style.display="none"}else(p.IS_IPAD&&t.options.iPadUseNativeControls||p.IS_IPHONE&&t.options.iPhoneUseNativeControls||p.IS_ANDROID&&t.options.AndroidUseNativeControls)&&(t.media.originalNode.poster=e)}},{key:"changeSkin",value:function(e){var t=this;t.getElement(t.container).className=t.options.classPrefix+"container "+e,t.setPlayerSize(t.width,t.height),t.setControlsSize()}},{key:"globalBind",value:function(e,t){var n=this,o=n.node?n.node.ownerDocument:l.default;if((e=(0,m.splitEvents)(e,n.id)).d)for(var i=e.d.split(" "),r=0,a=i.length;r',n.appendChild(r),a.style.display="none",a.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",a.innerHTML='
    ',n.appendChild(a),s.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer "+i.options.classPrefix+"overlay-play",s.innerHTML='
    ',s.addEventListener("click",function(){if(i.options.clickToPlayPause){var e=i.getElement(i.container).querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");i.paused?i.play():i.pause(),e.setAttribute("aria-pressed",!!t),i.getElement(i.container).focus()}}),s.addEventListener("keydown",function(e){var t=e.keyCode||e.which||0;if(13===t||p.IS_FIREFOX&&32===t){var n=(0,m.createEvent)("click",s);return s.dispatchEvent(n),!1}}),n.appendChild(s),null!==i.media.rendererName&&(/(youtube|facebook)/i.test(i.media.rendererName)&&!(i.media.originalNode.getAttribute("poster")||e.options.poster||"function"==typeof i.media.renderer.getPosterUrl&&i.media.renderer.getPosterUrl())||p.IS_STOCK_ANDROID||i.media.originalNode.getAttribute("autoplay"))&&(s.style.display="none");var d=!1;o.addEventListener("play",function(){s.style.display="none",r.style.display="none",a.style.display="none",d=!1}),o.addEventListener("playing",function(){s.style.display="none",r.style.display="none",a.style.display="none",d=!1}),o.addEventListener("seeking",function(){s.style.display="none",r.style.display="",d=!1}),o.addEventListener("seeked",function(){s.style.display=i.paused&&!p.IS_STOCK_ANDROID?"":"none",r.style.display="none",d=!1}),o.addEventListener("pause",function(){r.style.display="none",p.IS_STOCK_ANDROID||d||(s.style.display=""),d=!1}),o.addEventListener("waiting",function(){r.style.display="",d=!1}),o.addEventListener("loadeddata",function(){r.style.display="",p.IS_ANDROID&&(o.canplayTimeout=setTimeout(function(){if(l.default.createEvent){var e=l.default.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),o.dispatchEvent(e)}},300)),d=!1}),o.addEventListener("canplay",function(){r.style.display="none",clearTimeout(o.canplayTimeout),d=!1}),o.addEventListener("error",function(e){i._handleError(e,i.media,i.node),r.style.display="none",s.style.display="none",d=!0}),o.addEventListener("loadedmetadata",function(){i.controlsEnabled||i.enableControls()}),o.addEventListener("keydown",function(t){i.onkeydown(e,o,t),d=!1})}}},{key:"buildkeyboard",value:function(e,t,n,o){var i=this;i.getElement(i.container).addEventListener("keydown",function(){i.keyboardAction=!0}),i.globalKeydownCallback=function(t){var n=l.default.activeElement.closest("."+i.options.classPrefix+"container"),r=i.media.closest("."+i.options.classPrefix+"container");return i.hasFocus=!(!n||!r||n.id!==r.id),i.onkeydown(e,o,t)},i.globalClickCallback=function(e){i.hasFocus=!!e.target.closest("."+i.options.classPrefix+"container")},i.globalBind("keydown",i.globalKeydownCallback),i.globalBind("click",i.globalClickCallback)}},{key:"onkeydown",value:function(e,t,n){if(e.hasFocus&&e.options.enableKeyboard)for(var o=0,i=e.options.keyActions.length;oimg");o&&e.node.setAttribute("poster",o.src),delete e.node.autoplay,""!==e.media.canPlayType((0,v.getTypeFromFile)(n))&&e.node.setAttribute("src",n),~t.indexOf("iframe")&&l.default.getElementById(e.media.id+"-iframe-overlay").remove();var i=e.node.cloneNode();if(i.style.display="",e.getElement(e.container).parentNode.insertBefore(i,e.getElement(e.container)),e.node.remove(),e.mediaFiles)for(var r=0,a=e.mediaFiles.length;r-1},create:function(e,t,n){var o=e.originalNode,d=e.id+"_"+t.prefix,u=o.autoplay,c=o.children,p=null,m=null;o.removeAttribute("type");for(var h=0,v=c.length;h1?t-1:0),o=1;o0)for(var x=0,w=n.length;xt[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,o,i){p.plugins[e]=p.detectPlugin(t,n,o,i)},detectPlugin:function(e,t,n,o){var a=[0,0,0],s=void 0,l=void 0;if(null!==c.NAV.plugins&&void 0!==c.NAV.plugins&&"object"===i(c.NAV.plugins[e])){if((s=c.NAV.plugins[e].description)&&(void 0===c.NAV.mimeTypes||!c.NAV.mimeTypes[t]||c.NAV.mimeTypes[t].enabledPlugin))for(var d=0,u=(a=s.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;d
    '+l.default.t("mejs.install-flash")+"
    "}else _=['id="__'+o.id+'"','name="__'+o.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+o.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+o.options.pluginPath+o.options.filename+'"','flashvars="'+P.join("&")+'"'],T?(_.push('width="'+k+'"'),_.push('height="'+C+'"')):_.push('style="position: fixed; left: -9999em; top: -9999em;"'),o.flashWrapper.innerHTML="";if(o.flashNode=o.flashWrapper.lastChild,o.hide=function(){i=!1,T&&(o.flashNode.style.display="none")},o.show=function(){i=!0,T&&(o.flashNode.style.display="")},o.setSize=function(e,t){o.flashNode.style.width=e+"px",o.flashNode.style.height=t+"px",null!==o.flashApi&&"function"==typeof o.flashApi.fire_setSize&&o.flashApi.fire_setSize(e,t)},o.destroy=function(){o.flashNode.remove()},n&&n.length>0)for(var A=0,L=n.length;A-1},create:function(e,t,n){var o=e.originalNode,d=e.id+"_"+t.prefix,u=null,c=null;u=o.cloneNode(!0),t=Object.assign(t,e.options);for(var p=a.default.html5media.properties,m=a.default.html5media.events.concat(["click","mouseover","mouseout"]),h=function(t){if("error"!==t.type){var n=(0,l.createEvent)(t.type,e);e.dispatchEvent(n)}},v=0,g=p.length;v0)for(var y=0,E=n.length;y-1},create:function(e,t,n){var o=e.originalNode,d=e.id+"_"+t.prefix,u=o.getAttribute("preload"),c=o.autoplay,p=null,m=null,h=0,v=n.length;m=o.cloneNode(!0),(t=Object.assign(t,e.options)).hls.autoStartLoad=u&&"none"!==u||c;for(var g=a.default.html5media.properties,y=a.default.html5media.events.concat(["click","mouseover","mouseout"]),E=function(t){if("error"!==t.type){var n=(0,l.createEvent)(t.type,e);e.dispatchEvent(n)}},b=0,S=g.length;b3e3)a=(new Date).getTime(),p.recoverMediaError();else if(!s||i-s>3e3)s=(new Date).getTime(),console.warn("Attempting to swap Audio Codec and recover from media error"),p.swapAudioCodec(),p.recoverMediaError();else{var r="Cannot recover, last media error recovery failed";e.generateError(r,m.src),console.error(r)}break;case"networkError":if("manifestLoadError"===o.details)if(h0)for(;h0)for(;v0;){var e=c.iframeQueue.pop();c.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";return e.indexOf("?")>0?""===(t=c.getYouTubeIdFromParam(e))&&(t=c.getYouTubeIdFromUrl(e)):t=c.getYouTubeIdFromUrl(e),(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(void 0===e||null===e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",o=0,i=t.length;o-1&&i?"https://img.youtube.com/vi/"+i+"/"+n+".jpg":""},o}};i.default.onYouTubePlayerAPIReady=function(){c.iFrameReady()},d.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),s.renderer.add(f)},{2:2,26:26,27:27,28:28,3:3,7:7,8:8}],25:[function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.cancelFullScreen=n.requestFullScreen=n.isFullScreen=n.FULLSCREEN_EVENT_NAME=n.HAS_NATIVE_FULLSCREEN_ENABLED=n.HAS_TRUE_NATIVE_FULLSCREEN=n.HAS_IOS_FULLSCREEN=n.HAS_MS_NATIVE_FULLSCREEN=n.HAS_MOZ_NATIVE_FULLSCREEN=n.HAS_WEBKIT_NATIVE_FULLSCREEN=n.HAS_NATIVE_FULLSCREEN=n.SUPPORTS_NATIVE_HLS=n.SUPPORT_PASSIVE_EVENT=n.SUPPORT_POINTER_EVENTS=n.HAS_MSE=n.IS_STOCK_ANDROID=n.IS_SAFARI=n.IS_FIREFOX=n.IS_CHROME=n.IS_EDGE=n.IS_IE=n.IS_ANDROID=n.IS_IOS=n.IS_IPOD=n.IS_IPHONE=n.IS_IPAD=n.UA=n.NAV=void 0;for(var i=o(e(3)),r=o(e(2)),a=o(e(7)),s=n.NAV=i.default.navigator,l=n.UA=s.userAgent.toLowerCase(),d=n.IS_IPAD=/ipad/i.test(l)&&!i.default.MSStream,u=n.IS_IPHONE=/iphone/i.test(l)&&!i.default.MSStream,c=n.IS_IPOD=/ipod/i.test(l)&&!i.default.MSStream,f=(n.IS_IOS=/ipad|iphone|ipod/i.test(l)&&!i.default.MSStream,n.IS_ANDROID=/android/i.test(l)),p=n.IS_IE=/(trident|microsoft)/i.test(s.appName),m=(n.IS_EDGE="msLaunchUri"in s&&!("documentMode"in r.default)),h=n.IS_CHROME=/chrome/i.test(l),v=n.IS_FIREFOX=/firefox/i.test(l),g=n.IS_SAFARI=/safari/i.test(l)&&!h,y=n.IS_STOCK_ANDROID=/^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(l),E=(n.HAS_MSE="MediaSource"in i.default),b=n.SUPPORT_POINTER_EVENTS=function(){var e=r.default.createElement("x"),t=r.default.documentElement,n=i.default.getComputedStyle;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e);var o=n&&"auto"===n(e,"").pointerEvents;return e.remove(),!!o}(),S=n.SUPPORT_PASSIVE_EVENT=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});i.default.addEventListener("test",null,t)}catch(e){}return e}(),x=["source","track","audio","video"],w=void 0,P=0,T=x.length;P1&&void 0!==arguments[1]?arguments[1]:400,n=arguments[2];e.style.opacity||(e.style.opacity=1);var o=null;f.default.requestAnimationFrame(function i(r){var a=r-(o=o||r),s=parseFloat(1-a/t,2);e.style.opacity=s<0?0:s,a>t?n&&"function"==typeof n&&n():f.default.requestAnimationFrame(i)})}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments[2];e.style.opacity||(e.style.opacity=0);var o=null;f.default.requestAnimationFrame(function i(r){var a=r-(o=o||r),s=parseFloat(a/t,2);e.style.opacity=s>1?1:s,a>t?n&&"function"==typeof n&&n():f.default.requestAnimationFrame(i)})}function d(e,t){var n=[];e=e.parentNode.firstChild;do{t&&!t(e)||n.push(e)}while(e=e.nextSibling);return n}function u(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function c(e,t,n,o){var i=f.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),r="application/x-www-form-urlencoded; charset=UTF-8",a=!1,s="*/".concat("*");switch(t){case"text":r="text/plain";break;case"json":r="application/json, text/javascript";break;case"html":r="text/html";break;case"xml":r="application/xml, text/xml"}"application/x-www-form-urlencoded"!==r&&(s=r+", */*; q=0.01"),i&&(i.open("GET",e,!0),i.setRequestHeader("Accept",s),i.onreadystatechange=function(){if(!a&&4===i.readyState)if(200===i.status){a=!0;var e=void 0;switch(t){case"json":e=JSON.parse(i.responseText);break;case"xml":e=i.responseXML;break;default:e=i.responseText}n(e)}else"function"==typeof o&&o(i.status)},i.send())}Object.defineProperty(n,"__esModule",{value:!0}),n.removeClass=n.addClass=n.hasClass=void 0,n.loadScript=i,n.offset=r,n.toggleClass=a,n.fadeOut=s,n.fadeIn=l,n.siblings=d,n.visible=u,n.ajax=c;var f=o(e(3)),p=o(e(2)),m=o(e(7)),h=void 0,v=void 0,g=void 0;"classList"in p.default.documentElement?(h=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},v=function(e,t){return e.classList.add(t)},g=function(e,t){return e.classList.remove(t)}):(h=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},v=function(e,t){y(e,t)||(e.className+=" "+t)},g=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var y=n.hasClass=h,E=n.addClass=v,b=n.removeClass=g;m.default.Utils=m.default.Utils||{},m.default.Utils.offset=r,m.default.Utils.hasClass=y,m.default.Utils.addClass=E,m.default.Utils.removeClass=b,m.default.Utils.toggleClass=a,m.default.Utils.fadeIn=l,m.default.Utils.fadeOut=s,m.default.Utils.siblings=d,m.default.Utils.visible=u,m.default.Utils.ajax=c,m.default.Utils.loadScript=i},{2:2,3:3,7:7}],27:[function(e,t,n){"use strict";function o(e){if("string"!=typeof e)throw new Error("Argument passed must be a string");var t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function i(e,t){var n=this,o=arguments,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof e)throw new Error("First argument must be a function");if("number"!=typeof t)throw new Error("Second argument must be a numeric value");var r=void 0;return function(){var a=n,s=o,l=i&&!r;clearTimeout(r),r=setTimeout(function(){r=null,i||e.apply(a,s)},t),l&&e.apply(a,s)}}function r(e){return Object.getOwnPropertyNames(e).length<=0}function a(e,t){var n=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,o={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var i=e+(t?"."+t:"");i.startsWith(".")?(o.d.push(i),o.w.push(i)):o[n.test(e)?"w":"d"].push(i)}),o.d=o.d.join(" "),o.w=o.w.join(" "),o}function s(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var n=e.match(/([a-z]+\.([a-z]+))/i),o={target:t};return null!==n&&(e=n[1],o.namespace=n[2]),new window.CustomEvent(e,{detail:o})}function l(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function d(e){return"string"==typeof e}Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHTML=o,n.debounce=i,n.isObjectEmpty=r,n.splitEvents=a,n.createEvent=s,n.isNodeAfter=l,n.isString=d;var u=function(e){return e&&e.__esModule?e:{default:e}}(e(7));u.default.Utils=u.default.Utils||{},u.default.Utils.escapeHTML=o,u.default.Utils.debounce=i,u.default.Utils.isObjectEmpty=r,u.default.Utils.splitEvents=a,u.default.Utils.createEvent=s,u.default.Utils.isNodeAfter=l,u.default.Utils.isString=d},{7:7}],28:[function(e,t,n){"use strict";function o(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='x',t.firstChild.href}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?a(e):t}function r(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&e.indexOf(";")>-1?e.substr(0,e.indexOf(";")):e}function a(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,n=c.length;t=0&&t.item(n)!==this;);return n>-1}),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=void 0,o=this;do{for(n=t.length;--n>=0&&t.item(n)!==o;);}while(n<0&&(o=o.parentElement));return o}),function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n0&&void 0!==arguments[0]?arguments[0]:25)%1==0)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"mm:ss";e=!e||"number"!=typeof e||e<0?0:e;var s=Math.round(.066666*i),l=Math.round(i),d=24*Math.round(3600*i),u=Math.round(600*i),c=o(i)?";":":",f=void 0,p=void 0,m=void 0,h=void 0,v=Math.round(e*i);if(o(i)){v<0&&(v=d+v);var g=(v%=d)%u;v+=9*s*Math.floor(v/u),g>s&&(v+=s*Math.floor((g-s)/Math.round(60*l-s)));var y=Math.floor(v/l);f=Math.floor(Math.floor(y/60)/60),p=Math.floor(y/60)%60,m=n?y%60:(v/l%60).toFixed(r)}else f=Math.floor(e/3600)%24,p=Math.floor(e/60)%60,m=n?Math.floor(e%60):(e%60).toFixed(r);f=f<=0?0:f,p=p<=0?0:p,m=m<=0?0:m;for(var E=a.split(":"),b={},S=0,x=E.length;S0?(f<10&&b.h>1?"0"+f:f)+":":"";return C+=(p<10&&b.m>1?"0"+p:p)+":",C+=""+(m<10&&b.s>1?"0"+m:m),n&&(C+=(h=(h=(v%l).toFixed(0))<=0?0:h)<10&&b.f?c+"0"+h:""+c+h),C}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25;if("string"!=typeof e)throw new TypeError("Time must be a string");if(e.indexOf(";")>0&&(e=e.replace(";",":")),!/\d{2}(\:\d{2}){0,3}/i.test(e))throw new TypeError("Time code must have the format `00:00:00`");var n=e.split(":"),i=void 0,r=0,a=0,s=0,l=0,d=0,u=Math.round(.066666*t),c=Math.round(t),f=3600*c,p=60*c;switch(n.length){default:case 1:s=parseInt(n[0],10);break;case 2:a=parseInt(n[0],10),s=parseInt(n[1],10);break;case 3:r=parseInt(n[0],10),a=parseInt(n[1],10),s=parseInt(n[2],10);break;case 4:r=parseInt(n[0],10),a=parseInt(n[1],10),s=parseInt(n[2],10),l=parseInt(n[3],10)}return i=o(t)?f*r+p*a+c*s+l-u*((d=60*r+a)-Math.floor(d/10)):(f*r+p*a+t*s+l)/t,parseFloat(i.toFixed(3))}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:25;e=!e||"number"!=typeof e||e<0?0:e;for(var o=Math.floor(e/3600)%24,i=Math.floor(e/60)%60,r=Math.floor(e%60),a=[[Math.floor((e%1*n).toFixed(3)),"f"],[r,"s"],[i,"m"],[o,"h"]],s=t.timeFormat,l=s[1]===s[0],d=l?2:1,u=s.length0){h=!0;break}if(!h)break;l||(s=c+s),s=a[p][1]+u+s,l&&(s=a[p][1]+s),c=a[p][1]}t.timeFormat=s}function s(e){if("string"!=typeof e)throw new TypeError("Argument must be a string value");for(var t=~(e=e.replace(",",".")).indexOf(".")?e.split(".")[1].length:0,n=0,o=1,i=0,r=(e=e.split(":").reverse()).length;i0&&(o=Math.pow(60,i)),n+=Number(e[i])*o;return Number(n.toFixed(t))}Object.defineProperty(n,"__esModule",{value:!0}),n.isDropFrame=o,n.secondsToTimeCode=i,n.timeCodeToSeconds=r,n.calculateTimeFormat=a,n.convertSMPTEtoSeconds=s;var l=function(e){return e&&e.__esModule?e:{default:e}}(e(7));l.default.Utils=l.default.Utils||{},l.default.Utils.secondsToTimeCode=i,l.default.Utils.timeCodeToSeconds=r,l.default.Utils.calculateTimeFormat=a,l.default.Utils.convertSMPTEtoSeconds=s},{7:7}]},{},[29,6,5,15,23,20,19,21,22,24,16,18,17,9,10,11,12,13,14]); !function(a,b){void 0===mejs.plugins&&(mejs.plugins={},mejs.plugins.silverlight=[],mejs.plugins.silverlight.push({types:[]})),mejs.HtmlMediaElementShim=mejs.HtmlMediaElementShim||{getTypeFromFile:mejs.Utils.getTypeFromFile},void 0===mejs.MediaFeatures&&(mejs.MediaFeatures=mejs.Features),void 0===mejs.Utility&&(mejs.Utility=mejs.Utils);var c=MediaElementPlayer.prototype.init;MediaElementPlayer.prototype.init=function(){this.options.classPrefix="mejs-",this.$media=this.$node=b(this.node),c.call(this)};var d=MediaElementPlayer.prototype._meReady;MediaElementPlayer.prototype._meReady=function(){this.container=b(this.container),this.controls=b(this.controls),this.layers=b(this.layers),d.apply(this,arguments)},MediaElementPlayer.prototype.getElement=function(a){return void 0!==b&&a instanceof b?a[0]:a},MediaElementPlayer.prototype.buildfeatures=function(a,c,d,e){for(var f=["playpause","current","progress","duration","tracks","volume","fullscreen"],g=0,h=this.options.features.length;g'+mejsL10n.strings["mejs.download-video"]+""},b(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!b(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(c)}var c={};return{initialize:a}}a.wp=a.wp||{},a.wp.mediaelement=new c,b(a.wp.mediaelement.initialize)}(window,jQuery); var sbi_js_exists=(typeof sbi_js_exists!=='undefined') ? true:false; if(!sbi_js_exists){ "function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g}); (function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.sbi_owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.sbi_owl)a.sbi_owl.hasOwnProperty(d)&&(e+=a.sbi_owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath? (e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("sbi_owl-originalStyles",this.$elem.attr("style"));this.$elem.data("sbi_owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length; this.wrapItems();this.$sbi_owlItems=this.$elem.find(".sbi_owl-item");this.$sbi_owlWrapper=this.$elem.find(".sbi_owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.sbi_owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&& (this.options.autoPlay=5E3);this.play();this.$elem.find(".sbi_owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this, [this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}), g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('
    ').wrap('
    ');this.$elem.find(".sbi_owl-wrapper").wrap('
    ');this.wrapperOuter=this.$elem.find(".sbi_owl-wrapper-outer");this.$elem.css("display","block")}, baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall= !1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;bthis.itemsAmount&& !0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a= this,b=0,e=a.itemsAmount-a.options.items;a.$sbi_owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("sbi_owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("sbi_owl-roundPages",b)})},appendWrapperSizes:function(){this.$sbi_owlWrapper.css({width:this.$sbi_owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/ this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('
    ');a.sbi_owlControls.append(b);a.buttonPrev= f("
    ",{"class":"sbi_owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("
    ",{"class":"sbi_owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.sbi_owlControls mousedown.sbi_owlControls",'div[class^="sbi_owl"]',function(a){a.preventDefault()});b.on("touchend.sbi_owlControls mouseup.sbi_owlControls",'div[class^="sbi_owl"]',function(b){b.preventDefault();f(this).hasClass("sbi_owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper= f('
    ');a.sbi_owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.sbi_owlControls mouseup.sbi_owlControls",".sbi_owl-page",function(b){b.preventDefault();Number(f(this).data("sbi_owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("sbi_owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c",{"class":"sbi_owl-page"}),g=f("",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"sbi_owl-numbers":""}),d.append(g),d.data("sbi_owl-page",b===c?e:c),d.data("sbi_owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".sbi_owl-page").each(function(){f(this).data("sbi_owl-roundPages")===f(a.$sbi_owlItems[a.currentItem]).data("sbi_owl-roundPages")&&(a.paginationWrapper.find(".sbi_owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.sbi_owlControls&&(this.options.items>=this.itemsAmount?this.sbi_owlControls.hide():this.sbi_owlControls.show())},destroyControls:function(){this.sbi_owlControls&&this.sbi_owlControls.remove()},next:function(a){if(this.isTransition)return!1; this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.sbi_owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0), !0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0}, c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem= this.sbi_owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.sbi_owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)}, checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$sbi_owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$sbi_owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$sbi_owlWrapper.css(this.addCssSpeed(a))}, addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+ a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$sbi_owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$sbi_owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$sbi_owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)"; a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.sbi_owl mousedown.sbi_owl","touchmove.sbi_owl mousemove.sbi_owl","touchend.sbi_owl touchcancel.sbi_owl mouseup.sbi_owl"]: !1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.sbi_owl","touchmove.sbi_owl","touchend.sbi_owl touchcancel.sbi_owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.sbi_owl","mousemove.sbi_owl","mouseup.sbi_owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.sbi_owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})}, gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos; "function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.sbi_owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)} function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$sbi_owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.sbi_owl.dragDirection="left":d.sbi_owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}), a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".sbi_owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1; !1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$sbi_owlWrapper.hasClass("grabbing")||d.$sbi_owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem= a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)): (c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("sbi_owl.next",function(){a.next()});a.$elem.on("sbi_owl.prev",function(){a.prev()});a.$elem.on("sbi_owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("sbi_owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("sbi_owl.goTo",function(b,e){a.goTo(e)}); a.$elem.on("sbi_owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a=this.currentItem:!0)&&e=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$sbi_owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b, 100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$sbi_owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$sbi_owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.sbi_owlCarousel=function(a){return this.each(function(){if(!0===f(this).data("sbi_owl-init"))return!1;f(this).data("sbi_owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"sbi_owlCarousel",b)})};f.fn.sbi_owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1, responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"sbi_owl-carousel",theme:"sbi_owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document); window.sbiLinkify=(function(){var k="[a-z\\d.-]+://",h="(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])",c="(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+",n="(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)",f="(?:"+c+n+"|"+h+")",o="(?:[;/][^#?<>\\s]*)?",e="(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?",d="\\b"+k+"[^<>\\s]+",a="\\b"+f+o+e+"(?!\\w)",m="mailto:",j="(?:"+m+")?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@"+f+e+"(?!\\w)",l=new RegExp("(?:"+d+"|"+a+"|"+j+")","ig"),g=new RegExp("^"+k,"i"),b={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},i={callback:function(q,p){return p?''+q+"":q},punct_regexp:/(?:[!?.,:;'"]|(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/};return function(u,z){z=z||{};var w,v,A,p,x="",t=[],s,E,C,y,q,D,B,r;for(v in i){if(z[v]===undefined){z[v]=i[v]}}while(w=l.exec(u)){A=w[0];E=l.lastIndex;C=E-A.length;if(/[\/:]/.test(u.charAt(C-1))){continue}do{y=A;r=A.substr(-1);B=b[r];if(B){q=A.match(new RegExp("\\"+B+"(?!$)","g"));D=A.match(new RegExp("\\"+r,"g"));if((q?q.length:0)<(D?D.length:0)){A=A.substr(0,A.length-1);E--}}if(z.punct_regexp){A=A.replace(z.punct_regexp,function(F){E-=F.length;return""})}}while(A.length&&A!==y);p=A;if(!g.test(p)){p=(p.indexOf("@")!==-1?(!p.indexOf(m)?"":m):!p.indexOf("irc.")?"irc://":!p.indexOf("ftp.")?"ftp://":"http://")+p}if(s!=C){t.push([u.slice(s,C)]);s=E}t.push([A,p])}t.push([u.substr(s)]);for(v=0;v=0?u:o+u;var a=n?n:o;if(n<0){a=o+n}s=a-u;if(s>0){i=new Array(s);if(this.charAt){for(r=0;r-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;di||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[]; if(typeof e.event.props!=='undefined'){ var f=e.event.props.concat(a); } var l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x; e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;xMath.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(se.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)}); (function(){ var a=jQuery, b=function(){ function a(){ this.fadeDuration=500, this.fitImagesInViewport = !0, this.resizeDuration=700, this.positionFromTop=50, this.showImageNumberLabel = !0, this.alwaysShowNavOnTouchDevices = !1, this.wrapAround = !1 } return a.prototype.albumLabel=function(a, b){ return a + " / " + b }, a }(), c=function(){ function b(a){ this.options=a, this.album=[], this.currentImageIndex=void 0, this.init() } return b.prototype.init=function(){ this.enable(), this.build() }, b.prototype.enable=function(){ var b=this; a("body").on("click", "a[data-lightbox-sbi]", function(c){ return b.start(a(c.currentTarget)), !1 }) }, b.prototype.build=function(){ var b=this, sbLbCarouselDestroy=function(){ jQuery('#sbi_lightbox .sbi_lb_lightbox-image').remove(); if(jQuery('#sbi_lightbox .sbi_owl-carousel').length){ if(jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel')) jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel').destroy(); jQuery('#sbi_lightbox .sbi_owl-item').remove(); } jQuery('#sbi_lightbox').find('.fa-clone').remove(); }; a("
    " + "
    " + "
    " + "
    " + "
    " + "
    " + "
    " + "
    " + "" + "
    " + "
    " + "
    " + "
    " + "
    " + "
    " + "
    " + "" + "" + "" + "
    ").appendTo(a("body")), this.$lightbox=a("#sbi_lightbox"), this.$overlay=a("#sbi_lightboxOverlay"), this.$outerContainer=this.$lightbox.find(".sbi_lb-outerContainer"), this.$container=this.$lightbox.find(".sbi_lb-container"), this.containerTopPadding=parseInt(this.$container.css("padding-top"), 10), this.containerRightPadding=parseInt(this.$container.css("padding-right"), 10), this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"), 10), this.containerLeftPadding=parseInt(this.$container.css("padding-left"), 10), this.$overlay.hide().on("click", function(){ return b.end(), !1 }), jQuery(document).on('click', function(event, b, c){ if(!jQuery(event.target).closest('.sbi_lb-outerContainer').length){ if(!jQuery(event.target).closest('.sbi_lb-dataContainer').length){ jQuery('#sbi_lightboxOverlay, #sbi_lightbox').fadeOut(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); sbLbCarouselDestroy(); }} }), this.$lightbox.hide(), jQuery('#sbi_lightboxOverlay').on("click", function(c){ sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); return "sbi_lightbox"===a(c.target).attr("id")&&b.end(), !1 }), this.$lightbox.find(".sbi_lb-prev").on("click", function(){ sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); return b.changeImage(0===b.currentImageIndex ? b.album.length - 1:b.currentImageIndex - 1), !1 }), this.$lightbox.find(".sbi_lb-container").on("swiperight", function(){ sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); return b.changeImage(0===b.currentImageIndex ? b.album.length - 1:b.currentImageIndex - 1), !1 }), this.$lightbox.find(".sbi_lb-next").on("click", function(){ sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); return b.changeImage(b.currentImageIndex===b.album.length - 1 ? 0:b.currentImageIndex + 1), !1 }), this.$lightbox.find(".sbi_lb-container").on("swipeleft", function(){ sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); return b.changeImage(b.currentImageIndex===b.album.length - 1 ? 0:b.currentImageIndex + 1), !1 }), this.$lightbox.find(".sbi_lb-loader, .sbi_lb-close").on("click", function(){ sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); return b.end(), !1 }) }, b.prototype.start=function(b){ function c(a){ var sbiFeedOptions=a.closest('.sbi').attr('data-options'); sbiFeedOptions=jQuery.parseJSON(sbiFeedOptions); var carouselData=-1; if(a.attr("data-carousel").length > 1) carouselData=jQuery.parseJSON(a.attr("data-carousel")); if(!carouselData){ carouselData={};} d.album.push({ link: a.attr("href"), title: a.attr("data-title")||a.attr("title"), video: a.attr("data-video"), id: a.attr("data-id"), url: a.attr("data-url"), user: a.attr("data-user"), avatar: a.attr("data-avatar"), lightboxcomments: sbiFeedOptions.lightboxcomments, numcomments: sbiFeedOptions.numcomments, carousel: carouselData }); } var d=this, e=a(window); e.on("resize", a.proxy(this.sizeOverlay, this)), a("select, object, embed").css({ visibility: "hidden" }), this.sizeOverlay(), this.album=[]; var f, g=0, h=b.attr("data-lightbox-sbi"); if(h){ f=a(b.prop("tagName") + '[data-lightbox-sbi="' + h + '"]'); for (var i=0; i < f.length; i=++i) c(a(f[i])), f[i]===b[0]&&(g=i) }else if("lightbox"===b.attr("rel")) c(b); else { f=a(b.prop("tagName") + '[rel="' + b.attr("rel") + '"]'); for (var j=0; j < f.length; j=++j) c(a(f[j])), f[j]===b[0]&&(g=j) } var k=e.scrollTop() + this.options.positionFromTop, l=e.scrollLeft(); this.$lightbox.css({ top: k + "px", left: l + "px" }).fadeIn(this.options.fadeDuration), this.changeImage(g) }, b.prototype.changeImage=function(b){ var c=this; this.disableKeyboardNav(); var d=this.$lightbox.find(".sbi_lb-image"); this.$overlay.fadeIn(this.options.fadeDuration), a(".sbi_lb-loader").fadeIn("slow"), this.$lightbox.find(".sbi_lb-image, .sbi_lb-nav, .sbi_lb-prev, .sbi_lb-next, .sbi_lb-dataContainer, .sbi_lb-numbers, .sbi_lb-caption").hide(), this.$outerContainer.addClass("animating"); var e=new Image; e.onload=function(){ var sbi_lb_comments_width=0, sbiNavArrowsWidth=0; if((jQuery('.sbi').attr('data-sbi-lb-comments')==='true')&&window.innerWidth > 640){ sbi_lb_comments_width=300; } if(window.innerWidth < (740 + sbi_lb_comments_width)&&window.innerWidth > 640){ sbiNavArrowsWidth=100; } var f, g, h, i, j, k, l; d.attr("src", c.album[b].link), f=a(e), d.width(e.width), d.height(e.height), c.options.fitImagesInViewport&&(l=a(window).width(), k=a(window).height(), j=l - c.containerLeftPadding - c.containerRightPadding - 20 - sbi_lb_comments_width - sbiNavArrowsWidth, i=k - c.containerTopPadding - c.containerBottomPadding - 150, (e.width > j||e.height > i)&&(e.width / j > e.height / i ? (h=j, g=parseInt(e.height / (e.width / h), 10), d.width(h), d.height(g)):(g=i, h=parseInt(e.width / (e.height / g), 10), d.width(h), d.height(g)))), c.sizeContainer(d.width(), d.height()) }, e.src=this.album[b].link, this.currentImageIndex=b }, b.prototype.sizeOverlay=function(){ this.$overlay.width(a(window).width()).height(a(document).height()) }, b.prototype.sizeContainer=function(a, b){ function c(){ d.$lightbox.find(".sbi_lb-dataContainer").width(g), d.$lightbox.find(".sbi_lb-prevLink").height(h), d.$lightbox.find(".sbi_lb-nextLink").height(h), d.showImage() } var d=this, e=this.$outerContainer.outerWidth(), f=this.$outerContainer.outerHeight(), g=a + this.containerLeftPadding + this.containerRightPadding, h=b + this.containerTopPadding + this.containerBottomPadding; e!==g||f!==h ? this.$outerContainer.animate({ width: g, height: h }, this.options.resizeDuration, "swing", function(){ c() }):c() }, b.prototype.showImage=function(){ this.$lightbox.find(".sbi_lb-loader").hide(), this.$lightbox.find(".sbi_lb-image").fadeIn("slow"), this.updateNav(), this.updateDetails(), this.preloadNeighboringImages(), this.enableKeyboardNav() }, b.prototype.updateNav=function(){ var a = !1; try { document.createEvent("TouchEvent"), a=this.options.alwaysShowNavOnTouchDevices ? !0:!1 } catch (b){} this.$lightbox.find(".sbi_lb-nav").show(), this.album.length > 1&&(this.options.wrapAround ? (a&&this.$lightbox.find(".sbi_lb-prev, .sbi_lb-next").css("opacity", "1"), this.$lightbox.find(".sbi_lb-prev, .sbi_lb-next").show()):(this.currentImageIndex > 0&&(this.$lightbox.find(".sbi_lb-prev").show(), a&&this.$lightbox.find(".sbi_lb-prev").css("opacity", "1")), this.currentImageIndex < this.album.length - 1&&(this.$lightbox.find(".sbi_lb-next").show(), a&&this.$lightbox.find(".sbi_lb-next").css("opacity", "1")))) }, b.prototype.updateDetails=function(){ var b=this; if(sbi_supports_video()){ jQuery('#sbi_lightbox').removeClass('sbi_video_lightbox'); if(this.album[this.currentImageIndex].video.length){ jQuery('#sbi_lightbox').addClass('sbi_video_lightbox'); jQuery('.sbi_video').attr({ 'src':this.album[this.currentImageIndex].video, 'poster':this.album[this.currentImageIndex].link, 'autoplay':'true' }); }} jQuery('#sbi_lightbox .sbi_instagram a').attr('href', this.album[this.currentImageIndex].url); jQuery('#sbi_lightbox .sbi_lightbox_tooltip').hide(); jQuery('#sbi_lightbox #sbi_mod_box').find('#sbi_photo_id').text(this.album[this.currentImageIndex].id); jQuery('#sbi_lightbox #sbi_facebook_icon').attr('href', 'https://www.facebook.com/sharer/sharer.php?u=' + this.album[this.currentImageIndex].url+'&t=Text'); jQuery('#sbi_lightbox #sbi_twitter_icon').attr('href', 'https://twitter.com/home?status='+this.album[this.currentImageIndex].url+' ' + this.album[this.currentImageIndex].title); jQuery('#sbi_lightbox #sbi_google_icon').attr('href', 'https://plus.google.com/share?url='+this.album[this.currentImageIndex].url); jQuery('#sbi_lightbox #sbi_linkedin_icon').attr('href', 'https://www.linkedin.com/shareArticle?mini=true&url='+this.album[this.currentImageIndex].url+'&title='+this.album[this.currentImageIndex].title); jQuery('#sbi_lightbox #sbi_pinterest_icon').attr('href', 'https://pinterest.com/pin/create/button/?url='+this.album[this.currentImageIndex].url+'&media='+this.album[this.currentImageIndex].link+'&description='+this.album[this.currentImageIndex].title); jQuery('#sbi_lightbox #sbi_email_icon').attr('href', 'mailto:?subject=Instagram&body='+this.album[this.currentImageIndex].title+' '+this.album[this.currentImageIndex].url); if(this.album[this.currentImageIndex].carousel!==''&&typeof this.album[this.currentImageIndex].carousel[0]!=='undefined'){ var wrapEl=jQuery('.sbi_lb-image-wrap'), styles=jQuery('.sbi_lb-image').attr('style') + 'opacity: 1 !important'; jQuery.each(this.album[this.currentImageIndex].carousel,function(index,value){ if(index > 0){ if(value.type==='image'){ wrapEl.append(''); }else if(sbi_supports_video()&&value.type==='video'){ wrapEl.append(''); }} }); jQuery('.sbi_lb-image-wrap-outer').prepend(''); wrapEl.sbi_owlCarousel({ items: 1, navigation: true, navigationText: ['',''], pagination: true, autoPlay: false, stopOnHover: true, itemsDesktop: 1, itemsDesktopSmall: 1, itemsTablet: 1, itemsTabletSmall: 1, itemsMobile: 1, afterAction:function(el){ var $owlCarousel=jQuery(el).closest('.sbi_owl-carousel'), $listItem=$owlCarousel.find('.sbi_owl-page.active'), currentActiveIndex=$owlCarousel.find('.sbi_owl-page').index($listItem), $maybeVideo=$owlCarousel.find('.sbi_owl-item:eq('+currentActiveIndex+')').find('video'); if($owlCarousel.find('video').length) $owlCarousel.find('video').get(0).pause(); if($maybeVideo.length){ $maybeVideo.get(0).play(); }} }); var $navElementsWrapper=wrapEl.find('.sbi_owl-buttons'); if(window.width > 640){ $navElementsWrapper.addClass('onhover').hide(); wrapEl.on({ mouseenter: function (){ $navElementsWrapper.fadeIn(); }, mouseleave: function (){ $navElementsWrapper.fadeOut(); }}); }} jQuery('.sbi_lb-commentBox').remove(); if((this.album[this.currentImageIndex].lightboxcomments==='true'||this.album[this.currentImageIndex].lightboxcomments===true)&&this.album[this.currentImageIndex].numcomments > 0){ var sbiComments={ postID: '', maxNumComments: this.album[this.currentImageIndex].numcomments, disableCache: (this.album[this.currentImageIndex].disablecache||this.album[this.currentImageIndex].disablecache==='true'), numCommentsOnPage: parseInt(jQuery('#'+this.album[this.currentImageIndex].id).find('.sbi_comments').text().replace(',', '')), commentObj: [], getRemoteComments: function (missing){ var cleanId=this.postID.replace('sbi_',''), at=sb_instagram_js_options.sb_instagram_at, url='https://api.instagram.com/v1/media/' + cleanId + '/comments?access_token=' + at; jQuery.ajax({ method: "GET", url: url, dataType: "jsonp", success: function(data){ sbiComments.commentObj=data.data; var toBeCached=[]; jQuery.each(sbiComments.commentObj, function(){ var comment={ created_time: this.created_time, id: this.id, text: this.text, user_name: this.from.username }; toBeCached.push(comment); }); if(typeof sb_instagram_js_options.sbiPageCommentCache==='undefined'){ sb_instagram_js_options.sbiPageCommentCache=[]; } sb_instagram_js_options.sbiPageCommentCache[cleanId]=[toBeCached, new Date().getTime() / 1000 + 100*60,sbiComments.numCommentsOnPage]; if(missing!=='all'){ sbiComments.replaceWithNewComments(sb_instagram_js_options.sbiPageCommentCache[cleanId][0]); }else{ sbiComments.appendExistingComments(); } if(!sbiComments.disableCache&&window.sbiStandalone.noDB!==true){ sbiComments.cacheComments(toBeCached, sbiComments.numCommentsOnPage); }} }); }, getCommentHtml: function (comment){ var comHtml=''; comHtml +='

    '; comHtml +=''+comment.user_name+''; comHtml +=''+comment.text.replace(/(\\')/g,"'").replace(/(\\")/g,'"')+''; comHtml +='

    '; return comHtml; }, appendExistingComments: function (){ var cleanId=this.postID.replace('sbi_',''), comments=sb_instagram_js_options.sbiPageCommentCache[cleanId][0], fifteenMinutesFromLastCache=sb_instagram_js_options.sbiPageCommentCache[cleanId][1], nowInSeconds=new Date().getTime() / 1000, maxNumComments=parseInt(this.maxNumComments), commentsNeeded=sbiComments.numCommentsOnPage - parseInt(sb_instagram_js_options.sbiPageCommentCache[cleanId][2]); var loadingHTML=''; if(fifteenMinutesFromLastCache > nowInSeconds){ commentsNeeded=0; }else{ if(commentsNeeded > 0){ loadingHTML='

    '; sbiComments.getRemoteComments(); }} var comsHtml=''; if(typeof comments[0]!=='undefined'){ comsHtml +='
    '; var lastIndex=-1; if((comments.length + commentsNeeded) < maxNumComments){ lastIndex=0 - comments.length; }else if((maxNumComments - commentsNeeded) > 0){ lastIndex=0 - (maxNumComments - commentsNeeded); } if(commentsNeeded < maxNumComments){ comments=comments.slice(lastIndex); jQuery.each(comments, function(){ comsHtml +=sbiComments.getCommentHtml(this); }); } comsHtml +=loadingHTML; comsHtml +='
    '; jQuery('.sbi_lb-dataContainer').append(comsHtml); }}, replaceWithNewComments: function (comments){ var comsHtml='', lastIndex=Math.max((0 - parseInt(this.maxNumComments)), (0 - comments.length)), newComments=comments.slice(lastIndex); jQuery.each(newComments, function(){ comsHtml +=sbiComments.getCommentHtml(this); }); jQuery('.sbi_lb-commentBox').html(comsHtml); }, cacheComments: function (comments, totalComments){ var submittedData={ 'action': 'sbi_update_comment_cache', 'post_id': this.postID, 'comments': comments, 'total_comments': totalComments }; jQuery.ajax({ url: sbiajaxurl, type: 'post', data: submittedData, success: function(data){ }}); }}; function sbiCommentsInit(id){ sbiComments.postID=id; if(sb_instagram_js_options.sbiPageCommentCache&&sb_instagram_js_options.sbiPageCommentCache.hasOwnProperty(sbiComments.postID.replace('sbi_',''))){ sbiComments.appendExistingComments(); }else{ sbiComments.getRemoteComments('all'); }} if(typeof this.album[this.currentImageIndex].id!=='undefined'){ sbiCommentsInit(this.album[this.currentImageIndex].id); }else{ setTimeout(function(){ if(typeof this.album[this.currentImageIndex].id!=='undefined'){ sbiCommentsInit(this.album[this.currentImageIndex].id); }},500); }} var sbiLightboxCaption=this.album[this.currentImageIndex].title, hashRegex=/(^|\s)#(\w[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC+0-9]+\w)/gi, tagRegex=/[@]+[A-Za-z0-9-_]+/g; if(typeof sbiLightboxCaption!=='undefined'&&sbiLightboxCaption!==''){ sbiLightboxCaption=sbiLightboxCaption.replace(/(>#)/g,'> #'); } (sbiLightboxCaption) ? sbiLightboxCaption=sbiLinkify(sbiLightboxCaption):sbiLightboxCaption=''; function sbiReplaceHashtags(hash){ var replacementString=jQuery.trim(hash); if(/^#[0-9A-F]{6}$/i.test(replacementString)){ return replacementString; }else{ return ' ' + replacementString + ''; }} sbiLightboxCaption=sbiLightboxCaption.replace(hashRegex , sbiReplaceHashtags); function sbiReplaceTags(tag){ var replacementString=jQuery.trim(tag); return ' ' + replacementString + ''; } sbiLightboxCaption=sbiLightboxCaption.replace(tagRegex , sbiReplaceTags); "undefined"!=typeof sbiLightboxCaption&&""!==sbiLightboxCaption&&this.$lightbox.find(".sbi_lb-caption").html('

    @'+this.album[this.currentImageIndex].user + '

    ' + sbiLightboxCaption).fadeIn("fast"), this.album.length > 1&&this.options.showImageNumberLabel ? this.$lightbox.find(".sbi_lb-number").text(this.options.albumLabel(this.currentImageIndex + 1, this.album.length)).fadeIn("fast"):this.$lightbox.find(".sbi_lb-number").hide(), this.$outerContainer.removeClass("animating"), this.$lightbox.find(".sbi_lb-dataContainer").fadeIn(this.options.resizeDuration, function(){ return b.sizeOverlay() }) }, b.prototype.preloadNeighboringImages=function(){ if(this.album.length > this.currentImageIndex + 1){ var a=new Image; a.src=this.album[this.currentImageIndex + 1].link } if(this.currentImageIndex > 0){ var b=new Image; b.src=this.album[this.currentImageIndex - 1].link }}, b.prototype.enableKeyboardNav=function(){ a(document).on("keyup.keyboard", a.proxy(this.keyboardAction, this)) }, b.prototype.disableKeyboardNav=function(){ a(document).off(".keyboard") }, b.prototype.keyboardAction=function(a){ var sbLbCarouselDestroy=function(){ jQuery('#sbi_lightbox .sbi_lb_lightbox-image').remove(); if(jQuery('#sbi_lightbox .sbi_owl-carousel').length){ if(jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel')) jQuery('#sbi_lightbox .sbi_owl-carousel').data('sbi_owlCarousel').destroy(); jQuery('#sbi_lightbox .sbi_owl-item').remove(); } jQuery('#sbi_lightbox').find('.fa-clone').remove(); }; var KEYCODE_ESC=27; var KEYCODE_LEFTARROW=37; var KEYCODE_RIGHTARROW=39; var keycode=event.keyCode; var key=String.fromCharCode(keycode).toLowerCase(); if(keycode===KEYCODE_ESC||key.match(/x|o|c/)){ sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); jQuery('#sbi_lightbox iframe').attr('src', ''); this.end(); }else if(key==='p'||keycode===KEYCODE_LEFTARROW){ if(this.currentImageIndex!==0){ this.changeImage(this.currentImageIndex - 1); }else if(this.options.wrapAround&&this.album.length > 1){ this.changeImage(this.album.length - 1); } sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); jQuery('#sbi_lightbox iframe').attr('src', ''); }else if(key==='n'||keycode===KEYCODE_RIGHTARROW){ if(this.currentImageIndex!==this.album.length - 1){ this.changeImage(this.currentImageIndex + 1); }else if(this.options.wrapAround&&this.album.length > 1){ this.changeImage(0); } sbLbCarouselDestroy(); if(sbi_supports_video()) jQuery('#sbi_lightbox video.sbi_video')[0].pause(); jQuery('#sbi_lightbox iframe').attr('src', ''); }}, b.prototype.end=function(){ this.disableKeyboardNav(), a(window).off("resize", this.sizeOverlay), this.$lightbox.fadeOut(this.options.fadeDuration), this.$overlay.fadeOut(this.options.fadeDuration), a("select, object, embed").css({ visibility: "visible" }) }, b }(); a(function(){ { var a=new b; new c(a) }}) }).call(this); function sbi_supports_video(){ return !!document.createElement('video').canPlayType; } var modMode={ status: false, usingDB: true, $self: jQuery('.sbi_moderation_mode'), originalParent: jQuery('.sbi_moderation_mode').parent(), hideOrShow: 'hide', dbHidePhotos: sb_instagram_js_options.sb_instagram_hide_photos.replace(/ /g,'').split(','), dbBlockUsers: sb_instagram_js_options.sb_instagram_block_users.replace(/ /g,'').split(','), dbWhiteList: [], whiteListIndex: '', selectedHide: [], selectedShow: [], selectedUsers: [], setStatus: function (status){ this.status=status; }, setUsingDB: function (usingDB){ this.usingDB=usingDB; }, setSelf: function ($self){ if($self.hasClass('sbi')){ this.$self=$self; }else{ this.$self=$self.closest('.sbi'); }}, setOriginalPosition: function (){ this.originalParent=this.$self.parent(); }, updateHideOrShow: function (hideOrShow){ this.hideOrShow=hideOrShow; }, mergeDBAndSelected: function (){ if(!this.$self.hasClass('sbi_mod_merged')){ for (var i=0; i < modMode.dbHidePhotos.length; i++){ if(modMode.dbHidePhotos[i]==''){ modMode.dbHidePhotos.splice(i, 1); }} for (var i=0; i < modMode.dbHidePhotos.length; i++){ if(modMode.selectedHide.indexOf(modMode.dbHidePhotos[i].replace('sbi_', ''))==-1){ modMode.selectedHide.push(modMode.dbHidePhotos[i].replace('sbi_', '')); }} for (var i=0; i < modMode.dbWhiteList.length; i++){ if(modMode.dbWhiteList[i]==''){ modMode.dbWhiteList.splice(i, 1); }} for (var i=0; i < modMode.dbWhiteList.length; i++){ if(modMode.selectedShow.indexOf(modMode.dbWhiteList[i].replace('sbi_', ''))==-1){ modMode.selectedShow.push(modMode.dbWhiteList[i].replace('sbi_', '')); }} for (var i=0; i < modMode.dbBlockUsers.length; i++){ if(modMode.dbBlockUsers[i]==''){ modMode.dbBlockUsers.splice(i, 1) }} for (var i=0; i < modMode.dbBlockUsers.length; i++){ if(modMode.selectedUsers.indexOf(modMode.dbBlockUsers[i])==-1){ modMode.selectedUsers.push(modMode.dbBlockUsers[i]); }} }}, setWhiteListData: function(listNum, ids){ this.whiteListIndex=listNum; this.dbWhiteList=ids.replace(/ /g,'').split(','); }, updateBlockUser: function(checkbox){ var user=checkbox.val(); if(checkbox.is(':checked')){ if(modMode.selectedUsers.indexOf(user) < 0){ modMode.selectedUsers.push(user); }}else{ modMode.selectedUsers.splice(modMode.selectedUsers.indexOf(user), 1); }}, addModSettingsHtml: function (){ if(!this.$self.find('.sbi_mod_mode_wrapper').length){ var sbi_submit_mod_settings_btn=' Save Settings'; modMode.$self.append('
    '+sbi_submit_mod_settings_btn+'
    ' ).find('.sb_instagram_header').before('
    ' + ' Exit moderation mode' + '

    Moderation Type

    ' + '
    ' + '
    ' + sbi_submit_mod_settings_btn + '
    ' ); if(this.whiteListIndex!==''){ modMode.$self.find('#sbi_hs_show').prop("checked", true); modMode.hideOrShow='show'; }} jQuery('body').append('

    Saved

    '); }, addModHtml: function (user){ var html = '
    ' + '' + user + '' + '
    ' + '
    '; return html; }, closeMod: function(){ var url=window.location.href; if(url.indexOf('sbi_moderation_mode=true') > -1){ url=url.replace('?sbi_moderation_mode=true', ''); url=url.replace('&sbi_moderation_mode=true', ''); } if(url.indexOf('sbi_moderation_index=') > -1){ url=url.split('&sbi_moderation_index=')[0]; } window.location.href=url; }, resizeFeed: function (){ modMode.$self.closest('body').css('position','relative').prepend(modMode.$self); }, replaceInfoHtml: function (){ var mod=modMode.$self.find('.sbi_mod'); mod.each(function(){ jQuery(this).closest('.sbi_item').find('.sbi_info').html(jQuery(this)); jQuery(this).children().css('font-size','14px'); }); }, styleImage: function (image, hideOrShow){ if(hideOrShow=='hide'){ image.append('').css('outline','3px solid #e5593d'); }else{ image.append('').css('outline','3px solid #4e9c2b'); }}, changeClickEvent: function (item, e){ e.preventDefault(); var id=item.closest('.sbi_item').attr('id').replace('sbi_', ''), user=item.closest('.sbi_item').find('.sbi_mod_user').text(); if(modMode.hideOrShow==='hide'){ if(modMode.selectedUsers.indexOf(user)===-1){ if(modMode.selectedHide.indexOf(id) > -1){ modMode.selectedHide.splice(modMode.selectedHide.indexOf(id), 1); }else{ modMode.selectedHide.push(id); }} }else{ if(modMode.selectedShow.indexOf(id) > -1){ modMode.selectedShow.splice(modMode.selectedShow.indexOf(id), 1); }else{ modMode.selectedShow.push(id); }} modMode.updateDisplay(modMode.$self); }, updateDisplay: function (){ modMode.$self.find('.sbi_photo').css('outline','').find('.sbi_mod_post_status').remove(); var blockedUsers=modMode.selectedUsers; modMode.$self.find('.sbi_item').each(function(){ var user=jQuery(this).find('.sbi_mod_user').text(), image=jQuery(this).find('.sbi_photo'); if(blockedUsers.indexOf(user) > -1){ modMode.styleImage(image, 'hide'); image.closest('.sbi_item').find('.sbi_mod_block_user').prop('checked', true); }else{ image.closest('.sbi_item').find('.sbi_mod_block_user').prop('checked', false); var id=jQuery(this).attr('id').replace('sbi_', ''), idPlusSbi='sbi_'+id; if(modMode.hideOrShow==='hide'){ if(modMode.selectedHide.indexOf(id) > -1||modMode.selectedHide.indexOf(idPlusSbi) > -1){ modMode.styleImage(image, 'hide'); }}else{ if(modMode.selectedShow.indexOf(id) > -1||modMode.selectedShow.indexOf(idPlusSbi) > -1){ modMode.styleImage(image, 'show'); }} }}); }, ajaxSubmit: function (){ modMode.$self.find('.sbi_mod_submit_mod').next('span').remove(); modMode.$self.fadeTo("fast", 0.3).find('.sbi_mod_submit_mod').attr('disabled','true'); if(modMode.hideOrShow==='hide'){ modMode.$self.find('.sbi_mod_new_white_list').hide(); var submittedData={ ids: modMode.selectedHide, blocked_users: modMode.selectedUsers, action: 'sbi_update_mod_mode_settings' }; jQuery.ajax({ url: sbiajaxurl, type: 'post', data: submittedData, success: function (data){ setTimeout(function(){ modMode.$self.fadeTo(500, 1); modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled'); }, 500); jQuery('.sbi_mod_saved').fadeIn(); setTimeout(function(){ jQuery('.sbi_mod_saved').fadeOut(); }, 3000); }}); }else{ var submittedData={ ids: modMode.selectedShow, db_index: modMode.whiteListIndex, blocked_users: modMode.selectedUsers, action: 'sbi_update_mod_mode_white_list' }; jQuery.ajax({ url: sbiajaxurl, type: 'post', data: submittedData, success: function (data){ if(data.length){ modMode.$self.find('.sbi_mod_new_white_list').remove(); modMode.$self.find('.sbi_mod_submit_mod').after('
    ' + '

    Important. Please use this shortcode to apply your white list:

    ' + '[instagram-feed whitelist="'+data+'"]' + '
    ' ); modMode.whiteListIndex=data; } setTimeout(function(){ modMode.$self.find('.sbi_mod_new_white_list').show(); modMode.$self.css('opacity', 1); modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled'); }, 500); jQuery('.sbi_mod_saved').fadeIn(); setTimeout(function(){ jQuery('.sbi_mod_saved').fadeOut(); }, 3000); }}); }}, showOnPageSubmit: function (){ modMode.$self.find('.sbi_mod_submit_mod').next('span').remove(); modMode.$self.find('.sbi_mod_submit_mod').attr('disabled','true'); if(modMode.hideOrShow==='hide'){ modMode.$self.find('.sbi_mod_new_white_list').hide(); var submittedData={ ids: modMode.selectedHide, blocked_users: modMode.selectedUsers, action: 'sbi_update_mod_mode_settings' }; if(submittedData.ids.length||submittedData.blocked_users.length){ var idsString=submittedData.ids.join(', '), blockedUsersString=submittedData.blocked_users.join(', '); modMode.$self.find('.sbi_mod_new_white_list').remove(); modMode.$self.find('.sbi_mod_submit_mod').after('
    ' + '

    Important. Please use this in your sb_instagram_hide_photos setting

    ' + ''+idsString+'' + '
    ' + '
    ' + '

    Important. Please use this in your sb_instagram_block_users setting

    ' + ''+blockedUsersString+'' + '
    ' ); } modMode.$self.find('.sbi_mod_new_white_list').show(); modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled'); }else{ var submittedData={ ids: modMode.selectedShow, db_index: modMode.whiteListIndex, blocked_users: modMode.selectedUsers, action: 'sbi_update_mod_mode_white_list' }; if(submittedData.ids.length||submittedData.blocked_users.length){ var idsString=submittedData.ids.join(', '), blockedUsersString=submittedData.blocked_users.join(', '); modMode.$self.find('.sbi_mod_new_white_list').remove(); modMode.$self.find('.sbi_mod_submit_mod').after('
    ' + '

    Important. Please use this in your sbiWhiteListIds setting

    ' + ''+idsString+'' + '
    ' + '
    ' + '

    Important. Please use this in your sb_instagram_block_users setting

    ' + ''+blockedUsersString+'' + '
    ' ); } modMode.$self.find('.sbi_mod_new_white_list').show(); modMode.$self.find('.sbi_mod_submit_mod').removeAttr('disabled'); }}, submitSelected: function (){ if(modMode.usingDB){ modMode.ajaxSubmit(); }else{ modMode.showOnPageSubmit(); }} }; function sbi_init(_cache){ window.sbiStandalone={ 'noDB':false, 'forceModMode':false }; var sbiTouchDevice=false; if(sbiIsTouchDevice()===true) sbiTouchDevice=true; function sbiIsTouchDevice(){ return true==("ontouchstart" in window||window.DocumentTouch&&document instanceof DocumentTouch); } function sbiSetUserApiUrl(user_id, at, before, extra, handleData){ var url='https://api.instagram.com/v1/users/search?q=' + user_id + '&access_token=' + at; jQuery.ajax({ method: "GET", url: url, dataType: "jsonp", success: function(data){ var matchingID=data.data[0].id; jQuery.each(data.data, function(){ if(this.username===user_id){ matchingID=this.id; }}); var apiCall="https://api.instagram.com/v1/users/"+ matchingID + before + "?access_token=" + at + extra; handleData(apiCall,matchingID); }}); } var $i=0, sbi_time=0, numIncludewords=0; sbiCreatePage(function(){ jQuery('#sb_instagram.sbi').each(function (){ var feedOptions=JSON.parse(this.getAttribute('data-options')); if(feedOptions.includewords.length > 0){ numIncludewords++; } if(feedOptions.lightboxcomments=='true'&&window.sbiCommentCacheStatus!==1&&feedOptions.numcomments > 0){ window.sbiCommentCacheStatus=1; }}); }); function sbiCreatePage(_callback){ _callback(); window.sbiCacheStatuses={}; jQuery('#sb_instagram.sbi').each(function(){ var var_this=this, feedOptions=JSON.parse(var_this.getAttribute('data-options')); $i++; jQuery(this).attr('data-sbi-index', $i); feedOptions.feedIndex=$i; window.sbiCacheStatuses[$i]={ 'header':(feedOptions.sbiHeaderCache=='true'), 'feed':(feedOptions.sbiCacheExists=='true') }; setTimeout(function(){ sbiCreateFeed(var_this,feedOptions); },sbi_time); if(numIncludewords > 0){ sbi_time +=2000; } function sbiCreateFeed(var_this,feedOptions){ var imagesArrCount=0; var $self=jQuery(var_this), imgRes='standard_resolution', cols=parseInt(var_this.getAttribute('data-cols')), showcaption='', showlikes='', getType=feedOptions.type, sortby='none', hovercolorstyles='', num=var_this.getAttribute('data-num'), user_id=var_this.getAttribute('data-id'), $header='', disablelightbox=feedOptions.disablelightbox, captionlinks=feedOptions.captionlinks, morePosts=[], hidePhotos=sb_instagram_js_options.sb_instagram_hide_photos.replace(/ /g,'').split(","), blockUsers=sb_instagram_js_options.sb_instagram_block_users.replace(/ /g,'').split(","), showUsers=feedOptions.showusers.replace(/ /g,'').split(","), includeWords=feedOptions.includewords.replace(/ /g,'').split(","), excludeWords=feedOptions.excludewords.replace(/ /g,'').split(","), whiteList=feedOptions.sbiWhiteList.replace(/ /g,''), whiteListIds=feedOptions.sbiWhiteListIds.replace(/ /g,'').split(","), sbiHeaderCache=feedOptions.sbiHeaderCache, media=feedOptions.media; if(typeof hidePhotos==='undefined'||(whiteList.length > 0&&whiteList!=''&&!modMode.status==true)) hidePhotos=[]; if(typeof blockUsers==='undefined'||(whiteList.length > 0&&whiteList!=''&&!modMode.status==true)) blockUsers=[]; if(typeof showUsers==='undefined') showUsers=[]; for(var i=0; i < hidePhotos.length; i++){ hidePhotos[i]=hidePhotos[i].replace(/sbi_/g, ''); } feedOptions.disablecache=(feedOptions.disablecache=='true'||jQuery('.sbi_moderation_mode').length > 0); if(feedOptions.lightboxcomments=='true'){ if(!jQuery('.sbi_lightbox').hasClass('sbi_lb-comments-enabled')){ jQuery('.sbi_lightbox').addClass('sbi_lb-comments-enabled'); }} if(feedOptions.showcaption=='false'||feedOptions.showcaption=='') showcaption='style="display: none;"'; if(feedOptions.showlikes=='false'||feedOptions.showlikes=='') showlikes='display: none;'; if(feedOptions.sortby!=='') sortby=feedOptions.sortby; if(feedOptions.hovercolor!=='0,0,0') hovercolorstyles='style="background: rgba('+feedOptions.hovercolor+',0.85)"'; switch(var_this.getAttribute('data-res')){ case 'auto': var feedWidth=$self.innerWidth(), colWidth=$self.innerWidth() / cols; var sbiWindowWidth=jQuery(window).width(); if(sbiWindowWidth < 640){ if(feedWidth < 640&&$self.is('.sbi_col_1')) colWidth=480; if(feedWidth < 640&&$self.is('.sbi_col_3, .sbi_col_4, .sbi_col_5, .sbi_col_6')) colWidth=300; if(feedWidth < 640&&$self.is('.sbi_col_7, .sbi_col_8, .sbi_col_9, .sbi_col_10')) colWidth=100; if((feedWidth > 320&&feedWidth < 480)&&sbiWindowWidth < 480) colWidth=480; if(feedWidth < 320&&sbiWindowWidth < 480) colWidth=300; } if(colWidth < 150){ imgRes='thumbnail'; }else if(colWidth < 320){ imgRes='low_resolution'; }else{ imgRes='standard_resolution'; } if(feedWidth <=100) imgRes='low_resolution'; break; case 'thumb': imgRes='thumbnail'; break; case 'medium': imgRes='low_resolution'; break; default: imgRes='standard_resolution'; } var looparray=['']; if(getType=='hashtag'){ var hashtags_arr=feedOptions.hashtag.replace(/ /g,'').split(","); looparray=hashtags_arr; }else if(getType=='user'){ var ids_arr=user_id.replace(/ /g,'').split(","); looparray=ids_arr; }else if(getType=='location'){ var locations_arr=feedOptions.location.replace(/ /g,'').split(","); looparray=locations_arr; }else if(getType=='coordinates'){ var coords_arr=feedOptions.coordinates.replace(/ /g,'').split("),("); looparray=coords_arr; }else if(getType=='single'){ var single_arr=feedOptions.single.replace(/sbi_/g, ''); single_arr=single_arr.replace(/ /g,'').split(","); looparray=single_arr; } var apiURLs=[], apiCall=''; jQuery.each(looparray, function(index, entry){ if(getType=='user'){ apiCall="https://api.instagram.com/v1/users/"+ entry +"/media/recent?access_token=" + sb_instagram_js_options.sb_instagram_at+"&count=33"; }else if(getType=='coordinates'){ entry=entry.replace(/[()]/g, ''); var entryArr=entry.split(","), lat=entryArr[0], lng=entryArr[1], dis='1000'; if(typeof entryArr[2]!=='undefined'){ dis=entryArr[2]; } apiCall="https://api.instagram.com/v1/media/search?lat="+lat+"&lng="+lng+"&distance="+dis+"&access_token=" + sb_instagram_js_options.sb_instagram_at+"&count=33&max_timestamp="; }else if(getType=='location'){ apiCall="https://api.instagram.com/v1/locations/"+ entry +"/media/recent?access_token=" + sb_instagram_js_options.sb_instagram_at+"&count=33"; }else if(getType=='liked'){ apiCall="https://api.instagram.com/v1/users/self/media/liked?access_token=" + sb_instagram_js_options.sb_instagram_at+"&count=33"; }else if(getType=='single'){ apiCall="https://api.instagram.com/v1/media/"+ entry +"?access_token=" + sb_instagram_js_options.sb_instagram_at; }else{ apiCall="https://api.instagram.com/v1/tags/"+ entry +"/media/recent?access_token=" + sb_instagram_js_options.sb_instagram_at+"&count=33"; } apiURLs.push(apiCall); }); var sbiSettings={num:num, getType:getType, user_id:user_id, cols:cols, imgRes:imgRes, sortby:sortby, showcaption:showcaption, showlikes:showlikes, disablelightbox:disablelightbox, captionlinks:captionlinks, feedOptions:feedOptions, hidePhotos:hidePhotos, blockUsers:blockUsers, showUsers:showUsers, excludeWords:excludeWords, includeWords:includeWords, whiteList:whiteList, whiteListIds:whiteListIds, looparray: looparray}; var sbi_cache_string_include=''; var sbi_cache_string_exclude=''; var sbiTransientNames={ 'header':'', 'feed':'' }; if(includeWords.length > 0){ jQuery.each(includeWords, function(index, word){ var sbi_include_word=word.replace(/ /g,"").replace(/#/g,""); sbi_cache_string_include +=sbi_include_word.substring(0, 3); }); } if(excludeWords.length > 0){ jQuery.each(excludeWords, function(index, word){ var sbi_exclude_word=word.replace(/ /g,"").replace(/#/g,""); sbi_cache_string_exclude +=sbi_exclude_word.substring(0, 3); }); } var sbi_cache_string_include_length=sbi_cache_string_include.length; var sbi_cache_string_exclude_length=sbi_cache_string_exclude.length; var sbi_cache_string_length=40 - Math.min(sbi_cache_string_include_length + sbi_cache_string_exclude_length, 20); var transientName='sbi_'; if(getType==='liked'){ transientName +='liked'; } looparray=looparray.join().replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""); var transientWhiteList=feedOptions.sbiWhiteList.substring(0, 3), transientShowUser=feedOptions.showusers.substring(0, 3); transientName +=transientWhiteList + transientShowUser; if(feedOptions.media!=='all') transientName +=feedOptions.media.substring(0, 1); transientName +=looparray.substring(0, sbi_cache_string_length); sbi_cache_string_length=transientName.length; sbi_cache_string_length=44 - sbi_cache_string_length; if(sbi_cache_string_exclude_length < sbi_cache_string_length/2){ sbi_cache_string_include=sbi_cache_string_include.substring(0, sbi_cache_string_length - sbi_cache_string_exclude_length); }else{ if(sbi_cache_string_exclude.length==0){ sbi_cache_string_include=sbi_cache_string_include.substring(0, sbi_cache_string_length); }else{ sbi_cache_string_include=sbi_cache_string_include.substring(0, sbi_cache_string_length/2); } if(sbi_cache_string_include.length==0){ sbi_cache_string_exclude=sbi_cache_string_exclude.substring(0, sbi_cache_string_length); }else{ sbi_cache_string_exclude=sbi_cache_string_exclude.substring(0, sbi_cache_string_length/2); }} function getHeaderTransientName(looparrayZero){ var headerTransientName='sbi_header_' + looparrayZero; headerTransientName=headerTransientName.substring(0, 45); return headerTransientName; } transientName +=sbi_cache_string_include + sbi_cache_string_exclude; sbiTransientNames.feed=transientName.substring(0, 45); sbiTransientNames.header=getHeaderTransientName(sbiSettings.looparray[0]); if(!sb_instagram_js_options.sbiPageCommentCache&&window.sbiCommentCacheStatus===1&&window.sbiStandalone.noDB!==true){ sbiTransientNames.comments='need'; }else{ sbiTransientNames.comments='no'; } if(( window.sbiCacheStatuses[feedOptions.feedIndex].feed===true||window.sbiCacheStatuses[feedOptions.feedIndex].header===true||sbiTransientNames.comments==='need')&&!feedOptions.disablecache&&typeof feedOptions.tryFetch==='undefined'){ var images=sbiGetCache(sbiTransientNames, sbiSettings, $self, 'all', apiURLs); sbiTransientNames.comments='no'; } if(getType=='user'&&isNaN(ids_arr[0])){ sbiSetUserApiUrl(ids_arr[0], sb_instagram_js_options.sb_instagram_at, '/media/recent', '&count=33', function(apiURL,newFeedID){ sbiSettings.user_id=newFeedID; sbiFetchData([apiURL], sbiTransientNames.feed, sbiSettings, $self); }); }else{ if(window.sbiCacheStatuses[feedOptions.feedIndex].feed===false&&window.sbiCacheStatuses[feedOptions.feedIndex].feed!=='fetched'){ window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched'; window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch='done'; sbiFetchData(apiURLs, sbiTransientNames.feed, sbiSettings, $self); } if(!window.sbiCacheStatuses[feedOptions.feedIndex].header&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='fetched'&&sbiSettings.getType==='user'){ window.sbiCacheStatuses[feedOptions.feedIndex].header='fetched'; sbiFetchData(apiURLs, sbiTransientNames.header, sbiSettings, $self); }} var imagesArr='', sbiNewData=false, noMoreData=false, photoIds=[], imagesHTML='', photosAvailable=0, apiRequests=1; function sbiBuildFeed(images, transientName, sbiSettings, $self){ var $loadBtn=$self.find("#sbi_load .sbi_load_btn"), num=parseInt(sbiSettings.num), cols=parseInt(sbiSettings.cols), hovercolorstyles='', hovertextstyles='', feedOptions=sbiSettings.feedOptions, disablelightbox=sbiSettings.disablelightbox, captionlinks=sbiSettings.captionlinks, itemCount=0, imgRes=sbiSettings.imgRes, getType=feedOptions.type, hidePhotos=sbiSettings.hidePhotos, blockUsers=sbiSettings.blockUsers, excludeWords=sbiSettings.excludeWords, showUsers=sbiSettings.showUsers, includeWords=sbiSettings.includeWords, whiteListIds=sbiSettings.whiteListIds, whiteList=sbiSettings.whiteList, maxRequests=parseInt(feedOptions.maxrequests), removedPhotosCount=0, carousel=JSON.parse(feedOptions.carousel)[0], carouselarrows=JSON.parse(feedOptions.carousel)[1], carouselpag=JSON.parse(feedOptions.carousel)[2], carouselautoplay=JSON.parse(feedOptions.carousel)[3], carouseltime=JSON.parse(feedOptions.carousel)[4], imagepadding=feedOptions.imagepadding, imagepaddingunit=feedOptions.imagepaddingunit, looparray=sbiSettings.looparray, headerstyle=feedOptions.headerstyle, headerstyle=feedOptions.headerstyle, headerprimarycolor=feedOptions.headerprimarycolor, headersecondarycolor=feedOptions.headersecondarycolor, media=feedOptions.media; var sbiModIndex='b'; if(typeof $self.parent().attr('class')!=='undefined'){ sbiModIndex=$self.index()+$self.parent().attr('class').toString(); }else{ sbiModIndex='noclass'; } var forceModMode=false, usingDB=true; if(typeof window.sbiStandalone!=='undefined'){ forceModMode=window.sbiStandalone.forceModMode; usingDB=(window.sbiStandalone.noDB===false); } if(feedOptions.sbiModIndex===sbiModIndex.substring(0,10)||$self.hasClass('sbi_mod_merged')||forceModMode){ modMode.setStatus($self.hasClass('sbi_moderation_mode')); modMode.setUsingDB(usingDB); }else{ modMode.setStatus(false); } if(modMode.status===true){ modMode.setSelf($self); if(!modMode.$self.hasClass('sbi_mod_merged')){ if(sbiSettings.feedOptions.sbiWhiteList.length){ modMode.setWhiteListData(sbiSettings.feedOptions.sbiWhiteList, sbiSettings.feedOptions.sbiWhiteListIds); }} modMode.mergeDBAndSelected(); disablelightbox='true'; hidePhotos=[]; blockUsers=[]; showUsers[0]=''; feedOptions.showlikes='false'; feedOptions.showcaption='false'; sbiSettings.showlikes=''; sbiSettings.showcaption=''; carousel=false; imagepadding=5; imagepaddingunit="px"; } jQuery('.sbi_moderation_link').click(function(){ var modIndex='b'; if(typeof jQuery(this).closest('.sbi').parent().attr('class')!=='undefined'){ modIndex=jQuery(this).closest('.sbi').index()+jQuery(this).closest('.sbi').parent().attr('class'); }else{ modIndex='noclass'; } var url=window.location.href; modIndex=modIndex.substring(0,10); if(url.indexOf('sbi_moderation_mode=true')==-1){ if(url.indexOf('?') > -1){ url +='&sbi_moderation_mode=true&sbi_moderation_index='+modIndex; }else{ url +='?sbi_moderation_mode=true&sbi_moderation_index='+modIndex; }} window.location.href=url; }); if(imagesArr==''){ imagesArr=images; }else if(sbiNewData==true){ jQuery.each(images.data, function(index, entry){ imagesArr.data.push(entry); }); sbiNewData=false; } var imagesNextUrl=images.pagination.next_url; if(typeof imagesNextUrl==='undefined'||imagesNextUrl.length==0){ noMoreData=true; }else{ $loadBtn.show(); } if(typeof images.pagination!=='undefined') imagesArr["pagination"]=images.pagination; if(feedOptions.showcaption=='false'||feedOptions.showcaption=='') showcaption='style="display: none;"'; if(feedOptions.showlikes=='false'||feedOptions.showlikes=='') showlikes='display: none;'; if(feedOptions.sortby!=='') sortby=feedOptions.sortby; if(feedOptions.hovercolor!=='0,0,0') hovercolorstyles='style="background: rgba('+feedOptions.hovercolor+',0.85)"'; if(feedOptions.hovertextcolor!=='0,0,0') hovertextstyles='style="color: rgba('+feedOptions.hovertextcolor+',1)"'; var imagesArrCountOrig=imagesArrCount, removePhotoIndexes=[]; if($self.find('.sbi_header_link').length==0){ if(getType=='user'){ var sbi_page_url='https://api.instagram.com/v1/users/' + looparray[0] + '?access_token=' + sb_instagram_js_options.sb_instagram_at; if(isNaN(looparray[0])){ sbiSetUserApiUrl(looparray[0], sb_instagram_js_options.sb_instagram_at, '', '', function(apiURL){ sbi_page_url=apiURL; if(sbiHeaderCache=='true'&&!feedOptions.disablecache){ }else{ jQuery.ajax({ method: "GET", url: sbi_page_url, dataType: "jsonp", success: function(data){ sbiBuildHeader(data, sbiSettings); if(!feedOptions.disablecache&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='cached'&&typeof data.data.username!=='undefined'&&typeof data.data.pagination==='undefined'){ window.sbiCacheStatuses[feedOptions.feedIndex].header='cached'; sbiCachePhotos(data, headerTransientName); }} }); }}); }else{ var headerTransientName='sbi_header_' + looparray[0]; headerTransientName=headerTransientName.substring(0, 45); if(sbiHeaderCache=='true'&&!feedOptions.disablecache){ }else{ jQuery.ajax({ method: "GET", url: sbi_page_url, dataType: "jsonp", success: function (data){ sbiBuildHeader(data, sbiSettings); if(!feedOptions.disablecache&&window.sbiCacheStatuses[feedOptions.feedIndex].header!=='cached'&&typeof data.data.username!=='undefined'&&typeof data.data.pagination==='undefined'){ window.sbiCacheStatuses[feedOptions.feedIndex].header='cached'; sbiCachePhotos(data, headerTransientName); }} }); }} }else{ var headerStyles=''; if(feedOptions.headercolor.length) headerStyles='style="color: #'+feedOptions.headercolor+'"'; if(getType=='hashtag'){ $header=''; }else{ $header=''; if(getType=='hashtag'){ $header +=''; }else{ $header +='
    '; } if($self.find('.sbi_header_link').length==0) $self.find('.sb_instagram_header').prepend($header); $self.find('.sb_instagram_header .sbi_header_link').hover(function(){ $self.find('.sbi_feed_type_user .sbi_header_hashtag_icon, .sbi_feed_type_hashtag .sbi_header_hashtag_icon').attr('style', 'background: ' +$self.find('h3').css('color')); $self.find('.sbi_feed_type_hashtag.sbi_header_style_boxed .sbi_header_hashtag_icon').css({ 'background':'#000', 'color':'#fff' }); }, function(){ $self.find('.sbi_feed_type_user .sbi_header_hashtag_icon, .sbi_feed_type_hashtag .sbi_header_hashtag_icon').removeAttr('style'); $self.find('.sbi_feed_type_hashtag.sbi_header_style_boxed .sbi_header_hashtag_icon').css({ 'background':'#'+feedOptions.headersecondarycolor, 'color':'#'+feedOptions.headerprimarycolor }); }); }} jQuery.each(imagesArr.data, function(itemNumber, item){ var removePhoto=false; if(showUsers[0]!==''){ var hits=0; jQuery.each(showUsers, function (index, username){ if(item.user.username==jQuery.trim(username)){ hits++; }}); if(hits < 1){ hidePhotos.push(item.id); }}else{ jQuery.each(blockUsers, function(index, username){ if(item.user.username==jQuery.trim(username)){ hidePhotos.push(item.id); }}); } if((excludeWords.length > 0&&excludeWords[0]!=='')&&item.caption!=null&&item.caption!=''){ jQuery.each(excludeWords, function(index, word){ word=jQuery.trim(word).toLowerCase(); if(item.caption.text.toLowerCase().indexOf(word) > -1&&word!==''){ }}); var workingCaptionEx=' ' + item.caption.text + ' '; jQuery.each(excludeWords, function(index, word){ if(word!==''){ var needle=encodeURI(jQuery.trim(word).toLowerCase()), haystack=encodeURI(workingCaptionEx.toLowerCase().replace('#', ' #')), regex=new RegExp("%20"+needle + "\\b"); haystack=haystack.replace(/#/g, '%20#'); if(regex.test(haystack)){ hidePhotos.push(item.id); }} }); } if(includeWords.length > 0&&includeWords!=''){ if(item.caption==null){ hidePhotos.push(item.id); }else{ var containsWord=false, workingCaption=' ' + item.caption.text + ' '; jQuery.each(includeWords, function(index, word){ var needle=encodeURI(jQuery.trim(word).toLowerCase()), haystack=encodeURI(workingCaption.toLowerCase().replace('#', ' #')), regex=new RegExp("%20"+needle + "\\b"); haystack=haystack.replace(/#/g, '%20#'); if(regex.test(haystack)){ containsWord=true; }}); if(containsWord==false&&(jQuery.inArray(item.id, hidePhotos) < 1)){ hidePhotos.push(item.id); }} } if(item.type=='video'&&typeof item.videos=='undefined') item.type='image'; if(media=='videos'&&item.type!=='video') removePhoto=true; if(media=='photos'&&item.type!=='image') removePhoto=true; if(whiteList.length > 0&&whiteList!=''&&!modMode.status==true){ if(whiteListIds.indexOf(item.id)===-1){ hidePhotos.push(item.id); }} jQuery.each(hidePhotos, function(index, id){ if(item.id==jQuery.trim(id)) removePhoto=true; }); if(removePhoto){ removedPhotosCount++; removePhotoIndexes.push(itemNumber); return; } itemCount++; if(itemCount >((imagesArrCountOrig-photosAvailable)+num)||itemCount <=imagesArrCountOrig) return; imagesArrCount++; var data_video='data-video=""'; if(item.type=='video'){ data_video='data-video="'+item.videos.standard_resolution.url + '"'; } var data_carousel='data-carousel=""'; if(item.type==='carousel'&&typeof item.carousel_media!=='undefined'){ var data_carousel_object={}; jQuery.each(item.carousel_media,function(index,value){ if(typeof value.images!=='undefined'){ data_carousel_object[index]={ 'type':'image', 'media':value.images.standard_resolution.url };}else if(typeof value.videos!=='undefined'){ data_carousel_object[index]={ 'type':'video', 'media':value.videos.standard_resolution.url };}}); data_carousel="data-carousel='"+JSON.stringify(data_carousel_object).replace(/'/g, "\\'")+"'"; } var data_image=item.images.standard_resolution.url; switch(imgRes){ case 'thumbnail': data_image=item.images.thumbnail.url; break; case 'low_resolution': data_image=item.images.low_resolution.url; break; } data_image=data_image.split("?ig_cache_key")[0]; var date=new Date(item.created_time*1000); var created_time_raw=item.created_time; var m=date.getMonth(); var d=date.getDate(); var month_names=new Array(); month_names[month_names.length]="Jan"; month_names[month_names.length]="Feb"; month_names[month_names.length]="Mar"; month_names[month_names.length]="Apr"; month_names[month_names.length]="May"; month_names[month_names.length]="Jun"; month_names[month_names.length]="Jul"; month_names[month_names.length]="Aug"; month_names[month_names.length]="Sep"; month_names[month_names.length]="Oct"; month_names[month_names.length]="Nov"; month_names[month_names.length]="Dec"; var itemDate=d + ' ' + month_names[m]; var captionText=''; if(item.caption!=null&&item.caption!=''){ var captionText=item.caption.text.replace(/"/g, """); captionText=captionText.replace(/\n/g, "
    "); } if(feedOptions.hoverdisplay.indexOf('location') > -1){ var showHoverLocation=true; }else{ var showHoverLocation=false; } if(feedOptions.hoverdisplay.indexOf('caption') > -1){ var showHoverCaption=true; }else{ var showHoverCaption=false; } if(feedOptions.hoverdisplay.indexOf('likes') > -1){ var showHoverLikes=true; }else{ var showHoverLikes=false; } if(feedOptions.hoverdisplay.indexOf('username') > -1){ var showHoverUsername=true; }else{ var showHoverUsername=false; } if(feedOptions.hoverdisplay.indexOf('icon') > -1){ var showHoverIcon=true; }else{ var showHoverIcon=false; } if(feedOptions.hoverdisplay.indexOf('date') > -1){ var showHoverDate=true; }else{ var showHoverDate=false; } if(feedOptions.hoverdisplay.indexOf('instagram') > -1){ var showHoverInstagram=true; }else{ var showHoverInstagram=false; } if(item.location!=null&&item.caption!=''&&showHoverLocation){ if(item.location.name=='undefined'||item.location.name==null){ var locationName=''; }else{ var sbi_lat=(item.location.hasOwnProperty("latitude")) ? 'data-lat="'+item.location.latitude+'"':'', sbi_long=(item.location.hasOwnProperty("longitude")) ? 'data-long="'+item.location.longitude+'"':'', locationName=''+item.location.name+''; }}else{ var locationName=''; } var sbiCaptionHTML=''; if(showHoverCaption){ sbiCaptionHTML='

    '+ captionText.substring(0, feedOptions.captionlength); if(captionText.length > parseInt(feedOptions.captionlength)) sbiCaptionHTML +='...'; sbiCaptionHTML +='

    '; } var sbiMetaHTML=''; if(showHoverLikes){ sbiMetaHTML='
    '+commaSeparateNumber(item.likes.count)+''+commaSeparateNumber(item.comments.count)+'
    '; } var sbiUsernameHTML=''; if(showHoverUsername){ sbiUsernameHTML='

    '+item.user.username+'

    '; } var sbiIconHTML=''; if(showHoverIcon){ sbiIconHTML=''; } var sbiDateHTML=''; if(showHoverDate){ sbiDateHTML=''+itemDate + ''; } var sbiInstagramHTML=''; if(showHoverInstagram){ sbiInstagramHTML=''; } var sbiHoverEffect='sbi_fade'; var carouselPadding=(carousel==true) ? ' style="padding: '+imagepadding+imagepaddingunit+' !important;"':''; imagesHTML +='
    '+captionText+'

    '+captionText+' ...

    '+commaSeparateNumber(item.likes.count)+''+commaSeparateNumber(item.comments.count)+'
    '; if(modMode.status===true){ imagesHTML +=modMode.addModHtml(item.user.username); } imagesHTML +='
    '; }); removePhotoIndexes.reverse(); jQuery.each(removePhotoIndexes, function(index, itemNumber){ imagesArr.data.splice(itemNumber, 1); }); if((imagesArrCount - imagesArrCountOrig) < num) photosAvailable +=imagesArrCount - imagesArrCountOrig; var numWhiteListIds=feedOptions.sbiWhiteListIds.replace(/ /g,'').split(",").length; if(((imagesArrCount - imagesArrCountOrig) < num)&&(photosAvailable < num) &&(apiRequests < maxRequests)&&!noMoreData&&(imagesArrCount < numWhiteListIds||feedOptions.sbiWhiteList==='')){ var sbiFetchURL=imagesArr.pagination.next_url; window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched'; sbiFetchData(sbiFetchURL, sbiTransientNames.feed, sbiSettings, $self); sbiNewData=true; }else{ $self.find('#sbi_images').append(imagesHTML); sbiAfterImagesLoaded(imagesArr,sbiTransientNames.feed); imagesHTML=''; $self.find('.sbi_loader').remove(); $loadBtn.find('.fa-spinner').hide(); $loadBtn.find('.sbi_btn_text').css('opacity', 1); } function sbiAfterImagesLoaded(imagesArr,transientName){ $self.find('.sbi_item').each(function(){ var $self=jQuery(this), $sbi_link_area=$self.find('.sbi_link_area'); var $sbi_lightbox=jQuery('#sbi_lightbox'); $self.find('.sbi_lightbox_link').click(function(){ $sbi_lightbox.removeClass('sbi_video_lightbox'); if($self.hasClass('sbi_type_video')){ $sbi_lightbox.addClass('sbi_video_lightbox'); jQuery('.sbi_video').attr({ 'poster':jQuery(this).attr('href') }); }}); var $post_text=$self.find('.sbi_info .sbi_caption'), text_limit=feedOptions.captionlength; if(typeof text_limit==='undefined'||text_limit=='') text_limit=99999; var full_text=$self.find('.sbi_photo img').attr('alt'); if(full_text==undefined) full_text=''; var short_text=full_text.substring(0,text_limit); $post_text.html(short_text); if(full_text.length > text_limit) $self.find('.sbi_expand').show(); $self.find('.sbi_expand a').unbind('click').bind('click', function(e){ e.preventDefault(); var $expand=jQuery(this); if($self.hasClass('sbi_caption_full')){ $post_text.html(short_text); $self.removeClass('sbi_caption_full'); }else{ $post_text.html(full_text); $self.addClass('sbi_caption_full'); }}); if(disablelightbox=='true'||captionlinks=='true'){ if(!sbiTouchDevice){ $self.find('.sbi_photo').hover(function(){ jQuery(this).fadeTo(200, 0.85); }, function(){ jQuery(this).stop().fadeTo(500, 1); }); } if(captionlinks=='true'){ function sbiUrlDetect(text){ var urlRegex=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g; return text.match(urlRegex); } var cap=$self.find('img').attr('alt'), url=sbiUrlDetect(cap); if(url){ $self.find('a').attr('href', url); }} }else{ var $sbi_photo_wrap=$self.find('.sbi_photo_wrap'), $sbi_link=$sbi_photo_wrap.find('.sbi_link'); if(sbiTouchDevice||feedOptions.hovereffect=='none'){ $sbi_link.css('background', 'none').show(); $sbi_link.find('*').hide().end().find('.sbi_link_area').show(); }else{ $sbi_photo_wrap.hover(function(){ $sbi_link.fadeIn(200); $self.addClass('sbi_animate'); }, function(){ $sbi_link.stop().fadeOut(600); $self.removeClass('sbi_animate'); }); }} }); jQuery('.sbi_lightbox_action a').unbind().bind('click', function(){ jQuery(this).parent().find('.sbi_lightbox_tooltip').toggle(); }); $self.find('#sbi_images .sbi_item.sbi_new').sort(function (a, b){ var aComp=jQuery(a).attr("data-date"), bComp=jQuery(b).attr("data-date"); if(sortby=='none'){ return bComp - aComp; }else{ return (Math.round(Math.random())-0.5); }}).appendTo($self.find("#sbi_images")); setTimeout(function(){ jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new'); morePosts=[]; }, 500); var imagesArrLength=imagesArr.data.length; if(( (imagesArrCount >=imagesArrLength)&&noMoreData)||(getType=='coordinates'&&images.data.length==0)){ $loadBtn.hide(); } if(sbiSettings.whiteList.length&&($self.find('.sbi_item').length===sbiSettings.whiteListIds.length)){ $loadBtn.hide(); } $self.find('#sbi_load .sbi_load_btn').off().on('click', function(){ $loadBtn.find('.fa-spinner').show(); $loadBtn.find('.sbi_btn_text').css('opacity', 0); photosAvailable=0; imagesArrCount=parseInt(imagesArrCount); imagesArrLength=imagesArr.data.length; var numWhiteListIds=feedOptions.sbiWhiteListIds.replace(/ /g,'').split(",").length; if((imagesArrCount + num) < imagesArrLength||noMoreData||(imagesArrCount >=numWhiteListIds&&feedOptions.sbiWhiteList!==''&&modMode.status!==true)){ if(photosAvailable!=='finished') sbiBuildFeed(images, transientName, sbiSettings, $self); sbiNewData=false; if(( (imagesArrCount >=imagesArrLength)&&noMoreData)||(getType=='coordinates'&&images.data.length==0)){ $loadBtn.hide(); } if(sbiSettings.whiteList.length&&($self.find('.sbi_item').length===sbiSettings.whiteListIds.length)){ $loadBtn.hide(); }}else{ sbiFetchURL=imagesArr.pagination.next_url; window.sbiCacheStatuses[feedOptions.feedIndex].feed='fetched'; sbiFetchData(sbiFetchURL, transientName, sbiSettings, $self); sbiNewData=true; apiRequests=0; }}); if(modMode.status===true){ if(!modMode.$self.hasClass('sbi_mod_merged')){ modMode.setOriginalPosition(); modMode.resizeFeed(); } setTimeout(function (){ modMode.$self.find('.sbi_item .sbi_photo').each(function (){ if(!jQuery(this).hasClass('sbi_mod_changed')){ jQuery(this).click(function (e){ modMode.changeClickEvent(jQuery(this), e); }); jQuery(this).addClass('sbi_mod_changed'); }}); setTimeout(function (){ modMode.addModSettingsHtml(); modMode.$self.find('.sbi_mod_submit_mod').click(function (){ modMode.submitSelected(); }); modMode.$self.find('.sbi_hide_show_radio').click(function (){ modMode.updateHideOrShow(jQuery(this).val()); modMode.updateDisplay(); }); modMode.$self.find('.sbi_mod_block_user').each(function(){ if(!jQuery(this).hasClass('sbi_mod_changed')){ jQuery(this).click(function (){ modMode.updateBlockUser(jQuery(this)); modMode.updateDisplay(); }); jQuery(this).addClass('sbi_mod_changed'); }}); modMode.$self.find('.sbi_close_mod').click(function (){ modMode.closeMod(); }); modMode.replaceInfoHtml(); jQuery('.sbi_item').each(function(){ jQuery(this).css('height',jQuery('.sbi_photo_wrap').innerHeight()+jQuery('.sbi_info').innerHeight()); }); modMode.updateDisplay(); modMode.$self.addClass('sbi_mod_merged'); modMode.$self.find('.sbi_info').removeClass('sbi_info'); }, 600); }, 350); } if(typeof sbi_custom_js=='function') setTimeout(function(){ sbi_custom_js(); }, 100); if(imgRes!=='thumbnail'){ var sbi_imgLiquid=sbi_imgLiquid||{VER:"0.9.944"};sbi_imgLiquid.bgs_Available=!1,sbi_imgLiquid.bgs_CheckRunned=!1,function(i){function t(){if(!sbi_imgLiquid.bgs_CheckRunned){sbi_imgLiquid.bgs_CheckRunned=!0;var t=i('');i("body").append(t),!function(){var i=t[0];if(i&&window.getComputedStyle){var e=window.getComputedStyle(i,null);e&&e.backgroundSize&&(sbi_imgLiquid.bgs_Available="cover"===e.backgroundSize)}}(),t.remove()}}i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},t();var a=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(t){function e(){-1===u.css("background-image").indexOf(encodeURI(c.attr("src")))&&u.css({"background-image":'url("'+encodeURI(c.attr("src"))+'")'}),u.css({"background-size":g.fill?"cover":"contain","background-position":(g.horizontalAlign+" "+g.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",u).css({display:"block",width:"100%",height:"100%"}),i("img",u).css({display:"none"}),g.onItemFinish&&g.onItemFinish(t,u,c),u.addClass("sbi_imgLiquid_bgSize"),u.addClass("sbi_imgLiquid_ready"),l()}function o(){function e(){c.data("sbi_imgLiquid_error")||c.data("sbi_imgLiquid_loaded")||c.data("sbi_imgLiquid_oldProcessed")||(u.is(":visible")&&c[0].complete&&c[0].width>0&&c[0].height>0?(c.data("sbi_imgLiquid_loaded",!0),setTimeout(r,t*g.delay)):setTimeout(e,g.timecheckvisibility))}if(c.data("oldSrc")&&c.data("oldSrc")!==c.attr("src")){var a=c.clone().removeAttr("style");return a.data("sbi_imgLiquid_settings",c.data("sbi_imgLiquid_settings")),c.parent().prepend(a),c.remove(),c=a,c[0].width=0,void setTimeout(o,10)}return c.data("sbi_imgLiquid_oldProcessed")?void r():(c.data("sbi_imgLiquid_oldProcessed",!1),c.data("oldSrc",c.attr("src")),i("img:not(:first)",u).css("display","none"),u.css({overflow:"hidden"}),c.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),c.on("error",n),c[0].onerror=n,e(),void d())}function d(){(g.responsive||c.data("sbi_imgLiquid_oldProcessed"))&&c.data("sbi_imgLiquid_settings")&&(g=c.data("sbi_imgLiquid_settings"),u.actualSize=u.get(0).offsetWidth+u.get(0).offsetHeight/1e4,u.sizeOld&&u.actualSize!==u.sizeOld&&r(),u.sizeOld=u.actualSize,setTimeout(d,g.responsiveCheckTime))}function n(){c.data("sbi_imgLiquid_error",!0),u.addClass("sbi_imgLiquid_error"),g.onItemError&&g.onItemError(t,u,c),l()}function s(){var i={};if(a.settings.useDataHtmlAttr){var t=u.attr("data-sbi_imgLiquid-fill"),e=u.attr("data-sbi_imgLiquid-horizontalAlign"),o=u.attr("data-sbi_imgLiquid-verticalAlign");("true"===t||"false"===t)&&(i.fill=Boolean("true"===t)),void 0===e||"left"!==e&&"center"!==e&&"right"!==e&&-1===e.indexOf("%")||(i.horizontalAlign=e),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}return sbi_imgLiquid.isIE&&a.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}function r(){var i,e,a,o,d,n,s,r,m=0,h=0,f=u.width(),v=u.height();void 0===c.data("owidth")&&c.data("owidth",c[0].width),void 0===c.data("oheight")&&c.data("oheight",c[0].height),g.fill===f/v>=c.data("owidth")/c.data("oheight")?(i="100%",e="auto",a=Math.floor(f),o=Math.floor(f*(c.data("oheight")/c.data("owidth")))):(i="auto",e="100%",a=Math.floor(v*(c.data("owidth")/c.data("oheight"))),o=Math.floor(v)),d=g.horizontalAlign.toLowerCase(),s=f-a,"left"===d&&(h=0),"center"===d&&(h=.5*s),"right"===d&&(h=s),-1!==d.indexOf("%")&&(d=parseInt(d.replace("%",""),10),d>0&&(h=s*d*.01)),n=g.verticalAlign.toLowerCase(),r=v-o,"left"===n&&(m=0),"center"===n&&(m=.5*r),"bottom"===n&&(m=r),-1!==n.indexOf("%")&&(n=parseInt(n.replace("%",""),10),n>0&&(m=r*n*.01)),g.hardPixels&&(i=a,e=o),c.css({width:i,height:e,"margin-left":Math.floor(h),"margin-top":Math.floor(m)}),c.data("sbi_imgLiquid_oldProcessed")||(c.fadeTo(g.fadeInTime,1),c.data("sbi_imgLiquid_oldProcessed",!0),g.removeBoxBackground&&u.css("background-image","none"),u.addClass("sbi_imgLiquid_nobgSize"),u.addClass("sbi_imgLiquid_ready")),g.onItemFinish&&g.onItemFinish(t,u,c),l()}function l(){t===a.length-1&&a.settings.onFinish&&a.settings.onFinish()}var g=a.settings,u=i(this),c=i("img:first",u);return c.length?(c.data("sbi_imgLiquid_settings")?(u.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),g=i.extend({},c.data("sbi_imgLiquid_settings"),a.options)):g=i.extend({},a.settings,s()),c.data("sbi_imgLiquid_settings",g),g.onItemStart&&g.onItemStart(t,u,c),void(sbi_imgLiquid.bgs_Available&&g.useBackgroundSize?e():o())):void n()})}})}(jQuery); !function (){ var css=sbi_imgLiquid.injectCss, head=document.getElementsByTagName('head')[0], style=document.createElement('style'); style.type='text/css'; if(style.styleSheet){ style.styleSheet.cssText=css; }else{ style.appendChild(document.createTextNode(css)); } head.appendChild(style); }(); $self.find(".sbi_photo").sbi_imgLiquid({fill:true}); } var sbi_delay=(function(){ var sbi_timer=0; return function(sbi_callback, sbi_ms){ clearTimeout (sbi_timer); sbi_timer=setTimeout(sbi_callback, sbi_ms); };})(); jQuery(window).resize(function(){ sbi_delay(function(){ sbiSetPhotoHeight(); sbiGetItemSize(); }, 500); }); function sbiSetPhotoHeight(){ if(imgRes!=='thumbnail'){ var sbi_photo_width=$self.find('.sbi_photo').eq(0).innerWidth(); var sbi_num_cols=parseInt(cols); if(!$self.hasClass('sbi_disable_mobile')){ var sbiWindowWidth=jQuery(window).width(); if(sbiWindowWidth < 640&&(parseInt(cols) > 2&&parseInt(cols) < 7)) sbi_num_cols=2; if(sbiWindowWidth < 640&&(parseInt(cols) > 6&&parseInt(cols) < 11)) sbi_num_cols=4; if(sbiWindowWidth <=480&&parseInt(cols) > 2) sbi_num_cols=1; } var sbi_photo_width_manual=($self.find('#sbi_images').width() / sbi_num_cols) - (imagepadding*2); if(sbi_photo_width <=(sbi_photo_width_manual)) sbi_photo_width=sbi_photo_width_manual; $self.find('.sbi_photo').css('height', sbi_photo_width); }} if(carousel==false) sbiSetPhotoHeight(); !function(i){var n={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},c={};c.sbiCheckVisibility=function(i,n){if(jQuery.contains(document,i[0])){var e=n.sbiPreviousVisibility,t=i.is(":visible");n.sbiPreviousVisibility=t,null==e?n.runOnLoad&&n.callback(i,t):e!==t&&n.callback(i,t),setTimeout(function(){c.sbiCheckVisibility(i,n)},n.frequency)}},i.fn.sbiVisibilityChanged=function(e){var t=i.extend({},n,e);return this.each(function(){c.sbiCheckVisibility(i(this),t)})}}(jQuery); jQuery(".sbi").filter(':hidden').sbiVisibilityChanged({ callback: function(element, visible){ sbiSetPhotoHeight(); sbiGetItemSize(); }, runOnLoad: false }); if(carousel==true){ setTimeout(function(){ if(!carouselautoplay) carouseltime=false; var itemsDesktop=false, itemsDesktopSmall=false, itemsTablet=false, itemsTabletSmall=false, itemsMobile=false; if(!$self.hasClass('sbi_disable_mobile')){ var sbiWindowWidth=jQuery(window).width(); if(sbiWindowWidth < 640&&(parseInt(cols) > 2&&parseInt(cols) < 7)) itemsTabletSmall=[639,2]; if(sbiWindowWidth < 640&&(parseInt(cols) > 6&&parseInt(cols) < 11)) itemsTabletSmall=[639,4]; if(sbiWindowWidth <=480&&parseInt(cols)!=2) itemsMobile=[480,1]; if(sbiWindowWidth <=480&&parseInt(cols)==2) itemsMobile=[480,2]; } $self.find(".sbi_carousel").sbi_owlCarousel({ items: cols, navigation: carouselarrows, navigationText: ['',''], pagination: carouselpag, autoPlay: carouseltime, stopOnHover: true, itemsDesktop: itemsDesktop, itemsDesktopSmall: itemsDesktopSmall, itemsTablet: itemsTablet, itemsTabletSmall: itemsTabletSmall, itemsMobile: itemsMobile }); jQuery('#sb_instagram #sbi_images.sbi_carousel .sbi_item').fadeIn(); sbiSetPhotoHeight(); sbiGetItemSize(); var sbi_arrows_top=($self.find('.sbi_photo').eq(0).innerWidth()/2); if(imagepaddingunit=='px') sbi_arrows_top +=parseInt(imagepadding)*2; $self.find('.sbi_owl-buttons div').css('top', sbi_arrows_top); }, 500); } function sbiGetItemSize(){ $self.removeClass('sbi_small sbi_medium'); var sbiItemWidth=$self.find('.sbi_item').innerWidth(); if(sbiItemWidth > 120&&sbiItemWidth < 240){ $self.addClass('sbi_medium'); }else if(sbiItemWidth <=120){ $self.addClass('sbi_small'); }} if(carousel!==true) sbiGetItemSize(); if(!feedOptions.disablecache&&typeof _cache!=='undefined'&&window.sbiCacheStatuses[feedOptions.feedIndex].feed==='fetched'){ _cache(imagesArr,transientName); window.sbiCacheStatuses[feedOptions.feedIndex].feed='cached'; } photosAvailable='finished'; }} function commaSeparateNumber(val){ while (/(\d+)(\d{3})/.test(val.toString())){ val=val.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); } return val; } function sbiBuildHeader(data, sbiSettings){ var feedOptions=sbiSettings.feedOptions, headerStyles=''; if(feedOptions.headercolor.length) headerStyles='style="color: #'+feedOptions.headercolor+'"'; $header=''; $header +='
    '; $header +='

    '+data.data.username+'

    '; var $headerInfo='

    '+commaSeparateNumber(data.data.counts.followed_by)+'

    '; if(feedOptions.showfollowers!=''&&feedOptions.showfollowers!='false'&&feedOptions.headerstyle!=='boxed') $header +=$headerInfo; if(typeof data.data.bio!=='undefined'&&data.data.bio.length > 1&&feedOptions.showbio!=''&&feedOptions.showbio!='false') $header +='

    '+data.data.bio+'

    '; $header +='
    '; $header +='
    '; $header +='
    '; $header +=''+data.data.full_name+''; $header +='
    '; $header +='
    '; if(feedOptions.headerstyle=='boxed'){ $header +='
    '; if(feedOptions.showbio!='false') $header +=$headerInfo; $header +='
    '; } if($self.find('.sbi_header_link').length==0) $self.find('.sb_instagram_header').prepend($header); if($self.find('.sbi_follow_btn').length) $self.find('.sbi_follow_btn a').attr('href', 'https://instagram.com/' + data.data.username); if(feedOptions.headerstyle=='boxed'&&$self.find('.sbi_header_follow_btn').length) $self.find('.sbi_header_follow_btn span').text($self.find('.sb_instagram_header').attr('data-follow-text').replace(/\\/g, "")); $self.find('.sb_instagram_header .sbi_header_link').hover(function(){ $self.find('.sb_instagram_header .sbi_header_img_hover').fadeIn(200); }, function(){ $self.find('.sb_instagram_header .sbi_header_img_hover').stop().fadeOut(600); }); } function sbiFetchData(next_url, transientName, sbiSettings, $self){ apiURLs=next_url; var urlCount=apiURLs.length, getType=sbiSettings.getType; if(urlCount==0){ if(imagesArrCount + parseInt(sbiSettings.num) >=imagesArr.data.length){ jQuery('#sbi_load .sbi_load_btn').hide(); }}else{ var returnedImages=[], numberOfRequests=urlCount; jQuery.each(apiURLs, function(index, entry){ jQuery.ajax({ method: "GET", url: entry, dataType: "jsonp", success: function(data){ var sbiErrorResponse=data.meta.error_message, sbiErrorMsg='', sbiErrorDir=''; if(typeof sbiErrorResponse!=='undefined'){ if(sbiErrorResponse.indexOf('access_token') > -1){ sbiErrorMsg +='

    Error: Access Token is not valid or has expired
    This error message is only visible to WordPress admins'; sbiErrorDir="

    There's an issue with the Instagram Access Token that you are using. Please obtain a new Access Token on the plugin's Settings page.
    If you continue to have an issue with your Access Token then please see
    this FAQ for more information."; }else if(sbiErrorResponse.indexOf('user does not exist') > -1||sbiErrorResponse.indexOf('you cannot view this resource') > -1){ sbiErrorMsg +='

    Error: User IDs does not exist, is invalid, or private
    This error is only visible to WordPress admins'; sbiErrorDir="

    Please double check the Instagram User ID that you are using and ensure that it is valid and not from a private account. To find your User ID simply enter your Instagram user name into this tool.

    "; }else if(sbiErrorResponse.indexOf('invalid media id') > -1){ sbiErrorMsg +='

    Error: Post Id does not exist or is invalid
    This error is only visible to WordPress admins.'; sbiErrorDir="

    Please double check the media (post) id is correct.

    "; } jQuery('#sb_instagram').empty().append('

    Unable to show Instagram photos

    ' + sbiErrorMsg + sbiErrorDir + '
    '); return; } if(getType=='coordinates') data.pagination={'previous_url':entry}; returnedImages.push(data); numberOfRequests--; if(numberOfRequests==0&&photosAvailable!=='finished') sbiImagesReady(getType); }}) }); function sbiImagesReady(getType){ var paginationArr=[], returnedImagesArr=[]; jQuery.each(returnedImages, function(index, object){ if(getType=='single'){ object.data=[ object.data ] ; } if(typeof object.data!=='undefined'){ jQuery.each(object.data, function(index, image){ if(jQuery.inArray(image.id, photoIds) > -1){ }else{ photoIds.push(image.id); returnedImagesArr.push(image); }}); if(getType=='coordinates'){ var lastCreatedTime=object.data[ object.data.length - 1 ].created_time, existing_url=object.pagination.previous_url, existing_url_parts=existing_url.split('max_timestamp='), new_url=existing_url_parts[0] + 'max_timestamp=' + lastCreatedTime; paginationArr.push(new_url); }else{ if(typeof object.pagination!=='undefined'&&typeof object.pagination.next_url!=='undefined') paginationArr.push(object.pagination.next_url); }} }); if(sortby!=='random'){ returnedImagesArr.sort(function(x, y){ return y.created_time - x.created_time; }); }else{ returnedImagesArr.sort(function (a, b){ return (Math.round(Math.random())-0.5); }); transientName +='!'; } returnedImages[0].data=returnedImagesArr; if(typeof returnedImages[0].pagination!=='undefined'){ returnedImages[0].pagination.next_url=paginationArr; }else{ returnedImages[0].pagination={ "next_url":"" };} var allImages=returnedImages[0]; if(photosAvailable!=='finished') sbiBuildFeed(allImages, transientName, sbiSettings, $self); apiRequests++; }} } function sbiGetCache(transientName, sbiSettings, $self, cacheWhat, apiURLs){ var transientData=transientName; window.sbiCommentCacheStatus=0; if(typeof transientName==='object'){ transientData=JSON.stringify(transientName); } var getCacheOpts={ url: sbiajaxurl, type: 'POST', async: true, cache: false, data:{ action: 'get_cache', transientName: transientData }, success: function(data){ data=decodeURI(data); data=data.replace(/\\'/g, "'"); data=data.replace(/\\'/g, "'"); var jsonobj=JSON.parse(data); if(cacheWhat=='all'){ if(typeof jsonobj.header.error==='undefined'){ sbiBuildHeader(jsonobj.header, sbiSettings); } if(typeof jsonobj.feed.error==='undefined'){ if(photosAvailable!=='finished') sbiBuildFeed(jsonobj.feed, transientName, sbiSettings, $self); }else{ feedOptions=JSON.parse($self[0].getAttribute('data-options')); var thisIndex=$self[0].getAttribute('data-sbi-index'); feedOptions.feedIndex=thisIndex; if(window.sbiCacheStatuses[thisIndex].feed!==false&&jsonobj.feed.error==='tryfetch'){ window.sbiCacheStatuses[thisIndex].feed=false; window.sbiCacheStatuses[thisIndex].comments='no'; feedOptions.tryFetch=true; if(typeof window.sbiCacheStatuses[feedOptions.feedIndex].tryFetch==='undefined') sbiCreateFeed($self[0], feedOptions); }else if(window.sbiCacheStatuses[thisIndex].feed===true){ var sbiErrorMsg='

    Cache Error: Looking for cache that doesn\'t exist
    This error is only visible to WordPress admins.'; var sbiErrorDir="

    If you are using a caching plugin, try enabling the option on the Customize tab 'Cache error API recheck' or 'Force cache to clear on interval'

    "; jQuery('#sb_instagram').empty().append('

    Unable to show Instagram photos

    ' + sbiErrorMsg + sbiErrorDir + '
    '); }} if(typeof jsonobj.comments.error==='undefined'){ sb_instagram_js_options.sbiPageCommentCache=jsonobj.comments; }}else{ if(cacheWhat=='header'){ sbiBuildHeader(jsonobj, sbiSettings); }else{ if(photosAvailable!=='finished') sbiBuildFeed(jsonobj, transientName, sbiSettings, $self); }} }, error: function(xhr,textStatus,e){ console.log(e); return; }}; jQuery.ajax(getCacheOpts); }} }); }} function sbiCachePhotos(images, transientName){ var jsonstring=JSON.stringify(images); jsonstring=encodeURI(jsonstring); if(jsonstring.indexOf('%7B%22')===0){ var setCacheOpts={ url: sbiajaxurl, type: 'POST', async: true, cache: false, data:{ action: 'cache_photos', photos: jsonstring, transientName: transientName }, success: function(response){ return; }, error: function(xhr,textStatus,e){ console.log(e); return; }}; jQuery.ajax(setCacheOpts); }} function sbi_cache_all(imagesArr,transientName){ if(transientName.indexOf('header')&&typeof imagesArr.data.pagination==='undefined'){ sbiCachePhotos(imagesArr,transientName); }else if(!transientName.indexOf('header')&&typeof imagesArr.data.pagination!=='undefined'){ sbiCachePhotos(imagesArr,transientName); }} jQuery(document).ready(function(){ window.sbiCommentCacheStatus=0; sbi_init(function(imagesArr,transientName){ sbi_cache_all(imagesArr,transientName); }); }); };