/* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ // t: current time, b: begInnIng value, c: change In value, d: duration jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend( jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { //alert(jQuery.easing.default); return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, easeOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }, easeInOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; } }); /* * * TERMS OF USE - EASING EQUATIONS * * Open source under the BSD License. * * Copyright © 2001 Robert Penner * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(e){mejs.YouTubeApi.flashReady(e)}!function(e){var t=new Array,i=new Array,o=function(){},n=0,s={splashVPos:"35%",loaderVPos:"75%",splashID:"#jpreContent",showSplash:!0,showPercentage:!0,autoClose:!0,closeBtnText:"Start!",onetimeLoad:!1,debugMode:!1,splashFunction:function(){}},r=function(){if(s.onetimeLoad){for(var e,t=document.cookie.split("; "),i=0;e=t[i]&&t[i].split("=");i++)if("jpreLoader"===e.shift())return e.join("=");return!1}return!1},a=function(e){if(s.onetimeLoad){var t=new Date;t.setDate(t.getDate()+e);var i=null==e?"":"expires="+t.toUTCString();document.cookie="jpreLoader=loaded; "+i}},l=function(){if(jOverlay=e("
").attr("id","jpreOverlay").css({position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:9999999}).appendTo("body"),s.showSplash){jContent=e("
").attr("id","jpreSlide").appendTo(jOverlay);var t=e(window).width()-e(jContent).width();e(jContent).css({position:"absolute",top:s.splashVPos,left:Math.round(50/e(window).width()*t)+"%"}),e(jContent).html(e(s.splashID).wrap("
").parent().html()),e(s.splashID).remove(),s.splashFunction()}jLoader=e("
").attr("id","jpreLoader").appendTo(jOverlay);var i=e(window).width()-e(jLoader).width();e(jLoader).css({position:"absolute",top:s.loaderVPos,left:Math.round(50/e(window).width()*i)+"%"}),jBar=e("
").attr("id","jpreBar").css({width:"0%",height:"100%"}).appendTo(jLoader),s.showPercentage&&(jPer=e("
").attr("id","jprePercentage").css({position:"relative",height:"100%"}).appendTo(jLoader).html("Loading...")),s.autoclose||(jButton=e("
").attr("id","jpreButton").on("click",function(){m()}).css({position:"relative",height:"100%"}).appendTo(jLoader).text(s.closeBtnText).hide())},d=function(i){e(i).find("*:not(script)").each(function(){var i="";if(-1==e(this).css("background-image").indexOf("none")&&-1==e(this).css("background-image").indexOf("-gradient")){if(i=e(this).css("background-image"),-1!=i.indexOf("url")){var o=i.match(/url\((.*?)\)/);i=o[1].replace(/\"/g,"")}}else"img"==e(this).get(0).nodeName.toLowerCase()&&"undefined"!=typeof e(this).attr("src")&&(i=e(this).attr("src"));i.length>0&&t.push(i)})},c=function(){for(var e=0;e=t.length){if(n=t.length,a(),s.showPercentage&&e(jPer).text("100%"),s.debugMode){p()}e(jBar).stop().animate({width:"100%"},500,"linear",function(){s.autoClose?m():e(jButton).fadeIn(1e3)})}},m=function(){e(jOverlay).fadeOut(800,function(){e(jOverlay).remove(),o()})},p=function(){if(i.length>0){var e="ERROR - IMAGE FILES MISSING!!!\n\r";e+=i.length+" image files cound not be found. \n\r",e+="Please check your image paths and filenames:\n\r";for(var t=0;t=0?"state-success":"state-error";classie.add(t.button,n),setTimeout(function(){classie.remove(t.button,n),t._enable()},t.options.statusTime)}else t._enable();classie.remove(t.button,"state-loading")},100)},i.prototype._enable=function(){this.button.removeAttribute("disabled")},e.ProgressButton=i}(window),function(e){var t,i,o,n,s,r,a,l="Close",d="BeforeClose",c="AfterClose",u="BeforeAppend",h="MarkupParse",m="Open",p="Change",f="mfp",g="."+f,v="mfp-ready",y="mfp-removing",w="mfp-prevent-close",b=function(){},x=!!window.jQuery,T=e(window),S=function(e,i){t.ev.on(f+e+g,i)},C=function(t,i,o,n){var s=document.createElement("div");return s.className="mfp-"+t,o&&(s.innerHTML=o),n?i&&i.appendChild(s):(s=e(s),i&&s.appendTo(i)),s},j=function(i,o){t.ev.triggerHandler(f+i,o),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(o)?o:[o]))},k=function(i){return i===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=i),t.currTemplate.closeBtn},M=function(){e.magnificPopup.instance||(t=new b,t.init(),e.magnificPopup.instance=t)},E=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};b.prototype={constructor:b,init:function(){var i=navigator.appVersion;t.isIE7=-1!==i.indexOf("MSIE 7."),t.isIE8=-1!==i.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=E(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document.body),n=e(document),t.popupsCache={}},open:function(i){var o;if(i.isObj===!1){t.items=i.items.toArray(),t.index=0;var s,a=i.items;for(o=0;a.length>o;o++)if(s=a[o],s.parsed&&(s=s.el[0]),s===i.el[0]){t.index=o;break}}else t.items=e.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(t.isOpen)return void t.updateItemHTML();t.types=[],r="",t.ev=i.mainEl&&i.mainEl.length?i.mainEl.eq(0):n,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=C("bg").on("click"+g,function(){t.close()}),t.wrap=C("wrap").attr("tabindex",-1).on("click"+g,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=C("container",t.wrap)),t.contentContainer=C("content"),t.st.preloader&&(t.preloader=C("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;l.length>o;o++){var d=l[o];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}j("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(S(h,function(e,t,i,o){i.close_replaceWith=k(o.type)}),r+=" mfp-close-btn-in"):t.wrap.append(k())),t.st.alignTop&&(r+=" mfp-align-top"),t.wrap.css(t.fixedContentPos?{overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}:{top:T.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:n.height(),position:"absolute"}),t.st.enableEscapeKey&&n.on("keyup"+g,function(e){27===e.keyCode&&t.close()}),T.on("resize"+g,function(){t.updateSize()}),t.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&t.wrap.addClass(r);var c=t.wH=T.height(),u={};if(t.fixedContentPos&&t._hasScrollBar(c)){var p=t._getScrollbarSize();p&&(u.marginRight=p)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):u.overflow="hidden");var f=t.st.mainClass;return t.isIE7&&(f+=" mfp-ie7"),f&&t._addClassToMFP(f),t.updateItemHTML(),j("BuildControls"),e("html").css(u),t.bgOverlay.add(t.wrap).prependTo(document.body),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),n.on("focusin"+g,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(c),j(m),i},close:function(){t.isOpen&&(j(d),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(y),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){j(l);var i=y+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}n.off("keyup"+g+" focusin"+g),t.ev.off(g),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,j(c)},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,o=window.innerHeight*i;t.wrap.css("height",o),t.wH=o}else t.wH=e||T.height();t.fixedContentPos||t.wrap.css("height",t.wH),j("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var o=i.type;if(j("BeforeChange",[t.currItem?t.currItem.type:"",o]),t.currItem=i,!t.currTemplate[o]){var n=t.st[o]?t.st[o].markup:!1;j("FirstMarkupParse",n),t.currTemplate[o]=n?e(n):!0}s&&s!==i.type&&t.container.removeClass("mfp-"+s+"-holder");var r=t["get"+o.charAt(0).toUpperCase()+o.slice(1)](i,t.currTemplate[o]);t.appendContent(r,o),i.preloaded=!0,j(p,i),s=i.type,t.container.prepend(t.contentContainer),j("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[i]===!0?t.content.find(".mfp-close").length||t.content.append(k()):t.content=e:t.content="",j(u),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var o=t.items[i],n=o.type;if(o=o.tagName?{el:e(o)}:{data:o,src:o.src},o.el){for(var s=t.types,r=0;s.length>r;r++)if(o.el.hasClass("mfp-"+s[r])){n=s[r];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=n||t.st.type||"inline",o.index=i,o.parsed=!0,t.items[i]=o,j("ElementParse",o),t.items[i]},addGroup:function(e,i){var o=function(o){o.mfpEl=this,t._openClick(o,e,i)};i||(i={});var n="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(n).on(n,o)):(i.isObj=!1,i.delegate?e.off(n).on(n,i.delegate,o):(i.items=e,e.off(n).on(n,o)))},_openClick:function(i,o,n){var s=void 0!==n.midClick?n.midClick:e.magnificPopup.defaults.midClick;if(s||2!==i.which&&!i.ctrlKey&&!i.metaKey){var r=void 0!==n.disableOn?n.disableOn:e.magnificPopup.defaults.disableOn;if(r)if(e.isFunction(r)){if(!r.call(t))return!0}else if(r>T.width())return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),n.el=e(i.mfpEl),n.delegate&&(n.items=o.find(n.delegate)),t.open(n)}},updateStatus:function(e,o){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),o||"loading"!==e||(o=t.st.tLoading);var n={status:e,text:o};j("UpdateStatus",n),e=n.status,o=n.text,t.preloader.html(o),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),i=e}},_checkIfClose:function(i){if(!e(i).hasClass(w)){var o=t.st.closeOnContentClick,n=t.st.closeOnBgClick;if(o&&n)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(o)return!0}else if(n&&e.contains(document,i))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?n.height():document.body.scrollHeight)>(e||T.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){return i.target===t.wrap[0]||e.contains(t.wrap[0],i.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,i,o){var n;o.data&&(i=e.extend(o.data,i)),j(h,[t,i,o]),e.each(i,function(e,i){if(void 0===i||i===!1)return!0;if(n=e.split("_"),n.length>1){var o=t.find(g+"-"+n[0]);if(o.length>0){var s=n[1];"replaceWith"===s?o[0]!==i[0]&&o.replaceWith(i):"img"===s?o.is("img")?o.attr("src",i):o.replaceWith(''):o.attr(n[1],i)}}else t.find(g+"-"+e).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:b.prototype,modules:[],open:function(t,i){return M(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(i){M();var o=e(this);if("string"==typeof i)if("open"===i){var n,s=x?o.data("magnificPopup"):o[0].magnificPopup,r=parseInt(arguments[1],10)||0;s.items?n=s.items[r]:(n=o,s.delegate&&(n=n.find(s.delegate)),n=n.eq(r)),t._openClick({mfpEl:n},o,s)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),x?o.data("magnificPopup",i):o[0].magnificPopup=i,t.addGroup(o,i);return o};var P,z,F,A="inline",I=function(){F&&(z.after(F.addClass(P)).detach(),F=null)};e.magnificPopup.registerModule(A,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(A),S(l+"."+A,function(){I()})},getInline:function(i,o){if(I(),i.src){var n=t.st.inline,s=e(i.src);if(s.length){var r=s[0].parentNode;r&&r.tagName&&(z||(P=n.hiddenClass,z=C(P),P="mfp-"+P),F=s.after(z).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",n.tNotFound),s=e("
");return i.inlineElement=s,s}return t.updateStatus("ready"),t._parseMarkup(o,{},i),o}}});var L,_="ajax",B=function(){L&&o.removeClass(L)},N=function(){B(),t.req&&t.req.abort()};e.magnificPopup.registerModule(_,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){t.types.push(_),L=t.st.ajax.cursor,S(l+"."+_,N),S("BeforeChange."+_,N)},getAjax:function(i){L&&o.addClass(L),t.updateStatus("loading");var n=e.extend({url:i.src,success:function(o,n,s){var r={data:o,xhr:s};j("ParseAjax",r),t.appendContent(e(r.data),_),i.finished=!0,B(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),j("AjaxContentAdded")},error:function(){B(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(n),""}}});var H,$=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var o=t.st.image.titleSrc;if(o){if(e.isFunction(o))return o.call(t,i);if(i.el)return i.el.attr(o)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=t.st.image,i=".image";t.types.push("image"),S(m+i,function(){"image"===t.currItem.type&&e.cursor&&o.addClass(e.cursor)}),S(l+i,function(){e.cursor&&o.removeClass(e.cursor),T.off("resize"+g)}),S("Resize"+i,t.resizeImage),t.isLowIE&&S("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,H&&clearInterval(H),e.isCheckingImgSize=!1,j("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,o=e.img[0],n=function(s){H&&clearInterval(H),H=setInterval(function(){return o.naturalWidth>0?void t._onImageHasSize(e):(i>200&&clearInterval(H),i++,void(3===i?n(10):40===i?n(50):100===i&&n(500)))},s)};n(1)},getImage:function(i,o){var n=0,s=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,j("ImageLoadComplete")):(n++,200>n?setTimeout(s,100):r()))},r=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",a.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},a=t.st.image,l=o.find(".mfp-img");if(l.length){var d=document.createElement("img");d.className="mfp-img",i.img=e(d).on("load.mfploader",s).on("error.mfploader",r),d.src=i.src,l.is("img")&&(i.img=i.img.clone()),i.img[0].naturalWidth>0&&(i.hasSize=!0)}return t._parseMarkup(o,{title:$(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(H&&clearInterval(H),i.loadError?(o.addClass("mfp-loading"),t.updateStatus("error",a.tError.replace("%url%",i.src))):(o.removeClass("mfp-loading"),t.updateStatus("ready")),o):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,o.addClass("mfp-loading"),t.findImageSize(i)),o)}}});var O,R=function(){return void 0===O&&(O=void 0!==document.createElement("p").style.MozTransform),O};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,i=t.st.zoom,o=".zoom";if(i.enabled&&t.supportsTransition){var n,s,r=i.duration,a=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),o="all "+i.duration/1e3+"s "+i.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},s="transition";return n["-webkit-"+s]=n["-moz-"+s]=n["-o-"+s]=n[s]=o,t.css(n),t},c=function(){t.content.css("visibility","visible")};S("BuildControls"+o,function(){if(t._allowZoom()){if(clearTimeout(n),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void c();s=a(e),s.css(t._getOffset()),t.wrap.append(s),n=setTimeout(function(){s.css(t._getOffset(!0)),n=setTimeout(function(){c(),setTimeout(function(){s.remove(),e=s=null,j("ZoomAnimationEnded")},16)},r)},16)}}),S(d+o,function(){if(t._allowZoom()){if(clearTimeout(n),t.st.removalDelay=r,!e){if(e=t._getItemToZoom(),!e)return;s=a(e)}s.css(t._getOffset(!0)),t.wrap.append(s),t.content.css("visibility","hidden"),setTimeout(function(){s.css(t._getOffset())},16)}}),S(l+o,function(){t._allowZoom()&&(c(),s&&s.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var o;o=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var n=o.offset(),s=parseInt(o.css("padding-top"),10),r=parseInt(o.css("padding-bottom"),10);n.top-=e(window).scrollTop()-s;var a={width:o.width(),height:(x?o.innerHeight():o[0].offsetHeight)-r-s};return R()?a["-moz-transform"]=a.transform="translate("+n.left+"px,"+n.top+"px)":(a.left=n.left,a.top=n.top),a}}});var D="iframe",W="//about:blank",V=function(e){if(t.currTemplate[D]){var i=t.currTemplate[D].find("iframe");i.length&&(e||(i[0].src=W),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(D,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(D),S("BeforeChange",function(e,t,i){t!==i&&(t===D?V():i===D&&V(!0))}),S(l+"."+D,function(){V()})},getIframe:function(i,o){var n=i.src,s=t.st.iframe;e.each(s.patterns,function(){return n.indexOf(this.index)>-1?(this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1):void 0});var r={};return s.srcAction&&(r[s.srcAction]=n),t._parseMarkup(o,r,i),t.updateStatus("ready"),o}}});var U=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},q=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,o=".mfp-gallery",s=Boolean(e.fn.mfpFastClick);return t.direction=!0,i&&i.enabled?(r+=" mfp-gallery",S(m+o,function(){i.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),n.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),S("UpdateStatus"+o,function(e,i){i.text&&(i.text=q(i.text,t.currItem.index,t.items.length))}),S(h+o,function(e,o,n,s){var r=t.items.length;n.counter=r>1?q(i.tCounter,s.index,r):""}),S("BuildControls"+o,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var o=i.arrowMarkup,n=t.arrowLeft=e(o.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(w),r=t.arrowRight=e(o.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(w),a=s?"mfpFastClick":"click";n[a](function(){t.prev()}),r[a](function(){t.next()}),t.isIE7&&(C("b",n[0],!1,!0),C("a",n[0],!1,!0),C("b",r[0],!1,!0),C("a",r[0],!1,!0)),t.container.append(n.add(r))}}),S(p+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void S(l+o,function(){n.off(o),t.wrap.off("click"+o),t.arrowLeft&&s&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=U(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=U(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,o=Math.min(i[0],t.items.length),n=Math.min(i[1],t.items.length);for(e=1;(t.direction?n:o)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?o:n)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=U(i),!t.items[i].preloaded){var o=t.items[i];o.parsed||(o=t.parseEl(i)),j("LazyLoad",o),"image"===o.type&&(o.img=e('').on("load.mfploader",function(){o.hasSize=!0}).on("error.mfploader",function(){o.hasSize=!0,o.loadError=!0,j("LazyLoadError",o)}).attr("src",o.src)),o.preloaded=!0}}}});var Y="retina";e.magnificPopup.registerModule(Y,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;i=isNaN(i)?i():i,i>1&&(S("ImageHasSize."+Y,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),S("ElementParse."+Y,function(t,o){o.src=e.replaceSrc(o,i)}))}}}}),function(){var t=1e3,i="ontouchstart"in window,o=function(){T.off("touchmove"+s+" touchend"+s)},n="mfpFastClick",s="."+n;e.fn.mfpFastClick=function(n){return e(this).each(function(){var r,a=e(this);if(i){var l,d,c,u,h,m;a.on("touchstart"+s,function(e){u=!1,m=1,h=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],d=h.clientX,c=h.clientY,T.on("touchmove"+s,function(e){h=e.originalEvent?e.originalEvent.touches:e.touches,m=h.length,h=h[0],(Math.abs(h.clientX-d)>10||Math.abs(h.clientY-c)>10)&&(u=!0,o())}).on("touchend"+s,function(e){o(),u||m>1||(r=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){r=!1},t),n())})})}a.on("click"+s,function(){r||n()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+s+" click"+s),i&&T.off("touchmove"+s+" touchend"+s)}}(),M()}(window.jQuery||window.Zepto),function(e,t){"use strict";var i,o=e.document,n=e.Modernizr,s=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},r="Moz Webkit O Ms".split(" "),a=function(e){var t,i=o.documentElement.style;if("string"==typeof i[e])return e;e=s(e);for(var n=0,a=r.length;a>n;n++)if(t=r[n]+e,"string"==typeof i[t])return t},l=a("transform"),d=a("transitionProperty"),c={csstransforms:function(){return!!l},csstransforms3d:function(){var e=!!a("perspective");if(e){var i=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),o="@media ("+i.join("transform-3d),(")+"modernizr)",n=t("").appendTo("head"),s=t('
').appendTo("html");e=3===s.height(),s.remove(),n.remove()}return e},csstransitions:function(){return!!d}};if(n)for(i in c)n.hasOwnProperty(i)||n.addTest(i,c[i]);else{n=e.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var u,h=" ";for(i in c)u=c[i](),n[i]=u,h+=" "+(u?"":"no-")+i;t("html").addClass(h)}if(n.csstransforms){var m=n.csstransforms3d?{translate:function(e){return"translate3d("+e[0]+"px, "+e[1]+"px, 0) "},scale:function(e){return"scale3d("+e+", "+e+", 1) "}}:{translate:function(e){return"translate("+e[0]+"px, "+e[1]+"px) "},scale:function(e){return"scale("+e+") "}},p=function(e,i,o){var n,s,r=t.data(e,"isoTransform")||{},a={},d={};a[i]=o,t.extend(r,a);for(n in r)s=r[n],d[n]=m[n](s);var c=d.translate||"",u=d.scale||"",h=c+u;t.data(e,"isoTransform",r),e.style[l]=h};t.cssNumber.scale=!0,t.cssHooks.scale={set:function(e,t){p(e,"scale",t)},get:function(e){var i=t.data(e,"isoTransform");return i&&i.scale?i.scale:1}},t.fx.step.scale=function(e){t.cssHooks.scale.set(e.elem,e.now+e.unit)},t.cssNumber.translate=!0,t.cssHooks.translate={set:function(e,t){p(e,"translate",t)},get:function(e){var i=t.data(e,"isoTransform");return i&&i.translate?i.translate:[0,0]}}}var f,g;n.csstransitions&&(f={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[d],g=a("transitionDuration"));var v,y=t.event,w=t.event.handle?"handle":"dispatch";y.special.smartresize={setup:function(){t(this).bind("resize",y.special.smartresize.handler)},teardown:function(){t(this).unbind("resize",y.special.smartresize.handler)},handler:function(e,t){var i=this,o=arguments;e.type="smartresize",v&&clearTimeout(v),v=setTimeout(function(){y[w].apply(i,o)},"execAsap"===t?0:100)}},t.fn.smartresize=function(e){return e?this.bind("smartresize",e):this.trigger("smartresize",["execAsap"])},t.Isotope=function(e,i,o){this.element=t(i),this._create(e),this._init(o)};var b=["width","height"],x=t(e);t.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},t.Isotope.prototype={_create:function(e){this.options=t.extend({},t.Isotope.settings,e),this.styleQueue=[],this.elemCount=0;var i=this.element[0].style;this.originalStyle={};var o=b.slice(0);for(var n in this.options.containerStyle)o.push(n);for(var s=0,r=o.length;r>s;s++)n=o[s],this.originalStyle[n]=i[n]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var a={"original-order":function(e,t){return t.elemCount++,t.elemCount},random:function(){return Math.random()}};this.options.getSortData=t.extend(this.options.getSortData,a),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var l=this;setTimeout(function(){l.element.addClass(l.options.containerClass)},0),this.options.resizable&&x.bind("smartresize.isotope",function(){l.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(e){var t=this.options.itemSelector,i=t?e.filter(t).add(e.find(t)):e,o={position:"absolute"};return i=i.filter(function(e,t){return 1===t.nodeType}),this.usingTransforms&&(o.left=0,o.top=0),i.css(o).addClass(this.options.itemClass),this.updateSortData(i,!0),i },_init:function(e){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(e)},option:function(e){if(t.isPlainObject(e)){this.options=t.extend(!0,this.options,e);var i;for(var o in e)i="_update"+s(o),this[i]&&this[i]()}},_updateAnimationEngine:function(){var e,t=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,"");switch(t){case"css":case"none":e=!1;break;case"jquery":e=!0;break;default:e=!n.csstransitions}this.isUsingJQueryAnimation=e,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var e=this.usingTransforms=this.options.transformsEnabled&&n.csstransforms&&n.csstransitions&&!this.isUsingJQueryAnimation;e||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=e?this._translate:this._positionAbs},_filter:function(e){var t=""===this.options.filter?"*":this.options.filter;if(!t)return e;var i=this.options.hiddenClass,o="."+i,n=e.filter(o),s=n;if("*"!==t){s=n.filter(t);var r=e.not(o).not(t).addClass(i);this.styleQueue.push({$el:r,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:s,style:this.options.visibleStyle}),s.removeClass(i),e.filter(t)},updateSortData:function(e,i){var o,n,s=this,r=this.options.getSortData;e.each(function(){o=t(this),n={};for(var e in r)n[e]=i||"original-order"!==e?r[e](o,s):t.data(this,"isotope-sort-data")[e];t.data(this,"isotope-sort-data",n)})},_sort:function(){var e=this.options.sortBy,t=this._getSorter,i=this.options.sortAscending?1:-1,o=function(o,n){var s=t(o,e),r=t(n,e);return s===r&&"original-order"!==e&&(s=t(o,"original-order"),r=t(n,"original-order")),(s>r?1:r>s?-1:0)*i};this.$filteredAtoms.sort(o)},_getSorter:function(e,i){return t.data(e,"isotope-sort-data")[i]},_translate:function(e,t){return{translate:[e,t]}},_positionAbs:function(e,t){return{left:e,top:t}},_pushPosition:function(e,t,i){t=Math.round(t+this.offset.left),i=Math.round(i+this.offset.top);var o=this.getPositionStyles(t,i);this.styleQueue.push({$el:e,style:o}),this.options.itemPositionDataEnabled&&e.data("isotope-item-position",{x:t,y:i})},layout:function(e,t){var i=this.options.layoutMode;if(this["_"+i+"Layout"](e),this.options.resizesContainer){var o=this["_"+i+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:o})}this._processStyleQueue(e,t),this.isLaidOut=!0},_processStyleQueue:function(e,i){var o,s,r,a,l=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",d=this.options.animationOptions,c=this.options.onLayout;if(s=function(e,t){t.$el[l](t.style,d)},this._isInserting&&this.isUsingJQueryAnimation)s=function(e,t){o=t.$el.hasClass("no-transition")?"css":l,t.$el[o](t.style,d)};else if(i||c||d.complete){var u=!1,h=[i,c,d.complete],m=this;if(r=!0,a=function(){if(!u){for(var t,i=0,o=h.length;o>i;i++)t=h[i],"function"==typeof t&&t.call(m.element,e,m);u=!0}},this.isUsingJQueryAnimation&&"animate"===l)d.complete=a,r=!1;else if(n.csstransitions){for(var p,v=0,y=this.styleQueue[0],w=y&&y.$el;!w||!w.length;){if(p=this.styleQueue[v++],!p)return;w=p.$el}var b=parseFloat(getComputedStyle(w[0])[g]);b>0&&(s=function(e,t){t.$el[l](t.style,d).one(f,a)},r=!1)}}t.each(this.styleQueue,s),r&&a(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(e){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,e)},addItems:function(e,t){var i=this._getAtoms(e);this.$allAtoms=this.$allAtoms.add(i),t&&t(i)},insert:function(e,t){this.element.append(e);var i=this;this.addItems(e,function(e){var o=i._filter(e);i._addHideAppended(o),i._sort(),i.reLayout(),i._revealAppended(o,t)})},appended:function(e,t){var i=this;this.addItems(e,function(e){i._addHideAppended(e),i.layout(e),i._revealAppended(e,t)})},_addHideAppended:function(e){this.$filteredAtoms=this.$filteredAtoms.add(e),e.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:e,style:this.options.hiddenStyle})},_revealAppended:function(e,t){var i=this;setTimeout(function(){e.removeClass("no-transition"),i.styleQueue.push({$el:e,style:i.options.visibleStyle}),i._isInserting=!1,i._processStyleQueue(e,t)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(e,t){this.$allAtoms=this.$allAtoms.not(e),this.$filteredAtoms=this.$filteredAtoms.not(e);var i=this,o=function(){e.remove(),t&&t.call(i.element)};e.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:e,style:this.options.hiddenStyle}),this._sort(),this.reLayout(o)):o()},shuffle:function(e){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(e)},destroy:function(){var e=this.usingTransforms,t=this.options;this.$allAtoms.removeClass(t.hiddenClass+" "+t.itemClass).each(function(){var t=this.style;t.position="",t.top="",t.left="",t.opacity="",e&&(t[l]="")});var i=this.element[0].style;for(var o in this.originalStyle)i[o]=this.originalStyle[o];this.element.unbind(".isotope").undelegate("."+t.hiddenClass,"click").removeClass(t.containerClass).removeData("isotope"),x.unbind(".isotope")},_getSegments:function(e){var t,i=this.options.layoutMode,o=e?"rowHeight":"columnWidth",n=e?"height":"width",r=e?"rows":"cols",a=this.element[n](),l=this.options[i]&&this.options[i][o]||this.$filteredAtoms["outer"+s(n)](!0)||a;t=Math.floor(a/l),t=Math.max(t,1),this[i][r]=t,this[i][o]=l},_checkIfSegmentsChanged:function(e){var t=this.options.layoutMode,i=e?"rows":"cols",o=this[t][i];return this._getSegments(e),this[t][i]!==o},_masonryReset:function(){this.masonry={},this._getSegments();var e=this.masonry.cols;for(this.masonry.colYs=[];e--;)this.masonry.colYs.push(0)},_masonryLayout:function(e){var i=this,o=i.masonry;e.each(function(){var e=t(this),n=Math.ceil(e.outerWidth(!0)/o.columnWidth);if(n=Math.min(n,o.cols),1===n)i._masonryPlaceBrick(e,o.colYs);else{var s,r,a=o.cols+1-n,l=[];for(r=0;a>r;r++)s=o.colYs.slice(r,r+n),l[r]=Math.max.apply(Math,s);i._masonryPlaceBrick(e,l)}})},_masonryPlaceBrick:function(e,t){for(var i=Math.min.apply(Math,t),o=0,n=0,s=t.length;s>n;n++)if(t[n]===i){o=n;break}var r=this.masonry.columnWidth*o,a=i;this._pushPosition(e,r,a);var l=i+e.outerHeight(!0),d=this.masonry.cols+1-s;for(n=0;d>n;n++)this.masonry.colYs[o+n]=l},_masonryGetContainerSize:function(){var e=Math.max.apply(Math,this.masonry.colYs);return{height:e}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(e){var i=this,o=this.element.width(),n=this.fitRows;e.each(function(){var e=t(this),s=e.outerWidth(!0),r=e.outerHeight(!0);0!==n.x&&s+n.x>o&&(n.x=0,n.y=n.height),i._pushPosition(e,n.x,n.y),n.height=Math.max(n.y+r,n.height),n.x+=s})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(e){var i=this,o=this.cellsByRow;e.each(function(){var e=t(this),n=o.index%o.cols,s=Math.floor(o.index/o.cols),r=(n+.5)*o.columnWidth-e.outerWidth(!0)/2,a=(s+.5)*o.rowHeight-e.outerHeight(!0)/2;i._pushPosition(e,r,a),o.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(e){var i=this;e.each(function(){var e=t(this);i._pushPosition(e,0,i.straightDown.y),i.straightDown.y+=e.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var e=this.masonryHorizontal.rows;for(this.masonryHorizontal.rowXs=[];e--;)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(e){var i=this,o=i.masonryHorizontal;e.each(function(){var e=t(this),n=Math.ceil(e.outerHeight(!0)/o.rowHeight);if(n=Math.min(n,o.rows),1===n)i._masonryHorizontalPlaceBrick(e,o.rowXs);else{var s,r,a=o.rows+1-n,l=[];for(r=0;a>r;r++)s=o.rowXs.slice(r,r+n),l[r]=Math.max.apply(Math,s);i._masonryHorizontalPlaceBrick(e,l)}})},_masonryHorizontalPlaceBrick:function(e,t){for(var i=Math.min.apply(Math,t),o=0,n=0,s=t.length;s>n;n++)if(t[n]===i){o=n;break}var r=i,a=this.masonryHorizontal.rowHeight*o;this._pushPosition(e,r,a);var l=i+e.outerWidth(!0),d=this.masonryHorizontal.rows+1-s;for(n=0;d>n;n++)this.masonryHorizontal.rowXs[o+n]=l},_masonryHorizontalGetContainerSize:function(){var e=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:e}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(e){var i=this,o=this.element.height(),n=this.fitColumns;e.each(function(){var e=t(this),s=e.outerWidth(!0),r=e.outerHeight(!0);0!==n.y&&r+n.y>o&&(n.x=n.width,n.y=0),i._pushPosition(e,n.x,n.y),n.width=Math.max(n.x+s,n.width),n.y+=r})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(e){var i=this,o=this.cellsByColumn;e.each(function(){var e=t(this),n=Math.floor(o.index/o.rows),s=o.index%o.rows,r=(n+.5)*o.columnWidth-e.outerWidth(!0)/2,a=(s+.5)*o.rowHeight-e.outerHeight(!0)/2;i._pushPosition(e,r,a),o.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(e){var i=this;e.each(function(){var e=t(this);i._pushPosition(e,i.straightAcross.x,0),i.straightAcross.x+=e.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},t.fn.imagesLoaded=function(e){function i(){e.call(n,s)}function o(e){var n=e.target;n.src!==a&&-1===t.inArray(n,l)&&(l.push(n),--r<=0&&(setTimeout(i),s.unbind(".imagesLoaded",o)))}var n=this,s=n.find("img").add(n.filter("img")),r=s.length,a="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",l=[];return r||i(),s.bind("load.imagesLoaded error.imagesLoaded",o).each(function(){var e=this.src;this.src=a,this.src=e}),n};var T=function(t){e.console&&e.console.error(t)};t.fn.isotope=function(e,i){if("string"==typeof e){var o=Array.prototype.slice.call(arguments,1);this.each(function(){var i=t.data(this,"isotope");return i?t.isFunction(i[e])&&"_"!==e.charAt(0)?void i[e].apply(i,o):void T("no such method '"+e+"' for isotope instance"):void T("cannot call methods on isotope prior to initialization; attempted to call method '"+e+"'")})}else this.each(function(){var o=t.data(this,"isotope");o?(o.option(e),o._init(i)):t.data(this,"isotope",new t.Isotope(e,this,i))});return this}}(window,jQuery);var mejs=mejs||{};mejs.version="2.14.2",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(e){return encodeURIComponent(e)},escapeHTML:function(e){return e.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(e){var t=document.createElement("div");return t.innerHTML='x',t.firstChild.href},getScriptPath:function(e){for(var t,i,o,n=0,s="",r="",a=document.getElementsByTagName("script"),l=a.length,d=e.length;l>n;n++){for(i=a[n].src,t=i.lastIndexOf("/"),t>-1?(o=i.substring(t+1),i=i.substring(0,t+1)):(o=i,i=""),t=0;d>t;t++)if(r=e[t],r=o.indexOf(r),r>-1){s=i;break}if(""!==s)break}return s},secondsToTimeCode:function(e,t,i,o){"undefined"==typeof i?i=!1:"undefined"==typeof o&&(o=25);var n=Math.floor(e/3600)%24,s=Math.floor(e/60)%60,r=Math.floor(e%60);return e=Math.floor((e%1*o).toFixed(3)),(t||n>0?(10>n?"0"+n:n)+":":"")+(10>s?"0"+s:s)+":"+(10>r?"0"+r:r)+(i?":"+(10>e?"0"+e:e):"")},timeCodeToSeconds:function(e,t,i,o){"undefined"==typeof i?i=!1:"undefined"==typeof o&&(o=25),e=e.split(":"),t=parseInt(e[0],10);var n=parseInt(e[1],10),s=parseInt(e[2],10),r=0,a=0;return i&&(r=parseInt(e[3])/o),a=3600*t+60*n+s+r},convertSMPTEtoSeconds:function(e){if("string"!=typeof e)return!1;e=e.replace(",",".");var t=0,i=-1!=e.indexOf(".")?e.split(".")[1].length:0,o=1;e=e.split(":").reverse();for(var n=0;n0&&(o=Math.pow(60,n)),t+=Number(e[n])*o;return Number(t.toFixed(i))},removeSwf:function(e){var t=document.getElementById(e);t&&/object|embed/i.test(t.nodeName)&&(mejs.MediaFeatures.isIE?(t.style.display="none",function(){4==t.readyState?mejs.Utility.removeObjectInIE(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))},removeObjectInIE:function(e){if(e=document.getElementById(e)){for(var t in e)"function"==typeof e[t]&&(e[t]=null);e.parentNode.removeChild(e)}}},mejs.PluginDetector={hasPluginVersion:function(e,t){var i=this.plugins[e];return t[1]=t[1]||0,t[2]=t[2]||0,i[0]>t[0]||i[0]==t[0]&&i[1]>t[1]||i[0]==t[0]&&i[1]==t[1]&&i[2]>=t[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(e,t,i,o,n){this.plugins[e]=this.detectPlugin(t,i,o,n)},detectPlugin:function(e,t,i,o){var n,s=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[e]){if((i=this.nav.plugins[e].description)&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[t]||this.nav.mimeTypes[t].enabledPlugin))for(s=i.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),e=0;e0;)this.removeChild(t[0]);if("string"==typeof e)this.src=e;else{var i;for(t=0;t0&&null!==d[0].url&&this.getTypeFromFile(d[0].url).indexOf("audio")>-1&&(c.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(e.canPlayType=function(e){return null!==e.match(/video\/(mp4|m4v)/gi)?"maybe":""}),!(!i||"auto"!==t.mode&&"auto_plugin"!==t.mode&&"native"!==t.mode||mejs.MediaFeatures.isBustedNativeHTTPS&&t.httpsBasicAuthSite===!0)){for(o||(s=document.createElement(c.isVideo?"video":"audio"),e.parentNode.insertBefore(s,e),e.style.display="none",c.htmlMediaElement=e=s),s=0;s0&&(c.url=d[0].url),c)},formatType:function(e,t){return e&&!t?this.getTypeFromFile(e):t&&~t.indexOf(";")?t.substr(0,t.indexOf(";")):t},getTypeFromFile:function(e){return e=e.split("?")[0],e=e.substring(e.lastIndexOf(".")+1).toLowerCase(),(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(e)?"video":"audio")+"/"+this.getTypeFromExtension(e)},getTypeFromExtension:function(e){switch(e){case"mp4":case"m4v":case"m4a":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}},createErrorMessage:function(e,t,i){var o=e.htmlMediaElement,n=document.createElement("div");n.className="me-cannotplay";try{n.style.width=o.width+"px",n.style.height=o.height+"px"}catch(s){}n.innerHTML=t.customError?t.customError:""!==i?'':''+mejs.i18n.t("Download File")+"",o.parentNode.insertBefore(n,o),o.style.display="none",t.error(o)},createPlugin:function(e,t,i,o,n,s){i=e.htmlMediaElement;var r,a=1,l=1,d="me_"+e.method+"_"+mejs.meIndex++,c=new mejs.PluginMediaElement(d,e.method,e.url),u=document.createElement("div");for(c.tagName=i.tagName,r=0;r0?t.pluginWidth:t.videoWidth>0?t.videoWidth:null!==i.getAttribute("width")?i.getAttribute("width"):t.defaultVideoWidth,l=t.pluginHeight>0?t.pluginHeight:t.videoHeight>0?t.videoHeight:null!==i.getAttribute("height")?i.getAttribute("height"):t.defaultVideoHeight,a=mejs.Utility.encodeUrl(a),l=mejs.Utility.encodeUrl(l)):t.enablePluginDebug&&(a=320,l=240),c.success=t.success,mejs.MediaPluginBridge.registerPluginElement(d,c,i),u.className="me-plugin",u.id=d+"_container",e.isVideo?i.parentNode.insertBefore(u,i):document.body.insertBefore(u,document.body.childNodes[0]),o=["id="+d,"isvideo="+(e.isVideo?"true":"false"),"autoplay="+(o?"true":"false"),"preload="+n,"width="+a,"startvolume="+t.startVolume,"timerrate="+t.timerRate,"flashstreamer="+t.flashStreamer,"height="+l,"pseudostreamstart="+t.pseudoStreamingStartQueryParam],null!==e.url&&o.push("flash"==e.method?"file="+mejs.Utility.encodeUrl(e.url):"file="+e.url),t.enablePluginDebug&&o.push("debug=true"),t.enablePluginSmoothing&&o.push("smoothing=true"),t.enablePseudoStreaming&&o.push("pseudostreaming=true"),s&&o.push("controls=true"),t.pluginVars&&(o=o.concat(t.pluginVars)),e.method){case"silverlight":u.innerHTML='';break;case"flash":mejs.MediaFeatures.isIE?(e=document.createElement("div"),u.appendChild(e),e.outerHTML=''):u.innerHTML='';break;case"youtube":-1!=e.url.lastIndexOf("youtu.be")?(e=e.url.substr(e.url.lastIndexOf("/")+1),-1!=e.indexOf("?")&&(e=e.substr(0,e.indexOf("?")))):e=e.url.substr(e.url.lastIndexOf("=")+1),youtubeSettings={container:u,containerId:u.id,pluginMediaElement:c,pluginId:d,videoId:e,height:l,width:a},mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case"vimeo":if(t=d+"_player",c.vimeoid=e.url.substr(e.url.lastIndexOf("/")+1),u.innerHTML='',"function"==typeof $f){var m=$f(u.childNodes[0]);m.addEvent("ready",function(){function e(e,t,i,o){e={type:i,target:t},"timeupdate"==i&&(t.currentTime=e.currentTime=o.seconds,t.duration=e.duration=o.duration),t.dispatchEvent(e.type,e)}m.playVideo=function(){m.api("play")},m.pauseVideo=function(){m.api("pause") },m.seekTo=function(e){m.api("seekTo",e)},m.addEvent("play",function(){e(m,c,"play"),e(m,c,"playing")}),m.addEvent("pause",function(){e(m,c,"pause")}),m.addEvent("finish",function(){e(m,c,"ended")}),m.addEvent("playProgress",function(t){e(m,c,"timeupdate",t)}),c.pluginApi=m,mejs.MediaPluginBridge.initPlugin(d)})}else console.warn("You need to include froogaloop for vimeo to work")}return i.style.display="none",i.removeAttribute("autoplay"),c},updateNative:function(e,t){var i,o=e.htmlMediaElement;for(i in mejs.HtmlMediaElement)o[i]=mejs.HtmlMediaElement[i];return t.success(o,o),o}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(){if(!this.isIframeStarted){var e=document.createElement("script");e.src="//www.youtube.com/player_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(e){this.isLoaded?this.createIframe(e):(this.loadIframeApi(),this.iframeQueue.push(e))},createIframe:function(e){var t=e.pluginMediaElement,i=new YT.Player(e.containerId,{height:e.height,width:e.width,videoId:e.videoId,playerVars:{controls:0},events:{onReady:function(){e.pluginMediaElement.pluginApi=i,mejs.MediaPluginBridge.initPlugin(e.pluginId),setInterval(function(){mejs.YouTubeApi.createEvent(i,t,"timeupdate")},250)},onStateChange:function(e){mejs.YouTubeApi.handleStateChange(e.data,i,t)}}})},createEvent:function(e,t,i){if(i={type:i,target:t},e&&e.getDuration){t.currentTime=i.currentTime=e.getCurrentTime(),t.duration=i.duration=e.getDuration(),i.paused=t.paused,i.ended=t.ended,i.muted=e.isMuted(),i.volume=e.getVolume()/100,i.bytesTotal=e.getVideoBytesTotal(),i.bufferedBytes=e.getVideoBytesLoaded();var o=i.bufferedBytes/i.bytesTotal*i.duration;i.target.buffered=i.buffered={start:function(){return 0},end:function(){return o},length:1}}t.dispatchEvent(i.type,i)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=!0;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(e){this.flashPlayers[e.pluginId]=e;var t,i="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+e.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(t=document.createElement("div"),e.container.appendChild(t),t.outerHTML=''):e.container.innerHTML=''},flashReady:function(e){var t=this.flashPlayers[e],i=document.getElementById(e),o=t.pluginMediaElement;o.pluginApi=o.pluginElement=i,mejs.MediaPluginBridge.initPlugin(e),i.cueVideoById(t.videoId),e=t.containerId+"_callback",window[e]=function(e){mejs.YouTubeApi.handleStateChange(e,i,o)},i.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(i,o,"timeupdate")},250)},handleStateChange:function(e,t,i){switch(e){case-1:i.paused=!0,i.ended=!0,mejs.YouTubeApi.createEvent(t,i,"loadedmetadata");break;case 0:i.paused=!1,i.ended=!0,mejs.YouTubeApi.createEvent(t,i,"ended");break;case 1:i.paused=!1,i.ended=!1,mejs.YouTubeApi.createEvent(t,i,"play"),mejs.YouTubeApi.createEvent(t,i,"playing");break;case 2:i.paused=!0,i.ended=!1,mejs.YouTubeApi.createEvent(t,i,"pause");break;case 3:mejs.YouTubeApi.createEvent(t,i,"progress")}}},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(e,t){var i={locale:{language:"",strings:{}},methods:{}};i.getLanguage=function(){return(i.locale.language||window.navigator.userLanguage||window.navigator.language).substr(0,2).toLowerCase()},"undefined"!=typeof mejsL10n&&(i.locale.language=mejsL10n.language),i.methods.checkPlain=function(e){var t,i,o={"&":"&",'"':""","<":"<",">":">"};e=String(e);for(t in o)o.hasOwnProperty(t)&&(i=RegExp(t,"g"),e=e.replace(i,o[t]));return e},i.methods.t=function(e,t){return i.locale.strings&&i.locale.strings[t.context]&&i.locale.strings[t.context][e]&&(e=i.locale.strings[t.context][e]),i.methods.checkPlain(e)},i.t=function(e,t){if("string"==typeof e&&e.length>0){var o=i.getLanguage();return t=t||{context:o},i.methods.t(e,t)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},t.i18n=i}(document,mejs),function(e){"undefined"!=typeof mejsL10n&&(e[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),function(e){"undefined"==typeof e.de&&(e.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schließen"})}(mejs.i18n.locale.strings),function(e){"undefined"==typeof e.zh&&(e.zh={Fullscreen:"全螢幕","Go Fullscreen":"全屏模式","Turn off Fullscreen":"退出全屏模式",Close:"關閉"})}(mejs.i18n.locale.strings),"undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof ender&&(mejs.$=ender),function(e){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(e){return.05*e.duration},defaultSeekForwardInterval:function(e){return.05*e.duration},audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(e,t){t.paused||t.ended?e.play():e.pause()}},{keys:[38],action:function(e,t){t.setVolume(Math.min(t.volume+.1,1))}},{keys:[40],action:function(e,t){t.setVolume(Math.max(t.volume-.1,0))}},{keys:[37,227],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.max(t.currentTime-e.options.defaultSeekBackwardInterval(t),0);t.setCurrentTime(i)}}},{keys:[39,228],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.min(t.currentTime+e.options.defaultSeekForwardInterval(t),t.duration);t.setCurrentTime(i)}}},{keys:[70],action:function(e){"undefined"!=typeof e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(t,i){return this instanceof mejs.MediaElementPlayer?(this.$media=this.$node=e(t),this.node=this.media=this.$media[0],"undefined"!=typeof this.node.player?this.node.player:(this.node.player=this,"undefined"==typeof i&&(i=this.$node.data("mejsoptions")),this.options=e.extend({},mejs.MepDefaults,i),this.id="mep_"+mejs.mepIndex++,mejs.players[this.id]=this,this.init(),this)):new mejs.MediaElementPlayer(t,i)},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var t=this,i=mejs.MediaFeatures,o=e.extend(!0,{},t.options,{success:function(e,i){t.meReady(e,i)},error:function(e){t.handleError(e)}}),n=t.media.tagName.toLowerCase();t.isDynamic="audio"!==n&&"video"!==n,t.isVideo=t.isDynamic?t.options.isVideo:"audio"!==n&&t.options.isVideo,i.isiPad&&t.options.iPadUseNativeControls||i.isiPhone&&t.options.iPhoneUseNativeControls?(t.$media.attr("controls","controls"),i.isiPad&&null!==t.media.getAttribute("autoplay")&&t.play()):i.isAndroid&&t.options.AndroidUseNativeControls||(t.$media.removeAttr("controls"),t.container=e('
').addClass(t.$media[0].className).insertBefore(t.$media),t.container.addClass((i.isAndroid?"mejs-android ":"")+(i.isiOS?"mejs-ios ":"")+(i.isiPad?"mejs-ipad ":"")+(i.isiPhone?"mejs-iphone ":"")+(t.isVideo?"mejs-video ":"mejs-audio ")),i.isiOS?(i=t.$media.clone(),t.container.find(".mejs-mediaelement").append(i),t.$media.remove(),t.$node=t.$media=i,t.node=t.media=i[0]):t.container.find(".mejs-mediaelement").append(t.$media),t.controls=t.container.find(".mejs-controls"),t.layers=t.container.find(".mejs-layers"),i=t.isVideo?"video":"audio",n=i.substring(0,1).toUpperCase()+i.substring(1),t.width=t.options[i+"Width"]>0||t.options[i+"Width"].toString().indexOf("%")>-1?t.options[i+"Width"]:""!==t.media.style.width&&null!==t.media.style.width?t.media.style.width:null!==t.media.getAttribute("width")?t.$media.attr("width"):t.options["default"+n+"Width"],t.height=t.options[i+"Height"]>0||t.options[i+"Height"].toString().indexOf("%")>-1?t.options[i+"Height"]:""!==t.media.style.height&&null!==t.media.style.height?t.media.style.height:null!==t.$media[0].getAttribute("height")?t.$media.attr("height"):t.options["default"+n+"Height"],t.setPlayerSize(t.width,t.height),o.pluginWidth=t.width,o.pluginHeight=t.height),mejs.MediaElement(t.$media[0],o),"undefined"!=typeof t.container&&t.controlsAreVisible&&t.container.trigger("controlsshown")},showControls:function(e){var t=this;e="undefined"==typeof e||e,t.controlsAreVisible||(e?(t.controls.css("visibility","visible").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0,t.container.trigger("controlsshown")}),t.container.find(".mejs-control").css("visibility","visible").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0})):(t.controls.css("visibility","visible").css("display","block"),t.container.find(".mejs-control").css("visibility","visible").css("display","block"),t.controlsAreVisible=!0,t.container.trigger("controlsshown")),t.setControlsSize())},hideControls:function(t){var i=this;t="undefined"==typeof t||t,i.controlsAreVisible&&!i.options.alwaysShowControls&&(t?(i.controls.stop(!0,!0).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block"),i.controlsAreVisible=!1,i.container.trigger("controlshidden")}),i.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block")})):(i.controls.css("visibility","hidden").css("display","block"),i.container.find(".mejs-control").css("visibility","hidden").css("display","block"),i.controlsAreVisible=!1,i.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(e){var t=this;e="undefined"!=typeof e?e:1500,t.killControlsTimer("start"),t.controlsTimer=setTimeout(function(){t.hideControls(),t.killControlsTimer("hide")},e)},killControlsTimer:function(){null!==this.controlsTimer&&(clearTimeout(this.controlsTimer),delete this.controlsTimer,this.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){this.killControlsTimer(),this.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){this.showControls(!1),this.controlsEnabled=!0},meReady:function(e,t){var i=this,o=mejs.MediaFeatures,n=t.getAttribute("autoplay");n=!("undefined"==typeof n||null===n||"false"===n);var s;if(!i.created){if(i.created=!0,i.media=e,i.domNode=t,!(o.isAndroid&&i.options.AndroidUseNativeControls||o.isiPad&&i.options.iPadUseNativeControls||o.isiPhone&&i.options.iPhoneUseNativeControls)){i.buildposter(i,i.controls,i.layers,i.media),i.buildkeyboard(i,i.controls,i.layers,i.media),i.buildoverlays(i,i.controls,i.layers,i.media),i.findTracks();for(s in i.options.features)if(o=i.options.features[s],i["build"+o])try{i["build"+o](i,i.controls,i.layers,i.media)}catch(r){}i.container.trigger("controlsready"),i.setPlayerSize(i.width,i.height),i.setControlsSize(),i.isVideo&&(mejs.MediaFeatures.hasTouch?i.$media.bind("touchstart",function(){i.controlsAreVisible?i.hideControls(!1):i.controlsEnabled&&i.showControls(!1)}):(i.clickToPlayPauseCallback=function(){i.options.clickToPlayPause&&(i.media.paused?i.play():i.pause())},i.media.addEventListener("click",i.clickToPlayPauseCallback,!1),i.container.bind("mouseenter mouseover",function(){i.controlsEnabled&&(i.options.alwaysShowControls||(i.killControlsTimer("enter"),i.showControls(),i.startControlsTimer(2500)))}).bind("mousemove",function(){i.controlsEnabled&&(i.controlsAreVisible||i.showControls(),i.options.alwaysShowControls||i.startControlsTimer(2500))}).bind("mouseleave",function(){i.controlsEnabled&&!i.media.paused&&!i.options.alwaysShowControls&&i.startControlsTimer(1e3)})),i.options.hideVideoControlsOnLoad&&i.hideControls(!1),n&&!i.options.alwaysShowControls&&i.hideControls(),i.options.enableAutosize&&i.media.addEventListener("loadedmetadata",function(e){i.options.videoHeight<=0&&null===i.domNode.getAttribute("height")&&!isNaN(e.target.videoHeight)&&(i.setPlayerSize(e.target.videoWidth,e.target.videoHeight),i.setControlsSize(),i.media.setVideoSize(e.target.videoWidth,e.target.videoHeight))},!1)),e.addEventListener("play",function(){for(var e in mejs.players){var t=mejs.players[e];t.id!=i.id&&i.options.pauseOtherPlayers&&!t.paused&&!t.ended&&t.pause(),t.hasFocus=!1}i.hasFocus=!0},!1),i.media.addEventListener("ended",function(){if(i.options.autoRewind)try{i.media.setCurrentTime(0)}catch(e){}i.media.pause(),i.setProgressRail&&i.setProgressRail(),i.setCurrentRail&&i.setCurrentRail(),i.options.loop?i.play():!i.options.alwaysShowControls&&i.controlsEnabled&&i.showControls()},!1),i.media.addEventListener("loadedmetadata",function(){i.updateDuration&&i.updateDuration(),i.updateCurrent&&i.updateCurrent(),i.isFullScreen||(i.setPlayerSize(i.width,i.height),i.setControlsSize())},!1),setTimeout(function(){i.setPlayerSize(i.width,i.height),i.setControlsSize()},50),i.globalBind("resize",function(){i.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||i.setPlayerSize(i.width,i.height),i.setControlsSize()}),"youtube"==i.media.pluginType&&i.container.find(".mejs-overlay-play").hide()}n&&"native"==e.pluginType&&i.play(),i.options.success&&("string"==typeof i.options.success?window[i.options.success](i.media,i.domNode,i):i.options.success(i.media,i.domNode,i))}},handleError:function(e){this.controls.hide(),this.options.error&&this.options.error(e)},setPlayerSize:function(t,i){if("undefined"!=typeof t&&(this.width=t),"undefined"!=typeof i&&(this.height=i),this.height.toString().indexOf("%")>0||"100%"===this.$node.css("max-width")||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===1||this.$node[0].currentStyle&&"100%"===this.$node[0].currentStyle.maxWidth){var o=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,n=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,s=this.container.parent().closest(":visible").width();o=this.isVideo||!this.options.autosizeProgress?parseInt(s*n/o,10):n,isNaN(o)&&(o=this.container.parent().closest(":visible").height()),"body"===this.container.parent()[0].tagName.toLowerCase()&&(s=e(window).width(),o=e(window).height()),0!=o&&0!=s&&(this.container.width(s).height(o),this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%"),this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(s,o),this.layers.children(".mejs-layer").width("100%").height("100%"))}else this.container.width(this.width).height(this.height),this.layers.children(".mejs-layer").width(this.width).height(this.height);s=this.layers.find(".mejs-overlay-play"),o=s.find(".mejs-overlay-button"),s.height(this.container.height()-this.controls.height()),o.css("margin-top","-"+(o.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var t=0,i=0,o=this.controls.find(".mejs-time-rail"),n=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current"),this.controls.find(".mejs-time-loaded");var s=o.siblings(),r=s.last(),a=null;if(this.container.is(":visible")&&o.length&&o.is(":visible")){this.options&&!this.options.autosizeProgress&&(i=parseInt(o.css("width"))),0!==i&&i||(s.each(function(){var i=e(this);"absolute"!=i.css("position")&&i.is(":visible")&&(t+=e(this).outerWidth(!0))}),i=this.controls.width()-t-(o.outerWidth(!0)-o.width()));do o.width(i),n.width(i-(n.outerWidth(!0)-n.width())),"absolute"!=r.css("position")&&(a=r.position(),i--);while(null!=a&&a.top>0&&i>0);this.setProgressRail&&this.setProgressRail(),this.setCurrentRail&&this.setCurrentRail()}},buildposter:function(t,i,o,n){var s=e('
').appendTo(o);i=t.$media.attr("poster"),""!==t.options.poster&&(i=t.options.poster),""!==i&&null!=i?this.setPoster(i):s.hide(),n.addEventListener("play",function(){s.hide()},!1),t.options.showPosterWhenEnded&&t.options.autoRewind&&n.addEventListener("ended",function(){s.show()},!1)},setPoster:function(t){var i=this.container.find(".mejs-poster"),o=i.find("img");0==o.length&&(o=e('').appendTo(i)),o.attr("src",t),i.css({"background-image":"url("+t+")"})},buildoverlays:function(t,i,o,n){var s=this;if(t.isVideo){var r=e('
').hide().appendTo(o),a=e('
').hide().appendTo(o),l=e('
').appendTo(o).bind("click touchstart",function(){s.options.clickToPlayPause&&n.paused&&n.play()});n.addEventListener("play",function(){l.hide(),r.hide(),i.find(".mejs-time-buffering").hide(),a.hide()},!1),n.addEventListener("playing",function(){l.hide(),r.hide(),i.find(".mejs-time-buffering").hide(),a.hide()},!1),n.addEventListener("seeking",function(){r.show(),i.find(".mejs-time-buffering").show()},!1),n.addEventListener("seeked",function(){r.hide(),i.find(".mejs-time-buffering").hide()},!1),n.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||l.show()},!1),n.addEventListener("waiting",function(){r.show(),i.find(".mejs-time-buffering").show()},!1),n.addEventListener("loadeddata",function(){r.show(),i.find(".mejs-time-buffering").show()},!1),n.addEventListener("canplay",function(){r.hide(),i.find(".mejs-time-buffering").hide()},!1),n.addEventListener("error",function(){r.hide(),i.find(".mejs-time-buffering").hide(),a.show(),a.find("mejs-overlay-error").html("Error loading this resource")},!1)}},buildkeyboard:function(t,i,o,n){this.globalBind("keydown",function(e){if(t.hasFocus&&t.options.enableKeyboard)for(var i=0,o=t.options.keyActions.length;o>i;i++)for(var s=t.options.keyActions[i],r=0,a=s.keys.length;a>r;r++)if(e.keyCode==s.keys[r])return e.preventDefault(),s.action(t,n,e.keyCode),!1;return!0}),this.globalBind("click",function(i){t.hasFocus=0!=e(i.target).closest(".mejs-container").length})},findTracks:function(){var t=this,i=t.$media.find("track");t.tracks=[],i.each(function(i,o){o=e(o),t.tracks.push({srclang:o.attr("srclang")?o.attr("srclang").toLowerCase():"",src:o.attr("src"),kind:o.attr("kind"),label:o.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(e){this.container[0].className="mejs-container "+e,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(e){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(e){this.media.setMuted(e)},setCurrentTime:function(e){this.media.setCurrentTime(e)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(e){this.media.setVolume(e)},getVolume:function(){return this.media.volume},setSrc:function(e){this.media.setSrc(e)},remove:function(){var e,t;for(e in this.options.features)if(t=this.options.features[e],this["clean"+t])try{this["clean"+t](this)}catch(i){}this.isDynamic?this.$node.insertBefore(this.container):(this.$media.prop("controls",!0),this.$node.clone().show().insertBefore(this.container),this.$node.remove()),"native"!==this.media.pluginType&&this.media.remove(),delete mejs.players[this.id],"object"==typeof this.container&&this.container.remove(),this.globalUnbind(),delete this.node.player}},function(){function t(t,o){var n={d:[],w:[]};return e.each((t||"").split(" "),function(e,t){var s=t+"."+o;0===s.indexOf(".")?(n.d.push(s),n.w.push(s)):n[i.test(t)?"w":"d"].push(s)}),n.d=n.d.join(" "),n.w=n.w.join(" "),n}var i=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(i,o,n){i=t(i,this.id),i.d&&e(document).bind(i.d,o,n),i.w&&e(window).bind(i.w,o,n)},mejs.MediaElementPlayer.prototype.globalUnbind=function(i,o){i=t(i,this.id),i.d&&e(document).unbind(i.d,o),i.w&&e(window).unbind(i.w,o)}}(),"undefined"!=typeof jQuery&&(jQuery.fn.mediaelementplayer=function(e){return this.each(e===!1?function(){var e=jQuery(this).data("mediaelementplayer");e&&e.remove(),jQuery(this).removeData("mediaelementplayer")}:function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,e))}),this}),e(document).ready(function(){e(".mejs-player").mediaelementplayer()}),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(e){e.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")}),e.extend(MediaElementPlayer.prototype,{buildplaypause:function(t,i,o,n){var s=e('
').appendTo(i).click(function(e){return e.preventDefault(),n.paused?n.play():n.pause(),!1});n.addEventListener("play",function(){s.removeClass("mejs-play").addClass("mejs-pause")},!1),n.addEventListener("playing",function(){s.removeClass("mejs-play").addClass("mejs-pause")},!1),n.addEventListener("pause",function(){s.removeClass("mejs-pause").addClass("mejs-play")},!1),n.addEventListener("paused",function(){s.removeClass("mejs-pause").addClass("mejs-play")},!1)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{stopText:"Stop"}),e.extend(MediaElementPlayer.prototype,{buildstop:function(t,i,o,n){e('
').appendTo(i).click(function(){n.paused||n.pause(),n.currentTime>0&&(n.setCurrentTime(0),n.pause(),i.find(".mejs-time-current").width("0px"),i.find(".mejs-time-handle").css("left","0px"),i.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0)),i.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0)),o.find(".mejs-poster").show())})}})}(mejs.$),function(e){e.extend(MediaElementPlayer.prototype,{buildprogress:function(t,i,o,n){e('
00:00
').appendTo(i),i.find(".mejs-time-buffering").hide();var s=this,r=i.find(".mejs-time-total");o=i.find(".mejs-time-loaded");var a=i.find(".mejs-time-current"),l=i.find(".mejs-time-handle"),d=i.find(".mejs-time-float"),c=i.find(".mejs-time-float-current"),u=function(e){e=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.pageX;var t=r.offset(),i=r.outerWidth(!0),o=0,s=o=0;n.duration&&(ei+t.left&&(e=i+t.left),s=e-t.left,o=s/i,o=.02>=o?0:o*n.duration,h&&o!==n.currentTime&&n.setCurrentTime(o),mejs.MediaFeatures.hasTouch||(d.css("left",s),c.html(mejs.Utility.secondsToTimeCode(o)),d.show()))},h=!1;r.bind("mousedown touchstart",function(e){return 1===e.which||0===e.which?(h=!0,u(e),s.globalBind("mousemove.dur touchmove.dur",function(e){u(e)}),s.globalBind("mouseup.dur touchend.dur",function(){h=!1,d.hide(),s.globalUnbind(".dur")}),!1):void 0}).bind("mouseenter",function(){s.globalBind("mousemove.dur",function(e){u(e)}),mejs.MediaFeatures.hasTouch||d.show()}).bind("mouseleave",function(){h||(s.globalUnbind(".dur"),d.hide())}),n.addEventListener("progress",function(e){t.setProgressRail(e),t.setCurrentRail(e)},!1),n.addEventListener("timeupdate",function(e){t.setProgressRail(e),t.setCurrentRail(e)},!1),s.loaded=o,s.total=r,s.current=a,s.handle=l},setProgressRail:function(e){var t=void 0!=e?e.target:this.media,i=null;t&&t.buffered&&t.buffered.length>0&&t.buffered.end&&t.duration?i=t.buffered.end(0)/t.duration:t&&void 0!=t.bytesTotal&&t.bytesTotal>0&&void 0!=t.bufferedBytes?i=t.bufferedBytes/t.bytesTotal:e&&e.lengthComputable&&0!=e.total&&(i=e.loaded/e.total),null!==i&&(i=Math.min(1,Math.max(0,i)),this.loaded&&this.total&&this.loaded.width(this.total.width()*i))},setCurrentRail:function(){if(void 0!=this.media.currentTime&&this.media.duration&&this.total&&this.handle){var e=Math.round(this.total.width()*this.media.currentTime/this.media.duration),t=e-Math.round(this.handle.outerWidth(!0)/2);this.current.width(e),this.handle.css("left",t)}}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "}),e.extend(MediaElementPlayer.prototype,{buildcurrent:function(t,i,o,n){e('
'+(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
").appendTo(i),this.currenttime=this.controls.find(".mejs-currenttime"),n.addEventListener("timeupdate",function(){t.updateCurrent()},!1)},buildduration:function(t,i,o,n){i.children().last().find(".mejs-currenttime").length>0?e(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(i.find(".mejs-time")):(i.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),e('
'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
").appendTo(i)),this.durationD=this.controls.find(".mejs-duration"),n.addEventListener("timeupdate",function(){t.updateDuration()},!1)},updateCurrent:function(){this.currenttime&&this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600),this.durationD&&(this.options.duration>0||this.media.duration)&&this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration:this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),e.extend(MediaElementPlayer.prototype,{buildvolume:function(t,i,o,n){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var s=this,r=s.isVideo?s.options.videoVolume:s.options.audioVolume,a="horizontal"==r?e('
').appendTo(i):e('
').appendTo(i),l=s.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),d=s.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),c=s.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),u=s.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),h=function(e,t){if(l.is(":visible")||"undefined"!=typeof t)if(e=Math.max(0,e),e=Math.min(e,1),0==e?a.removeClass("mejs-mute").addClass("mejs-unmute"):a.removeClass("mejs-unmute").addClass("mejs-mute"),"vertical"==r){var i=d.height(),o=d.position(),n=i-i*e;u.css("top",Math.round(o.top+n-u.height()/2)),c.height(i-n),c.css("top",o.top+n)}else i=d.width(),o=d.position(),i*=e,u.css("left",Math.round(o.left+i-u.width()/2)),c.width(Math.round(i));else l.show(),h(e,!0),l.hide()},m=function(e){var t=null,i=d.offset();if("vertical"==r){if(t=d.height(),parseInt(d.css("top").replace(/px/,""),10),t=(t-(e.pageY-i.top))/t,0==i.top||0==i.left)return}else t=d.width(),t=(e.pageX-i.left)/t;t=Math.max(0,t),t=Math.min(t,1),h(t),n.setMuted(0==t?!0:!1),n.setVolume(t)},p=!1,f=!1;a.hover(function(){l.show(),f=!0},function(){f=!1,!p&&"vertical"==r&&l.hide()}),l.bind("mouseover",function(){f=!0}).bind("mousedown",function(e){return m(e),s.globalBind("mousemove.vol",function(e){m(e)}),s.globalBind("mouseup.vol",function(){p=!1,s.globalUnbind(".vol"),!f&&"vertical"==r&&l.hide()}),p=!0,!1}),a.find("button").click(function(){n.setMuted(!n.muted)}),n.addEventListener("volumechange",function(){p||(n.muted?(h(0),a.removeClass("mejs-mute").addClass("mejs-unmute")):(h(n.volume),a.removeClass("mejs-unmute").addClass("mejs-mute")))},!1),s.container.is(":visible")&&(h(t.options.startVolume),0===t.options.startVolume&&n.setMuted(!0),"native"===n.pluginType&&n.setVolume(t.options.startVolume))}}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")}),e.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,buildfullscreen:function(t,i,o,n){if(t.isVideo){t.isInIframe=window.location!=window.parent.location,mejs.MediaFeatures.hasTrueNativeFullScreen&&(o=function(){t.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(t.isNativeFullScreen=!0,t.setControlsSize()):(t.isNativeFullScreen=!1,t.exitFullScreen()))},mejs.MediaFeatures.hasMozNativeFullScreen?t.globalBind(mejs.MediaFeatures.fullScreenEventName,o):t.container.bind(mejs.MediaFeatures.fullScreenEventName,o));var s=this,r=e('
').appendTo(i);if("native"===s.media.pluginType||!s.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)r.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||t.isFullScreen?t.exitFullScreen():t.enterFullScreen() });else{var a=null;if(function(){var e=document.createElement("x"),t=document.documentElement,i=window.getComputedStyle;return"pointerEvents"in e.style?(e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e),i=i&&"auto"===i(e,"").pointerEvents,t.removeChild(e),!!i):!1}()&&!mejs.MediaFeatures.isOpera){var l=!1,d=function(){if(l){for(var e in c)c[e].hide();r.css("pointer-events",""),s.controls.css("pointer-events",""),s.media.removeEventListener("click",s.clickToPlayPauseCallback),l=!1}},c={};i=["top","left","right","bottom"];var u,h=function(){var e=r.offset().left-s.container.offset().left,t=r.offset().top-s.container.offset().top,i=r.outerWidth(!0),o=r.outerHeight(!0),n=s.container.width(),a=s.container.height();for(u in c)c[u].css({position:"absolute",top:0,left:0});c.top.width(n).height(t),c.left.width(e).height(o).css({top:t}),c.right.width(n-e-i).height(o).css({top:t,left:e+i}),c.bottom.width(n).height(a-o-t).css({top:t+o})};for(s.globalBind("resize",function(){h()}),u=0,o=i.length;o>u;u++)c[i[u]]=e('
').appendTo(s.container).mouseover(d).hide();r.on("mouseover",function(){if(!s.isFullScreen){var e=r.offset(),i=t.container.offset();n.positionFullscreenButton(e.left-i.left,e.top-i.top,!1),r.css("pointer-events","none"),s.controls.css("pointer-events","none"),s.media.addEventListener("click",s.clickToPlayPauseCallback);for(u in c)c[u].show();h(),l=!0}}),n.addEventListener("fullscreenchange",function(){s.isFullScreen=!s.isFullScreen,s.isFullScreen?s.media.removeEventListener("click",s.clickToPlayPauseCallback):s.media.addEventListener("click",s.clickToPlayPauseCallback),d()}),s.globalBind("mousemove",function(e){if(l){var t=r.offset();(e.pageYt.top+r.outerHeight(!0)||e.pageXt.left+r.outerWidth(!0))&&(r.css("pointer-events",""),s.controls.css("pointer-events",""),l=!1)}})}else r.on("mouseover",function(){null!==a&&(clearTimeout(a),delete a);var e=r.offset(),i=t.container.offset();n.positionFullscreenButton(e.left-i.left,e.top-i.top,!0)}).on("mouseout",function(){null!==a&&(clearTimeout(a),delete a),a=setTimeout(function(){n.hideFullscreenButton()},1500)})}t.fullscreenBtn=r,s.globalBind("keydown",function(e){(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||s.isFullScreen)&&27==e.keyCode&&t.exitFullScreen()})}},cleanfullscreen:function(e){e.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var t=this;if("native"===t.media.pluginType||!mejs.MediaFeatures.isFirefox&&!t.options.usePluginFullScreen){if(e(document.documentElement).addClass("mejs-fullscreen"),normalHeight=t.container.height(),normalWidth=t.container.width(),"native"===t.media.pluginType)if(mejs.MediaFeatures.hasTrueNativeFullScreen)mejs.MediaFeatures.requestFullScreen(t.container[0]),t.isInIframe&&setTimeout(function o(){if(t.isNativeFullScreen){var i=(window.devicePixelRatio||1)*e(window).width(),n=screen.width;Math.abs(n-i)>.002*n?t.exitFullScreen():setTimeout(o,500)}},500);else if(mejs.MediaFeatures.hasSemiNativeFullScreen)return void t.media.webkitEnterFullscreen();if(t.isInIframe){var i=t.options.newWindowCallback(this);if(""!==i){if(!mejs.MediaFeatures.hasTrueNativeFullScreen)return t.pause(),void window.open(i,t.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");setTimeout(function(){t.isNativeFullScreen||(t.pause(),window.open(i,t.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no"))},250)}}t.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),t.containerSizeTimeout=setTimeout(function(){t.container.css({width:"100%",height:"100%"}),t.setControlsSize()},500),"native"===t.media.pluginType?t.$media.width("100%").height("100%"):(t.container.find(".mejs-shim").width("100%").height("100%"),t.media.setVideoSize(e(window).width(),e(window).height())),t.layers.children("div").width("100%").height("100%"),t.fullscreenBtn&&t.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),t.setControlsSize(),t.isFullScreen=!0}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout),"native"!==this.media.pluginType&&mejs.MediaFeatures.isFirefox?this.media.setFullscreen(!1):(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),e(document.documentElement).removeClass("mejs-fullscreen"),this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight),"native"===this.media.pluginType?this.$media.width(normalWidth).height(normalHeight):(this.container.find(".mejs-shim").width(normalWidth).height(normalHeight),this.media.setVideoSize(normalWidth,normalHeight)),this.layers.children("div").width(normalWidth).height(normalHeight),this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),this.setControlsSize(),this.isFullScreen=!1)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),e.extend(MediaElementPlayer.prototype,{hasChapters:!1,buildtracks:function(t,i,o,n){if(0!=t.tracks.length){var s;if(this.domNode.textTracks)for(s=this.domNode.textTracks.length-1;s>=0;s--)this.domNode.textTracks[s].mode="hidden";for(t.chapters=e('
').prependTo(o).hide(),t.captions=e('
').prependTo(o).hide(),t.captionsText=t.captions.find(".mejs-captions-text"),t.captionsButton=e('
").appendTo(i),s=i=0;s0&&i.displayChapters(o)},!1),"slides"==o.kind&&i.setupSlides(o)},error:function(){i.loadNextTrack()}})},enableTrackButton:function(t,i){""===i&&(i=mejs.language.codes[t]||t),this.captionsButton.find("input[value="+t+"]").prop("disabled",!1).siblings("label").html(i),this.options.startLanguage==t&&e("#"+this.id+"_captions_"+t).click(),this.adjustLanguageBox()},addTrackButton:function(t,i){""===i&&(i=mejs.language.codes[t]||t),this.captionsButton.find("ul").append(e('
  • ")),this.adjustLanguageBox(),this.container.find(".mejs-captions-translations option[value="+t+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+this.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var e=!1;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i=t.entries.times[e].start&&this.media.currentTime<=t.entries.times[e].stop)return this.captionsText.html(t.entries.text[e]),void this.captions.show().height(0);this.captions.hide()}},setupSlides:function(e){this.slides=e,this.slides.entries.imgs=[this.slides.entries.text.length],this.showSlide(0)},showSlide:function(t){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var i=this,o=i.slides.entries.text[t],n=i.slides.entries.imgs[t];"undefined"==typeof n||"undefined"==typeof n.fadeIn?i.slides.entries.imgs[t]=n=e('').on("load",function(){n.appendTo(i.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):!n.is(":visible")&&!n.is(":animated")&&n.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var e,t=this.slides;for(e=0;e=t.entries.times[e].start&&this.media.currentTime<=t.entries.times[e].stop){this.showSlide(e);break}}},displayChapters:function(){var e;for(e=0;e100||i==t.entries.times.length-1&&100>o+s)&&(o=100-s),n.chapters.append(e('
    '+t.entries.text[i]+''+mejs.Utility.secondsToTimeCode(t.entries.times[i].start)+"–"+mejs.Utility.secondsToTimeCode(t.entries.times[i].stop)+"
    ")),s+=o;n.chapters.find("div.mejs-chapter").click(function(){n.media.setCurrentTime(parseFloat(e(this).attr("rel"))),n.media.paused&&n.media.play()}),n.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(t){var i=0;t=mejs.TrackFormatParser.split2(t,/\r?\n/);for(var o,n,s={text:[],times:[]};i$1"),s.text.push(n),s.times.push({start:0==mejs.Utility.convertSMPTEtoSeconds(o[1])?.2:mejs.Utility.convertSMPTEtoSeconds(o[1]),stop:mejs.Utility.convertSMPTEtoSeconds(o[3]),settings:o[5]})}return s}},dfxp:{parse:function(t){t=e(t).filter("tt");var i=0;i=t.children("div").eq(0);var o=i.find("p");i=t.find("#"+i.attr("style"));var n,s;if(t={text:[],times:[]},i.length&&(s=i.removeAttr("id").get(0).attributes,s.length))for(n={},i=0;i$1"),t.text.push(s),0==t.times.start&&(t.times.start=2)}return t}},split2:function(e,t){return e.split(t)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(e,t){var i,o=[],n="";for(i=0;i
    ').appendTo(e("body")).hide(),t.container.bind("contextmenu",function(e){return t.isContextMenuEnabled?(e.preventDefault(),t.renderContextMenu(e.clientX-1,e.clientY-1),!1):void 0}),t.container.bind("click",function(){t.contextMenu.hide()}),t.contextMenu.bind("mouseleave",function(){t.startContextMenuTimer()})},cleancontextmenu:function(e){e.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var e=this;e.killContextMenuTimer(),e.contextMenuTimer=setTimeout(function(){e.hideContextMenu(),e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;null!=e&&(clearTimeout(e),delete e)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(t,i){for(var o=this,n="",s=o.options.contextMenuItems,r=0,a=s.length;a>r;r++)if(s[r].isSeparator)n+='
    ';else{var l=s[r].render(o);null!=l&&(n+='
    '+l+"
    ")}o.contextMenu.empty().append(e(n)).css({top:i,left:t}).show(),o.contextMenu.find(".mejs-contextmenu-item").each(function(){var t=e(this),i=parseInt(t.data("itemindex"),10),n=o.options.contextMenuItems[i];"undefined"!=typeof n.show&&n.show(t,o),t.click(function(){"undefined"!=typeof n.click&&n.click(o),o.contextMenu.hide()})}),setTimeout(function(){o.killControlsTimer("rev3")},100)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")}),e.extend(MediaElementPlayer.prototype,{buildpostroll:function(t,i,o){var n=this.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof n&&(t.postroll=e('').prependTo(o).hide(),this.media.addEventListener("ended",function(){e.ajax({dataType:"html",url:n,success:function(e){o.find(".mejs-postroll-layer-content").html(e)}}),t.postroll.show()},!1))}})}(mejs.$),"undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof ender&&(mejs.$=ender),function(e){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(e){return.05*e.duration},defaultSeekForwardInterval:function(e){return.05*e.duration},audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(e,t){t.paused||t.ended?e.play():e.pause()}},{keys:[38],action:function(e,t){t.setVolume(Math.min(t.volume+.1,1))}},{keys:[40],action:function(e,t){t.setVolume(Math.max(t.volume-.1,0))}},{keys:[37,227],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.max(t.currentTime-e.options.defaultSeekBackwardInterval(t),0);t.setCurrentTime(i)}}},{keys:[39,228],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.min(t.currentTime+e.options.defaultSeekForwardInterval(t),t.duration);t.setCurrentTime(i)}}},{keys:[70],action:function(e){"undefined"!=typeof e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(t,i){return this instanceof mejs.MediaElementPlayer?(this.$media=this.$node=e(t),this.node=this.media=this.$media[0],"undefined"!=typeof this.node.player?this.node.player:(this.node.player=this,"undefined"==typeof i&&(i=this.$node.data("mejsoptions")),this.options=e.extend({},mejs.MepDefaults,i),this.id="mep_"+mejs.mepIndex++,mejs.players[this.id]=this,this.init(),this)):new mejs.MediaElementPlayer(t,i)},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var t=this,i=mejs.MediaFeatures,o=e.extend(!0,{},t.options,{success:function(e,i){t.meReady(e,i)},error:function(e){t.handleError(e)}}),n=t.media.tagName.toLowerCase();t.isDynamic="audio"!==n&&"video"!==n,t.isVideo=t.isDynamic?t.options.isVideo:"audio"!==n&&t.options.isVideo,i.isiPad&&t.options.iPadUseNativeControls||i.isiPhone&&t.options.iPhoneUseNativeControls?(t.$media.attr("controls","controls"),i.isiPad&&null!==t.media.getAttribute("autoplay")&&t.play()):i.isAndroid&&t.options.AndroidUseNativeControls||(t.$media.removeAttr("controls"),t.container=e('
    ').addClass(t.$media[0].className).insertBefore(t.$media),t.container.addClass((i.isAndroid?"mejs-android ":"")+(i.isiOS?"mejs-ios ":"")+(i.isiPad?"mejs-ipad ":"")+(i.isiPhone?"mejs-iphone ":"")+(t.isVideo?"mejs-video ":"mejs-audio ")),i.isiOS?(i=t.$media.clone(),t.container.find(".mejs-mediaelement").append(i),t.$media.remove(),t.$node=t.$media=i,t.node=t.media=i[0]):t.container.find(".mejs-mediaelement").append(t.$media),t.controls=t.container.find(".mejs-controls"),t.layers=t.container.find(".mejs-layers"),i=t.isVideo?"video":"audio",n=i.substring(0,1).toUpperCase()+i.substring(1),t.width=t.options[i+"Width"]>0||t.options[i+"Width"].toString().indexOf("%")>-1?t.options[i+"Width"]:""!==t.media.style.width&&null!==t.media.style.width?t.media.style.width:null!==t.media.getAttribute("width")?t.$media.attr("width"):t.options["default"+n+"Width"],t.height=t.options[i+"Height"]>0||t.options[i+"Height"].toString().indexOf("%")>-1?t.options[i+"Height"]:""!==t.media.style.height&&null!==t.media.style.height?t.media.style.height:null!==t.$media[0].getAttribute("height")?t.$media.attr("height"):t.options["default"+n+"Height"],t.setPlayerSize(t.width,t.height),o.pluginWidth=t.width,o.pluginHeight=t.height),mejs.MediaElement(t.$media[0],o),"undefined"!=typeof t.container&&t.controlsAreVisible&&t.container.trigger("controlsshown")},showControls:function(e){var t=this;e="undefined"==typeof e||e,t.controlsAreVisible||(e?(t.controls.css("visibility","visible").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0,t.container.trigger("controlsshown")}),t.container.find(".mejs-control").css("visibility","visible").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0})):(t.controls.css("visibility","visible").css("display","block"),t.container.find(".mejs-control").css("visibility","visible").css("display","block"),t.controlsAreVisible=!0,t.container.trigger("controlsshown")),t.setControlsSize())},hideControls:function(t){var i=this;t="undefined"==typeof t||t,i.controlsAreVisible&&!i.options.alwaysShowControls&&(t?(i.controls.stop(!0,!0).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block"),i.controlsAreVisible=!1,i.container.trigger("controlshidden")}),i.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block")})):(i.controls.css("visibility","hidden").css("display","block"),i.container.find(".mejs-control").css("visibility","hidden").css("display","block"),i.controlsAreVisible=!1,i.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(e){var t=this;e="undefined"!=typeof e?e:1500,t.killControlsTimer("start"),t.controlsTimer=setTimeout(function(){t.hideControls(),t.killControlsTimer("hide")},e)},killControlsTimer:function(){null!==this.controlsTimer&&(clearTimeout(this.controlsTimer),delete this.controlsTimer,this.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){this.killControlsTimer(),this.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){this.showControls(!1),this.controlsEnabled=!0},meReady:function(e,t){var i=this,o=mejs.MediaFeatures,n=t.getAttribute("autoplay");n=!("undefined"==typeof n||null===n||"false"===n);var s;if(!i.created){if(i.created=!0,i.media=e,i.domNode=t,!(o.isAndroid&&i.options.AndroidUseNativeControls||o.isiPad&&i.options.iPadUseNativeControls||o.isiPhone&&i.options.iPhoneUseNativeControls)){i.buildposter(i,i.controls,i.layers,i.media),i.buildkeyboard(i,i.controls,i.layers,i.media),i.buildoverlays(i,i.controls,i.layers,i.media),i.findTracks();for(s in i.options.features)if(o=i.options.features[s],i["build"+o])try{i["build"+o](i,i.controls,i.layers,i.media)}catch(r){}i.container.trigger("controlsready"),i.setPlayerSize(i.width,i.height),i.setControlsSize(),i.isVideo&&(mejs.MediaFeatures.hasTouch?i.$media.bind("touchstart",function(){i.controlsAreVisible?i.hideControls(!1):i.controlsEnabled&&i.showControls(!1)}):(i.clickToPlayPauseCallback=function(){i.options.clickToPlayPause&&(i.media.paused?i.play():i.pause())},i.media.addEventListener("click",i.clickToPlayPauseCallback,!1),i.container.bind("mouseenter mouseover",function(){i.controlsEnabled&&(i.options.alwaysShowControls||(i.killControlsTimer("enter"),i.showControls(),i.startControlsTimer(2500)))}).bind("mousemove",function(){i.controlsEnabled&&(i.controlsAreVisible||i.showControls(),i.options.alwaysShowControls||i.startControlsTimer(2500))}).bind("mouseleave",function(){i.controlsEnabled&&!i.media.paused&&!i.options.alwaysShowControls&&i.startControlsTimer(1e3)})),i.options.hideVideoControlsOnLoad&&i.hideControls(!1),n&&!i.options.alwaysShowControls&&i.hideControls(),i.options.enableAutosize&&i.media.addEventListener("loadedmetadata",function(e){i.options.videoHeight<=0&&null===i.domNode.getAttribute("height")&&!isNaN(e.target.videoHeight)&&(i.setPlayerSize(e.target.videoWidth,e.target.videoHeight),i.setControlsSize(),i.media.setVideoSize(e.target.videoWidth,e.target.videoHeight))},!1)),e.addEventListener("play",function(){for(var e in mejs.players){var t=mejs.players[e];t.id!=i.id&&i.options.pauseOtherPlayers&&!t.paused&&!t.ended&&t.pause(),t.hasFocus=!1}i.hasFocus=!0},!1),i.media.addEventListener("ended",function(){if(i.options.autoRewind)try{i.media.setCurrentTime(0)}catch(e){}i.media.pause(),i.setProgressRail&&i.setProgressRail(),i.setCurrentRail&&i.setCurrentRail(),i.options.loop?i.play():!i.options.alwaysShowControls&&i.controlsEnabled&&i.showControls()},!1),i.media.addEventListener("loadedmetadata",function(){i.updateDuration&&i.updateDuration(),i.updateCurrent&&i.updateCurrent(),i.isFullScreen||(i.setPlayerSize(i.width,i.height),i.setControlsSize())},!1),setTimeout(function(){i.setPlayerSize(i.width,i.height),i.setControlsSize()},50),i.globalBind("resize",function(){i.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||i.setPlayerSize(i.width,i.height),i.setControlsSize()}),"youtube"==i.media.pluginType&&i.container.find(".mejs-overlay-play").hide()}n&&"native"==e.pluginType&&i.play(),i.options.success&&("string"==typeof i.options.success?window[i.options.success](i.media,i.domNode,i):i.options.success(i.media,i.domNode,i))}},handleError:function(e){this.controls.hide(),this.options.error&&this.options.error(e)},setPlayerSize:function(t,i){if("undefined"!=typeof t&&(this.width=t),"undefined"!=typeof i&&(this.height=i),this.height.toString().indexOf("%")>0||"100%"===this.$node.css("max-width")||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===1||this.$node[0].currentStyle&&"100%"===this.$node[0].currentStyle.maxWidth){var o=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,n=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,s=this.container.parent().closest(":visible").width();o=this.isVideo||!this.options.autosizeProgress?parseInt(s*n/o,10):n,isNaN(o)&&(o=this.container.parent().closest(":visible").height()),"body"===this.container.parent()[0].tagName.toLowerCase()&&(s=e(window).width(),o=e(window).height()),0!=o&&0!=s&&(this.container.width(s).height(o),this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%"),this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(s,o),this.layers.children(".mejs-layer").width("100%").height("100%"))}else this.container.width(this.width).height(this.height),this.layers.children(".mejs-layer").width(this.width).height(this.height);s=this.layers.find(".mejs-overlay-play"),o=s.find(".mejs-overlay-button"),s.height(this.container.height()-this.controls.height()),o.css("margin-top","-"+(o.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var t=0,i=0,o=this.controls.find(".mejs-time-rail"),n=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current"),this.controls.find(".mejs-time-loaded");var s=o.siblings(),r=s.last(),a=null;if(this.container.is(":visible")&&o.length&&o.is(":visible")){this.options&&!this.options.autosizeProgress&&(i=parseInt(o.css("width"))),0!==i&&i||(s.each(function(){var i=e(this);"absolute"!=i.css("position")&&i.is(":visible")&&(t+=e(this).outerWidth(!0))}),i=this.controls.width()-t-(o.outerWidth(!0)-o.width()));do o.width(i),n.width(i-(n.outerWidth(!0)-n.width())),"absolute"!=r.css("position")&&(a=r.position(),i--);while(null!=a&&a.top>0&&i>0);this.setProgressRail&&this.setProgressRail(),this.setCurrentRail&&this.setCurrentRail()}},buildposter:function(t,i,o,n){var s=e('
    ').appendTo(o);i=t.$media.attr("poster"),""!==t.options.poster&&(i=t.options.poster),""!==i&&null!=i?this.setPoster(i):s.hide(),n.addEventListener("play",function(){s.hide()},!1),t.options.showPosterWhenEnded&&t.options.autoRewind&&n.addEventListener("ended",function(){s.show()},!1)},setPoster:function(t){var i=this.container.find(".mejs-poster"),o=i.find("img");0==o.length&&(o=e('').appendTo(i)),o.attr("src",t),i.css({"background-image":"url("+t+")"})},buildoverlays:function(t,i,o,n){var s=this;if(t.isVideo){var r=e('
    ').hide().appendTo(o),a=e('
    ').hide().appendTo(o),l=e('
    ').appendTo(o).bind("click touchstart",function(){s.options.clickToPlayPause&&n.paused&&n.play()});n.addEventListener("play",function(){l.hide(),r.hide(),i.find(".mejs-time-buffering").hide(),a.hide()},!1),n.addEventListener("playing",function(){l.hide(),r.hide(),i.find(".mejs-time-buffering").hide(),a.hide()},!1),n.addEventListener("seeking",function(){r.show(),i.find(".mejs-time-buffering").show()},!1),n.addEventListener("seeked",function(){r.hide(),i.find(".mejs-time-buffering").hide()},!1),n.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||l.show()},!1),n.addEventListener("waiting",function(){r.show(),i.find(".mejs-time-buffering").show()},!1),n.addEventListener("loadeddata",function(){r.show(),i.find(".mejs-time-buffering").show()},!1),n.addEventListener("canplay",function(){r.hide(),i.find(".mejs-time-buffering").hide()},!1),n.addEventListener("error",function(){r.hide(),i.find(".mejs-time-buffering").hide(),a.show(),a.find("mejs-overlay-error").html("Error loading this resource")},!1)}},buildkeyboard:function(t,i,o,n){this.globalBind("keydown",function(e){if(t.hasFocus&&t.options.enableKeyboard)for(var i=0,o=t.options.keyActions.length;o>i;i++)for(var s=t.options.keyActions[i],r=0,a=s.keys.length;a>r;r++)if(e.keyCode==s.keys[r])return e.preventDefault(),s.action(t,n,e.keyCode),!1; return!0}),this.globalBind("click",function(i){t.hasFocus=0!=e(i.target).closest(".mejs-container").length})},findTracks:function(){var t=this,i=t.$media.find("track");t.tracks=[],i.each(function(i,o){o=e(o),t.tracks.push({srclang:o.attr("srclang")?o.attr("srclang").toLowerCase():"",src:o.attr("src"),kind:o.attr("kind"),label:o.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(e){this.container[0].className="mejs-container "+e,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(e){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(e){this.media.setMuted(e)},setCurrentTime:function(e){this.media.setCurrentTime(e)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(e){this.media.setVolume(e)},getVolume:function(){return this.media.volume},setSrc:function(e){this.media.setSrc(e)},remove:function(){var e,t;for(e in this.options.features)if(t=this.options.features[e],this["clean"+t])try{this["clean"+t](this)}catch(i){}this.isDynamic?this.$node.insertBefore(this.container):(this.$media.prop("controls",!0),this.$node.clone().show().insertBefore(this.container),this.$node.remove()),"native"!==this.media.pluginType&&this.media.remove(),delete mejs.players[this.id],"object"==typeof this.container&&this.container.remove(),this.globalUnbind(),delete this.node.player}},function(){function t(t,o){var n={d:[],w:[]};return e.each((t||"").split(" "),function(e,t){var s=t+"."+o;0===s.indexOf(".")?(n.d.push(s),n.w.push(s)):n[i.test(t)?"w":"d"].push(s)}),n.d=n.d.join(" "),n.w=n.w.join(" "),n}var i=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(i,o,n){i=t(i,this.id),i.d&&e(document).bind(i.d,o,n),i.w&&e(window).bind(i.w,o,n)},mejs.MediaElementPlayer.prototype.globalUnbind=function(i,o){i=t(i,this.id),i.d&&e(document).unbind(i.d,o),i.w&&e(window).unbind(i.w,o)}}(),"undefined"!=typeof jQuery&&(jQuery.fn.mediaelementplayer=function(e){return this.each(e===!1?function(){var e=jQuery(this).data("mediaelementplayer");e&&e.remove(),jQuery(this).removeData("mediaelementplayer")}:function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,e))}),this}),e(document).ready(function(){e(".mejs-player").mediaelementplayer()}),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(e){e.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")}),e.extend(MediaElementPlayer.prototype,{buildplaypause:function(t,i,o,n){var s=e('
    ').appendTo(i).click(function(e){return e.preventDefault(),n.paused?n.play():n.pause(),!1});n.addEventListener("play",function(){s.removeClass("mejs-play").addClass("mejs-pause")},!1),n.addEventListener("playing",function(){s.removeClass("mejs-play").addClass("mejs-pause")},!1),n.addEventListener("pause",function(){s.removeClass("mejs-pause").addClass("mejs-play")},!1),n.addEventListener("paused",function(){s.removeClass("mejs-pause").addClass("mejs-play")},!1)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{stopText:"Stop"}),e.extend(MediaElementPlayer.prototype,{buildstop:function(t,i,o,n){e('
    ').appendTo(i).click(function(){n.paused||n.pause(),n.currentTime>0&&(n.setCurrentTime(0),n.pause(),i.find(".mejs-time-current").width("0px"),i.find(".mejs-time-handle").css("left","0px"),i.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0)),i.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0)),o.find(".mejs-poster").show())})}})}(mejs.$),function(e){e.extend(MediaElementPlayer.prototype,{buildprogress:function(t,i,o,n){e('
    00:00
    ').appendTo(i),i.find(".mejs-time-buffering").hide();var s=this,r=i.find(".mejs-time-total");o=i.find(".mejs-time-loaded");var a=i.find(".mejs-time-current"),l=i.find(".mejs-time-handle"),d=i.find(".mejs-time-float"),c=i.find(".mejs-time-float-current"),u=function(e){e=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.pageX;var t=r.offset(),i=r.outerWidth(!0),o=0,s=o=0;n.duration&&(ei+t.left&&(e=i+t.left),s=e-t.left,o=s/i,o=.02>=o?0:o*n.duration,h&&o!==n.currentTime&&n.setCurrentTime(o),mejs.MediaFeatures.hasTouch||(d.css("left",s),c.html(mejs.Utility.secondsToTimeCode(o)),d.show()))},h=!1;r.bind("mousedown touchstart",function(e){return 1===e.which||0===e.which?(h=!0,u(e),s.globalBind("mousemove.dur touchmove.dur",function(e){u(e)}),s.globalBind("mouseup.dur touchend.dur",function(){h=!1,d.hide(),s.globalUnbind(".dur")}),!1):void 0}).bind("mouseenter",function(){s.globalBind("mousemove.dur",function(e){u(e)}),mejs.MediaFeatures.hasTouch||d.show()}).bind("mouseleave",function(){h||(s.globalUnbind(".dur"),d.hide())}),n.addEventListener("progress",function(e){t.setProgressRail(e),t.setCurrentRail(e)},!1),n.addEventListener("timeupdate",function(e){t.setProgressRail(e),t.setCurrentRail(e)},!1),s.loaded=o,s.total=r,s.current=a,s.handle=l},setProgressRail:function(e){var t=void 0!=e?e.target:this.media,i=null;t&&t.buffered&&t.buffered.length>0&&t.buffered.end&&t.duration?i=t.buffered.end(0)/t.duration:t&&void 0!=t.bytesTotal&&t.bytesTotal>0&&void 0!=t.bufferedBytes?i=t.bufferedBytes/t.bytesTotal:e&&e.lengthComputable&&0!=e.total&&(i=e.loaded/e.total),null!==i&&(i=Math.min(1,Math.max(0,i)),this.loaded&&this.total&&this.loaded.width(this.total.width()*i))},setCurrentRail:function(){if(void 0!=this.media.currentTime&&this.media.duration&&this.total&&this.handle){var e=Math.round(this.total.width()*this.media.currentTime/this.media.duration),t=e-Math.round(this.handle.outerWidth(!0)/2);this.current.width(e),this.handle.css("left",t)}}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "}),e.extend(MediaElementPlayer.prototype,{buildcurrent:function(t,i,o,n){e('
    '+(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
    ").appendTo(i),this.currenttime=this.controls.find(".mejs-currenttime"),n.addEventListener("timeupdate",function(){t.updateCurrent()},!1)},buildduration:function(t,i,o,n){i.children().last().find(".mejs-currenttime").length>0?e(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(i.find(".mejs-time")):(i.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),e('
    '+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
    ").appendTo(i)),this.durationD=this.controls.find(".mejs-duration"),n.addEventListener("timeupdate",function(){t.updateDuration()},!1)},updateCurrent:function(){this.currenttime&&this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600),this.durationD&&(this.options.duration>0||this.media.duration)&&this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration:this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),e.extend(MediaElementPlayer.prototype,{buildvolume:function(t,i,o,n){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var s=this,r=s.isVideo?s.options.videoVolume:s.options.audioVolume,a="horizontal"==r?e('
    ').appendTo(i):e('
    ').appendTo(i),l=s.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),d=s.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),c=s.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),u=s.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),h=function(e,t){if(l.is(":visible")||"undefined"!=typeof t)if(e=Math.max(0,e),e=Math.min(e,1),0==e?a.removeClass("mejs-mute").addClass("mejs-unmute"):a.removeClass("mejs-unmute").addClass("mejs-mute"),"vertical"==r){var i=d.height(),o=d.position(),n=i-i*e;u.css("top",Math.round(o.top+n-u.height()/2)),c.height(i-n),c.css("top",o.top+n)}else i=d.width(),o=d.position(),i*=e,u.css("left",Math.round(o.left+i-u.width()/2)),c.width(Math.round(i));else l.show(),h(e,!0),l.hide()},m=function(e){var t=null,i=d.offset();if("vertical"==r){if(t=d.height(),parseInt(d.css("top").replace(/px/,""),10),t=(t-(e.pageY-i.top))/t,0==i.top||0==i.left)return}else t=d.width(),t=(e.pageX-i.left)/t;t=Math.max(0,t),t=Math.min(t,1),h(t),n.setMuted(0==t?!0:!1),n.setVolume(t)},p=!1,f=!1;a.hover(function(){l.show(),f=!0},function(){f=!1,!p&&"vertical"==r&&l.hide()}),l.bind("mouseover",function(){f=!0}).bind("mousedown",function(e){return m(e),s.globalBind("mousemove.vol",function(e){m(e)}),s.globalBind("mouseup.vol",function(){p=!1,s.globalUnbind(".vol"),!f&&"vertical"==r&&l.hide()}),p=!0,!1}),a.find("button").click(function(){n.setMuted(!n.muted)}),n.addEventListener("volumechange",function(){p||(n.muted?(h(0),a.removeClass("mejs-mute").addClass("mejs-unmute")):(h(n.volume),a.removeClass("mejs-unmute").addClass("mejs-mute")))},!1),s.container.is(":visible")&&(h(t.options.startVolume),0===t.options.startVolume&&n.setMuted(!0),"native"===n.pluginType&&n.setVolume(t.options.startVolume))}}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")}),e.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,buildfullscreen:function(t,i,o,n){if(t.isVideo){t.isInIframe=window.location!=window.parent.location,mejs.MediaFeatures.hasTrueNativeFullScreen&&(o=function(){t.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(t.isNativeFullScreen=!0,t.setControlsSize()):(t.isNativeFullScreen=!1,t.exitFullScreen()))},mejs.MediaFeatures.hasMozNativeFullScreen?t.globalBind(mejs.MediaFeatures.fullScreenEventName,o):t.container.bind(mejs.MediaFeatures.fullScreenEventName,o));var s=this,r=e('
    ').appendTo(i);if("native"===s.media.pluginType||!s.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)r.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||t.isFullScreen?t.exitFullScreen():t.enterFullScreen()});else{var a=null;if(function(){var e=document.createElement("x"),t=document.documentElement,i=window.getComputedStyle;return"pointerEvents"in e.style?(e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e),i=i&&"auto"===i(e,"").pointerEvents,t.removeChild(e),!!i):!1}()&&!mejs.MediaFeatures.isOpera){var l=!1,d=function(){if(l){for(var e in c)c[e].hide();r.css("pointer-events",""),s.controls.css("pointer-events",""),s.media.removeEventListener("click",s.clickToPlayPauseCallback),l=!1}},c={};i=["top","left","right","bottom"];var u,h=function(){var e=r.offset().left-s.container.offset().left,t=r.offset().top-s.container.offset().top,i=r.outerWidth(!0),o=r.outerHeight(!0),n=s.container.width(),a=s.container.height();for(u in c)c[u].css({position:"absolute",top:0,left:0});c.top.width(n).height(t),c.left.width(e).height(o).css({top:t}),c.right.width(n-e-i).height(o).css({top:t,left:e+i}),c.bottom.width(n).height(a-o-t).css({top:t+o})};for(s.globalBind("resize",function(){h()}),u=0,o=i.length;o>u;u++)c[i[u]]=e('
    ').appendTo(s.container).mouseover(d).hide();r.on("mouseover",function(){if(!s.isFullScreen){var e=r.offset(),i=t.container.offset();n.positionFullscreenButton(e.left-i.left,e.top-i.top,!1),r.css("pointer-events","none"),s.controls.css("pointer-events","none"),s.media.addEventListener("click",s.clickToPlayPauseCallback);for(u in c)c[u].show();h(),l=!0}}),n.addEventListener("fullscreenchange",function(){s.isFullScreen=!s.isFullScreen,s.isFullScreen?s.media.removeEventListener("click",s.clickToPlayPauseCallback):s.media.addEventListener("click",s.clickToPlayPauseCallback),d()}),s.globalBind("mousemove",function(e){if(l){var t=r.offset();(e.pageYt.top+r.outerHeight(!0)||e.pageXt.left+r.outerWidth(!0))&&(r.css("pointer-events",""),s.controls.css("pointer-events",""),l=!1)}})}else r.on("mouseover",function(){null!==a&&(clearTimeout(a),delete a);var e=r.offset(),i=t.container.offset();n.positionFullscreenButton(e.left-i.left,e.top-i.top,!0)}).on("mouseout",function(){null!==a&&(clearTimeout(a),delete a),a=setTimeout(function(){n.hideFullscreenButton()},1500)})}t.fullscreenBtn=r,s.globalBind("keydown",function(e){(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||s.isFullScreen)&&27==e.keyCode&&t.exitFullScreen()})}},cleanfullscreen:function(e){e.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var t=this;if("native"===t.media.pluginType||!mejs.MediaFeatures.isFirefox&&!t.options.usePluginFullScreen){if(e(document.documentElement).addClass("mejs-fullscreen"),normalHeight=t.container.height(),normalWidth=t.container.width(),"native"===t.media.pluginType)if(mejs.MediaFeatures.hasTrueNativeFullScreen)mejs.MediaFeatures.requestFullScreen(t.container[0]),t.isInIframe&&setTimeout(function o(){if(t.isNativeFullScreen){var i=(window.devicePixelRatio||1)*e(window).width(),n=screen.width;Math.abs(n-i)>.002*n?t.exitFullScreen():setTimeout(o,500)}},500);else if(mejs.MediaFeatures.hasSemiNativeFullScreen)return void t.media.webkitEnterFullscreen();if(t.isInIframe){var i=t.options.newWindowCallback(this);if(""!==i){if(!mejs.MediaFeatures.hasTrueNativeFullScreen)return t.pause(),void window.open(i,t.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");setTimeout(function(){t.isNativeFullScreen||(t.pause(),window.open(i,t.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no"))},250)}}t.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),t.containerSizeTimeout=setTimeout(function(){t.container.css({width:"100%",height:"100%"}),t.setControlsSize()},500),"native"===t.media.pluginType?t.$media.width("100%").height("100%"):(t.container.find(".mejs-shim").width("100%").height("100%"),t.media.setVideoSize(e(window).width(),e(window).height())),t.layers.children("div").width("100%").height("100%"),t.fullscreenBtn&&t.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),t.setControlsSize(),t.isFullScreen=!0}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout),"native"!==this.media.pluginType&&mejs.MediaFeatures.isFirefox?this.media.setFullscreen(!1):(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),e(document.documentElement).removeClass("mejs-fullscreen"),this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight),"native"===this.media.pluginType?this.$media.width(normalWidth).height(normalHeight):(this.container.find(".mejs-shim").width(normalWidth).height(normalHeight),this.media.setVideoSize(normalWidth,normalHeight)),this.layers.children("div").width(normalWidth).height(normalHeight),this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),this.setControlsSize(),this.isFullScreen=!1)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),e.extend(MediaElementPlayer.prototype,{hasChapters:!1,buildtracks:function(t,i,o,n){if(0!=t.tracks.length){var s;if(this.domNode.textTracks)for(s=this.domNode.textTracks.length-1;s>=0;s--)this.domNode.textTracks[s].mode="hidden";for(t.chapters=e('
    ').prependTo(o).hide(),t.captions=e('
    ').prependTo(o).hide(),t.captionsText=t.captions.find(".mejs-captions-text"),t.captionsButton=e('
    ").appendTo(i),s=i=0;s0&&i.displayChapters(o)},!1),"slides"==o.kind&&i.setupSlides(o)},error:function(){i.loadNextTrack()}})},enableTrackButton:function(t,i){""===i&&(i=mejs.language.codes[t]||t),this.captionsButton.find("input[value="+t+"]").prop("disabled",!1).siblings("label").html(i),this.options.startLanguage==t&&e("#"+this.id+"_captions_"+t).click(),this.adjustLanguageBox()},addTrackButton:function(t,i){""===i&&(i=mejs.language.codes[t]||t),this.captionsButton.find("ul").append(e('
  • ")),this.adjustLanguageBox(),this.container.find(".mejs-captions-translations option[value="+t+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+this.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var e=!1;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i=t.entries.times[e].start&&this.media.currentTime<=t.entries.times[e].stop)return this.captionsText.html(t.entries.text[e]),void this.captions.show().height(0);this.captions.hide()}},setupSlides:function(e){this.slides=e,this.slides.entries.imgs=[this.slides.entries.text.length],this.showSlide(0)},showSlide:function(t){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var i=this,o=i.slides.entries.text[t],n=i.slides.entries.imgs[t];"undefined"==typeof n||"undefined"==typeof n.fadeIn?i.slides.entries.imgs[t]=n=e('').on("load",function(){n.appendTo(i.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):!n.is(":visible")&&!n.is(":animated")&&n.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var e,t=this.slides;for(e=0;e=t.entries.times[e].start&&this.media.currentTime<=t.entries.times[e].stop){this.showSlide(e);break}}},displayChapters:function(){var e;for(e=0;e100||i==t.entries.times.length-1&&100>o+s)&&(o=100-s),n.chapters.append(e('
    '+t.entries.text[i]+''+mejs.Utility.secondsToTimeCode(t.entries.times[i].start)+"–"+mejs.Utility.secondsToTimeCode(t.entries.times[i].stop)+"
    ")),s+=o;n.chapters.find("div.mejs-chapter").click(function(){n.media.setCurrentTime(parseFloat(e(this).attr("rel"))),n.media.paused&&n.media.play()}),n.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(t){var i=0;t=mejs.TrackFormatParser.split2(t,/\r?\n/);for(var o,n,s={text:[],times:[]};i$1"),s.text.push(n),s.times.push({start:0==mejs.Utility.convertSMPTEtoSeconds(o[1])?.2:mejs.Utility.convertSMPTEtoSeconds(o[1]),stop:mejs.Utility.convertSMPTEtoSeconds(o[3]),settings:o[5]})}return s}},dfxp:{parse:function(t){t=e(t).filter("tt");var i=0;i=t.children("div").eq(0);var o=i.find("p");i=t.find("#"+i.attr("style"));var n,s;if(t={text:[],times:[]},i.length&&(s=i.removeAttr("id").get(0).attributes,s.length))for(n={},i=0;i$1"),t.text.push(s),0==t.times.start&&(t.times.start=2)}return t}},split2:function(e,t){return e.split(t)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(e,t){var i,o=[],n="";for(i=0;i
    ').appendTo(e("body")).hide(),t.container.bind("contextmenu",function(e){return t.isContextMenuEnabled?(e.preventDefault(),t.renderContextMenu(e.clientX-1,e.clientY-1),!1):void 0}),t.container.bind("click",function(){t.contextMenu.hide()}),t.contextMenu.bind("mouseleave",function(){t.startContextMenuTimer()})},cleancontextmenu:function(e){e.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var e=this;e.killContextMenuTimer(),e.contextMenuTimer=setTimeout(function(){e.hideContextMenu(),e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;null!=e&&(clearTimeout(e),delete e)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(t,i){for(var o=this,n="",s=o.options.contextMenuItems,r=0,a=s.length;a>r;r++)if(s[r].isSeparator)n+='
    ';else{var l=s[r].render(o);null!=l&&(n+='
    '+l+"
    ")}o.contextMenu.empty().append(e(n)).css({top:i,left:t}).show(),o.contextMenu.find(".mejs-contextmenu-item").each(function(){var t=e(this),i=parseInt(t.data("itemindex"),10),n=o.options.contextMenuItems[i];"undefined"!=typeof n.show&&n.show(t,o),t.click(function(){"undefined"!=typeof n.click&&n.click(o),o.contextMenu.hide()})}),setTimeout(function(){o.killControlsTimer("rev3")},100)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")}),e.extend(MediaElementPlayer.prototype,{buildpostroll:function(t,i,o){var n=this.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof n&&(t.postroll=e('').prependTo(o).hide(),this.media.addEventListener("ended",function(){e.ajax({dataType:"html",url:n,success:function(e){o.find(".mejs-postroll-layer-content").html(e)}}),t.postroll.show()},!1))}})}(mejs.$),function(e){var t=!1,i=!1,o=5e3,n=2e3,s=0,r=function(){var e=document.getElementsByTagName("script"),e=e[e.length-1].src.split("?")[0];return 0i;++i)e.call(t,this[i],i,this)});var l=window.requestAnimationFrame||!1,d=window.cancelAnimationFrame||!1;["ms","moz","webkit","o"].forEach(function(e){l||(l=window[e+"RequestAnimationFrame"]),d||(d=window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"])});var c=window.MutationObserver||window.WebKitMutationObserver||!1,u={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:!1,cursordragontouch:!1},h=!1,m=function(){if(h)return h; var e=document.createElement("DIV"),t={haspointerlock:"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document};t.isopera="opera"in window,t.isopera12=t.isopera&&"getUserMedia"in navigator,t.isie="all"in document&&"attachEvent"in e&&!t.isopera,t.isieold=t.isie&&!("msInterpolationMode"in e.style),t.isie7=!(!t.isie||t.isieold||"documentMode"in document&&7!=document.documentMode),t.isie8=t.isie&&"documentMode"in document&&8==document.documentMode,t.isie9=t.isie&&"performance"in window&&9<=document.documentMode,t.isie10=t.isie&&"performance"in window&&10<=document.documentMode,t.isie9mobile=/iemobile.9/i.test(navigator.userAgent),t.isie9mobile&&(t.isie9=!1),t.isie7mobile=!t.isie9mobile&&t.isie7&&/iemobile/i.test(navigator.userAgent),t.ismozilla="MozAppearance"in e.style,t.iswebkit="WebkitAppearance"in e.style,t.ischrome="chrome"in window,t.ischrome22=t.ischrome&&t.haspointerlock,t.ischrome26=t.ischrome&&"transition"in e.style,t.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window,t.hasmstouch=window.navigator.msPointerEnabled||!1,t.ismac=/^mac$/i.test(navigator.platform),t.isios=t.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform),t.isios4=t.isios&&!("seal"in Object),t.isandroid=/android/i.test(navigator.userAgent),t.trstyle=!1,t.hastransform=!1,t.hastranslate3d=!1,t.transitionstyle=!1,t.hastransition=!1,t.transitionend=!1;for(var i=["transform","msTransform","webkitTransform","MozTransform","OTransform"],o=0;on){if(w.getScrollTop()>=w.page.maxh)return!0}else if(0>=w.getScrollTop())return!0;w.scrollmom&&w.scrollmom.stop(),w.lastdeltay+=n,w.debounced("mousewheely",function(){var e=w.lastdeltay;w.lastdeltay=0,w.rail.drag||w.doScrollBy(e)},120)}return e.stopImmediatePropagation(),e.preventDefault()}var w=this;if(this.version="3.4.0",this.name="nicescroll",this.me=h,this.opt={doc:e("body"),win:!1},e.extend(this.opt,u),this.opt.snapbackspeed=80,a)for(var b in w.opt)"undefined"!=typeof a[b]&&(w.opt[b]=a[b]);this.iddoc=(this.doc=w.opt.doc)&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/BODY|HTML/.test(w.opt.win?w.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==w.opt.win,this.win=w.opt.win||(this.ispage?e(window):this.doc),this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win,this.body=e("body"),this.iframe=this.isfixed=this.viewport=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=w.opt.autohidemode,this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.checkrtlmode=!1;do this.id="ascrail"+n++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1,this.visibility=!0,this.hidden=this.locked=!1,this.cursoractive=!0,this.overflowx=w.opt.overflowx,this.overflowy=w.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltay=this.lastdeltax=0,this.detected=m();var x=e.extend({},this.detected);if(this.ishwscroll=(this.canhwscroll=x.hastransform&&w.opt.hwacceleration)&&w.haswrapper,this.istouchcapable=!1,x.cantouch&&x.ischrome&&!x.isios&&!x.isandroid&&(this.istouchcapable=!0,x.cantouch=!1),x.cantouch&&x.ismozilla&&!x.isios&&(this.istouchcapable=!0,x.cantouch=!1),w.opt.enablemouselockapi||(x.hasmousecapture=!1,x.haspointerlock=!1),this.delayed=function(e,t,i,o){var n=w.delaylist[e],s=(new Date).getTime();return!o&&n&&n.tt?!1:(n&&n.tt&&clearTimeout(n.tt),void(n&&n.last+i>s&&!n.tt?w.delaylist[e]={last:s+i,tt:setTimeout(function(){w.delaylist[e].tt=0,t.call()},i)}:n&&n.tt||(w.delaylist[e]={last:s,tt:0},setTimeout(function(){t.call()},0))))},this.debounced=function(e,t,i){var o=w.delaylist[e];(new Date).getTime(),w.delaylist[e]=t,o||setTimeout(function(){var t=w.delaylist[e];w.delaylist[e]=!1,t.call()},i)},this.synched=function(e,t){return w.synclist[e]=t,function(){w.onsync||(l(function(){w.onsync=!1;for(e in w.synclist){var t=w.synclist[e];t&&t.call(w),w.synclist[e]=!1}}),w.onsync=!0)}(),e},this.unsynched=function(e){w.synclist[e]&&(w.synclist[e]=!1)},this.css=function(e,t){for(var i in t)w.saved.css.push([e,i,e.css(i)]),e.css(i,t[i])},this.scrollTop=function(e){return"undefined"==typeof e?w.getScrollTop():w.setScrollTop(e)},this.scrollLeft=function(e){return"undefined"==typeof e?w.getScrollLeft():w.setScrollLeft(e)},BezierClass=function(e,t,i,o,n,s,r){this.st=e,this.ed=t,this.spd=i,this.p1=o||0,this.p2=n||1,this.p3=s||0,this.p4=r||1,this.ts=(new Date).getTime(),this.df=this.ed-this.st},BezierClass.prototype={B2:function(e){return 3*e*e*(1-e)},B3:function(e){return 3*e*(1-e)*(1-e)},B4:function(e){return(1-e)*(1-e)*(1-e)},getNow:function(){var e=1-((new Date).getTime()-this.ts)/this.spd,t=this.B2(e)+this.B3(e)+this.B4(e);return 0>e?this.ed:this.st+Math.round(this.df*t)},update:function(e,t){return this.st=this.getNow(),this.ed=e,this.spd=t,this.ts=(new Date).getTime(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},x.hastranslate3d&&x.isios&&this.doc.css("-webkit-backface-visibility","hidden");var T=function(){var e=w.doc.css(x.trstyle);return e&&"matrix"==e.substr(0,6)?e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1};this.getScrollTop=function(e){if(!e){if(e=T())return 16==e.length?-e[13]:-e[5];if(w.timerscroll&&w.timerscroll.bz)return w.timerscroll.bz.getNow()}return w.doc.translate.y},this.getScrollLeft=function(e){if(!e){if(e=T())return 16==e.length?-e[12]:-e[4];if(w.timerscroll&&w.timerscroll.bh)return w.timerscroll.bh.getNow()}return w.doc.translate.x},this.notifyScrollEvent=document.createEvent?function(e){var t=document.createEvent("UIEvents");t.initUIEvent("scroll",!1,!0,window,1),e.dispatchEvent(t)}:document.fireEvent?function(e){var t=document.createEventObject();e.fireEvent("onscroll"),t.cancelBubble=!0}:function(){},x.hastranslate3d&&w.opt.enabletranslate3d?(this.setScrollTop=function(e,t){w.doc.translate.y=e,w.doc.translate.ty=-1*e+"px",w.doc.css(x.trstyle,"translate3d("+w.doc.translate.tx+","+w.doc.translate.ty+",0px)"),t||w.notifyScrollEvent(w.win[0])},this.setScrollLeft=function(e,t){w.doc.translate.x=e,w.doc.translate.tx=-1*e+"px",w.doc.css(x.trstyle,"translate3d("+w.doc.translate.tx+","+w.doc.translate.ty+",0px)"),t||w.notifyScrollEvent(w.win[0])}):(this.setScrollTop=function(e,t){w.doc.translate.y=e,w.doc.translate.ty=-1*e+"px",w.doc.css(x.trstyle,"translate("+w.doc.translate.tx+","+w.doc.translate.ty+")"),t||w.notifyScrollEvent(w.win[0])},this.setScrollLeft=function(e,t){w.doc.translate.x=e,w.doc.translate.tx=-1*e+"px",w.doc.css(x.trstyle,"translate("+w.doc.translate.tx+","+w.doc.translate.ty+")"),t||w.notifyScrollEvent(w.win[0])})}else this.getScrollTop=function(){return w.docscroll.scrollTop()},this.setScrollTop=function(e){return w.docscroll.scrollTop(e)},this.getScrollLeft=function(){return w.docscroll.scrollLeft()},this.setScrollLeft=function(e){return w.docscroll.scrollLeft(e)};this.getTarget=function(e){return e?e.target?e.target:e.srcElement?e.srcElement:!1:!1},this.hasParent=function(e,t){if(!e)return!1;for(var i=e.target||e.srcElement||e||!1;i&&i.id!=t;)i=i.parentNode||!1;return!1!==i};var S={thin:1,medium:3,thick:5};this.getOffset=function(){if(w.isfixed)return{top:parseFloat(w.win.css("top")),left:parseFloat(w.win.css("left"))};if(!w.viewport)return w.win.offset();var e=w.win.offset(),t=w.viewport.offset();return{top:e.top-t.top+w.viewport.scrollTop(),left:e.left-t.left+w.viewport.scrollLeft()}},this.updateScrollBar=function(e){if(w.ishwscroll)w.rail.css({height:w.win.innerHeight()}),w.railh&&w.railh.css({width:w.win.innerWidth()});else{var t=w.getOffset(),i=t.top,o=t.left,i=i+g(w.win,"border-top-width",!0);w.win.outerWidth(),w.win.innerWidth();var o=o+(w.rail.align?w.win.outerWidth()-g(w.win,"border-right-width")-w.rail.width:g(w.win,"border-left-width")),n=w.opt.railoffset;n&&(n.top&&(i+=n.top),w.rail.align&&n.left&&(o+=n.left)),w.locked||w.rail.css({top:i,left:o,height:e?e.h:w.win.innerHeight()}),w.zoom&&w.zoom.css({top:i+1,left:1==w.rail.align?o-20:o+w.rail.width+4}),w.railh&&!w.locked&&(i=t.top,o=t.left,e=w.railh.align?i+g(w.win,"border-top-width",!0)+w.win.innerHeight()-w.railh.height:i+g(w.win,"border-top-width",!0),o+=g(w.win,"border-left-width"),w.railh.css({top:e,left:o,width:w.railh.width}))}},this.doRailClick=function(e,t,i){var o;w.locked||(w.cancelEvent(e),t?(t=i?w.doScrollLeft:w.doScrollTop,o=i?(e.pageX-w.railh.offset().left-w.cursorwidth/2)*w.scrollratio.x:(e.pageY-w.rail.offset().top-w.cursorheight/2)*w.scrollratio.y,t(o)):(t=i?w.doScrollLeftBy:w.doScrollBy,o=i?w.scroll.x:w.scroll.y,e=i?e.pageX-w.railh.offset().left:e.pageY-w.rail.offset().top,i=i?w.view.w:w.view.h,t(o>=e?i:-i)))},w.hasanimationframe=l,w.hascancelanimationframe=d,w.hasanimationframe?w.hascancelanimationframe||(d=function(){w.cancelAnimationFrame=!0}):(l=function(e){return setTimeout(e,15-Math.floor(+new Date/1e3)%16)},d=clearInterval),this.init=function(){if(w.saved.css=[],x.isie7mobile)return!0;if(x.hasmstouch&&w.css(w.ispage?e("html"):w.win,{"-ms-touch-action":"none"}),w.zindex="auto",w.zindex=w.ispage||"auto"!=w.opt.zindex?w.opt.zindex:p()||"auto",!w.ispage&&"auto"!=w.zindex&&w.zindex>s&&(s=w.zindex),w.isie&&0==w.zindex&&"auto"==w.opt.zindex&&(w.zindex="auto"),!w.ispage||!x.cantouch&&!x.isieold&&!x.isie9mobile){var n=w.docscroll;w.ispage&&(n=w.haswrapper?w.win:w.doc),x.isie9mobile||w.css(n,{"overflow-y":"hidden"}),w.ispage&&x.isie7&&("BODY"==w.doc[0].nodeName?w.css(e("html"),{"overflow-y":"hidden"}):"HTML"==w.doc[0].nodeName&&w.css(e("body"),{"overflow-y":"hidden"})),x.isios&&!w.ispage&&!w.haswrapper&&w.css(e("body"),{"-webkit-overflow-scrolling":"touch"});var a=e(document.createElement("div"));a.css({position:"relative",top:0,"float":"right",width:w.opt.cursorwidth,height:"0px","background-color":w.opt.cursorcolor,border:w.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":w.opt.cursorborderradius,"-moz-border-radius":w.opt.cursorborderradius,"border-radius":w.opt.cursorborderradius}),a.hborder=parseFloat(a.outerHeight()-a.innerHeight()),w.cursor=a;var l=e(document.createElement("div"));l.attr("id",w.id),l.addClass("nicescroll-rails");var d,u,h,m=["left","right"];for(h in m)u=m[h],(d=w.opt.railpadding[u])?l.css("padding-"+u,d+"px"):w.opt.railpadding[u]=0;if(l.append(a),l.width=Math.max(parseFloat(w.opt.cursorwidth),a.outerWidth())+w.opt.railpadding.left+w.opt.railpadding.right,l.css({width:l.width+"px",zIndex:w.zindex,background:w.opt.background,cursor:"default"}),l.visibility=!0,l.scrollable=!0,l.align="left"==w.opt.railalign?0:1,w.rail=l,a=w.rail.drag=!1,w.opt.boxzoom&&!w.ispage&&!x.isieold&&(a=document.createElement("div"),w.bind(a,"click",w.doZoom),w.zoom=e(a),w.zoom.css({cursor:"pointer","z-index":w.zindex,backgroundImage:"url("+r+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),w.opt.dblclickzoom&&w.bind(w.win,"dblclick",w.doZoom),x.cantouch&&w.opt.gesturezoom&&(w.ongesturezoom=function(e){return 1.5e.scale&&w.doZoomOut(e),w.cancelEvent(e)},w.bind(w.win,"gestureend",w.ongesturezoom))),w.railh=!1,w.opt.horizrailenabled){w.css(n,{"overflow-x":"hidden"}),a=e(document.createElement("div")),a.css({position:"relative",top:0,height:w.opt.cursorwidth,width:"0px","background-color":w.opt.cursorcolor,border:w.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":w.opt.cursorborderradius,"-moz-border-radius":w.opt.cursorborderradius,"border-radius":w.opt.cursorborderradius}),a.wborder=parseFloat(a.outerWidth()-a.innerWidth()),w.cursorh=a;var g=e(document.createElement("div"));g.attr("id",w.id+"-hr"),g.addClass("nicescroll-rails"),g.height=Math.max(parseFloat(w.opt.cursorwidth),a.outerHeight()),g.css({height:g.height+"px",zIndex:w.zindex,background:w.opt.background}),g.append(a),g.visibility=!0,g.scrollable=!0,g.align="top"==w.opt.railvalign?0:1,w.railh=g,w.railh.drag=!1}if(w.ispage?(l.css({position:"fixed",top:"0px",height:"100%"}),l.css(l.align?{right:"0px"}:{left:"0px"}),w.body.append(l),w.railh&&(g.css({position:"fixed",left:"0px",width:"100%"}),g.css(g.align?{bottom:"0px"}:{top:"0px"}),w.body.append(g))):(w.ishwscroll?("static"==w.win.css("position")&&w.css(w.win,{position:"relative"}),n="HTML"==w.win[0].nodeName?w.body:w.win,w.zoom&&(w.zoom.css({position:"absolute",top:1,right:0,"margin-right":l.width+4}),n.append(w.zoom)),l.css({position:"absolute",top:0}),l.css(l.align?{right:0}:{left:0}),n.append(l),g&&(g.css({position:"absolute",left:0,bottom:0}),g.css(g.align?{bottom:0}:{top:0}),n.append(g))):(w.isfixed="fixed"==w.win.css("position"),n=w.isfixed?"fixed":"absolute",w.isfixed||(w.viewport=w.getViewport(w.win[0])),w.viewport&&(w.body=w.viewport,0==/relative|absolute/.test(w.viewport.css("position"))&&w.css(w.viewport,{position:"relative"})),l.css({position:n}),w.zoom&&w.zoom.css({position:n}),w.updateScrollBar(),w.body.append(l),w.zoom&&w.body.append(w.zoom),w.railh&&(g.css({position:n}),w.body.append(g))),x.isios&&w.css(w.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),x.isie&&w.opt.disableoutline&&w.win.attr("hideFocus","true"),x.iswebkit&&w.opt.disableoutline&&w.win.css({outline:"none"})),!1===w.opt.autohidemode?(w.autohidedom=!1,w.rail.css({opacity:w.opt.cursoropacitymax}),w.railh&&w.railh.css({opacity:w.opt.cursoropacitymax})):!0===w.opt.autohidemode?(w.autohidedom=e().add(w.rail),x.isie8&&(w.autohidedom=w.autohidedom.add(w.cursor)),w.railh&&(w.autohidedom=w.autohidedom.add(w.railh)),w.railh&&x.isie8&&(w.autohidedom=w.autohidedom.add(w.cursorh))):"scroll"==w.opt.autohidemode?(w.autohidedom=e().add(w.rail),w.railh&&(w.autohidedom=w.autohidedom.add(w.railh))):"cursor"==w.opt.autohidemode?(w.autohidedom=e().add(w.cursor),w.railh&&(w.autohidedom=w.autohidedom.add(w.cursorh))):"hidden"==w.opt.autohidemode&&(w.autohidedom=!1,w.hide(),w.locked=!1),x.isie9mobile)w.scrollmom=new f(w),w.onmangotouch=function(e){e=w.getScrollTop();var t=w.getScrollLeft();if(e==w.scrollmom.lastscrolly&&t==w.scrollmom.lastscrollx)return!0;var i=e-w.mangotouch.sy,o=t-w.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(o,2)+Math.pow(i,2)))){var n=0>i?-1:1,s=0>o?-1:1,r=+new Date;w.mangotouch.lazy&&clearTimeout(w.mangotouch.lazy),802&&(w.mangotouch.lazy=setTimeout(function(){w.mangotouch.lazy=!1,w.mangotouch.dry=0,w.mangotouch.drx=0,w.mangotouch.tm=0,w.scrollmom.doMomentum(30)},100)))}},l=w.getScrollTop(),g=w.getScrollLeft(),w.mangotouch={sy:l,ly:l,dry:0,sx:g,lx:g,drx:0,lazy:!1,tm:0},w.bind(w.docscroll,"scroll",w.onmangotouch);else{if(x.cantouch||w.istouchcapable||w.opt.touchbehavior||x.hasmstouch){w.scrollmom=new f(w),w.ontouchstart=function(t){if(t.pointerType&&2!=t.pointerType)return!1;if(!w.locked){if(x.hasmstouch)for(var i=t.target?t.target:!1;i;){var o=e(i).getNiceScroll();if(00?"v":!1:w.rail.scrollable&&!w.railh.scrollable?o>0?"h":!1:!1,w.rail.drag.ck||(w.rail.drag.dl="f")}if(w.opt.touchbehavior&&w.isiframe&&x.isie&&(o=w.win.position(),w.rail.drag.x+=o.left,w.rail.drag.y+=o.top),w.hasmoving=!1,w.lastmouseup=!1,w.scrollmom.reset(t.clientX,t.clientY),!x.cantouch&&!this.istouchcapable&&!x.hasmstouch){if(!i||!/INPUT|SELECT|TEXTAREA/i.test(i.nodeName))return!w.ispage&&x.hasmousecapture&&i.setCapture(),w.cancelEvent(t);/SUBMIT|CANCEL|BUTTON/i.test(e(i).attr("type"))&&(pc={tg:i,click:!1},w.preventclick=pc)}}},w.ontouchend=function(e){return e.pointerType&&2!=e.pointerType?!1:w.rail.drag&&2==w.rail.drag.pt&&(w.scrollmom.doMomentum(),w.rail.drag=!1,w.hasmoving&&(w.hasmoving=!1,w.lastmouseup=!0,w.hideCursor(),x.hasmousecapture&&document.releaseCapture(),!x.cantouch))?w.cancelEvent(e):void 0};var v=w.opt.touchbehavior&&w.isiframe&&!x.hasmousecapture;w.ontouchmove=function(t,i){if(t.pointerType&&2!=t.pointerType)return!1;if(w.rail.drag&&2==w.rail.drag.pt){if(x.cantouch&&"undefined"==typeof t.original)return!0;if(w.hasmoving=!0,w.preventclick&&!w.preventclick.click&&(w.preventclick.click=w.preventclick.tg.onclick||!1,w.preventclick.tg.onclick=w.onpreventclick),t=e.extend({original:t},t),"changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),w.forcescreen){var o=t;t={original:t.original?t.original:t},t.clientX=o.screenX,t.clientY=o.screenY}if(o=ofy=0,v&&!i){var n=w.win.position(),o=-n.left;ofy=-n.top}var s=t.clientY+ofy,n=s-w.rail.drag.y,r=t.clientX+o,a=r-w.rail.drag.x,l=w.rail.drag.st-n;if(w.ishwscroll&&w.opt.bouncescroll?0>l?l=Math.round(l/2):l>w.page.maxh&&(l=w.page.maxh+Math.round((l-w.page.maxh)/2)):(0>l&&(s=l=0),l>w.page.maxh&&(l=w.page.maxh,s=0)),w.railh&&w.railh.scrollable){var d=w.rail.drag.sl-a;w.ishwscroll&&w.opt.bouncescroll?0>d?d=Math.round(d/2):d>w.page.maxw&&(d=w.page.maxw+Math.round((d-w.page.maxw)/2)):(0>d&&(r=d=0),d>w.page.maxw&&(d=w.page.maxw,r=0))}if(o=!1,w.rail.drag.dl)o=!0,"v"==w.rail.drag.dl?d=w.rail.drag.sl:"h"==w.rail.drag.dl&&(l=w.rail.drag.st);else{var n=Math.abs(n),a=Math.abs(a),c=w.opt.directionlockdeadzone;if("v"==w.rail.drag.ck){if(n>c&&.3*n>=a)return w.rail.drag=!1,!0;a>c&&(w.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==w.rail.drag.ck){if(a>c&&.3*az>=n)return w.rail.drag=!1,!0;n>c&&(w.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}if(w.synched("touchmove",function(){w.rail.drag&&2==w.rail.drag.pt&&(w.prepareTransition&&w.prepareTransition(0),w.rail.scrollable&&w.setScrollTop(l),w.scrollmom.update(r,s),w.railh&&w.railh.scrollable?(w.setScrollLeft(d),w.showCursor(l,d)):w.showCursor(l),x.isie10&&document.selection.clear())}),x.ischrome&&w.istouchcapable&&(o=!1),o)return w.cancelEvent(t)}}}if(w.onmousedown=function(e,t){if(!w.rail.drag||1==w.rail.drag.pt){if(w.locked)return w.cancelEvent(e);w.cancelScroll(),w.rail.drag={x:e.clientX,y:e.clientY,sx:w.scroll.x,sy:w.scroll.y,pt:1,hr:!!t};var i=w.getTarget(e);return!w.ispage&&x.hasmousecapture&&i.setCapture(),w.isiframe&&!x.hasmousecapture&&(w.saved.csspointerevents=w.doc.css("pointer-events"),w.css(w.doc,{"pointer-events":"none"})),w.cancelEvent(e)}},w.onmouseup=function(e){return w.rail.drag&&(x.hasmousecapture&&document.releaseCapture(),w.isiframe&&!x.hasmousecapture&&w.doc.css("pointer-events",w.saved.csspointerevents),1==w.rail.drag.pt)?(w.rail.drag=!1,w.cancelEvent(e)):void 0},w.onmousemove=function(e){if(w.rail.drag&&1==w.rail.drag.pt){if(x.ischrome&&0==e.which)return w.onmouseup(e);if(w.cursorfreezed=!0,w.rail.drag.hr){w.scroll.x=w.rail.drag.sx+(e.clientX-w.rail.drag.x),0>w.scroll.x&&(w.scroll.x=0);var t=w.scrollvaluemaxw;w.scroll.x>t&&(w.scroll.x=t)}else w.scroll.y=w.rail.drag.sy+(e.clientY-w.rail.drag.y),0>w.scroll.y&&(w.scroll.y=0),t=w.scrollvaluemax,w.scroll.y>t&&(w.scroll.y=t);return w.synched("mousemove",function(){w.rail.drag&&1==w.rail.drag.pt&&(w.showCursor(),w.rail.drag.hr?w.doScrollLeft(Math.round(w.scroll.x*w.scrollratio.x),w.opt.cursordragspeed):w.doScrollTop(Math.round(w.scroll.y*w.scrollratio.y),w.opt.cursordragspeed))}),w.cancelEvent(e)}},x.cantouch||w.opt.touchbehavior)w.onpreventclick=function(e){return w.preventclick?(w.preventclick.tg.onclick=w.preventclick.click,w.preventclick=!1,w.cancelEvent(e)):void 0},w.bind(w.win,"mousedown",w.ontouchstart),w.onclick=x.isios?!1:function(e){return w.lastmouseup?(w.lastmouseup=!1,w.cancelEvent(e)):!0},w.opt.grabcursorenabled&&x.cursorgrabvalue&&(w.css(w.ispage?w.doc:w.win,{cursor:x.cursorgrabvalue}),w.css(w.rail,{cursor:x.cursorgrabvalue}));else{var y=function(e){if(w.selectiondrag){if(e){var t=w.win.outerHeight();e=e.pageY-w.selectiondrag.top,e>0&&t>e&&(e=0),e>=t&&(e-=t),w.selectiondrag.df=e}0!=w.selectiondrag.df&&(w.doScrollBy(2*-Math.floor(w.selectiondrag.df/6)),w.debounced("doselectionscroll",function(){y()},50))}};w.hasTextSelected="getSelection"in document?function(){return 0w.page.maxh?w.doScrollTop(w.page.maxh):(w.scroll.y=Math.round(w.getScrollTop()*(1/w.scrollratio.y)),w.scroll.x=Math.round(w.getScrollLeft()*(1/w.scrollratio.x)),w.cursoractive&&w.noticeCursor()),w.scroll.y&&0==w.getScrollTop()&&w.doScrollTo(Math.floor(w.scroll.y*w.scrollratio.y)),w)},this.resize=w.onResize,this.lazyResize=function(e){return e=isNaN(e)?30:e,w.delayed("resize",w.resize,e),w},this._bind=function(e,t,i,o){w.events.push({e:e,n:t,f:i,b:o,q:!1}),e.addEventListener?e.addEventListener(t,i,o||!1):e.attachEvent?e.attachEvent("on"+t,i):e["on"+t]=i},this.jqbind=function(t,i,o){w.events.push({e:t,n:i,f:o,q:!0}),e(t).bind(i,o)},this.bind=function(e,t,i,o){var n="jquery"in e?e[0]:e;"mousewheel"==t?"onwheel"in w.win?w._bind(n,"wheel",i,o||!1):(e="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",v(n,e,i,o||!1),"DOMMouseScroll"==e&&v(n,"MozMousePixelScroll",i,o||!1)):n.addEventListener?(x.cantouch&&/mouseup|mousedown|mousemove/.test(t)&&w._bind(n,"mousedown"==t?"touchstart":"mouseup"==t?"touchend":"touchmove",function(e){if(e.touches){if(2>e.touches.length){var t=e.touches.length?e.touches[0]:e;t.original=e,i.call(this,t)}}else e.changedTouches&&(t=e.changedTouches[0],t.original=e,i.call(this,t))},o||!1),w._bind(n,t,i,o||!1),x.cantouch&&"mouseup"==t&&w._bind(n,"touchcancel",i,o||!1)):w._bind(n,t,function(e){return(e=e||window.event||!1)&&e.srcElement&&(e.target=e.srcElement),"pageY"in e||(e.pageX=e.clientX+document.documentElement.scrollLeft,e.pageY=e.clientY+document.documentElement.scrollTop),!1===i.call(n,e)||!1===o?w.cancelEvent(e):!0})},this._unbind=function(e,t,i,o){e.removeEventListener?e.removeEventListener(t,i,o):e.detachEvent?e.detachEvent("on"+t,i):e["on"+t]=!1},this.unbindAll=function(){for(var e=0;e20?e:0},w.opt.smoothscroll?w.ishwscroll&&x.hastransition&&w.opt.usetransition?(this.prepareTransition=function(e,t){var i=t?e>20?e:0:w.getTransitionSpeed(e),o=i?x.prefixstyle+"transform "+i+"ms ease-out":"";return w.lasttransitionstyle&&w.lasttransitionstyle==o||(w.lasttransitionstyle=o,w.doc.css(x.transitionstyle,o)),i},this.doScrollLeft=function(e,t){var i=w.scrollrunning?w.newscrolly:w.getScrollTop();w.doScrollPos(e,i,t)},this.doScrollTop=function(e,t){var i=w.scrollrunning?w.newscrollx:w.getScrollLeft();w.doScrollPos(i,e,t)},this.doScrollPos=function(e,t,i){var o=w.getScrollTop(),n=w.getScrollLeft();return(0>(w.newscrolly-o)*(t-o)||0>(w.newscrollx-n)*(e-n))&&w.cancelScroll(),0==w.opt.bouncescroll&&(0>t?t=0:t>w.page.maxh&&(t=w.page.maxh),0>e?e=0:e>w.page.maxw&&(e=w.page.maxw)),w.scrollrunning&&e==w.newscrollx&&t==w.newscrolly?!1:(w.newscrolly=t,w.newscrollx=e,w.newscrollspeed=i||!1,w.timer?!1:void(w.timer=setTimeout(function(){var i,o,n=w.getScrollTop(),s=w.getScrollLeft();i=e-s,o=t-n,i=Math.round(Math.sqrt(Math.pow(i,2)+Math.pow(o,2))),i=w.newscrollspeed&&1=w.newscrollspeed&&(i*=w.newscrollspeed),w.prepareTransition(i,!0),w.timerscroll&&w.timerscroll.tm&&clearInterval(w.timerscroll.tm),i>0&&(!w.scrollrunning&&w.onscrollstart&&w.onscrollstart.call(w,{type:"scrollstart",current:{x:s,y:n},request:{x:e,y:t},end:{x:w.newscrollx,y:w.newscrolly},speed:i}),x.transitionend?w.scrollendtrapped||(w.scrollendtrapped=!0,w.bind(w.doc,x.transitionend,w.onScrollEnd,!1)):(w.scrollendtrapped&&clearTimeout(w.scrollendtrapped),w.scrollendtrapped=setTimeout(w.onScrollEnd,i)),w.timerscroll={bz:new BezierClass(n,w.newscrolly,i,0,0,.58,1),bh:new BezierClass(s,w.newscrollx,i,0,0,.58,1)},w.cursorfreezed||(w.timerscroll.tm=setInterval(function(){w.showCursor(w.getScrollTop(),w.getScrollLeft())},60))),w.synched("doScroll-set",function(){w.timer=0,w.scrollendtrapped&&(w.scrollrunning=!0),w.setScrollTop(w.newscrolly),w.setScrollLeft(w.newscrollx),w.scrollendtrapped||w.onScrollEnd()})},50)))},this.cancelScroll=function(){if(!w.scrollendtrapped)return!0;var e=w.getScrollTop(),t=w.getScrollLeft();return w.scrollrunning=!1,x.transitionend||clearTimeout(x.transitionend),w.scrollendtrapped=!1,w._unbind(w.doc,x.transitionend,w.onScrollEnd),w.prepareTransition(0),w.setScrollTop(e),w.railh&&w.setScrollLeft(t),w.timerscroll&&w.timerscroll.tm&&clearInterval(w.timerscroll.tm),w.timerscroll=!1,w.cursorfreezed=!1,w.showCursor(e,t),w},this.onScrollEnd=function(){w.scrollendtrapped&&w._unbind(w.doc,x.transitionend,w.onScrollEnd),w.scrollendtrapped=!1,w.prepareTransition(0),w.timerscroll&&w.timerscroll.tm&&clearInterval(w.timerscroll.tm),w.timerscroll=!1;var e=w.getScrollTop(),t=w.getScrollLeft();return w.setScrollTop(e),w.railh&&w.setScrollLeft(t),w.noticeCursor(!1,e,t),w.cursorfreezed=!1,0>e?e=0:e>w.page.maxh&&(e=w.page.maxh),0>t?t=0:t>w.page.maxw&&(t=w.page.maxw),e!=w.newscrolly||t!=w.newscrollx?w.doScrollPos(t,e,w.opt.snapbackspeed):(w.onscrollend&&w.scrollrunning&&w.onscrollend.call(w,{type:"scrollend",current:{x:t,y:e},end:{x:w.newscrollx,y:w.newscrolly}}),void(w.scrollrunning=!1))}):(this.doScrollLeft=function(e,t){var i=w.scrollrunning?w.newscrolly:w.getScrollTop();w.doScrollPos(e,i,t)},this.doScrollTop=function(e,t){var i=w.scrollrunning?w.newscrollx:w.getScrollLeft();w.doScrollPos(i,e,t)},this.doScrollPos=function(e,t,i){function o(){if(w.cancelAnimationFrame)return!0;if(w.scrollrunning=!0,u=1-u)return w.timer=l(o)||1;var e=0,t=sy=w.getScrollTop();if(w.dst.ay){var t=w.bzscroll?w.dst.py+w.bzscroll.getNow()*w.dst.ay:w.newscrolly,i=t-sy;(0>i&&t0&&t>w.newscrolly)&&(t=w.newscrolly),w.setScrollTop(t),t==w.newscrolly&&(e=1)}else e=1;var n=sx=w.getScrollLeft();w.dst.ax?(n=w.bzscroll?w.dst.px+w.bzscroll.getNow()*w.dst.ax:w.newscrollx,i=n-sx,(0>i&&n0&&n>w.newscrollx)&&(n=w.newscrollx),w.setScrollLeft(n),n==w.newscrollx&&(e+=1)):e+=1,2==e?(w.timer=0,w.cursorfreezed=!1,w.bzscroll=!1,w.scrollrunning=!1,0>t?t=0:t>w.page.maxh&&(t=w.page.maxh),0>n?n=0:n>w.page.maxw&&(n=w.page.maxw),n!=w.newscrollx||t!=w.newscrolly?w.doScrollPos(n,t):w.onscrollend&&w.onscrollend.call(w,{type:"scrollend",current:{x:sx,y:sy},end:{x:w.newscrollx,y:w.newscrolly}})):w.timer=l(o)||1}if(t="undefined"==typeof t||!1===t?w.getScrollTop(!0):t,w.timer&&w.newscrolly==t&&w.newscrollx==e)return!0;w.timer&&d(w.timer),w.timer=0;var n=w.getScrollTop(),s=w.getScrollLeft();(0>(w.newscrolly-n)*(t-n)||0>(w.newscrollx-s)*(e-s))&&w.cancelScroll(),w.newscrolly=t,w.newscrollx=e,w.bouncescroll&&w.rail.visibility||(0>w.newscrolly?w.newscrolly=0:w.newscrolly>w.page.maxh&&(w.newscrolly=w.page.maxh)),w.bouncescroll&&w.railh.visibility||(0>w.newscrollx?w.newscrollx=0:w.newscrollx>w.page.maxw&&(w.newscrollx=w.page.maxw)),w.dst={},w.dst.x=e-s,w.dst.y=t-n,w.dst.px=s,w.dst.py=n;var r=Math.round(Math.sqrt(Math.pow(w.dst.x,2)+Math.pow(w.dst.y,2)));w.dst.ax=w.dst.x/r,w.dst.ay=w.dst.y/r;var a=0,c=r;if(0==w.dst.x?(a=n,c=t,w.dst.ay=1,w.dst.py=0):0==w.dst.y&&(a=s,c=e,w.dst.ax=1,w.dst.px=0),r=w.getTransitionSpeed(r),i&&1>=i&&(r*=i),w.bzscroll=r>0?w.bzscroll?w.bzscroll.update(c,r):new BezierClass(a,c,r,0,1,0,1):!1,!w.timer){(n==w.page.maxh&&t>=w.page.maxh||s==w.page.maxw&&e>=w.page.maxw)&&w.checkContentSize();var u=1;w.cancelAnimationFrame=!1,w.timer=1,w.onscrollstart&&!w.scrollrunning&&w.onscrollstart.call(w,{type:"scrollstart",current:{x:s,y:n},request:{x:e,y:t},end:{x:w.newscrollx,y:w.newscrolly},speed:r}),o(),(n==w.page.maxh&&t>=n||s==w.page.maxw&&e>=s)&&w.checkContentSize(),w.noticeCursor()}},this.cancelScroll=function(){return w.timer&&d(w.timer),w.timer=0,w.bzscroll=!1,w.scrollrunning=!1,w}):(this.doScrollLeft=function(e,t){var i=w.getScrollTop();w.doScrollPos(e,i,t)},this.doScrollTop=function(e,t){var i=w.getScrollLeft();w.doScrollPos(i,e,t)},this.doScrollPos=function(e,t){var i=e>w.page.maxw?w.page.maxw:e;0>i&&(i=0);var o=t>w.page.maxh?w.page.maxh:t;0>o&&(o=0),w.synched("scroll",function(){w.setScrollTop(o),w.setScrollLeft(i)})},this.cancelScroll=function(){}),this.doScrollBy=function(e,t){var i=0,i=t?Math.floor((w.scroll.y-e)*w.scrollratio.y):(w.timer?w.newscrolly:w.getScrollTop(!0))-e;if(w.bouncescroll){var o=Math.round(w.view.h/2);-o>i?i=-o:i>w.page.maxh+o&&(i=w.page.maxh+o)}return w.cursorfreezed=!1,py=w.getScrollTop(!0),0>i&&0>=py?w.noticeCursor():i>w.page.maxh&&py>=w.page.maxh?(w.checkContentSize(),w.noticeCursor()):void w.doScrollTop(i)},this.doScrollLeftBy=function(e,t){var i=0,i=t?Math.floor((w.scroll.x-e)*w.scrollratio.x):(w.timer?w.newscrollx:w.getScrollLeft(!0))-e;if(w.bouncescroll){var o=Math.round(w.view.w/2);-o>i?i=-o:i>w.page.maxw+o&&(i=w.page.maxw+o)}return w.cursorfreezed=!1,px=w.getScrollLeft(!0),0>i&&0>=px||i>w.page.maxw&&px>=w.page.maxw?w.noticeCursor():void w.doScrollLeft(i)},this.doScrollTo=function(e,t){t&&Math.round(e*w.scrollratio.y),w.cursorfreezed=!1,w.doScrollTop(e)},this.checkContentSize=function(){var e=w.getContentSize();(e.h!=w.page.h||e.w!=w.page.w)&&w.resize(!1,e)},w.onscroll=function(){w.rail.drag||w.cursorfreezed||w.synched("scroll",function(){w.scroll.y=Math.round(w.getScrollTop()*(1/w.scrollratio.y)),w.railh&&(w.scroll.x=Math.round(w.getScrollLeft()*(1/w.scrollratio.x))),w.noticeCursor()})},w.bind(w.docscroll,"scroll",w.onscroll),this.doZoomIn=function(t){if(!w.zoomactive){w.zoomactive=!0,w.zoomrestore={style:{}};var i,o="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),n=w.win[0].style;for(i in o){var r=o[i];w.zoomrestore.style[r]="undefined"!=typeof n[r]?n[r]:""}return w.zoomrestore.style.width=w.win.css("width"),w.zoomrestore.style.height=w.win.css("height"),w.zoomrestore.padding={w:w.win.outerWidth()-w.win.width(),h:w.win.outerHeight()-w.win.height()},x.isios4&&(w.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0)),w.win.css({position:x.isios4?"absolute":"fixed",top:0,left:0,"z-index":s+100,margin:"0px"}),o=w.win.css("backgroundColor"),(""==o||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(o))&&w.win.css("backgroundColor","#fff"),w.rail.css({"z-index":s+101}),w.zoom.css({"z-index":s+102}),w.zoom.css("backgroundPosition","0px -18px"),w.resizeZoom(),w.onzoomin&&w.onzoomin.call(w),w.cancelEvent(t)}},this.doZoomOut=function(t){return w.zoomactive?(w.zoomactive=!1,w.win.css("margin",""),w.win.css(w.zoomrestore.style),x.isios4&&e(window).scrollTop(w.zoomrestore.scrollTop),w.rail.css({"z-index":w.zindex}),w.zoom.css({"z-index":w.zindex}),w.zoomrestore=!1,w.zoom.css("backgroundPosition","0px 0px"),w.onResize(),w.onzoomout&&w.onzoomout.call(w),w.cancelEvent(t)):void 0},this.doZoom=function(e){return w.zoomactive?w.doZoomOut(e):w.doZoomIn(e)},this.resizeZoom=function(){if(w.zoomactive){var t=w.getScrollTop();w.win.css({width:e(window).width()-w.zoomrestore.padding.w+"px",height:e(window).height()-w.zoomrestore.padding.h+"px"}),w.onResize(),w.setScrollTop(Math.min(w.page.maxh,t))}},this.init(),e.nicescroll.push(this)},f=function(e){var t=this;this.nc=e,this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0,this.snapy=this.snapx=!1,this.demuly=this.demulx=0,this.lastscrolly=this.lastscrollx=-1,this.timer=this.chky=this.chkx=0,this.time=function(){return+new Date},this.reset=function(e,i){t.stop();var o=t.time();t.steptime=0,t.lasttime=o,t.speedx=0,t.speedy=0,t.lastx=e,t.lasty=i,t.lastscrollx=-1,t.lastscrolly=-1},this.update=function(e,i){var o=t.time();t.steptime=o-t.lasttime,t.lasttime=o;var o=i-t.lasty,n=e-t.lastx,s=t.nc.getScrollTop(),r=t.nc.getScrollLeft(),s=s+o,r=r+n;t.snapx=0>r||r>t.nc.page.maxw,t.snapy=0>s||s>t.nc.page.maxh,t.speedx=n,t.speedy=o,t.lastx=e,t.lasty=i},this.stop=function(){t.nc.unsynched("domomentum2d"),t.timer&&clearTimeout(t.timer),t.timer=0,t.lastscrollx=-1,t.lastscrolly=-1},this.doSnapy=function(e,i){var o=!1;0>i?(i=0,o=!0):i>t.nc.page.maxh&&(i=t.nc.page.maxh,o=!0),0>e?(e=0,o=!0):e>t.nc.page.maxw&&(e=t.nc.page.maxw,o=!0),o&&t.nc.doScrollPos(e,i,t.nc.opt.snapbackspeed)},this.doMomentum=function(e){var i=t.time(),o=e?i+e:t.lasttime;e=t.nc.getScrollLeft();var n=t.nc.getScrollTop(),s=t.nc.page.maxh,r=t.nc.page.maxw;if(t.speedx=r>0?Math.min(60,t.speedx):0,t.speedy=s>0?Math.min(60,t.speedy):0,o=o&&50>=i-o,(0>n||n>s||0>e||e>r)&&(o=!1),e=t.speedx&&o?t.speedx:!1,t.speedy&&o&&t.speedy||e){var a=Math.max(16,t.steptime);a>50&&(e=a/50,t.speedx*=e,t.speedy*=e,a=50),t.demulxy=0,t.lastscrollx=t.nc.getScrollLeft(),t.chkx=t.lastscrollx,t.lastscrolly=t.nc.getScrollTop(),t.chky=t.lastscrolly;var l=t.lastscrollx,d=t.lastscrolly,c=function(){var e=600l||l>r)&&(e=.1),t.speedy&&(d=Math.floor(t.lastscrolly-t.speedy*(1-t.demulxy)),t.lastscrolly=d,0>d||d>s)&&(e=.1),t.demulxy=Math.min(1,t.demulxy+e),t.nc.synched("domomentum2d",function(){t.speedx&&(t.nc.getScrollLeft()!=t.chkx&&t.stop(),t.chkx=l,t.nc.setScrollLeft(l)),t.speedy&&(t.nc.getScrollTop()!=t.chky&&t.stop(),t.chky=d,t.nc.setScrollTop(d)),t.timer||(t.nc.hideCursor(),t.doSnapy(l,d))}),1>t.demulxy?t.timer=setTimeout(c,a):(t.stop(),t.nc.hideCursor(),t.doSnapy(l,d))};c()}else t.doSnapy(t.nc.getScrollLeft(),t.nc.getScrollTop())}},g=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(t,i){return(i=e.data(t,"__nicescroll")||!1)&&i.ishwscroll?i.getScrollTop():g.call(t)},set:function(t,i){var o=e.data(t,"__nicescroll")||!1;return o&&o.ishwscroll?o.setScrollTop(parseInt(i)):g.call(t,i),this}},e.fn.scrollTop=function(t){if("undefined"==typeof t){var i=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return i&&i.ishwscroll?i.getScrollTop():g.call(this)}return this.each(function(){var i=e.data(this,"__nicescroll")||!1;i&&i.ishwscroll?i.setScrollTop(parseInt(t)):g.call(e(this),t)})};var v=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(t,i){return(i=e.data(t,"__nicescroll")||!1)&&i.ishwscroll?i.getScrollLeft():v.call(t)},set:function(t,i){var o=e.data(t,"__nicescroll")||!1;return o&&o.ishwscroll?o.setScrollLeft(parseInt(i)):v.call(t,i),this}},e.fn.scrollLeft=function(t){if("undefined"==typeof t){var i=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return i&&i.ishwscroll?i.getScrollLeft():v.call(this)}return this.each(function(){var i=e.data(this,"__nicescroll")||!1;i&&i.ishwscroll?i.setScrollLeft(parseInt(t)):v.call(e(this),t)})};var y=function(t){var i=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){for(var t=0;t0?c.height:32,a=c.width>0?c.width:32,l.height=r,l.width=a,d=l.getContext("2d"),b.ready()},g={},g.ff=/firefox/i.test(navigator.userAgent.toLowerCase()),g.chrome=/chrome/i.test(navigator.userAgent.toLowerCase()),g.opera=/opera/i.test(navigator.userAgent.toLowerCase()),g.ie=/msie/i.test(navigator.userAgent.toLowerCase())||/trident/i.test(navigator.userAgent.toLowerCase()),g.supported=g.chrome||g.ff||g.opera}catch(h){throw"Error initializing favico..."}},b={};b.ready=function(){u=!0,b.reset(),p()},b.reset=function(){y=[],h=!1,d.clearRect(0,0,a,r),d.drawImage(c,0,0,a,r),M.setIcon(l)},b.start=function(){if(u&&!m){var e=function(){h=y[0],m=!1,y.length>0&&(y.shift(),b.start())};y.length>0&&(m=!0,h?E.run(h.options,function(){E.run(y[0].options,function(){e()},!1)},!0):E.run(y[0].options,function(){e()},!1))}};var x={},T=function(e){return e.n=Math.abs(e.n),e.x=a*e.x,e.y=r*e.y,e.w=a*e.w,e.h=r*e.h,e};x.circle=function(e){e=T(e);var t=e.n>9&&e.n<100;t&&(e.x=e.x-.4*e.w,e.w=1.4*e.w),d.clearRect(0,0,a,r),d.drawImage(c,0,0,a,r),d.beginPath(),d.font=n.fontStyle+" "+Math.floor(e.h)+"px "+n.fontFamily,d.textAlign="center",t?(d.moveTo(e.x+e.w/2,e.y),d.lineTo(e.x+e.w-e.h/2,e.y),d.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),d.lineTo(e.x+e.w,e.y+e.h-e.h/2),d.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),d.lineTo(e.x+e.h/2,e.y+e.h),d.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),d.lineTo(e.x,e.y+e.h/2),d.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):d.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),d.fillStyle="rgba("+n.bgColor.r+","+n.bgColor.g+","+n.bgColor.b+","+e.o+")",d.fill(),d.closePath(),d.beginPath(),d.stroke(),d.fillStyle="rgba("+n.textColor.r+","+n.textColor.g+","+n.textColor.b+","+e.o+")",e.n>99?d.fillText("∞",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()},x.rectangle=function(e){e=T(e);var t=e.n>9&&e.n<100;t&&(e.x=Math.floor(e.x-.4*e.w),e.w=Math.floor(1.4*e.w)),d.clearRect(0,0,a,r),d.drawImage(c,0,0,a,r),d.beginPath(),d.font="bold "+Math.floor(e.h)+"px sans-serif",d.textAlign="center",d.fillStyle="rgba("+n.bgColor.r+","+n.bgColor.g+","+n.bgColor.b+","+e.o+")",d.fillRect(e.x,e.y,e.w,e.h),d.fillStyle="rgba("+n.textColor.r+","+n.textColor.g+","+n.textColor.b+","+e.o+")",e.n>99?d.fillText("∞",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()};var S=function(e,t){p=function(){try{if(e>0){if(E.types[""+t]&&(n.animation=t),y.push({type:"badge",options:{n:e}}),y.length>100)throw"Too many badges requests in queue...";b.start()}else b.reset()}catch(i){throw"Error setting badge..."}},u&&p()},C=function(e){p=function(){try{var t=e.width,i=e.height,o=document.createElement("img"),n=i/r>t/a?t/a:i/r;o.setAttribute("src",e.getAttribute("src")),o.height=i/n,o.width=t/n,d.clearRect(0,0,a,r),d.drawImage(o,0,0,a,r),M.setIcon(l)}catch(s){throw"Error setting image..."}},u&&p()},j=function(e){p=function(){try{if("stop"===e)return f=!0,b.reset(),void(f=!1);e.addEventListener("play",function(){t(this)},!1)}catch(i){throw"Error setting video..."}},u&&p()},k=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),g.supported){var i=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,p=function(){try{if("stop"===e)return f=!0,b.reset(),void(f=!1);i=document.createElement("video"),i.width=a,i.height=r,navigator.getUserMedia({video:!0,audio:!1},function(e){i.src=URL.createObjectURL(e),i.play(),t(i)},function(){})}catch(o){throw"Error setting webcam..."}},u&&p()}},M={};M.getIcon=function(){var e=!1,t=function(){for(var e=document.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length,i=t-1;i>=0;i--)if(/icon/i.test(e[i].getAttribute("rel")))return e[i];return!1};return n.elementId?(e=document.getElementById(n.elementId),e.setAttribute("href",e.getAttribute("src"))):(e=t(),e===!1&&(e=document.createElement("link"),e.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(e))),e.setAttribute("type","image/png"),e},M.setIcon=function(e){var t=e.toDataURL("image/png");if(n.elementId)document.getElementById(n.elementId).setAttribute("src",t);else if(g.ff||g.opera){var i=s;s=document.createElement("link"),g.opera&&s.setAttribute("rel","icon"),s.setAttribute("rel","icon"),s.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(s),s.setAttribute("href",t),i.parentNode&&i.parentNode.removeChild(i)}else s.setAttribute("href",t)};var E={};return E.duration=40,E.types={},E.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],E.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],E.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],E.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],E.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],E.run=function(e,t,i,s){var r=E.types[n.animation];return s=i===!0?"undefined"!=typeof s?s:r.length-1:"undefined"!=typeof s?s:0,t=t?t:function(){},s=0?(x[n.type](o(e,r[s])),setTimeout(function(){i?s-=1:s+=1,E.run(e,t,i,s)},E.duration),void M.setIcon(l)):void t()},w(),{badge:S,video:j,image:C,webcam:k,reset:b.reset}};"undefined"!=typeof define&&define.amd?define([],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),!function(e,t){"use strict";var i=t.Modernizr,o={},n={_init:function(t){return n.$el=e(this),n.options=e.extend(!0,{custom:!1,modalIdAttribute:"modal-id",hiddeBtnID:"hideemodal"},t),n._config(),n.$el.click(function(){}),this},_config:function(){var t=n.$el.data(n.options.modalIdAttribute);return o.modal=e("#"+t),this},showModal:function(){return n.baseHtml(),n.startLoading(),o.overlay.addClass("shown"),o.html.addClass("shown"),this},hideModal:function(){return o.overlay.removeClass("shown"),o.html.removeClass("shown"),setTimeout(function(){n.destroy()},300),this},setHideEvent:function(){o.overlay.click(function(){n.hideModal()}),o.closeBtnHtml.click(function(){n.hideModal()});var t=e("#"+n.options.hiddeBtnID);t.click(function(){n.hideModal()})},setHTML:function(e){return o.html.html(e),this},setTitle:function(e){return o.modalTitle.text(e),this},addText:function(e){return o.modalText.append(e),this},addError:function(e){return o.modalText.append('

    '+e+"

    "),o.modalTitle.text("ERROR"),this},addImage:function(e){return o.html.addClass("with-image"),o.modalImage=jQuery('').appendTo(o.html),this},addBtn:function(t){return t=e.extend(!0,{href:"",cssClass:"",onclick:"",id:"",title:"",hideOnClick:!1},t),o.modalBtn=jQuery(''+t.title+"").appendTo(o.modalText),t.hideOnClick&&o.modalBtn.click(function(){n.hideModal()}),this},startLoading:function(){return o.html.addClass("eloading"),this},endLoading:function(){return o.html.removeClass("eloading"),this},baseHtml:function(){return o.overlay=jQuery('
    '),o.html=jQuery('
    '),o.modalText=jQuery('
    ').prependTo(o.html),o.modalTitle=jQuery('
    ').prependTo(o.modalText),o.closeBtnHtml=jQuery('
    ').prependTo(o.html),i.csstransforms&&(o.overlay.addClass("with-transforms"),o.html.addClass("with-transforms")),i.csstransitions&&(o.overlay.addClass("with-transitions"),o.html.addClass("with-transitions")),e("body").prepend(o.overlay),e("body").prepend(o.html),n.setHideEvent(),this },destroy:function(){return o.overlay.remove(),o.html.remove(),this}};e.fn.eModal=function(t){return n[t]?n[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("invalid method call!"):n._init.apply(this,arguments)}}(jQuery,window),function(e){function t(t){var i=t||window.event,o=[].slice.call(arguments,1),n=0,s=0,r=0;return t=e.event.fix(i),t.type="mousewheel",i.wheelDelta&&(n=i.wheelDelta/120),i.detail&&(n=-i.detail/3),r=n,void 0!==i.axis&&i.axis===i.HORIZONTAL_AXIS&&(r=0,s=-1*n),void 0!==i.wheelDeltaY&&(r=i.wheelDeltaY/120),void 0!==i.wheelDeltaX&&(s=-1*i.wheelDeltaX/120),o.unshift(t,n,s,r),(e.event.dispatch||e.event.handle).apply(this,o)}var i=["DOMMouseScroll","mousewheel"];if(e.event.fixHooks)for(var o=i.length;o;)e.event.fixHooks[i[--o]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=i.length;e;)this.addEventListener(i[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery),function(e,t,i){function o(t,i){this.bodyOverflowX,this.callbacks={hide:[],show:[]},this.checkInterval=null,this.Content,this.$el=e(t),this.$elProxy,this.elProxyPosition,this.enabled=!0,this.options=e.extend({},l,i),this.mouseIsOverProxy=!1,this.namespace="tooltipster-"+Math.round(1e5*Math.random()),this.Status="hidden",this.timerHide=null,this.timerShow=null,this.$tooltip,this.options.iconTheme=this.options.iconTheme.replace(".",""),this.options.theme=this.options.theme.replace(".",""),this._init()}function n(t,i){var o=!0;return e.each(t,function(e){return"undefined"==typeof i[e]||t[e]!==i[e]?(o=!1,!1):void 0}),o}function s(){return!c&&d}function r(){var e=i.body||i.documentElement,t=e.style,o="transition";if("string"==typeof t[o])return!0;v=["Moz","Webkit","Khtml","O","ms"],o=o.charAt(0).toUpperCase()+o.substr(1);for(var n=0;n'),t.$elProxy.text(t.options.icon)):t.$elProxy=t.options.iconCloning?t.options.icon.clone(!0):t.options.icon,t.$elProxy.insertAfter(t.$el)):t.$elProxy=t.$el,"hover"==t.options.trigger?(t.$elProxy.on("mouseenter."+t.namespace,function(){(!s()||t.options.touchDevices)&&(t.mouseIsOverProxy=!0,t._show())}).on("mouseleave."+t.namespace,function(){(!s()||t.options.touchDevices)&&(t.mouseIsOverProxy=!1)}),d&&t.options.touchDevices&&t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})):"click"==t.options.trigger&&t.$elProxy.on("click."+t.namespace,function(){(!s()||t.options.touchDevices)&&t._show()})}},_show:function(){var e=this;"shown"!=e.Status&&"appearing"!=e.Status&&(e.options.delay?e.timerShow=setTimeout(function(){("click"==e.options.trigger||"hover"==e.options.trigger&&e.mouseIsOverProxy)&&e._showNow()},e.options.delay):e._showNow())},_showNow:function(i){var o=this;o.options.functionBefore.call(o.$el,o.$el,function(){if(o.enabled&&null!==o.Content){i&&o.callbacks.show.push(i),o.callbacks.hide=[],clearTimeout(o.timerShow),o.timerShow=null,clearTimeout(o.timerHide),o.timerHide=null,o.options.onlyOne&&e(".tooltipstered").not(o.$el).each(function(t,i){var o=e(i),n=o.data("tooltipster-ns");e.each(n,function(e,t){var i=o.data(t),n=i.status(),s=i.option("autoClose");"hidden"!==n&&"disappearing"!==n&&s&&i.hide()})});var n=function(){o.Status="shown",e.each(o.callbacks.show,function(e,t){t.call(o.$el)}),o.callbacks.show=[]};if("hidden"!==o.Status){var s=0;"disappearing"===o.Status?(o.Status="appearing",r()?(o.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+o.options.animation+"-show"),o.options.speed>0&&o.$tooltip.delay(o.options.speed),o.$tooltip.queue(n)):o.$tooltip.stop().fadeIn(n)):"shown"===o.Status&&n()}else{o.Status="appearing";var s=o.options.speed;o.bodyOverflowX=e("body").css("overflow-x"),e("body").css("overflow-x","hidden");var a="tooltipster-"+o.options.animation,l="-webkit-transition-duration: "+o.options.speed+"ms; -webkit-animation-duration: "+o.options.speed+"ms; -moz-transition-duration: "+o.options.speed+"ms; -moz-animation-duration: "+o.options.speed+"ms; -o-transition-duration: "+o.options.speed+"ms; -o-animation-duration: "+o.options.speed+"ms; -ms-transition-duration: "+o.options.speed+"ms; -ms-animation-duration: "+o.options.speed+"ms; transition-duration: "+o.options.speed+"ms; animation-duration: "+o.options.speed+"ms;",c=o.options.minWidth?"min-width:"+Math.round(o.options.minWidth)+"px;":"",u=o.options.maxWidth?"max-width:"+Math.round(o.options.maxWidth)+"px;":"",h=o.options.interactive?"pointer-events: auto;":"";if(o.$tooltip=e('
    '),r()&&o.$tooltip.addClass(a),o._content_insert(),o.$tooltip.appendTo("body"),o.reposition(),o.options.functionReady.call(o.$el,o.$el,o.$tooltip),r()?(o.$tooltip.addClass(a+"-show"),o.options.speed>0&&o.$tooltip.delay(o.options.speed),o.$tooltip.queue(n)):o.$tooltip.css("display","none").fadeIn(o.options.speed,n),o._interval_set(),e(t).on("scroll."+o.namespace+" resize."+o.namespace,function(){o.reposition()}),o.options.autoClose)if(e("body").off("."+o.namespace),"hover"==o.options.trigger)if(d&&setTimeout(function(){e("body").on("touchstart."+o.namespace,function(){o.hide()})},0),o.options.interactive){d&&o.$tooltip.on("touchstart."+o.namespace,function(e){e.stopPropagation()});var m=null;o.$elProxy.add(o.$tooltip).on("mouseleave."+o.namespace+"-autoClose",function(){clearTimeout(m),m=setTimeout(function(){o.hide()},o.options.interactiveTolerance)}).on("mouseenter."+o.namespace+"-autoClose",function(){clearTimeout(m)})}else o.$elProxy.on("mouseleave."+o.namespace+"-autoClose",function(){o.hide()});else"click"==o.options.trigger&&(setTimeout(function(){e("body").on("click."+o.namespace+" touchstart."+o.namespace,function(){o.hide()})},0),o.options.interactive&&o.$tooltip.on("click."+o.namespace+" touchstart."+o.namespace,function(e){e.stopPropagation()}))}o.options.timer>0&&(o.timerHide=setTimeout(function(){o.timerHide=null,o.hide()},o.options.timer+s))}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(0===e("body").find(t.$el).length||0===e("body").find(t.$elProxy).length||"hidden"==t.Status||0===e("body").find(t.$tooltip).length)("shown"==t.Status||"appearing"==t.Status)&&t.hide(),t._interval_cancel();else if(t.options.positionTracker){var i=t._repositionInfo(t.$elProxy),o=!1;n(i.dimension,t.elProxyPosition.dimension)&&("fixed"===t.$elProxy.css("position")?n(i.position,t.elProxyPosition.position)&&(o=!0):n(i.offset,t.elProxyPosition.offset)&&(o=!0)),o||t.reposition()}},200)},_interval_cancel:function(){clearInterval(this.checkInterval),this.checkInterval=null},_content_set:function(e){"object"==typeof e&&null!==e&&this.options.contentCloning&&(e=e.clone(!0)),this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(".tooltipster-content");"string"!=typeof e.Content||e.options.contentAsHTML?t.empty().append(e.Content):t.text(e.Content)},_update:function(e){var t=this;t._content_set(e),null!==t.Content?"hidden"!==t.Status&&(t._content_insert(),t.reposition(),t.options.updateAnimation&&(r()?(t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing"),setTimeout(function(){"hidden"!=t.Status&&(t.$tooltip.removeClass("tooltipster-content-changing"),setTimeout(function(){"hidden"!==t.Status&&t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})},t.options.speed))},t.options.speed)):t.$tooltip.fadeTo(t.options.speed,.5,function(){"hidden"!=t.Status&&t.$tooltip.fadeTo(t.options.speed,1)}))):t.hide()},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(!1),width:e.outerWidth(!1)},offset:e.offset(),position:{left:parseInt(e.css("left")),top:parseInt(e.css("top"))}}},hide:function(i){var o=this;i&&o.callbacks.hide.push(i),o.callbacks.show=[],clearTimeout(o.timerShow),o.timerShow=null,clearTimeout(o.timerHide),o.timerHide=null;var n=function(){e.each(o.callbacks.hide,function(e,t){t.call(o.$el)}),o.callbacks.hide=[]};if("shown"==o.Status||"appearing"==o.Status){o.Status="disappearing";var s=function(){o.Status="hidden","object"==typeof o.Content&&null!==o.Content&&o.Content.detach(),o.$tooltip.remove(),o.$tooltip=null,e(t).off("."+o.namespace),e("body").off("."+o.namespace).css("overflow-x",o.bodyOverflowX),e("body").off("."+o.namespace),o.$elProxy.off("."+o.namespace+"-autoClose"),o.options.functionAfter.call(o.$el,o.$el),n()};r()?(o.$tooltip.clearQueue().removeClass("tooltipster-"+o.options.animation+"-show").addClass("tooltipster-dying"),o.options.speed>0&&o.$tooltip.delay(o.options.speed),o.$tooltip.queue(s)):o.$tooltip.stop().fadeOut(o.options.speed,s)}else"hidden"==o.Status&&n();return o},show:function(e){return this._showNow(e),this},update:function(e){return this.content(e)},content:function(e){return"undefined"==typeof e?this.Content:(this._update(e),this)},reposition:function(){function i(){var i=e(t).scrollLeft();0>E-i&&(s=E-i,E=i),E+l-i>r&&(s=E-(r+i-l),E=r+i-l)}function o(i,o){a.offset.top-e(t).scrollTop()-d-F-12<0&&o.indexOf("top")>-1&&(I=i),a.offset.top+a.dimension.height+d+12+F>e(t).scrollTop()+e(t).height()&&o.indexOf("bottom")>-1&&(I=i,z=a.offset.top-d-F-12)}var n=this;if(0!==e("body").find(n.$tooltip).length){n.$tooltip.css("width",""),n.elProxyPosition=n._repositionInfo(n.$elProxy);var s=null,r=e(t).width(),a=n.elProxyPosition,l=n.$tooltip.outerWidth(!1),d=(n.$tooltip.innerWidth()+1,n.$tooltip.outerHeight(!1));if(n.$elProxy.is("area")){var c=n.$elProxy.attr("shape"),u=n.$elProxy.parent().attr("name"),h=e('img[usemap="#'+u+'"]'),m=h.offset().left,p=h.offset().top,f=void 0!==n.$elProxy.attr("coords")?n.$elProxy.attr("coords").split(","):void 0;if("circle"==c){var g=parseInt(f[0]),v=parseInt(f[1]),y=parseInt(f[2]);a.dimension.height=2*y,a.dimension.width=2*y,a.offset.top=p+v-y,a.offset.left=m+g-y}else if("rect"==c){var g=parseInt(f[0]),v=parseInt(f[1]),w=parseInt(f[2]),b=parseInt(f[3]);a.dimension.height=b-v,a.dimension.width=w-g,a.offset.top=p+v,a.offset.left=m+g}else if("poly"==c){for(var x=0,T=0,S=0,C=0,j="even",k=0;kS&&(S=M,0===k&&(x=S)),x>M&&(x=M),j="odd"):(M>C&&(C=M,1==k&&(T=C)),T>M&&(T=M),j="even")}a.dimension.height=C-T,a.dimension.width=S-x,a.offset.top=p+T,a.offset.left=m+x}else a.dimension.height=h.outerHeight(!1),a.dimension.width=h.outerWidth(!1),a.offset.top=p,a.offset.left=m}var E=0,P=0,z=0,F=parseInt(n.options.offsetY),A=parseInt(n.options.offsetX),I=n.options.position;if("top"==I){var L=a.offset.left+l-(a.offset.left+a.dimension.width);E=a.offset.left+A-L/2,z=a.offset.top-d-F-12,i(),o("bottom","top")}if("top-left"==I&&(E=a.offset.left+A,z=a.offset.top-d-F-12,i(),o("bottom-left","top-left")),"top-right"==I&&(E=a.offset.left+a.dimension.width+A-l,z=a.offset.top-d-F-12,i(),o("bottom-right","top-right")),"bottom"==I){var L=a.offset.left+l-(a.offset.left+a.dimension.width);E=a.offset.left-L/2+A,z=a.offset.top+a.dimension.height+F+12,i(),o("top","bottom")}if("bottom-left"==I&&(E=a.offset.left+A,z=a.offset.top+a.dimension.height+F+12,i(),o("top-left","bottom-left")),"bottom-right"==I&&(E=a.offset.left+a.dimension.width+A-l,z=a.offset.top+a.dimension.height+F+12,i(),o("top-right","bottom-right")),"left"==I){E=a.offset.left-A-l-12,P=a.offset.left+A+a.dimension.width+12;var _=a.offset.top+d-(a.offset.top+a.dimension.height);if(z=a.offset.top-_/2-F,0>E&&P+l>r){var B=2*parseFloat(n.$tooltip.css("border-width")),N=l+E-B;n.$tooltip.css("width",N+"px"),d=n.$tooltip.outerHeight(!1),E=a.offset.left-A-N-12-B,_=a.offset.top+d-(a.offset.top+a.dimension.height),z=a.offset.top-_/2-F}else 0>E&&(E=a.offset.left+A+a.dimension.width+12,s="left")}if("right"==I){E=a.offset.left+A+a.dimension.width+12,P=a.offset.left-A-l-12;var _=a.offset.top+d-(a.offset.top+a.dimension.height);if(z=a.offset.top-_/2-F,E+l>r&&0>P){var B=2*parseFloat(n.$tooltip.css("border-width")),N=r-E-B;n.$tooltip.css("width",N+"px"),d=n.$tooltip.outerHeight(!1),_=a.offset.top+d-(a.offset.top+a.dimension.height),z=a.offset.top-_/2-F}else E+l>r&&(E=a.offset.left-A-l-12,s="right")}if(n.options.arrow){var H="tooltipster-arrow-"+I;if(n.options.arrowColor.length<1)var $=n.$tooltip.css("background-color");else var $=n.options.arrowColor;if(s?"left"==s?(H="tooltipster-arrow-right",s=""):"right"==s?(H="tooltipster-arrow-left",s=""):s="left:"+Math.round(s)+"px;":s="","top"==I||"top-left"==I||"top-right"==I)var O=parseFloat(n.$tooltip.css("border-bottom-width")),R=n.$tooltip.css("border-bottom-color");else if("bottom"==I||"bottom-left"==I||"bottom-right"==I)var O=parseFloat(n.$tooltip.css("border-top-width")),R=n.$tooltip.css("border-top-color");else if("left"==I)var O=parseFloat(n.$tooltip.css("border-right-width")),R=n.$tooltip.css("border-right-color");else if("right"==I)var O=parseFloat(n.$tooltip.css("border-left-width")),R=n.$tooltip.css("border-left-color");else var O=parseFloat(n.$tooltip.css("border-bottom-width")),R=n.$tooltip.css("border-bottom-color");O>1&&O++;var D="";if(0!==O){var W="",V="border-color: "+R+";";-1!==H.indexOf("bottom")?W="margin-top: -"+Math.round(O)+"px;":-1!==H.indexOf("top")?W="margin-bottom: -"+Math.round(O)+"px;":-1!==H.indexOf("left")?W="margin-right: -"+Math.round(O)+"px;":-1!==H.indexOf("right")&&(W="margin-left: -"+Math.round(O)+"px;"),D=''}n.$tooltip.find(".tooltipster-arrow").remove();var U='
    '+D+'
    ';n.$tooltip.append(U)}n.$tooltip.css({top:Math.round(z)+"px",left:Math.round(E)+"px"})}return n},enable:function(){return this.enabled=!0,this},disable:function(){return this.hide(),this.enabled=!1,this},destroy:function(){var t=this;t.hide(),t.$el[0]!==t.$elProxy[0]&&t.$elProxy.remove(),t.$el.removeData(t.namespace).off("."+t.namespace);var i=t.$el.data("tooltipster-ns");if(1===i.length){var o="string"==typeof t.Content?t.Content:e("
    ").append(t.Content).html();t.$el.removeClass("tooltipstered").attr("title",o).removeData(t.namespace).removeData("tooltipster-ns").off("."+t.namespace)}else i=e.grep(i,function(e){return e!==t.namespace}),t.$el.data("tooltipster-ns",i);return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:void 0},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:void 0},option:function(e,t){return"undefined"==typeof t?this.options[e]:(this.options[e]=t,this)},status:function(){return this.Status}},e.fn[a]=function(){var t=arguments;if(0===this.length){if("string"==typeof t[0]){var i=!0;switch(t[0]){case"setDefaults":e.extend(l,t[1]);break;default:i=!1}return i?!0:this}return this}if("string"==typeof t[0]){var n="#*$~&";return this.each(function(){var i=e(this).data("tooltipster-ns"),o=i?e(this).data(i[0]):null;if(!o)throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element');if("function"!=typeof o[t[0]])throw new Error('Unknown method .tooltipster("'+t[0]+'")');var s=o[t[0]](t[1],t[2]);return s!==o?(n=s,!1):void 0}),"#*$~&"!==n?n:this}var s=[],r=t[0]&&"undefined"!=typeof t[0].multiple,a=r&&t[0].multiple||!r&&l.multiple;return this.each(function(){var i=!1,n=e(this).data("tooltipster-ns"),r=null;n?a?i=!0:console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.'):i=!0,i&&(r=new o(this,t[0]),n||(n=[]),n.push(r.namespace),e(this).data("tooltipster-ns",n),e(this).data(r.namespace,r)),s.push(r)}),a?s:this};var d=!!("ontouchstart"in t),c=!1;e("body").one("mousemove",function(){c=!0})}(jQuery,window,document),!function(e,t){"function"==typeof define&&define.amd?define(t):e.BackgroundCheck=t(e)}(this,function(){"use strict";function e(e){if(void 0===e||void 0===e.targets)throw"Missing attributes";I.debug=o(e.debug,!1),I.debugOverlay=o(e.debugOverlay,!1),I.targets=r(e.targets),I.images=r(e.images||"img",!0),I.changeParent=o(e.changeParent,!1),I.threshold=o(e.threshold,50),I.minComplexity=o(e.minComplexity,30),I.minOverlap=o(e.minOverlap,50),I.windowEvents=o(e.windowEvents,!0),I.maxDuration=o(e.maxDuration,500),I.mask=o(e.mask,{r:0,g:255,b:0}),I.classes=o(e.classes,{dark:"background--dark",light:"background--light",complex:"background--complex"}),void 0===M&&(a(),M&&(E.style.position="fixed",E.style.top="0px",E.style.left="0px",E.style.width="100%",E.style.height="100%",window.addEventListener(A,S.bind(null,function(){c(),T()})),window.addEventListener("scroll",S.bind(null,T)),c(),T()))}function t(){M=null,E=null,P=null,I={},z&&clearTimeout(z)}function i(e){j("debug")&&console.log(e)}function o(e,t){return n(e,typeof t),void 0===e?t:e}function n(e,t){if(void 0!==e&&typeof e!==t)throw"Incorrect attribute type"}function s(e){for(var t,o,n=[],s=0;s1)throw"Multiple backgrounds are not supported";if(!o||"none"===o)throw"Element is not an but does not have a background-image";n[s]={img:new Image,el:n[s]},o=o.slice(4,-1),o=o.replace(/"/g,""),n[s].img.src=o,i("CSS Image - "+o)}return n}function r(e,t){var i=e;if("string"==typeof e?i=document.querySelectorAll(e):e&&1===e.nodeType&&(i=[e]),!i||0===i.length||void 0===i.length)throw"Elements not found";return t&&(i=s(i)),i=Array.prototype.slice.call(i)}function a(){E=document.createElement("canvas"),E&&E.getContext?(P=E.getContext("2d"),M=!0):M=!1,l()}function l(){j("debugOverlay")?(E.style.opacity=.5,E.style.pointerEvents="none",document.body.appendChild(E)):E.parentNode&&E.parentNode.removeChild(E)}function d(e){var o=(new Date).getTime()-e;i("Duration: "+o+"ms"),o>j("maxDuration")&&(console.log("BackgroundCheck - Killed"),g(),t())}function c(){F={left:0,top:0,right:document.body.clientWidth,bottom:window.innerHeight},E.width=document.body.clientWidth,E.height=window.innerHeight}function u(e,t,i){var o,n;return-1!==e.indexOf("px")?o=parseFloat(e):-1!==e.indexOf("%")?(o=parseFloat(e),n=o/100,o=n*t,i&&(o-=i*n)):o=t,o}function h(e){var t=window.getComputedStyle(e.el);e.el.style.backgroundRepeat="no-repeat",e.el.style.backgroundOrigin="padding-box";var i=t.backgroundSize.split(" "),o=i[0],n=void 0===i[1]?"auto":i[1],s=e.el.clientWidth/e.el.clientHeight,r=e.img.naturalWidth/e.img.naturalHeight;"cover"===o?s>=r?(o="100%",n="auto"):(o="auto",i[0]="auto",n="100%"):"contain"===o&&(1/r>1/s?(o="auto",i[0]="auto",n="100%"):(o="100%",n="auto")),o="auto"===o?e.img.naturalWidth:u(o,e.el.clientWidth),n="auto"===n?o/e.img.naturalWidth*e.img.naturalHeight:u(n,e.el.clientHeight),"auto"===i[0]&&"auto"!==i[1]&&(o=n/e.img.naturalHeight*e.img.naturalWidth);var a=t.backgroundPosition;"top"===a?a="50% 0%":"left"===a?a="0% 50%":"right"===a?a="100% 50%":"bottom"===a?a="50% 100%":"center"===a&&(a="50% 50%"),a=a.split(" ");var l,d;return 4===a.length?(l=a[1],d=a[3]):(l=a[0],d=a[1]),d=d||"50%",l=u(l,e.el.clientWidth,o),d=u(d,e.el.clientHeight,n),4===a.length&&("right"===a[0]&&(l=e.el.clientWidth-e.img.naturalWidth-l),"bottom"===a[2]&&(d=e.el.clientHeight-e.img.naturalHeight-d)),l+=e.el.getBoundingClientRect().left,d+=e.el.getBoundingClientRect().top,{left:Math.floor(l),right:Math.floor(l+o),top:Math.floor(d),bottom:Math.floor(d+n),width:Math.floor(o),height:Math.floor(n)}}function m(e){var t,i,o;if(e.nodeType){var n=e.getBoundingClientRect();t={left:n.left,right:n.right,top:n.top,bottom:n.bottom,width:n.width,height:n.height},o=e.parentNode,i=e}else t=h(e),o=e.el,i=e.img;o=o.getBoundingClientRect(),t.imageTop=0,t.imageLeft=0,t.imageWidth=i.naturalWidth,t.imageHeight=i.naturalHeight;var s,r=t.imageHeight/t.height;return t.topo.bottom&&(s=t.bottom-o.bottom,t.imageHeight-=r*s,t.height-=s),t.right>o.right&&(s=t.right-o.right,t.imageWidth-=r*s,t.width-=s),t.imageTop=Math.floor(t.imageTop),t.imageLeft=Math.floor(t.imageLeft),t.imageHeight=Math.floor(t.imageHeight),t.imageWidth=Math.floor(t.imageWidth),t}function p(e){var t=m(e);e=e.nodeType?e:e.img,t.imageWidth>0&&t.imageHeight>0&&t.width>0&&t.height>0?P.drawImage(e,t.imageLeft,t.imageTop,t.imageWidth,t.imageHeight,t.left,t.top,t.width,t.height):i("Skipping image - "+e.src+" - area too small")}function f(e,t,i){var o=e.className;switch(i){case"add":o+=" "+t;break;case"remove":var n=new RegExp("(?:^|\\s)"+t+"(?!\\S)","g");o=o.replace(n,"")}e.className=o.trim()}function g(e){for(var t,i=e?[e]:j("targets"),o=0;o0&&r.height>0){g(e),e=j("changeParent")?e.parentNode:e,o=P.getImageData(r.left,r.top,r.width,r.height).data;for(var h=0;hj("minComplexity")/100&&f(e,j("classes").complex,"add"))}}function y(e,t){return e=(e.nodeType?e:e.el).getBoundingClientRect(),t=t===F?t:(t.nodeType?t:t.el).getBoundingClientRect(),!(e.rightt.right||e.top>t.bottom||e.bottomr;r++)t=j("targets")[r],y(t,F)&&("targets"!==o||e&&e!==t?"image"===o&&y(t,e)&&v(t):(n=!0,v(t)));if("targets"===o&&!n)throw e+" is not a target";d(i)}function b(e){var t=function(e){var t=0;return"static"!==window.getComputedStyle(e).position&&(t=parseInt(window.getComputedStyle(e).zIndex,10)||0,t>=0&&t++),t},i=e.parentNode,o=i?t(i):0,n=t(e);return 1e5*o+n}function x(e){var t=!1;return e.sort(function(e,i){e=e.nodeType?e:e.el,i=i.nodeType?i:i.el;var o=e.compareDocumentPosition(i),n=0;return e=b(e),i=b(i),e>i&&(t=!0),e===i&&2===o?n=1:e===i&&4===o&&(n=-1),n||e-i}),i("Sorted: "+t),t&&i(e),t}function T(e,t,o){if(M){var n=j("mask");i("--- BackgroundCheck ---"),i("onLoad event: "+(o&&o.src)),t!==!0&&(P.clearRect(0,0,E.width,E.height),P.fillStyle="rgb("+n.r+", "+n.g+", "+n.b+")",P.fillRect(0,0,E.width,E.height));for(var s,r,a=o?[o]:j("images"),l=x(a),d=!1,c=0;c 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { options = $.extend({}, options); if (value === null || value === undefined) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = String(value); return (document.cookie = [ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // key and possibly options given, get cookie... options = value || {}; var decode = options.raw ? function(s) { return s; } : decodeURIComponent; var pairs = document.cookie.split('; '); for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined } return null; }; })(jQuery); /*! Magnific Popup - v0.9.9 - 2013-11-15 * http://dimsemenov.com/plugins/magnific-popup/ * Copyright (c) 2013 Dmitry Semenov; */ (function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",v="."+g,h="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+v,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document.body),o=e(document),t.popupsCache={}},open:function(n){var i;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var r,s=n.items;for(i=0;s.length>i;i++)if(r=s[i],r.parsed&&(r=r.el[0]),r===n.el[0]){t.index=i;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+v,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+v,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(i=0;l.length>i;i++){var c=l[i];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+v,function(e){27===e.keyCode&&t.close()}),I.on("resize"+v,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var d=t.wH=I.height(),u={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(u.marginRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):u.overflow="hidden");var g=t.st.mainClass;return t.isIE7&&(g+=" mfp-ie7"),g&&t._addClassToMFP(g),t.updateItemHTML(),T("BuildControls"),e("html").css(u),t.bgOverlay.add(t.wrap).prependTo(document.body),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(h),t._setFocus()):t.bgOverlay.addClass(h),o.on("focusin"+v,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(d),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+h+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+v+" focusin"+v),t.ev.off(v),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i=t.items[n],o=i.type;if(i=i.tagName?{el:e(i)}:{data:i,src:i.src},i.el){for(var r=t.types,a=0;r.length>a;a++)if(i.el.hasClass("mfp-"+r[a])){o=r[a];break}i.src=i.el.attr("data-mfp-src"),i.src||(i.src=i.el.attr("href"))}return i.type=o||t.st.type||"inline",i.index=n,i.parsed=!0,t.items[n]=i,T("ElementParse",i),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(v+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith(''):i.attr(o[1],n)}}else t.find(v+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("
    ");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(h)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
    ',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+v)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),n.img[0].naturalWidth>0&&(n.hasSize=!0)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'
    ',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()})(window.jQuery||window.Zepto); /** * Isotope v1.5.25 * An exquisite jQuery plugin for magical layouts * http://isotope.metafizzy.co * * Commercial use requires one-time purchase of a commercial license * http://isotope.metafizzy.co/docs/license.html * * Non-commercial use is licensed under the MIT License * * Copyright 2013 Metafizzy */ (function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e"+d+"{#modernizr{height:3px}}"+"").appendTo("head"),f=b('
    ').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;fg?1:f0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;id&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;id&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery); // Generated by CoffeeScript 1.6.2 /* jQuery Waypoints - v2.0.2 Copyright (c) 2011-2013 Caleb Troughton Dual licensed under the MIT license and GPL license. https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt */ (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); /*! * MediaElement.js * HTML5
    ').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")}, false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('
    ').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left", "0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$); (function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('
    00:00
    ').appendTo(b);b.find(".mejs-time-buffering").hide();var d= this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.originalEvent.changedTouches?h.originalEvent.changedTouches[0].pageX:h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(hr+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left", o);q.html(mejs.Utility.secondsToTimeCode(n));m.show()}}},t=false;g.bind("mousedown touchstart",function(h){if(h.which===1||h.which===0){t=true;p(h);d.globalBind("mousemove.dur touchmove.dur",function(l){p(l)});d.globalBind("mouseup.dur touchend.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}}); e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal; else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('
    '+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
    ").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b, c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"); f('
    '+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
    ").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()}, false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration: this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!((mejs.MediaFeatures.isAndroid||mejs.MediaFeatures.isiOS)&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('
    ').appendTo(b):f('
    ').appendTo(b), j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute"); if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true): e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0); k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen= false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('
    ').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&& mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events", "");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l, left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show(); t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageYl.top+g.outerHeight(true)||h.pageXl.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover", function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()}, containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen){var e=(window.devicePixelRatio|| 1)*f(window).width(),d=screen.width;Math.abs(d-e)>d*0.0020?a.exitFullScreen():setTimeout(c,500)}},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}}, 250);else{a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%"); a.media.setVideoSize(f(window).width(),f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()|| this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"); this.setControlsSize();this.isFullScreen=false}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('
    ').prependTo(c).hide();a.captions= f('
    ').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('
    ").appendTo(b);for(d=b=0;d0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b); this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('
  • "));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()}, adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer== "undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b= a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a100||c==a.entries.times.length- 1&&e+d<100)e=100-d;b.chapters.append(f('
    '+a.entries.text[c]+''+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"
    "));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel"))); b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese", ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b$1");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b$1");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d
    ').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()}, isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a, b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g
    ';else{var j=d[g].render(c);if(j!=null)e+='
    '+j+"
    "}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!= "undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('').prependTo(c).hide();this.media.addEventListener("ended", function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$); /** * @license MIT * @fileOverview Favico animations * @author Miroslav Magda, http://blog.ejci.net * @version 0.3.0 */ !function(){var t=function(t){"use strict";function e(t){if(t.paused||t.ended||g)return!1;try{s.clearRect(0,0,h,a),s.drawImage(t,0,0,h,a)}catch(o){}setTimeout(e,L.duration,t),E.setIcon(c)}function o(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,o,n){return e+e+o+o+n+n});var o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:!1}function n(t,e){var o,n={};for(o in t)n[o]=t[o];for(o in e)n[o]=e[o];return n}t=t?t:{};var r,i,a,h,c,s,l,f,u,d,y,g,w,x={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1},m=[];y=function(){},f=g=!1;var p=function(){if(r=n(x,t),r.bgColor=o(r.bgColor),r.textColor=o(r.textColor),r.position=r.position.toLowerCase(),r.animation=L.types[""+r.animation]?r.animation:x.animation,"up"===r.position)for(var e=0;e0?l.height:32,h=l.width>0?l.width:32,c.height=a,c.width=h,s=c.getContext("2d"),v.ready()},w={},w.ff=/firefox/i.test(navigator.userAgent.toLowerCase()),w.chrome=/chrome/i.test(navigator.userAgent.toLowerCase()),w.opera=/opera/i.test(navigator.userAgent.toLowerCase()),w.ie=/msie/i.test(navigator.userAgent.toLowerCase())||/trident/i.test(navigator.userAgent.toLowerCase()),w.supported=w.chrome||w.ff||w.opera}catch(u){throw"Error initializing favico..."}},v={};v.ready=function(){f=!0,v.reset(),y()},v.reset=function(){m=[],u=!1,s.clearRect(0,0,h,a),s.drawImage(l,0,0,h,a),E.setIcon(c)},v.start=function(){if(f&&!d){var t=function(){u=m[0],d=!1,m.length>0&&(m.shift(),v.start())};m.length>0&&(d=!0,u?L.run(u.options,function(){L.run(m[0].options,function(){t()},!1)},!0):L.run(m[0].options,function(){t()},!1))}};var b={},C=function(t){return t.n=Math.abs(t.n),t.x=h*t.x,t.y=a*t.y,t.w=h*t.w,t.h=a*t.h,t};b.circle=function(t){t=C(t);var e=t.n>9&&t.n<100;e&&(t.x=t.x-.4*t.w,t.w=1.4*t.w),s.clearRect(0,0,h,a),s.drawImage(l,0,0,h,a),s.beginPath(),s.font=r.fontStyle+" "+Math.floor(t.h)+"px "+r.fontFamily,s.textAlign="center",e?(s.moveTo(t.x+t.w/2,t.y),s.lineTo(t.x+t.w-t.h/2,t.y),s.quadraticCurveTo(t.x+t.w,t.y,t.x+t.w,t.y+t.h/2),s.lineTo(t.x+t.w,t.y+t.h-t.h/2),s.quadraticCurveTo(t.x+t.w,t.y+t.h,t.x+t.w-t.h/2,t.y+t.h),s.lineTo(t.x+t.h/2,t.y+t.h),s.quadraticCurveTo(t.x,t.y+t.h,t.x,t.y+t.h-t.h/2),s.lineTo(t.x,t.y+t.h/2),s.quadraticCurveTo(t.x,t.y,t.x+t.h/2,t.y)):s.arc(t.x+t.w/2,t.y+t.h/2,t.h/2,0,2*Math.PI),s.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+t.o+")",s.fill(),s.closePath(),s.beginPath(),s.stroke(),s.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+t.o+")",t.n>99?s.fillText("?",Math.floor(t.x+t.w/2),Math.floor(t.y+t.h-.15*t.h)):s.fillText(t.n,Math.floor(t.x+t.w/2),Math.floor(t.y+t.h-.15*t.h)),s.closePath()},b.rectangle=function(t){t=C(t);var e=t.n>9&&t.n<100;e&&(t.x=Math.floor(t.x-.4*t.w),t.w=Math.floor(1.4*t.w)),s.clearRect(0,0,h,a),s.drawImage(l,0,0,h,a),s.beginPath(),s.font="bold "+Math.floor(t.h)+"px sans-serif",s.textAlign="center",s.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+t.o+")",s.fillRect(t.x,t.y,t.w,t.h),s.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+t.o+")",t.n>99?s.fillText("?",Math.floor(t.x+t.w/2),Math.floor(t.y+t.h-.15*t.h)):s.fillText(t.n,Math.floor(t.x+t.w/2),Math.floor(t.y+t.h-.15*t.h)),s.closePath()};var I=function(t,e){y=function(){try{if(t>0){if(L.types[""+e]&&(r.animation=e),m.push({type:"badge",options:{n:t}}),m.length>100)throw"Too many badges requests in queue...";v.start()}else v.reset()}catch(o){throw"Error setting badge..."}},f&&y()},A=function(t){y=function(){try{var e=t.width,o=t.height,n=document.createElement("img"),r=o/a>e/h?e/h:o/a;n.setAttribute("src",t.getAttribute("src")),n.height=o/r,n.width=e/r,s.clearRect(0,0,h,a),s.drawImage(n,0,0,h,a),E.setIcon(c)}catch(i){throw"Error setting image..."}},f&&y()},M=function(t){y=function(){try{if("stop"===t)return g=!0,v.reset(),g=!1,void 0;t.addEventListener("play",function(){e(this)},!1)}catch(o){throw"Error setting video..."}},f&&y()},T=function(t){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(t){return t}),w.supported){var o=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,y=function(){try{if("stop"===t)return g=!0,v.reset(),g=!1,void 0;o=document.createElement("video"),o.width=h,o.height=a,navigator.getUserMedia({video:!0,audio:!1},function(t){o.src=URL.createObjectURL(t),o.play(),e(o)},function(){})}catch(n){throw"Error setting webcam..."}},f&&y()}},E={};E.getIcon=function(){var t=!1,e=function(){for(var t=document.getElementsByTagName("head")[0].getElementsByTagName("link"),e=t.length,o=e-1;o>=0;o--)if(/icon/i.test(t[o].getAttribute("rel")))return t[o];return!1};return r.elementId?(t=document.getElementById(r.elementId),t.setAttribute("href",t.getAttribute("src"))):(t=e(),t===!1&&(t=document.createElement("link"),t.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(t))),t.setAttribute("type","image/png"),t},E.setIcon=function(t){var e=t.toDataURL("image/png");if(r.elementId)document.getElementById(r.elementId).setAttribute("src",e);else if(w.ff||w.opera){var o=i;i=document.createElement("link"),w.opera&&i.setAttribute("rel","icon"),i.setAttribute("rel","icon"),i.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(i),i.setAttribute("href",e),o.parentNode&&o.parentNode.removeChild(o)}else i.setAttribute("href",e)};var L={};return L.duration=40,L.types={},L.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],L.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],L.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],L.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],L.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],L.run=function(t,e,o,i){var a=L.types[r.animation];return i=o===!0?"undefined"!=typeof i?i:a.length-1:"undefined"!=typeof i?i:0,e=e?e:function(){},i=0?(b[r.type](n(t,a[i])),setTimeout(function(){o?i-=1:i+=1,L.run(t,e,o,i)},L.duration),E.setIcon(c),void 0):(e(),void 0)},p(),{badge:I,video:M,image:A,webcam:T,reset:v.reset}};"undefined"!=typeof define&&define.amd?define([],function(){return t}):"undefined"!=typeof module&&module.exports?module.exports=t:this.Favico=t}(); /** * jquery.emodal.js v1.0.0 * http://8theme.com * * Licensed under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * Copyright 2013, Serg * http://8theme.com */ ;( function( $, window, undefined ) { 'use strict'; // global var Modernizr = window.Modernizr; var settings = {}; var methods = { _init : function( options ) { methods.$el = $(this); // options methods.options = $.extend(true, { 'custom': false, 'modalIdAttribute': 'modal-id', 'hiddeBtnID': 'hideemodal' }, options); methods._config(); // show modal methods.$el.click(function(event) { //methods.showModal(); }); return this; }, _config : function() { //modal window var id = methods.$el.data(methods.options.modalIdAttribute); settings.modal = $('#' + id); return this; }, showModal : function() { // base HTML methods.baseHtml(); methods.startLoading(); settings.overlay.addClass('shown'); settings.html.addClass('shown'); return this; }, hideModal: function() { settings.overlay.removeClass('shown'); settings.html.removeClass('shown'); setTimeout(function(){ methods.destroy(); }, 300) return this; }, setHideEvent: function (){ // hide modal settings.overlay.click(function(event) { methods.hideModal(); }); settings.closeBtnHtml.click(function(event) { methods.hideModal(); }); // other hide btn var hideBtn = $('#' + methods.options.hiddeBtnID); hideBtn.click(function(event) { methods.hideModal(); }); }, setHTML: function(html){ settings.html.html(html); return this; }, setTitle: function(title){ settings.modalTitle.text(title); return this; }, addText: function(text){ settings.modalText.append(text); return this; }, addError: function(text){ settings.modalText.append('

    ' + text + '

    '); settings.modalTitle.text('ERROR'); return this; }, addImage: function(src){ settings.html.addClass('with-image'); settings.modalImage = jQuery('').appendTo(settings.html); return this; }, addBtn: function(attr){ attr = $.extend(true, { 'href': '', 'cssClass': '', 'onclick': '', 'id': '', 'title': '', 'hideOnClick': false }, attr); settings.modalBtn = jQuery('' + attr.title + '').appendTo(settings.modalText); if(attr.hideOnClick) { settings.modalBtn.click(function(){ methods.hideModal(); }); } return this; }, startLoading: function(){ settings.html.addClass('eloading'); return this; }, endLoading: function(){ settings.html.removeClass('eloading'); return this; }, baseHtml: function (){ // Base HTML structure settings.overlay = jQuery('
    '); settings.html = jQuery('
    '); settings.modalText = jQuery('
    ').prependTo(settings.html); settings.modalTitle = jQuery('
    ').prependTo(settings.modalText); settings.closeBtnHtml = jQuery('
    ').prependTo(settings.html); if(Modernizr.csstransforms) { settings.overlay.addClass('with-transforms'); settings.html.addClass('with-transforms'); } if(Modernizr.csstransitions) { settings.overlay.addClass('with-transitions'); settings.html.addClass('with-transitions'); } // add base html to body $('body').prepend(settings.overlay); $('body').prepend(settings.html); methods.setHideEvent(); return this; }, destroy: function(){ settings.overlay.remove(); settings.html.remove(); return this; } } /* public functions */ $.fn.eModal = function(method) { if(methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || !method) { return methods._init.apply(this, arguments); } else { $.error('invalid method call!'); } }; var logError = function( message ) { if ( window.console ) { window.console.error( message ); } }; } )( jQuery, window ); /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and deltaY * * Version: 3.0.6 * * Requires: 1.2.2+ */ (function($) { var types = ['DOMMouseScroll', 'mousewheel']; if ($.event.fixHooks) { for ( var i=types.length; i; ) { $.event.fixHooks[ types[--i] ] = $.event.mouseHooks; } } $.event.special.mousewheel = { setup: function() { if ( this.addEventListener ) { for ( var i=types.length; i; ) { this.addEventListener( types[--i], handler, false ); } } else { this.onmousewheel = handler; } }, teardown: function() { if ( this.removeEventListener ) { for ( var i=types.length; i; ) { this.removeEventListener( types[--i], handler, false ); } } else { this.onmousewheel = null; } } }; $.fn.extend({ mousewheel: function(fn) { return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); }, unmousewheel: function(fn) { return this.unbind("mousewheel", fn); } }); function handler(event) { var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; event = $.event.fix(orgEvent); event.type = "mousewheel"; // Old school scrollwheel delta if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; } if ( orgEvent.detail ) { delta = -orgEvent.detail/3; } // New school multidimensional scroll (touchpads) deltas deltaY = delta; // Gecko if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { deltaY = 0; deltaX = -1*delta; } // Webkit if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } // Add event and delta to the front of the arguments args.unshift(event, delta, deltaX, deltaY); return ($.event.dispatch || $.event.handle).apply(this, args); } })(jQuery); /* Tooltipster v3.2.4 */;(function(e,t,n){function s(t,n){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=e(t);this.$elProxy;this.elProxyPosition;this.enabled=true;this.options=e.extend({},i,n);this.mouseIsOverProxy=false;this.namespace="tooltipster-"+Math.round(Math.random()*1e5);this.Status="hidden";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(".","");this.options.theme=this.options.theme.replace(".","");this._init()}function o(t,n){var r=true;e.each(t,function(e,i){if(typeof n[e]==="undefined"||t[e]!==n[e]){r=false;return false}});return r}function f(){return!a&&u}function l(){var e=n.body||n.documentElement,t=e.style,r="transition";if(typeof t[r]=="string"){return true}v=["Moz","Webkit","Khtml","O","ms"],r=r.charAt(0).toUpperCase()+r.substr(1);for(var i=0;i');t.$elProxy.text(t.options.icon)}else{if(t.options.iconCloning)t.$elProxy=t.options.icon.clone(true);else t.$elProxy=t.options.icon}t.$elProxy.insertAfter(t.$el)}else{t.$elProxy=t.$el}if(t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=true;t._show()}}).on("mouseleave."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=false}});if(u&&t.options.touchDevices){t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}}else if(t.options.trigger=="click"){t.$elProxy.on("click."+t.namespace,function(){if(!f()||t.options.touchDevices){t._show()}})}}},_show:function(){var e=this;if(e.Status!="shown"&&e.Status!="appearing"){if(e.options.delay){e.timerShow=setTimeout(function(){if(e.options.trigger=="click"||e.options.trigger=="hover"&&e.mouseIsOverProxy){e._showNow()}},e.options.delay)}else e._showNow()}},_showNow:function(n){var r=this;r.options.functionBefore.call(r.$el,r.$el,function(){if(r.enabled&&r.Content!==null){if(n)r.callbacks.show.push(n);r.callbacks.hide=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;if(r.options.onlyOne){e(".tooltipstered").not(r.$el).each(function(t,n){var r=e(n),i=r.data("tooltipster-ns");e.each(i,function(e,t){var n=r.data(t),i=n.status(),s=n.option("autoClose");if(i!=="hidden"&&i!=="disappearing"&&s){n.hide()}})})}var i=function(){r.Status="shown";e.each(r.callbacks.show,function(e,t){t.call(r.$el)});r.callbacks.show=[]};if(r.Status!=="hidden"){var s=0;if(r.Status==="disappearing"){r.Status="appearing";if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+r.options.animation+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.stop().fadeIn(i)}}else if(r.Status==="shown"){i()}}else{r.Status="appearing";var s=r.options.speed;r.bodyOverflowX=e("body").css("overflow-x");e("body").css("overflow-x","hidden");var o="tooltipster-"+r.options.animation,a="-webkit-transition-duration: "+r.options.speed+"ms; -webkit-animation-duration: "+r.options.speed+"ms; -moz-transition-duration: "+r.options.speed+"ms; -moz-animation-duration: "+r.options.speed+"ms; -o-transition-duration: "+r.options.speed+"ms; -o-animation-duration: "+r.options.speed+"ms; -ms-transition-duration: "+r.options.speed+"ms; -ms-animation-duration: "+r.options.speed+"ms; transition-duration: "+r.options.speed+"ms; animation-duration: "+r.options.speed+"ms;",f=r.options.minWidth?"min-width:"+Math.round(r.options.minWidth)+"px;":"",c=r.options.maxWidth?"max-width:"+Math.round(r.options.maxWidth)+"px;":"",h=r.options.interactive?"pointer-events: auto;":"";r.$tooltip=e('
    ');if(l())r.$tooltip.addClass(o);r._content_insert();r.$tooltip.appendTo("body");r.reposition();r.options.functionReady.call(r.$el,r.$el,r.$tooltip);if(l()){r.$tooltip.addClass(o+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.css("display","none").fadeIn(r.options.speed,i)}r._interval_set();e(t).on("scroll."+r.namespace+" resize."+r.namespace,function(){r.reposition()});if(r.options.autoClose){e("body").off("."+r.namespace);if(r.options.trigger=="hover"){if(u){setTimeout(function(){e("body").on("touchstart."+r.namespace,function(){r.hide()})},0)}if(r.options.interactive){if(u){r.$tooltip.on("touchstart."+r.namespace,function(e){e.stopPropagation()})}var p=null;r.$elProxy.add(r.$tooltip).on("mouseleave."+r.namespace+"-autoClose",function(){clearTimeout(p);p=setTimeout(function(){r.hide()},r.options.interactiveTolerance)}).on("mouseenter."+r.namespace+"-autoClose",function(){clearTimeout(p)})}else{r.$elProxy.on("mouseleave."+r.namespace+"-autoClose",function(){r.hide()})}}else if(r.options.trigger=="click"){setTimeout(function(){e("body").on("click."+r.namespace+" touchstart."+r.namespace,function(){r.hide()})},0);if(r.options.interactive){r.$tooltip.on("click."+r.namespace+" touchstart."+r.namespace,function(e){e.stopPropagation()})}}}}if(r.options.timer>0){r.timerHide=setTimeout(function(){r.timerHide=null;r.hide()},r.options.timer+s)}}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(e("body").find(t.$el).length===0||e("body").find(t.$elProxy).length===0||t.Status=="hidden"||e("body").find(t.$tooltip).length===0){if(t.Status=="shown"||t.Status=="appearing")t.hide();t._interval_cancel()}else{if(t.options.positionTracker){var n=t._repositionInfo(t.$elProxy),r=false;if(o(n.dimension,t.elProxyPosition.dimension)){if(t.$elProxy.css("position")==="fixed"){if(o(n.position,t.elProxyPosition.position))r=true}else{if(o(n.offset,t.elProxyPosition.offset))r=true}}if(!r){t.reposition()}}}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(e){if(typeof e==="object"&&e!==null&&this.options.contentCloning){e=e.clone(true)}this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(".tooltipster-content");if(typeof e.Content==="string"&&!e.options.contentAsHTML){t.text(e.Content)}else{t.empty().append(e.Content)}},_update:function(e){var t=this;t._content_set(e);if(t.Content!==null){if(t.Status!=="hidden"){t._content_insert();t.reposition();if(t.options.updateAnimation){if(l()){t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!="hidden"){t.$tooltip.removeClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!=="hidden"){t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})}},t.options.speed)}},t.options.speed)}else{t.$tooltip.fadeTo(t.options.speed,.5,function(){if(t.Status!="hidden"){t.$tooltip.fadeTo(t.options.speed,1)}})}}}}else{t.hide()}},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(false),width:e.outerWidth(false)},offset:e.offset(),position:{left:parseInt(e.css("left")),top:parseInt(e.css("top"))}}},hide:function(n){var r=this;if(n)r.callbacks.hide.push(n);r.callbacks.show=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;var i=function(){e.each(r.callbacks.hide,function(e,t){t.call(r.$el)});r.callbacks.hide=[]};if(r.Status=="shown"||r.Status=="appearing"){r.Status="disappearing";var s=function(){r.Status="hidden";if(typeof r.Content=="object"&&r.Content!==null){r.Content.detach()}r.$tooltip.remove();r.$tooltip=null;e(t).off("."+r.namespace);e("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);e("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);i()};if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(s)}else{r.$tooltip.stop().fadeOut(r.options.speed,s)}}else if(r.Status=="hidden"){i()}return r},show:function(e){this._showNow(e);return this},update:function(e){return this.content(e)},content:function(e){if(typeof e==="undefined"){return this.Content}else{this._update(e);return this}},reposition:function(){var n=this;if(e("body").find(n.$tooltip).length!==0){n.$tooltip.css("width","");n.elProxyPosition=n._repositionInfo(n.$elProxy);var r=null,i=e(t).width(),s=n.elProxyPosition,o=n.$tooltip.outerWidth(false),u=n.$tooltip.innerWidth()+1,a=n.$tooltip.outerHeight(false);if(n.$elProxy.is("area")){var f=n.$elProxy.attr("shape"),l=n.$elProxy.parent().attr("name"),c=e('img[usemap="#'+l+'"]'),h=c.offset().left,p=c.offset().top,d=n.$elProxy.attr("coords")!==undefined?n.$elProxy.attr("coords").split(","):undefined;if(f=="circle"){var v=parseInt(d[0]),m=parseInt(d[1]),g=parseInt(d[2]);s.dimension.height=g*2;s.dimension.width=g*2;s.offset.top=p+m-g;s.offset.left=h+v-g}else if(f=="rect"){var v=parseInt(d[0]),m=parseInt(d[1]),y=parseInt(d[2]),b=parseInt(d[3]);s.dimension.height=b-m;s.dimension.width=y-v;s.offset.top=p+m;s.offset.left=h+v}else if(f=="poly"){var w=[],E=[],S=0,x=0,T=0,N=0,C="even";for(var k=0;kT){T=L;if(k===0){S=T}}if(LN){N=L;if(k==1){x=N}}if(Li){r=A-(i+n-o);A=i+n-o}}function B(n,r){if(s.offset.top-e(t).scrollTop()-a-_-12<0&&r.indexOf("top")>-1){P=n}if(s.offset.top+s.dimension.height+a+12+_>e(t).scrollTop()+e(t).height()&&r.indexOf("bottom")>-1){P=n;M=s.offset.top-a-_-12}}if(P=="top"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left+D-j/2;M=s.offset.top-a-_-12;H();B("bottom","top")}if(P=="top-left"){A=s.offset.left+D;M=s.offset.top-a-_-12;H();B("bottom-left","top-left")}if(P=="top-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top-a-_-12;H();B("bottom-right","top-right")}if(P=="bottom"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left-j/2+D;M=s.offset.top+s.dimension.height+_+12;H();B("top","bottom")}if(P=="bottom-left"){A=s.offset.left+D;M=s.offset.top+s.dimension.height+_+12;H();B("top-left","bottom-left")}if(P=="bottom-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top+s.dimension.height+_+12;H();B("top-right","bottom-right")}if(P=="left"){A=s.offset.left-D-o-12;O=s.offset.left+D+s.dimension.width+12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A<0&&O+o>i){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=o+A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);A=s.offset.left-D-q-12-I;F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A<0){A=s.offset.left+D+s.dimension.width+12;r="left"}}if(P=="right"){A=s.offset.left+D+s.dimension.width+12;O=s.offset.left-D-o-12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A+o>i&&O<0){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=i-A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A+o>i){A=s.offset.left-D-o-12;r="right"}}if(n.options.arrow){var R="tooltipster-arrow-"+P;if(n.options.arrowColor.length<1){var U=n.$tooltip.css("background-color")}else{var U=n.options.arrowColor}if(!r){r=""}else if(r=="left"){R="tooltipster-arrow-right";r=""}else if(r=="right"){R="tooltipster-arrow-left";r=""}else{r="left:"+Math.round(r)+"px;"}if(P=="top"||P=="top-left"||P=="top-right"){var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}else if(P=="bottom"||P=="bottom-left"||P=="bottom-right"){var z=parseFloat(n.$tooltip.css("border-top-width")),W=n.$tooltip.css("border-top-color")}else if(P=="left"){var z=parseFloat(n.$tooltip.css("border-right-width")),W=n.$tooltip.css("border-right-color")}else if(P=="right"){var z=parseFloat(n.$tooltip.css("border-left-width")),W=n.$tooltip.css("border-left-color")}else{var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}if(z>1){z++}var X="";if(z!==0){var V="",J="border-color: "+W+";";if(R.indexOf("bottom")!==-1){V="margin-top: -"+Math.round(z)+"px;"}else if(R.indexOf("top")!==-1){V="margin-bottom: -"+Math.round(z)+"px;"}else if(R.indexOf("left")!==-1){V="margin-right: -"+Math.round(z)+"px;"}else if(R.indexOf("right")!==-1){V="margin-left: -"+Math.round(z)+"px;"}X=''}n.$tooltip.find(".tooltipster-arrow").remove();var K='
    '+X+'
    ';n.$tooltip.append(K)}n.$tooltip.css({top:Math.round(M)+"px",left:Math.round(A)+"px"})}return n},enable:function(){this.enabled=true;return this},disable:function(){this.hide();this.enabled=false;return this},destroy:function(){var t=this;t.hide();if(t.$el[0]!==t.$elProxy[0])t.$elProxy.remove();t.$el.removeData(t.namespace).off("."+t.namespace);var n=t.$el.data("tooltipster-ns");if(n.length===1){var r=typeof t.Content==="string"?t.Content:e("
    ").append(t.Content).html();t.$el.removeClass("tooltipstered").attr("title",r).removeData(t.namespace).removeData("tooltipster-ns").off("."+t.namespace)}else{n=e.grep(n,function(e,n){return e!==t.namespace});t.$el.data("tooltipster-ns",n)}return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(e,t){if(typeof t=="undefined")return this.options[e];else{this.options[e]=t;return this}},status:function(){return this.Status}};e.fn[r]=function(){var t=arguments;if(this.length===0){if(typeof t[0]==="string"){var n=true;switch(t[0]){case"setDefaults":e.extend(i,t[1]);break;default:n=false;break}if(n)return true;else return this}else{return this}}else{if(typeof t[0]==="string"){var r="#*$~&";this.each(function(){var n=e(this).data("tooltipster-ns"),i=n?e(this).data(n[0]):null;if(i){if(typeof i[t[0]]==="function"){var s=i[t[0]](t[1],t[2])}else{throw new Error('Unknown method .tooltipster("'+t[0]+'")')}if(s!==i){r=s;return false}}else{throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element')}});return r!=="#*$~&"?r:this}else{var o=[],u=t[0]&&typeof t[0].multiple!=="undefined",a=u&&t[0].multiple||!u&&i.multiple;this.each(function(){var n=false,r=e(this).data("tooltipster-ns"),i=null;if(!r){n=true}else{if(a)n=true;else console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.')}if(n){i=new s(this,t[0]);if(!r)r=[];r.push(i.namespace);e(this).data("tooltipster-ns",r);e(this).data(i.namespace,i)}o.push(i)});if(a)return o;else return this}}};var u=!!("ontouchstart"in t);var a=false;e("body").one("mousemove",function(){a=true})})(jQuery,window,document) /*Parallax on mouse move*/ !function(t,i,e,s){"use strict";function o(i,e){this.element=i,this.$context=t(i).data("api",this),this.$layers=this.$context.find(".layer");var s={calibrateX:this.$context.data("calibrate-x")||null,calibrateY:this.$context.data("calibrate-y")||null,invertX:this.$context.data("invert-x")||null,invertY:this.$context.data("invert-y")||null,limitX:parseFloat(this.$context.data("limit-x"))||null,limitY:parseFloat(this.$context.data("limit-y"))||null,scalarX:parseFloat(this.$context.data("scalar-x"))||null,scalarY:parseFloat(this.$context.data("scalar-y"))||null,frictionX:parseFloat(this.$context.data("friction-x"))||null,frictionY:parseFloat(this.$context.data("friction-y"))||null,originX:parseFloat(this.$context.data("origin-x"))||null,originY:parseFloat(this.$context.data("origin-y"))||null};for(var o in s)null===s[o]&&delete s[o];t.extend(this,r,e,s),this.calibrationTimer=null,this.calibrationFlag=!0,this.enabled=!1,this.depths=[],this.raf=null,this.bounds=null,this.ex=0,this.ey=0,this.ew=0,this.eh=0,this.ecx=0,this.ecy=0,this.erx=0,this.ery=0,this.cx=0,this.cy=0,this.ix=0,this.iy=0,this.mx=0,this.my=0,this.vx=0,this.vy=0,this.onMouseMove=this.onMouseMove.bind(this),this.onDeviceOrientation=this.onDeviceOrientation.bind(this),this.onOrientationTimer=this.onOrientationTimer.bind(this),this.onCalibrationTimer=this.onCalibrationTimer.bind(this),this.onAnimationFrame=this.onAnimationFrame.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.initialise()}var n="parallax",a=30,r={relativeInput:!1,clipRelativeInput:!1,calibrationThreshold:100,calibrationDelay:500,supportDelay:500,calibrateX:!1,calibrateY:!0,invertX:!0,invertY:!0,limitX:!1,limitY:!1,scalarX:10,scalarY:10,frictionX:.1,frictionY:.1,originX:.5,originY:.5};o.prototype.transformSupport=function(t){for(var o=e.createElement("div"),n=!1,a=null,r=!1,h=null,l=null,p=0,c=this.vendors.length;c>p;p++)if(null!==this.vendors[p]?(h=this.vendors[p][0]+"transform",l=this.vendors[p][1]+"Transform"):(h="transform",l="transform"),o.style[l]!==s){n=!0;break}switch(t){case"2D":r=n;break;case"3D":if(n){var m=e.body||e.createElement("body"),u=e.documentElement,y=u.style.overflow;e.body||(u.style.overflow="hidden",u.appendChild(m),m.style.overflow="hidden",m.style.background=""),m.appendChild(o),o.style[l]="translate3d(1px,1px,1px)",a=i.getComputedStyle(o).getPropertyValue(h),r=a!==s&&a.length>0&&"none"!==a,u.style.overflow=y,m.removeChild(o)}}return r},o.prototype.ww=null,o.prototype.wh=null,o.prototype.wcx=null,o.prototype.wcy=null,o.prototype.wrx=null,o.prototype.wry=null,o.prototype.portrait=null,o.prototype.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),o.prototype.vendors=[null,["-webkit-","webkit"],["-moz-","Moz"],["-o-","O"],["-ms-","ms"]],o.prototype.motionSupport=!!i.DeviceMotionEvent,o.prototype.orientationSupport=!!i.DeviceOrientationEvent,o.prototype.orientationStatus=0,o.prototype.transform2DSupport=o.prototype.transformSupport("2D"),o.prototype.transform3DSupport=o.prototype.transformSupport("3D"),o.prototype.propertyCache={},o.prototype.initialise=function(){"static"===this.$context.css("position")&&this.$context.css({position:"relative"}),this.accelerate(this.$context),this.updateLayers(),this.updateDimensions(),this.enable(),this.queueCalibration(this.calibrationDelay)},o.prototype.updateLayers=function(){this.$layers=this.$context.find(".layer"),this.depths=[],this.$layers.css({position:"absolute",display:"block",left:0,top:0}),this.$layers.first().css({position:"relative"}),this.accelerate(this.$layers),this.$layers.each(t.proxy(function(i,e){this.depths.push(t(e).data("depth")||0)},this))},o.prototype.updateDimensions=function(){this.ww=i.innerWidth,this.wh=i.innerHeight,this.wcx=this.ww*this.originX,this.wcy=this.wh*this.originY,this.wrx=Math.max(this.wcx,this.ww-this.wcx),this.wry=Math.max(this.wcy,this.wh-this.wcy)},o.prototype.updateBounds=function(){this.bounds=this.element.getBoundingClientRect(),this.ex=this.bounds.left,this.ey=this.bounds.top,this.ew=this.bounds.width,this.eh=this.bounds.height,this.ecx=this.ew*this.originX,this.ecy=this.eh*this.originY,this.erx=Math.max(this.ecx,this.ew-this.ecx),this.ery=Math.max(this.ecy,this.eh-this.ecy)},o.prototype.queueCalibration=function(t){clearTimeout(this.calibrationTimer),this.calibrationTimer=setTimeout(this.onCalibrationTimer,t)},o.prototype.enable=function(){this.enabled||(this.enabled=!0,this.orientationSupport?(this.portrait=null,i.addEventListener("deviceorientation",this.onDeviceOrientation),setTimeout(this.onOrientationTimer,this.supportDelay)):(this.cx=0,this.cy=0,this.portrait=!1,i.addEventListener("mousemove",this.onMouseMove)),i.addEventListener("resize",this.onWindowResize),this.raf=requestAnimationFrame(this.onAnimationFrame))},o.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.orientationSupport?i.removeEventListener("deviceorientation",this.onDeviceOrientation):i.removeEventListener("mousemove",this.onMouseMove),i.removeEventListener("resize",this.onWindowResize),cancelAnimationFrame(this.raf))},o.prototype.calibrate=function(t,i){this.calibrateX=t===s?this.calibrateX:t,this.calibrateY=i===s?this.calibrateY:i},o.prototype.invert=function(t,i){this.invertX=t===s?this.invertX:t,this.invertY=i===s?this.invertY:i},o.prototype.friction=function(t,i){this.frictionX=t===s?this.frictionX:t,this.frictionY=i===s?this.frictionY:i},o.prototype.scalar=function(t,i){this.scalarX=t===s?this.scalarX:t,this.scalarY=i===s?this.scalarY:i},o.prototype.limit=function(t,i){this.limitX=t===s?this.limitX:t,this.limitY=i===s?this.limitY:i},o.prototype.origin=function(t,i){this.originX=t===s?this.originX:t,this.originY=i===s?this.originY:i},o.prototype.clamp=function(t,i,e){return t=Math.max(t,i),t=Math.min(t,e)},o.prototype.css=function(i,e,o){var n=this.propertyCache[e];if(!n)for(var a=0,r=this.vendors.length;r>a;a++)if(n=null!==this.vendors[a]?t.camelCase(this.vendors[a][1]+"-"+e):e,i.style[n]!==s){this.propertyCache[e]=n;break}i.style[n]=o},o.prototype.accelerate=function(t){for(var i=0,e=t.length;e>i;i++){var s=t[i];this.css(s,"transform","translate3d(0,0,0)"),this.css(s,"transform-style","preserve-3d"),this.css(s,"backface-visibility","hidden")}},o.prototype.setPosition=function(t,i,e){i+="px",e+="px",this.transform3DSupport?this.css(t,"transform","translate3d("+i+","+e+",0)"):this.transform2DSupport?this.css(t,"transform","translate("+i+","+e+")"):(t.style.left=i,t.style.top=e)},o.prototype.onOrientationTimer=function(){this.orientationSupport&&0===this.orientationStatus&&(this.disable(),this.orientationSupport=!1,this.enable())},o.prototype.onCalibrationTimer=function(){this.calibrationFlag=!0},o.prototype.onWindowResize=function(){this.updateDimensions()},o.prototype.onAnimationFrame=function(){this.updateBounds();var t=this.ix-this.cx,i=this.iy-this.cy;(Math.abs(t)>this.calibrationThreshold||Math.abs(i)>this.calibrationThreshold)&&this.queueCalibration(0),this.portrait?(this.mx=this.calibrateX?i:this.iy,this.my=this.calibrateY?t:this.ix):(this.mx=this.calibrateX?t:this.ix,this.my=this.calibrateY?i:this.iy),this.mx*=this.ew*(this.scalarX/100),this.my*=this.eh*(this.scalarY/100),isNaN(parseFloat(this.limitX))||(this.mx=this.clamp(this.mx,-this.limitX,this.limitX)),isNaN(parseFloat(this.limitY))||(this.my=this.clamp(this.my,-this.limitY,this.limitY)),this.vx+=(this.mx-this.vx)*this.frictionX,this.vy+=(this.my-this.vy)*this.frictionY;for(var e=0,s=this.$layers.length;s>e;e++){var o=this.depths[e],n=this.$layers[e],a=this.vx*o*(this.invertX?-1:1),r=this.vy*o*(this.invertY?-1:1);this.setPosition(n,a,r)}this.raf=requestAnimationFrame(this.onAnimationFrame)},o.prototype.onDeviceOrientation=function(t){if(!this.desktop&&null!==t.beta&&null!==t.gamma){this.orientationStatus=1;var e=(t.beta||0)/a,s=(t.gamma||0)/a,o=i.innerHeight>i.innerWidth;this.portrait!==o&&(this.portrait=o,this.calibrationFlag=!0),this.calibrationFlag&&(this.calibrationFlag=!1,this.cx=e,this.cy=s),this.ix=e,this.iy=s}},o.prototype.onMouseMove=function(t){var i=t.clientX,e=t.clientY;!this.orientationSupport&&this.relativeInput?(this.clipRelativeInput&&(i=Math.max(i,this.ex),i=Math.min(i,this.ex+this.ew),e=Math.max(e,this.ey),e=Math.min(e,this.ey+this.eh)),this.ix=(i-this.ex-this.ecx)/this.erx,this.iy=(e-this.ey-this.ecy)/this.ery):(this.ix=(i-this.wcx)/this.wrx,this.iy=(e-this.wcy)/this.wry)};var h={enable:o.prototype.enable,disable:o.prototype.disable,updateLayers:o.prototype.updateLayers,calibrate:o.prototype.calibrate,friction:o.prototype.friction,invert:o.prototype.invert,scalar:o.prototype.scalar,limit:o.prototype.limit,origin:o.prototype.origin};t.fn[n]=function(i){var e=arguments;return this.each(function(){var s=t(this),a=s.data(n);a||(a=new o(this,i),s.data(n,a)),h[i]&&a[i].apply(a,Array.prototype.slice.call(e,1))})}}(window.jQuery||window.Zepto,window,document),function(){for(var t=0,i=["ms","moz","webkit","o"],e=0;eb?"0"+b:b;a=this.options.timeFormat.padMin&&10>a?"0"+a:a;c=this.options.timeFormat.padSec&&10>c?"0"+c:c;b=""+(this.options.timeFormat.showHour?b+this.options.timeFormat.sepHour:"");b+=this.options.timeFormat.showMin?a+this.options.timeFormat.sepMin:"";return b+=this.options.timeFormat.showSec?c+this.options.timeFormat.sepSec:""}};var n=new l;b.jPlayer.convertTime=function(a){return n.time(a)}; b.jPlayer.uaBrowser=function(a){a=a.toLowerCase();var c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var c=a.toLowerCase(),b=/(android)/,e=/(mobile)/;a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(c)||[];c=/(ipad|playbook)/.exec(c)||!e.exec(c)&&b.exec(c)|| [];a[1]&&(a[1]=a[1].replace(/\s/g,"_"));return{platform:a[1]||"",tablet:c[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var k=b.jPlayer.uaBrowser(navigator.userAgent);k.browser&&(b.jPlayer.browser[k.browser]=!0,b.jPlayer.browser.version=k.version);k=b.jPlayer.uaPlatform(navigator.userAgent);k.platform&&(b.jPlayer.platform[k.platform]=!0,b.jPlayer.platform.mobile=!k.tablet,b.jPlayer.platform.tablet=!!k.tablet);b.jPlayer.getDocMode=function(){var a;b.jPlayer.browser.msie&&(document.documentMode? a=document.documentMode:(a=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(a=7)));return a};b.jPlayer.browser.documentMode=b.jPlayer.getDocMode();b.jPlayer.nativeFeatures={init:function(){var a=document,c=a.createElement("video"),b={w3c:"fullscreenEnabled fullscreenElement requestFullscreen exitFullscreen fullscreenchange fullscreenerror".split(" "),moz:"mozFullScreenEnabled mozFullScreenElement mozRequestFullScreen mozCancelFullScreen mozfullscreenchange mozfullscreenerror".split(" "), webkit:" webkitCurrentFullScreenElement webkitRequestFullScreen webkitCancelFullScreen webkitfullscreenchange ".split(" "),webkitVideo:"webkitSupportsFullscreen webkitDisplayingFullscreen webkitEnterFullscreen webkitExitFullscreen ".split(" ")},e=["w3c","moz","webkit","webkitVideo"],g,h;this.fullscreen=c={support:{w3c:!!a[b.w3c[0]],moz:!!a[b.moz[0]],webkit:"function"===typeof a[b.webkit[3]],webkitVideo:"function"===typeof c[b.webkitVideo[2]]},used:{}};g=0;for(h=e.length;g','','','',''];c=document.createElement('');for(var e=0;e").join(">").split('"').join(""")}, _qualifyURL:function(a){var c=document.createElement("div");c.innerHTML='x';return c.firstChild.href},_absoluteMediaUrls:function(a){var c=this;b.each(a,function(b,e){e&&c.format[b]&&(a[b]=c._qualifyURL(e))});return a},addStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[a])},removeStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[a])},setMedia:function(a){var c=this, d=!1,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();this.androidFix.setMedia=!1;this.androidFix.play=!1;this.androidFix.pause=!1;a=this._absoluteMediaUrls(a);b.each(this.formats,function(e,f){var k="video"===c.format[f].media;b.each(c.solutions,function(e,g){if(c[g].support[f]&&c._validString(a[f])){var l="html"===g;k?(l?(c.html.video.gate=!0,c._html_setVideo(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(a),c.flash.active=!0),c.css.jq.videoPlay.length&& c.css.jq.videoPlay.show(),c.status.video=!0):(l?(c.html.audio.gate=!0,c._html_setAudio(a),c.html.active=!0,b.jPlayer.platform.android&&(c.androidFix.setMedia=!0)):(c.flash.gate=!0,c._flash_setAudio(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1);d=!0;return!1}});if(d)return!1});d?(this.status.nativeVideoControls&&this.html.video.gate||!this._validString(a.poster)||(e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show()),this.css.jq.title.length&& "string"===typeof a.title&&(this.css.jq.title.html(a.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",a.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",a.title)),this.status.srcSet=!0,this.status.media=b.extend({},a),this._updateButtons(!1),this._updateInterface(),this._trigger(b.jPlayer.event.setmedia)):this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,hint:b.jPlayer.errorHint.NO_SUPPORT})}, _resetMedia:function(){this._resetStatus();this._updateButtons(!1);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.flash.active&& this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(b.jPlayer.focus=this)},play:function(a){"object"===typeof a&&this.options.useStateClassSkin&&!this.status.paused?this.pause(a):(a="number"===typeof a?a:NaN,this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play"))},videoPlay:function(){this.play()},pause:function(a){a="number"===typeof a?a:NaN;this.status.srcSet?this.html.active? this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(a,c){var d=this,e="function"===typeof c,g=Array.prototype.slice.call(arguments);"string"===typeof a&&(e&&g.splice(1,1),b.each(this.instances,function(){d.element!==this&&(e&&!c.call(this.data("jPlayer"),d)||this.jPlayer.apply(this,g))}))},pauseOthers:function(a){this.tellOthers("pause",function(){return this.status.srcSet},a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0): this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a);this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},a)},mutedWorker:function(a){this.options.muted=a;this.html.used&&this._html_setProperty("muted",a);this.flash.used&& this._flash_mute(a);this.html.video.gate||this.html.audio.gate||(this._updateMute(a),this._updateVolume(this.options.volume),this._trigger(b.jPlayer.event.volumechange))},mute:function(a){"object"===typeof a&&this.options.useStateClassSkin&&this.options.muted?this._muted(!1):(a=a===f?!0:!!a,this._muted(a))},unmute:function(a){a=a===f?!0:!!a;this._muted(!a)},_updateMute:function(a){a===f&&(a=this.options.muted);a?this.addStateClass("muted"):this.removeStateClass("muted");this.css.jq.mute.length&&this.css.jq.unmute.length&& (this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a);this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_setProperty("volume",a);this.flash.used&&this._flash_volume(a);this.html.video.gate|| this.html.audio.gate||(this._updateVolume(a),this._trigger(b.jPlayer.event.volumechange))},volumeBar:function(a){if(this.css.jq.volumeBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width();a=c.height()-a.pageY+d.top;c=c.height();this.options.verticalVolume?this.volume(a/c):this.volume(e/g)}this.options.muted&&this._muted(!1)},_updateVolume:function(a){a===f&&(a=this.options.volume);a=this.options.muted?0:a;this.status.noVolume?(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(), this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(a){var c= this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&1!==this.ancestorJq.length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)});this._updateInterface();this._updateButtons();this._updateAutohide();this._updateVolume(); this._updateMute()},_cssSelector:function(a,c){var d=this;"string"===typeof c?b.jPlayer.prototype.options.cssSelector[a]?(this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer"),this.options.cssSelector[a]=c,this.css.cs[a]=this.options.cssSelectorAncestor+" "+c,this.css.jq[a]=c?b(this.css.cs[a]):[],this.css.jq[a].length&&this[a]&&this.css.jq[a].bind("click.jPlayer",function(c){c.preventDefault();d[a](c);d.options.autoBlur&&b(this).blur()}),c&&1!==this.css.jq[a].length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT, context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD}):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})}, duration:function(a){this.options.toggleDuration&&(this.options.captureDuration&&a.stopPropagation(),this._setOption("remainingDuration",!this.options.remainingDuration))},seekBar:function(a){if(this.css.jq.seekBar.length){var c=b(a.currentTarget),d=c.offset();a=a.pageX-d.left;c=c.width();this.playHead(100*a/c)}},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(a){if(this.css.jq.playbackRateBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width(); a=c.height()-a.pageY+d.top;c=c.height();this.playbackRate((this.options.verticalPlaybackRate?a/c:e/g)*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate)}},_updatePlaybackRate:function(){var a=(this.options.playbackRate-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(), this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*a+"%"))):(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(a){"object"===typeof a&&this.options.useStateClassSkin&&this.options.loop?this._loop(!1):this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(a){this.options.loop!==a&&(this.options.loop=a,this._updateButtons(),this._trigger(b.jPlayer.event.repeat))}, option:function(a,c){var d=a;if(0===arguments.length)return b.extend(!0,{},this.options);if("string"===typeof a){var e=a.split(".");if(c===f){for(var d=b.extend(!0,{},this.options),g=0;g= a&&(b=!0);return b},_validString:function(a){return a&&"string"===typeof a},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]}); this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_alert:function(a){a="jPlayer "+this.version.script+" : id='"+this.internal.self.id+ "' : "+a;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(a):alert(a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=!0;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=!1});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();var b=document.createEvent("Event");b.initEvent(c, !1,!0);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}}; b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.", NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ", CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}}); /** * jQuery prettySocial: Use custom social share buttons * Author: Sonny T. , sonnyt.com */(function(a){a.fn.prettySocial=function(){var b={pinterest:{url:"http://pinterest.com/pin/create/button/?url={{url}}&media={{media}}&description={{description}}",popup:{width:685,height:500}},facebook:{url:"https://www.facebook.com/sharer/sharer.php?s=100&p[title]={{title}}&p[summary]={{description}}&p[url]={{url}}&p[images][0]={{media}}",popup:{width:626,height:436}},twitter:{url:"https://twitter.com/share?url={{url}}&text={{description}}",popup:{width:685,height:500}},googleplus:{url:"https://plus.google.com/share?url={{url}}",popup:{width:600,height:600}},linkedin:{url:"https://www.linkedin.com/shareArticle?mini=true&url={{url}}&title={{title}}&summary={{description}}+&source={{via}}",popup:{width:600,height:600}}},d=function(f,e){var h=(window.innerWidth/2)-(f.popup.width/2),g=(window.innerHeight/2)-(f.popup.height/2);return window.open(e,"","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+f.popup.width+", height="+f.popup.height+", top="+g+", left="+h)},c=function(f,g){var e=f.url.replace(/{{url}}/g,encodeURIComponent(g.url)).replace(/{{title}}/g,encodeURIComponent(g.title)).replace(/{{description}}/g,encodeURIComponent(g.description)).replace(/{{media}}/g,encodeURIComponent(g.media)).replace(/{{via}}/g,encodeURIComponent(g.via));return e};return this.each(function(){var i=a(this);var g=i.data("type"),f=b[g]||null;if(!f){a.error("Social site is not set.")}var h={url:i.data("url")||"",title:i.data("title")||"",description:i.data("description")||"",media:i.data("media")||"",via:i.data("via")||""};var e=c(f,h);if(navigator.userAgent.match(/Android|IEMobile|BlackBerry|iPhone|iPad|iPod|Opera Mini/i)){i.bind("touchstart",function(j){if(j.originalEvent.touches.length>1){return}i.data("touchWithoutScroll",true)}).bind("touchmove",function(){i.data("touchWithoutScroll",false);return}).bind("touchend",function(k){k.preventDefault();var j=i.data("touchWithoutScroll");if(k.originalEvent.touches.length>1||!j){return}d(f,e)})}else{i.bind("click",function(j){j.preventDefault();d(f,e)})}})}})(jQuery);