minimal-mistakes-jekyll 4.5.2 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -2
  3. data/_includes/comments.html +2 -2
  4. data/_includes/head.html +43 -32
  5. data/_includes/scripts.html +12 -1
  6. data/_layouts/default.html +1 -1
  7. data/_layouts/single.html +1 -1
  8. data/_sass/minimal-mistakes.scss +1 -1
  9. data/_sass/minimal-mistakes/_archive.scss +317 -316
  10. data/_sass/minimal-mistakes/_base.scss +8 -7
  11. data/_sass/minimal-mistakes/_buttons.scss +36 -91
  12. data/_sass/minimal-mistakes/_footer.scss +3 -4
  13. data/_sass/minimal-mistakes/_forms.scss +7 -9
  14. data/_sass/minimal-mistakes/_mixins.scss +39 -0
  15. data/_sass/minimal-mistakes/_navigation.scss +426 -426
  16. data/_sass/minimal-mistakes/_notices.scss +1 -0
  17. data/_sass/minimal-mistakes/_page.scss +3 -6
  18. data/_sass/minimal-mistakes/_sidebar.scss +2 -2
  19. data/_sass/minimal-mistakes/_syntax.scss +2 -2
  20. data/_sass/minimal-mistakes/_tables.scss +3 -3
  21. data/_sass/minimal-mistakes/_utilities.scss +2 -2
  22. data/_sass/minimal-mistakes/_variables.scss +91 -84
  23. data/_sass/minimal-mistakes/skins/_air.scss +23 -0
  24. data/_sass/minimal-mistakes/skins/_contrast.scss +34 -0
  25. data/_sass/minimal-mistakes/skins/_dark.scss +24 -0
  26. data/_sass/minimal-mistakes/skins/_default.scss +5 -0
  27. data/_sass/minimal-mistakes/skins/_dirt.scss +15 -0
  28. data/_sass/minimal-mistakes/skins/_mint.scss +23 -0
  29. data/_sass/minimal-mistakes/skins/_sunrise.scss +26 -0
  30. data/assets/css/main.scss +2 -1
  31. data/assets/js/main.min.js +5 -5
  32. data/assets/js/plugins/jquery.magnific-popup.js +1860 -2049
  33. data/assets/js/plugins/jquery.smooth-scroll.min.js +9 -8
  34. data/assets/js/vendor/jquery/jquery-3.2.1.min.js +4 -0
  35. metadata +10 -3
  36. data/assets/js/vendor/jquery/jquery-1.12.4.min.js +0 -5
@@ -0,0 +1,26 @@
1
+ /* ==========================================================================
2
+ Sunrise skin
3
+ ========================================================================== */
4
+
5
+ /* Colors */
6
+ $dark-gray: #0e2431 !default;
7
+ $background-color: #e8d5b7 !default;
8
+ $text-color: #000 !default;
9
+ $muted-text-color: $dark-gray !default;
10
+ $primary-color: #fc3a52 !default;
11
+ $border-color: mix(#000, $background-color, 20%) !default;
12
+ $code-background-color: mix(#fff, $background-color, 20%) !default;
13
+ $code-background-color-dark: mix(#000, $background-color, 10%) !default;
14
+ $form-background-color: mix(#fff, $background-color, 15%) !default;
15
+ $footer-background-color: #f9b248 !default;
16
+ $link-color: mix(#000, $primary-color, 10%) !default;
17
+ $link-color-hover: mix(#fff, $link-color, 25%) !default;
18
+ $link-color-visited: mix(#000, $link-color, 25%) !default;
19
+ $masthead-link-color: $text-color !default;
20
+ $masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
21
+ $navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
22
+
23
+ .author__urls.social-icons .fa,
24
+ .page__footer-follow .social-icons .fa {
25
+ color: inherit;
26
+ }
@@ -4,4 +4,5 @@
4
4
 
5
5
  @charset "utf-8";
6
6
 
7
- @import "minimal-mistakes";
7
+ @import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
8
+ @import "minimal-mistakes"; // main partials
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Minimal Mistakes Jekyll Theme 4.5.2 by Michael Rose
2
+ * Minimal Mistakes Jekyll Theme 4.6.0 by Michael Rose
3
3
  * Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
4
4
  * Licensed under MIT
5
5
  */
6
- !function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"===n||pe.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Te.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(je)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(He,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_e.test(n)?pe.parseJSON(n):n}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(Ie(e)){var i,o,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(r||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=ne.pop()||pe.guid++:a),l[u]||(l[u]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?l[u]=pe.extend(l[u],t):l[u].data=pe.extend(l[u].data,t)),o=l[u],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function d(e,t,n){if(Ie(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!u(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,u(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},l=s(),u=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==u&&+l)&&Me.exec(pe.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,pe.style(e,t,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function p(e){var t=$e.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function g(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,r,i){for(var o,a,s,l,u,c,d,f=e.length,v=p(t),y=[],b=0;f>b;b++)if(a=e[b],a||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Ue.test(a)){for(l=l||v.appendChild(t.createElement("div")),u=(ze.exec(a)||["",""])[1].toLowerCase(),d=Xe[u]||Xe._default,l.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)l=l.lastChild;if(!de.leadingWhitespace&&We.test(a)&&y.push(t.createTextNode(We.exec(a)[0])),!de.tbody)for(a="table"!==u||Ye.test(a)?"<table>"!==d[1]||Ye.test(a)?0:l:l.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(t.createTextNode(a));for(l&&v.removeChild(l),de.appendChecked||pe.grep(h(y,"input"),g),b=0;a=y[b++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),l=h(v.appendChild(a),"script"),s&&m(l),n)for(o=0;a=l[o++];)Re.test(a.type||"")&&n.push(a);return l=null,v}function y(){return!0}function b(){return!1}function x(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=b;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function T(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function k(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)pe.event.add(t,n,s[n][r])}a.data&&(a.data=pe.extend({},a.data))}}function S(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){i=pe._data(t);for(r in i.events)pe.removeEvent(t,r,i.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(T(t).text=e.text,k(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Be.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function N(e,t,n,r){t=oe.apply([],t);var i,o,a,s,l,u,c=0,d=e.length,f=d-1,p=t[0],m=pe.isFunction(p);if(m||d>1&&"string"==typeof p&&!de.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);m&&(t[0]=p.call(this,i,o.html())),N(o,t,n,r)});if(d&&(u=v(t,e[0].ownerDocument,!1,e,r),i=u.firstChild,1===u.childNodes.length&&(u=i),i||r)){for(s=pe.map(h(u,"script"),T),a=s.length;d>c;c++)o=u,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(l=s[s.length-1].ownerDocument,pe.map(s,k),c=0;a>c;c++)o=s[c],Re.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(l,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ot,"")));u=i=null}return e}function A(e,t,n){for(var r,i=t?pe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||pe.cleanData(h(r)),r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&m(h(r,"script")),r.parentNode.removeChild(r));return e}function j(e,t){var n=pe(t.createElement(e)).appendTo(t.body),r=pe.css(n[0],"display");return n.detach(),r}function L(e){var t=re,n=ut[e];return n||(n=j(e,t),"none"!==n&&n||(lt=(lt||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(lt[0].contentWindow||lt[0].contentDocument).document,t.write(),t.close(),n=j(e,t),lt.detach()),ut[e]=n),n}function D(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function I(e){if(e in kt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Tt.length;n--;)if(e=Tt[n]+t,e in kt)return e}function _(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=pe._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&qe(r)&&(o[a]=pe._data(r,"olddisplay",L(r.nodeName)))):(i=qe(r),(n&&"none"!==n||!i)&&pe._data(r,"olddisplay",i?n:pe.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function H(e,t,n){var r=xt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function O(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=pe.css(e,n+Pe[o],!0,i)),r?("content"===n&&(a-=pe.css(e,"padding"+Pe[o],!0,i)),"margin"!==n&&(a-=pe.css(e,"border"+Pe[o]+"Width",!0,i))):(a+=pe.css(e,"padding"+Pe[o],!0,i),"padding"!==n&&(a+=pe.css(e,"border"+Pe[o]+"Width",!0,i)));return a}function M(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ht(e),a=de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=mt(e,t,o),(0>i||null==i)&&(i=e.style[t]),dt.test(i))return i;r=a&&(de.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+O(e,t,n||(a?"border":"content"),r,o)+"px"}function P(e,t,n,r,i){return new P.prototype.init(e,t,n,r,i)}function q(){return e.setTimeout(function(){Et=void 0}),Et=pe.now()}function F(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Pe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e,t,n){for(var r,i=(W.tweeners[t]||[]).concat(W.tweeners["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function z(e,t,n){var r,i,o,a,s,l,u,c,d=this,f={},p=e.style,h=e.nodeType&&qe(e),m=pe._data(e,"fxshow");n.queue||(s=pe._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,pe.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=pe.css(e,"display"),c="none"===u?pe._data(e,"olddisplay")||L(e.nodeName):u,"inline"===c&&"none"===pe.css(e,"float")&&(de.inlineBlockNeedsLayout&&"inline"!==L(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",de.shrinkWrapBlocks()||d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Nt.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;h=!0}f[r]=m&&m[r]||pe.style(e,r)}else u=void 0;if(pe.isEmptyObject(f))"inline"===("none"===u?L(e.nodeName):u)&&(p.display=u);else{m?"hidden"in m&&(h=m.hidden):m=pe._data(e,"fxshow",{}),o&&(m.hidden=!h),h?pe(e).show():d.done(function(){pe(e).hide()}),d.done(function(){var t;pe._removeData(e,"fxshow");for(t in f)pe.style(e,t,f[t])});for(r in f)a=B(h?m[r]:0,r,d),r in m||(m[r]=a.start,h&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function R(e,t){var n,r,i,o,a;for(n in e)if(r=pe.camelCase(n),i=t[r],o=e[n],pe.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=pe.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o=0,a=W.prefilters.length,s=pe.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=Et||q(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:Et||q(),duration:n.duration,tweens:[],createTween:function(t,n){var r=pe.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(R(c,u.opts.specialEasing);a>o;o++)if(r=W.prefilters[o].call(u,e,c,u.opts))return pe.isFunction(r.stop)&&(pe._queueHooks(u.elem,u.opts.queue).stop=pe.proxy(r.stop,r)),r;return pe.map(c,B,u),pe.isFunction(u.opts.start)&&u.opts.start.call(e,u),pe.fx.timer(pe.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function $(e){return pe.attr(e,"class")||""}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(je)||[];if(pe.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function U(e,t,n,r){function i(s){var l;return o[s]=!0,pe.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),i(u),!1)}),l}var o={},a=e===Kt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function Y(e,t){var n,r,i=pe.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&pe.extend(!0,e,n),e}function V(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}r||(r=a)}o=o||r}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function G(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function Z(e){return e.style&&e.style.display||pe.css(e,"display")}function J(e){if(!pe.contains(e.ownerDocument||re,e))return!0;for(;e&&1===e.nodeType;){if("none"===Z(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function K(e,t,n,r){var i;if(pe.isArray(t))pe.each(t,function(t,i){n||rn.test(e)?r(e,i):K(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==pe.type(t))r(e,t);else for(i in t)K(e+"["+i+"]",t[i],n,r)}function Q(){try{return new e.XMLHttpRequest}catch(t){}}function ee(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function te(e){return pe.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var ne=[],re=e.document,ie=ne.slice,oe=ne.concat,ae=ne.push,se=ne.indexOf,le={},ue=le.toString,ce=le.hasOwnProperty,de={},fe="1.12.4",pe=function(e,t){return new pe.fn.init(e,t)},he=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,me=/^-ms-/,ge=/-([\da-z])/gi,ve=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:fe,constructor:pe,selector:"",length:0,toArray:function(){return ie.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:ie.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:ne.sort,splice:ne.splice},pe.extend=pe.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||pe.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(i=arguments[s]))for(r in i)e=a[r],n=i[r],a!==n&&(u&&n&&(pe.isPlainObject(n)||(t=pe.isArray(n)))?(t?(t=!1,o=e&&pe.isArray(e)?e:[]):o=e&&pe.isPlainObject(e)?e:{},a[r]=pe.extend(u,o,n)):void 0!==n&&(a[r]=n));return a},pe.extend({expando:"jQuery"+(fe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&t-parseFloat(t)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!de.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ue.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(me,"ms-").replace(ge,ve)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;r>i&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(he,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?pe.merge(r,"string"==typeof e?[e]:e):ae.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(se)return se.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;)e[i++]=t[r++];if(n!==n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;a>o;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,r){var i,o,a=0,s=[];if(n(e))for(i=e.length;i>a;a++)o=t(e[a],a,r),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,r),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(i=e[t],t=e,e=i),pe.isFunction(e)?(n=ie.call(arguments,2),r=function(){return e.apply(t||this,n.concat(ie.call(arguments)))},r.guid=e.guid=e.guid||pe.guid++,r):void 0},now:function(){return+new Date},support:de}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=ne[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var ye=function(e){function t(e,t,n,r){var i,o,a,s,l,u,d,p,h=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&((t?t.ownerDocument||t:B)!==I&&D(t),t=t||I,H)){if(11!==m&&(u=ve.exec(e)))if(i=u[1]){if(9===m){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(h&&(a=h.getElementById(i))&&q(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return K.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&w.getElementsByClassName&&t.getElementsByClassName)return K.apply(n,t.getElementsByClassName(i)),n}if(w.qsa&&!X[e+" "]&&(!O||!O.test(e))){if(1!==m)h=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(be,"\\$&"):t.setAttribute("id",s=F),d=E(e),o=d.length,l=fe.test(s)?"#"+s:"[id='"+s+"']";o--;)d[o]=l+" "+f(d[o]);p=d.join(","),h=ye.test(e)&&c(t.parentNode)||t}if(p)try{return K.apply(n,h.querySelectorAll(p)),n}catch(g){}finally{s===F&&t.removeAttribute("id")}}}return N(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=I.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)C.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=R++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,u,c=[z,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(u=t[F]||(t[F]={}),l=u[t.uniqueID]||(u[t.uniqueID]={}),(s=l[r])&&s[0]===z&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var u,c,d,f=[],p=[],h=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:h||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(u=g(b,p),i(u,[],s,l),c=u.length;c--;)(d=u[c])&&(b[p[c]]=!(y[p[c]]=d));if(r){if(o||e){if(o){for(u=[],c=b.length;c--;)(d=b[c])&&u.push(y[c]=d);o(null,b=[],u,l)}for(c=b.length;c--;)(d=b[c])&&(u=o?ee(r,d):f[c])>-1&&(r[u]=!(a[u]=d))}}else b=g(b===a?b.splice(h,b.length):b),o?o(null,a,b,l):K.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),u=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];i>s;s++)if(n=C.relative[e[s].type])c=[p(h(c),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!C.relative[e[r].type];r++);return v(s>1&&h(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}c.push(n)}return h(c)}function b(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,l,u){var c,d,f,p=0,h="0",m=r&&[],v=[],y=A,b=r||o&&C.find.TAG("*",u),x=z+=null==y?1:Math.random()||.1,w=b.length;for(u&&(A=a===I||a||u);h!==w&&null!=(c=b[h]);h++){if(o&&c){for(d=0,a||c.ownerDocument===I||(D(c),s=!H);f=e[d++];)if(f(c,a||I,s)){l.push(c);break}u&&(z=x)}i&&((c=!f&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(p>0)for(;h--;)m[h]||v[h]||(v[h]=Z.call(l));v=g(v)}K.apply(l,v),u&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&(z=x,A=y),m};return i?r(a):a}var x,w,C,T,k,E,S,N,A,j,L,D,I,_,H,O,M,P,q,F="sizzle"+1*new Date,B=e.document,z=0,R=0,W=n(),$=n(),X=n(),U=function(e,t){return e===t&&(L=!0),0},Y=1<<31,V={}.hasOwnProperty,G=[],Z=G.pop,J=G.push,K=G.push,Q=G.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),fe=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Ce=function(){D()};try{K.apply(G=Q.call(B.childNodes),B.childNodes),G[B.childNodes.length].nodeType}catch(Te){K={apply:G.length?function(e,t){J.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==I&&9===r.nodeType&&r.documentElement?(I=r,_=I.documentElement,H=!k(I),(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(I.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ge.test(I.getElementsByClassName),w.getById=i(function(e){return _.appendChild(e).id=F,!I.getElementsByName||!I.getElementsByName(F).length}),w.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}},C.filter.ID=function(e){var t=e.replace(xe,we);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(xe,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},C.find.CLASS=w.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&H?t.getElementsByClassName(e):void 0},M=[],O=[],(w.qsa=ge.test(I.querySelectorAll))&&(i(function(e){_.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||O.push(".#.+[+~]")}),i(function(e){var t=I.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(w.matchesSelector=ge.test(P=_.matches||_.webkitMatchesSelector||_.mozMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&i(function(e){w.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),M.push("!=",oe)}),O=O.length&&new RegExp(O.join("|")),M=M.length&&new RegExp(M.join("|")),t=ge.test(_.compareDocumentPosition),q=t||ge.test(_.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return L=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===I||e.ownerDocument===B&&q(B,e)?-1:t===I||t.ownerDocument===B&&q(B,t)?1:j?ee(j,e)-ee(j,t):0:4&n?-1:1)}:function(e,t){if(e===t)return L=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!i||!o)return e===I?-1:t===I?1:i?-1:o?1:j?ee(j,e)-ee(j,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?a(s[r],l[r]):s[r]===B?-1:l[r]===B?1:0},I):I},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==I&&D(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&H&&!X[n+" "]&&(!M||!M.test(n))&&(!O||!O.test(n)))try{var r=P.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,I,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==I&&D(e),q(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==I&&D(e);var n=C.attrHandle[t.toLowerCase()],r=n&&V.call(C.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:w.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(L=!w.detectDuplicates,j=!w.sortStable&&e.slice(0),e.sort(U),L){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return j=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},C=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,we),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(o){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(f=g,d=f[F]||(f[F]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===z&&u[1],
7
- b=p&&u[2],f=p&&g.childNodes[p];f=++p&&f&&f[m]||(b=p=0)||h.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[z,p,b];break}}else if(y&&(f=t,d=f[F]||(f[F]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===z&&u[1],b=p),b===!1)for(;(f=++p&&f&&f[m]||(b=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++b||(y&&(d=f[F]||(f[F]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),c[e]=[z,b]),f!==t)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var i,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[F]?o(n):o.length>1?(i=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,we),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,we).toLowerCase(),function(t){var n;do if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===_},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},C.pseudos.nth=C.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})C.pseudos[x]=l(x);return d.prototype=C.filters=C.pseudos,C.setFilters=new d,E=t.tokenize=function(e,n){var r,i,o,a,s,l,u,c=$[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=C.preFilter;s;){r&&!(i=le.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ue.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in C.filter)!(i=pe[a].exec(s))||u[a]&&!(i=u[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):$(e,l).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=E(e)),n=t.length;n--;)o=y(t[n]),o[F]?r.push(o):i.push(o);o=X(e,b(i,r)),o.selector=e}return o},N=t.select=function(e,t,n,r){var i,o,a,s,l,u="function"==typeof e&&e,d=!r&&E(e=u.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&H&&C.relative[o[1].type]){if(t=(C.find.ID(a.matches[0].replace(xe,we),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!C.relative[s=a.type]);)if((l=C.find[s])&&(r=l(a.matches[0].replace(xe,we),ye.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return K.apply(n,r),n;break}}return(u||S(e,d))(r,t,!H,n,!t||ye.test(e)&&c(t.parentNode)||t),n},w.sortStable=F.split("").sort(U).join("")===F,w.detectDuplicates=!!L,D(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(I.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ye,pe.expr=ye.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ye.uniqueSort,pe.text=ye.getText,pe.isXMLDoc=ye.isXML,pe.contains=ye.contains;var be=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Ce=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Te=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;i>t;t++)if(pe.contains(r[t],this))return!0}));for(t=0;i>t;t++)pe.find(e,r[t],n);return n=this.pushStack(i>1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var ke,Ee=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Se=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ee.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Ce.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return ke.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};Se.prototype=pe.fn,ke=pe(re);var Ne=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=we.test(e)||"string"!=typeof e?pe(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return be(e,"parentNode")},parentsUntil:function(e,t,n){return be(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return be(e,"nextSibling")},prevAll:function(e){return be(e,"previousSibling")},nextUntil:function(e,t,n){return be(e,"nextSibling",n)},prevUntil:function(e,t,n){return be(e,"previousSibling",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Ne.test(e)&&(i=i.reverse())),this.pushStack(i)}});var je=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],l=-1,u=function(){for(i=e.once,r=t=!0;s.length;l=-1)for(n=s.shift();++l<a.length;)a[l].apply(n[0],n[1])===!1&&e.stopOnFalse&&(l=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(l=a.length-1,s.push(n)),function r(t){pe.each(t,function(t,n){pe.isFunction(n)?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==pe.type(n)&&r(n)})}(arguments),n&&!t&&u()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,a,n))>-1;)a.splice(n,1),l>=n&&l--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,l=1===s?e:pe.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&pe.isFunction(o[i].promise)?o[i].promise().progress(u(i,n,t)).done(u(i,r,o)).fail(l.reject):--s;return s||l.resolveWith(r,o),l.promise()}});var Le;pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(e===!0?--pe.readyWait:pe.isReady)||(pe.isReady=!0,e!==!0&&--pe.readyWait>0||(Le.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!Le)if(Le=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return Le.promise(t)},pe.ready.promise();var De;for(De in pe(de))break;de.ownFirst="0"===De,de.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",de.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");de.deleteExpando=!0;try{delete e.test}catch(t){de.deleteExpando=!1}e=null}();var Ie=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute("classid")===t},_e=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,He=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!u(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),l(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?l(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):void 0===t?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=pe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=pe._data(o[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),function(){var e;de.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,r;return n=re.getElementsByTagName("body")[0],n&&n.style?(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(re.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(r),e):void 0}}();var Oe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Me=new RegExp("^(?:([+-])=|)("+Oe+")([a-z%]*)$","i"),Pe=["Top","Right","Bottom","Left"],qe=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},Fe=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===pe.type(n)){i=!0;for(s in n)Fe(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,pe.isFunction(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(pe(e),n)})),t))for(;l>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},Be=/^(?:checkbox|radio)$/i,ze=/<([\w:-]+)/,Re=/^$|\/(?:java|ecma)script/i,We=/^\s+/,$e="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var e=re.createElement("div"),t=re.createDocumentFragment(),n=re.createElement("input");e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",de.leadingWhitespace=3===e.firstChild.nodeType,de.tbody=!e.getElementsByTagName("tbody").length,de.htmlSerialize=!!e.getElementsByTagName("link").length,de.html5Clone="<:nav></:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),de.appendChecked=n.checked,e.innerHTML="<textarea>x</textarea>",de.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),de.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,de.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,de.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:de.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ye=/<tbody/i;!function(){var t,n,r=re.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(de[t]=n in e)||(r.setAttribute(n,"t"),de[t]=r.attributes[n].expando===!1);r=null}();var Ve=/^(?:input|select|textarea)$/i,Ge=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Je=/^(?:focusinfocus|focusoutblur)$/,Ke=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,p,h,m,g=pe._data(e);if(g){for(n.handler&&(l=n,n=l.handler,i=l.selector),n.guid||(n.guid=pe.guid++),(a=g.events)||(a=g.events={}),(c=g.handle)||(c=g.handle=function(e){return"undefined"==typeof pe||e&&pe.event.triggered===e.type?void 0:pe.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(je)||[""],s=t.length;s--;)o=Ke.exec(t[s])||[],p=m=o[1],h=(o[2]||"").split(".").sort(),p&&(u=pe.event.special[p]||{},p=(i?u.delegateType:u.bindType)||p,u=pe.event.special[p]||{},d=pe.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&pe.expr.match.needsContext.test(i),namespace:h.join(".")},l),(f=a[p])||(f=a[p]=[],f.delegateCount=0,u.setup&&u.setup.call(e,r,h,c)!==!1||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,d):f.push(d),pe.event.global[p]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,f,p,h,m,g=pe.hasData(e)&&pe._data(e);if(g&&(c=g.events)){for(t=(t||"").match(je)||[""],u=t.length;u--;)if(s=Ke.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p){for(d=pe.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;o--;)a=f[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,d.remove&&d.remove.call(e,a));l&&!f.length&&(d.teardown&&d.teardown.call(e,h,g.handle)!==!1||pe.removeEvent(e,p,g.handle),delete c[p])}else for(p in c)pe.event.remove(e,p+t[u],n,r,!0);pe.isEmptyObject(c)&&(delete g.handle,pe._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,l,u,c,d,f=[r||re],p=ce.call(t,"type")?t.type:t,h=ce.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||re,3!==r.nodeType&&8!==r.nodeType&&!Je.test(p+pe.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),u=pe.event.special[p]||{},i||!u.trigger||u.trigger.apply(r,n)!==!1)){if(!i&&!u.noBubble&&!pe.isWindow(r)){for(l=u.delegateType||p,Je.test(l+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),c=s;c===(r.ownerDocument||re)&&f.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=f[d++])&&!t.isPropagationStopped();)t.type=d>1?l:u.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&Ie(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(f.pop(),n)===!1)&&Ie(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(m){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),l=(pe._data(this,"events")||{})[e.type]||[],u=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,l),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(r=[],n=0;s>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?pe(i,this).index(l)>-1:pe.find(i,this,null,[l]).length),r[i]&&r.push(o);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[pe.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Ze.test(i)?this.mouseHooks:Ge.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new pe.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||re),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(r=e.target.ownerDocument||re,i=r.documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==x()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===x()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var r=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=re.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var r="on"+t;e.detachEvent&&("undefined"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},pe.Event=function(e,t){return this instanceof pe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?y:b):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),void(this[pe.expando]=!0)):new pe.Event(e,t)},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=y,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=y,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=y,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||pe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),de.submit||(pe.event.special.submit={setup:function(){return pe.nodeName(this,"form")?!1:void pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):void 0;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){return pe.nodeName(this,"form")?!1:void pe.event.remove(this,"._submit")}}),de.change||(pe.event.special.change={setup:function(){return Ve.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1):void pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ve.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return pe.event.remove(this,"._change"),!Ve.test(this.nodeName)}}),de.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=pe._data(r,t);i||r.addEventListener(e,n,!0),pe._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=pe._data(r,t)-1;i?pe._data(r,t,i):(r.removeEventListener(e,n,!0),pe._removeData(r,t))}}}),pe.fn.extend({on:function(e,t,n,r){return w(this,e,t,n,r)},one:function(e,t,n,r){return w(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,pe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=b),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?pe.event.trigger(e,t,n,!0):void 0}});var Qe=/ jQuery\d+="(?:null|\d+)"/g,et=new RegExp("<(?:"+$e+")[\\s/>]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/<script|<style|<link/i,rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,l=pe.contains(e.ownerDocument,e);if(de.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(de.noCloneEvent&&de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&S(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)E(i,r[a]);else E(e,o);return r=h(o,"script"),r.length>0&&m(r,!l&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,l=pe.cache,u=de.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||Ie(n))&&(i=n[s],o=i&&l[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);l[i]&&(delete l[i],u||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:N,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return N(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.appendChild(e)}})},prepend:function(){return N(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return N(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return N(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Qe,""):void 0;if("string"==typeof e&&!nt.test(e)&&(de.htmlSerialize||!et.test(e))&&(de.leadingWhitespace||!We.test(e))&&!Xe[(ze.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(pe.cleanData(h(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return N(this,arguments,function(t){var n=this.parentNode;pe.inArray(this,e)<0&&(pe.cleanData(h(this)),
8
- n&&n.replaceChild(t,this))},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,r=0,i=[],o=pe(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),pe(o[r])[t](n),ae.apply(i,n.get());return this.pushStack(i)}});var lt,ut={HTML:"block",BODY:"block"},ct=/^margin/,dt=new RegExp("^("+Oe+")(?!px)[a-z%]+$","i"),ft=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},pt=re.documentElement;!function(){function t(){var t,c,d=re.documentElement;d.appendChild(l),u.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=i=s=!1,r=a=!0,e.getComputedStyle&&(c=e.getComputedStyle(u),n="1%"!==(c||{}).top,s="2px"===(c||{}).marginLeft,i="4px"===(c||{width:"4px"}).width,u.style.marginRight="50%",r="4px"===(c||{marginRight:"4px"}).marginRight,t=u.appendChild(re.createElement("div")),t.style.cssText=u.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",u.style.width="1px",a=!parseFloat((e.getComputedStyle(t)||{}).marginRight),u.removeChild(t)),u.style.display="none",o=0===u.getClientRects().length,o&&(u.style.display="",u.innerHTML="<table><tr><td></td><td>t</td></tr></table>",u.childNodes[0].style.borderCollapse="separate",t=u.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),d.removeChild(l)}var n,r,i,o,a,s,l=re.createElement("div"),u=re.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",de.opacity="0.5"===u.style.opacity,de.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",de.clearCloneStyle="content-box"===u.style.backgroundClip,l=re.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",l.appendChild(u),de.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,pe.extend(de,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,mt,gt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},mt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!de.pixelMarginRight()&&dt.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},mt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),dt.test(a)&&!gt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var vt=/alpha\([^)]*\)/i,yt=/opacity\s*=\s*([^)]*)/i,bt=/^(none|table(?!-c[ea]).+)/,xt=new RegExp("^("+Oe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Ct={letterSpacing:"0",fontWeight:"400"},Tt=["Webkit","O","Moz","ms"],kt=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=mt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":de.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),l=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=I(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=f(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),de.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{l[t]=n}catch(u){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=I(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=mt(e,t,r)),"normal"===o&&t in Ct&&(o=Ct[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){return n?bt.test(pe.css(e,"display"))&&0===e.offsetWidth?ft(e,wt,function(){return M(e,t,r)}):M(e,t,r):void 0},set:function(e,n,r){var i=r&&ht(e);return H(e,n,r?O(e,t,r,de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),de.opacity||(pe.cssHooks.opacity={get:function(e,t){return yt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(vt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=vt.test(o)?o.replace(vt,i):o+" "+i)}}),pe.cssHooks.marginRight=D(de.reliableMarginRight,function(e,t){return t?ft(e,{display:"inline-block"},mt,[e,"marginRight"]):void 0}),pe.cssHooks.marginLeft=D(de.reliableMarginLeft,function(e,t){return t?(parseFloat(mt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ft(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px":void 0}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Pe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=H)}),pe.fn.extend({css:function(e,t){return Fe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;i>a;a++)o[t[a]]=pe.css(e,t[a],!1,r);return o}return void 0!==n?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)},show:function(){return _(this,!0)},hide:function(){return _(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){qe(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=P,P.prototype={constructor:P,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=P.propHooks[this.prop];return e&&e.get?e.get(this):P.propHooks._default.get(this)},run:function(e){var t,n=P.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=P.prototype.init,pe.fx.step={};var Et,St,Nt=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend(W,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return f(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(je);for(var n,r=0,i=e.length;i>r;r++)n=e[r],W.tweeners[n]=W.tweeners[n]||[],W.tweeners[n].unshift(t)},prefilters:[z],prefilter:function(e,t){t?W.prefilters.unshift(e):W.prefilters.push(e)}}),pe.speed=function(e,t,n){var r=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return r.duration=pe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in pe.fx.speeds?pe.fx.speeds[r.duration]:pe.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){pe.isFunction(r.old)&&r.old.call(this),r.queue&&pe.dequeue(this,r.queue)},r},pe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(qe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=pe.isEmptyObject(e),o=pe.speed(t,n,r),a=function(){var t=W(this,pe.extend({},e),o);(i||pe._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=pe.timers,a=pe._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&At.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||pe.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=pe._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=pe.timers,a=r?r.length:0;for(n.finish=!0,pe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(F(t,!0),e,r,i)}}),pe.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(Et=pe.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),Et=void 0},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){St||(St=e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.clearInterval(St),St=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx?pe.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e,t=re.createElement("input"),n=re.createElement("div"),r=re.createElement("select"),i=r.appendChild(re.createElement("option"));n=re.createElement("div"),n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",de.getSetAttribute="t"!==n.className,de.style=/top/.test(e.getAttribute("style")),de.hrefNormalized="/a"===e.getAttribute("href"),de.checkOn=!!t.value,de.optSelected=i.selected,de.enctype=!!re.createElement("form").enctype,r.disabled=!0,de.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),de.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),de.radioValue="t"===t.value}();var jt=/\r/g,Lt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(jt,""):null==n?"":n)):void 0}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(Lt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;s>l;l++)if(n=r[l],(n.selected||l===i)&&(de.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=pe.makeArray(t),a=i.length;a--;)if(r=i[a],pe.inArray(pe.valHooks.option.get(r),o)>-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){return pe.isArray(t)?e.checked=pe.inArray(pe(e).val(),t)>-1:void 0}},de.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Dt,It,_t=pe.expr.attrHandle,Ht=/^(?:checked|selected)$/i,Ot=de.getSetAttribute,Mt=de.input;pe.fn.extend({attr:function(e,t){return Fe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;return 3!==o&&8!==o&&2!==o?"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?It:Dt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r)):void 0},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(je);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ot||!Ht.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ot?n:r)}}),It={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ot||!Ht.test(n)?e.setAttribute(!Ot&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=_t[t]||pe.find.attr;Mt&&Ot||!Ht.test(t)?_t[t]=function(e,t,r){var i,o;return r||(o=_t[t],_t[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,_t[t]=o),i}:_t[t]=function(e,t,n){return n?void 0:e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ot||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Dt&&Dt.set(e,t,n)}}),Ot||(Dt={set:function(e,t,n){var r=e.getAttributeNode(n);return r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},_t.id=_t.name=_t.coords=function(e,t,n){var r;return n?void 0:(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:Dt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Dt.set(e,""===t?!1:t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),de.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Pt=/^(?:input|select|textarea|button|object)$/i,qt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Fe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;return 3!==o&&8!==o&&2!==o?(1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]):void 0},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Pt.test(e.nodeName)||qt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),de.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),de.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),de.enctype||(pe.propFix.enctype="encoding");var Ft=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,$(this)))});if("string"==typeof e&&e)for(t=e.match(je)||[];n=this[l++];)if(i=$(n),r=1===n.nodeType&&(" "+i+" ").replace(Ft," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,$(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(je)||[];n=this[l++];)if(i=$(n),r=1===n.nodeType&&(" "+i+" ").replace(Ft," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,$(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(je)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=$(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+$(n)+" ").replace(Ft," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,zt=pe.now(),Rt=/\?/,Wt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace(Wt,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var $t=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Yt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Vt=/^(?:GET|HEAD)$/,Gt=/^\/\//,Zt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Jt={},Kt={},Qt="*/".concat("*"),en=Bt.href,tn=Zt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Yt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Y(Y(e,pe.ajaxSettings),t):Y(pe.ajaxSettings,e)},ajaxPrefilter:X(Jt),ajaxTransport:X(Kt),ajax:function(t,n){function r(t,n,r,i){var o,d,y,b,w,T=n;2!==x&&(x=2,l&&e.clearTimeout(l),c=void 0,s=i||"",C.readyState=t>0?4:0,o=t>=200&&300>t||304===t,r&&(b=V(f,C,r)),b=G(f,b,C,o),o?(f.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=C.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===f.type?T="nocontent":304===t?T="notmodified":(T=b.state,d=b.data,y=b.error,o=!y)):(y=T,!t&&T||(T="error",0>t&&(t=0))),C.status=t,C.statusText=(n||T)+"",o?m.resolveWith(p,[d,T,C]):m.rejectWith(p,[C,T,y]),C.statusCode(v),v=void 0,u&&h.trigger(o?"ajaxSuccess":"ajaxError",[C,f,o?d:y]),g.fireWith(p,[C,T]),u&&(h.trigger("ajaxComplete",[C,f]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,l,u,c,d,f=pe.ajaxSetup({},n),p=f.context||f,h=f.context&&(p.nodeType||p.jquery)?pe(p):pe.event,m=pe.Deferred(),g=pe.Callbacks("once memory"),v=f.statusCode||{},y={},b={},x=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!d)for(d={};t=Ut.exec(s);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)v[t]=[v[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(m.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,f.url=((t||f.url||en)+"").replace($t,"").replace(Gt,tn[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=pe.trim(f.dataType||"*").toLowerCase().match(je)||[""],null==f.crossDomain&&(i=Zt.exec(f.url.toLowerCase()),f.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=pe.param(f.data,f.traditional)),U(Jt,f,n,C),2===x)return C;u=pe.event&&f.global,u&&0===pe.active++&&pe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Vt.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(Rt.test(a)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=Xt.test(a)?a.replace(Xt,"$1_="+zt++):a+(Rt.test(a)?"&":"?")+"_="+zt++)),f.ifModified&&(pe.lastModified[a]&&C.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&C.setRequestHeader("If-None-Match",pe.etag[a])),(f.data&&f.hasContent&&f.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Qt+"; q=0.01":""):f.accepts["*"]);for(o in f.headers)C.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(f.beforeSend.call(p,C,f)===!1||2===x))return C.abort();w="abort";for(o in{success:1,error:1,complete:1})C[o](f[o]);if(c=U(Kt,f,n,C)){if(C.readyState=1,u&&h.trigger("ajaxSend",[C,f]),2===x)return C;f.async&&f.timeout>0&&(l=e.setTimeout(function(){C.abort("timeout")},f.timeout));try{x=1,c.send(y,r)}catch(T){if(!(2>x))throw T;r(-1,T)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return de.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:J(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)K(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Q():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Q()||ee()}:Q;var ln=0,un={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in un)un[e](void 0,!0)}),de.cors=!!cn&&"withCredentials"in cn,cn=de.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||de.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++ln;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,l,u;if(n&&(r||4===a.readyState))if(delete un[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{u={},o=a.status,"string"==typeof a.responseText&&(u.text=a.responseText);try{l=a.statusText}catch(c){l=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=u.text?200:404}u&&i(o,l,u,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=un[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var dn=[],fn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=dn.pop()||pe.expando+"_"+zt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(fn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&fn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(fn,"$1"+i):t.jsonp!==!1&&(t.url+=(Rt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,dn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Ce.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=v([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("<div>").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u,c=pe.css(e,"position"),d=pe(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=pe.css(e,"top"),l=pe.css(e,"left"),u=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,l])>-1,u?(r=d.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):d.css(f)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),
9
- left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Fe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=D(de.pixelPosition,function(e,n){return n?(n=mt(e,t),dt.test(n)?pe(e).position()[t]+"px":n):void 0})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Fe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var hn=e.jQuery,mn=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=mn),t&&e.jQuery===pe&&(e.jQuery=hn),pe},t||(e.jQuery=e.$=pe),pe}),function(e){"use strict";e.fn.fitVids=function(t){var n={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],i=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",o=document.createElement("div");o.innerHTML='<p>x</p><style id="fit-vids-style">'+i+"</style>",r.appendChild(o.childNodes[1])}return t&&e.extend(n,t),this.each(function(){var t=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&t.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);var i=e(this).find(t.join(","));i=i.not("object object"),i=i.not(r),i.each(function(t){var n=e(this);if(!(n.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&n.parent("object").length||n.parent(".fluid-width-video-wrapper").length)){n.css("height")||n.css("width")||!isNaN(n.attr("height"))&&!isNaN(n.attr("width"))||(n.attr("height",9),n.attr("width",16));var i="object"===this.tagName.toLowerCase()||n.attr("height")&&!isNaN(parseInt(n.attr("height"),10))?parseInt(n.attr("height"),10):n.height(),o=isNaN(parseInt(n.attr("width"),10))?n.width():parseInt(n.attr("width"),10),a=i/o;if(!n.attr("id")){var s="fitvid"+t;n.attr("id",s)}n.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*a+"%"),n.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto),$(document).ready(function(){function e(){l=n.width()-10,u=n.children().length,c=s[u-1],c>l?(n.children().last().prependTo(r),u-=1,e()):l>s[u]&&(r.children().first().appendTo(n),u+=1,e()),t.attr("count",i-u),u===i?t.addClass("hidden"):t.removeClass("hidden")}var t=$("nav.greedy-nav button"),n=$("nav.greedy-nav .visible-links"),r=$("nav.greedy-nav .hidden-links"),i=0,o=0,a=1e3,s=[];n.children().outerWidth(function(e,t){o+=t,i+=1,s.push(o)});var l,u,c,d;$(window).resize(function(){e()}),t.on("click",function(){r.toggleClass("hidden"),$(this).toggleClass("close"),clearTimeout(d)}),r.on("mouseleave",function(){d=setTimeout(function(){r.addClass("hidden"),t.toggleClass("close")},a)}).on("mouseenter",function(){clearTimeout(d)}),e()}),function(e){var t,n,r,i,o,a,s,l="Close",u="BeforeClose",c="AfterClose",d="BeforeAppend",f="MarkupParse",p="Open",h="Change",m="mfp",g="."+m,v="mfp-ready",y="mfp-removing",b="mfp-prevent-close",x=function(){},w=!!window.jQuery,C=e(window),T=function(e,n){t.ev.on(m+e+g,n)},k=function(t,n,r,i){var o=document.createElement("div");return o.className="mfp-"+t,r&&(o.innerHTML=r),i?n&&n.appendChild(o):(o=e(o),n&&o.appendTo(n)),o},E=function(n,r){t.ev.triggerHandler(m+n,r),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(r)?r:[r]))},S=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},N=function(){e.magnificPopup.instance||(t=new x,t.init(),e.magnificPopup.instance=t)},A=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};x.prototype={constructor:x,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=A(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document),t.popupsCache={}},open:function(n){r||(r=e(document.body));var o;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(o=0;o<l.length;o++)if(s=l[o],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=o;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return void t.updateItemHTML();t.types=[],a="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=i,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"+g,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+g,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 u=e.magnificPopup.modules;for(o=0;o<u.length;o++){var c=u[o];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].call(t)}E("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(T(f,function(e,t,n,r){n.close_replaceWith=S(r.type)}),a+=" mfp-close-btn-in"):t.wrap.append(S())),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:C.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:i.height(),position:"absolute"}),t.st.enableEscapeKey&&i.on("keyup"+g,function(e){27===e.keyCode&&t.close()}),C.on("resize"+g,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var d=t.wH=C.height(),h={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(h.marginRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):h.overflow="hidden");var y=t.st.mainClass;return t.isIE7&&(y+=" mfp-ie7"),y&&t._addClassToMFP(y),t.updateItemHTML(),E("BuildControls"),e("html").css(h),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||r),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),i.on("focusin"+g,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(d),E(p),n},close:function(){t.isOpen&&(E(u),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(y),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){E(l);var n=y+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var r={marginRight:""};t.isIE7?e("body, html").css("overflow",""):r.overflow="",e("html").css(r)}i.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,E(c)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,r=window.innerHeight*n;t.wrap.css("height",r),t.wH=r}else t.wH=e||C.height();t.fixedContentPos||t.wrap.css("height",t.wH),E("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 r=n.type;if(E("BeforeChange",[t.currItem?t.currItem.type:"",r]),t.currItem=n,!t.currTemplate[r]){var i=t.st[r]?t.st[r].markup:!1;E("FirstMarkupParse",i),i?t.currTemplate[r]=e(i):t.currTemplate[r]=!0}o&&o!==n.type&&t.container.removeClass("mfp-"+o+"-holder");var a=t["get"+r.charAt(0).toUpperCase()+r.slice(1)](n,t.currTemplate[r]);t.appendContent(a,r),n.preloaded=!0,E(h,n),o=n.type,t.container.prepend(t.contentContainer),E("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(S()):t.content=e:t.content="",E(d),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var r,i=t.items[n];if(i.tagName?i={el:e(i)}:(r=i.type,i={data:i,src:i.src}),i.el){for(var o=t.types,a=0;a<o.length;a++)if(i.el.hasClass("mfp-"+o[a])){r=o[a];break}i.src=i.el.attr("data-mfp-src"),i.src||(i.src=i.el.attr("href"))}return i.type=r||t.st.type||"inline",i.index=n,i.parsed=!0,t.items[n]=i,E("ElementParse",i),t.items[n]},addGroup:function(e,n){var r=function(r){r.mfpEl=this,t._openClick(r,e,n)};n||(n={});var i="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(i).on(i,r)):(n.isObj=!1,n.delegate?e.off(i).on(i,n.delegate,r):(n.items=e,e.off(i).on(i,r)))},_openClick:function(n,r,i){var o=void 0!==i.midClick?i.midClick:e.magnificPopup.defaults.midClick;if(o||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==i.disableOn?i.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(C.width()<a)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),i.el=e(n.mfpEl),i.delegate&&(i.items=r.find(i.delegate)),t.open(i)}},updateStatus:function(e,r){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),r||"loading"!==e||(r=t.st.tLoading);var i={status:e,text:r};E("UpdateStatus",i),e=i.status,r=i.text,t.preloader.html(r),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(b)){var r=t.st.closeOnContentClick,i=t.st.closeOnBgClick;if(r&&i)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(r)return!0}else if(i&&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?i.height():document.body.scrollHeight)>(e||C.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,r){var i;r.data&&(n=e.extend(r.data,n)),E(f,[t,n,r]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(i=e.split("_"),i.length>1){var r=t.find(g+"-"+i[0]);if(r.length>0){var o=i[1];"replaceWith"===o?r[0]!==n[0]&&r.replaceWith(n):"img"===o?r.is("img")?r.attr("src",n):r.replaceWith('<img src="'+n+'" class="'+r.attr("class")+'" />'):r.attr(i[1],n)}}else t.find(g+"-"+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:x.prototype,modules:[],open:function(t,n){return N(),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,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){N();var r=e(this);if("string"==typeof n)if("open"===n){var i,o=w?r.data("magnificPopup"):r[0].magnificPopup,a=parseInt(arguments[1],10)||0;o.items?i=o.items[a]:(i=r,o.delegate&&(i=i.find(o.delegate)),i=i.eq(a)),t._openClick({mfpEl:i},r,o)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),w?r.data("magnificPopup",n):r[0].magnificPopup=n,t.addGroup(r,n);return r};var j,L,D,I="inline",_=function(){D&&(L.after(D.addClass(j)).detach(),D=null)};e.magnificPopup.registerModule(I,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(I),T(l+"."+I,function(){_()})},getInline:function(n,r){if(_(),n.src){var i=t.st.inline,o=e(n.src);if(o.length){var a=o[0].parentNode;a&&a.tagName&&(L||(j=i.hiddenClass,L=k(j),j="mfp-"+j),D=o.after(L).detach().removeClass(j)),t.updateStatus("ready")}else t.updateStatus("error",i.tNotFound),o=e("<div>");return n.inlineElement=o,o}return t.updateStatus("ready"),t._parseMarkup(r,{},n),r}}});var H,O="ajax",M=function(){H&&r.removeClass(H)},P=function(){M(),t.req&&t.req.abort()};e.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(O),H=t.st.ajax.cursor,T(l+"."+O,P),T("BeforeChange."+O,P)},getAjax:function(n){H&&r.addClass(H),t.updateStatus("loading");var i=e.extend({url:n.src,success:function(r,i,o){var a={data:r,xhr:o};E("ParseAjax",a),t.appendContent(e(a.data),O),n.finished=!0,M(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),E("AjaxContentAdded")},error:function(){M(),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(i),""}}});var q,F=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var r=t.st.image.titleSrc;if(r){if(e.isFunction(r))return r.call(t,n);if(n.el)return n.el.attr(r)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),T(p+n,function(){"image"===t.currItem.type&&e.cursor&&r.addClass(e.cursor)}),T(l+n,function(){e.cursor&&r.removeClass(e.cursor),C.off("resize"+g)}),T("Resize"+n,t.resizeImage),t.isLowIE&&T("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,q&&clearInterval(q),e.isCheckingImgSize=!1,E("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,r=e.img[0],i=function(o){q&&clearInterval(q),q=setInterval(function(){return r.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(q),n++,void(3===n?i(10):40===n?i(50):100===n&&i(500)))},o)};i(1)},getImage:function(n,r){var i=0,o=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,E("ImageLoadComplete")):(i++,200>i?setTimeout(o,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=r.find(".mfp-img");if(l.length){var u=document.createElement("img");u.className="mfp-img",n.img=e(u).on("load.mfploader",o).on("error.mfploader",a),u.src=n.src,l.is("img")&&(n.img=n.img.clone()),u=n.img[0],u.naturalWidth>0?n.hasSize=!0:u.width||(n.hasSize=!1)}return t._parseMarkup(r,{title:F(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(q&&clearInterval(q),n.loadError?(r.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(r.removeClass("mfp-loading"),t.updateStatus("ready")),r):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,r.addClass("mfp-loading"),t.findImageSize(n)),r)}}});var B,z=function(){return void 0===B&&(B=void 0!==document.createElement("p").style.MozTransform),B};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,r=".zoom";if(n.enabled&&t.supportsTransition){var i,o,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),r="all "+n.duration/1e3+"s "+n.easing,i={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return i["-webkit-"+o]=i["-moz-"+o]=i["-o-"+o]=i[o]=r,t.css(i),t},c=function(){t.content.css("visibility","visible")};T("BuildControls"+r,function(){if(t._allowZoom()){if(clearTimeout(i),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void c();o=s(e),o.css(t._getOffset()),t.wrap.append(o),i=setTimeout(function(){o.css(t._getOffset(!0)),i=setTimeout(function(){c(),setTimeout(function(){o.remove(),e=o=null,E("ZoomAnimationEnded")},16)},a)},16)}}),T(u+r,function(){if(t._allowZoom()){if(clearTimeout(i),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;o=s(e)}o.css(t._getOffset(!0)),t.wrap.append(o),t.content.css("visibility","hidden"),setTimeout(function(){o.css(t._getOffset())},16)}}),T(l+r,function(){t._allowZoom()&&(c(),o&&o.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var r;r=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var i=r.offset(),o=parseInt(r.css("padding-top"),10),a=parseInt(r.css("padding-bottom"),10);i.top-=e(window).scrollTop()-o;var s={width:r.width(),height:(w?r.innerHeight():r[0].offsetHeight)-a-o};return z()?s["-moz-transform"]=s.transform="translate("+i.left+"px,"+i.top+"px)":(s.left=i.left,s.top=i.top),s}}});var R="iframe",W="//about:blank",$=function(e){if(t.currTemplate[R]){var n=t.currTemplate[R].find("iframe");n.length&&(e||(n[0].src=W),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(R,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',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(R),T("BeforeChange",function(e,t,n){t!==n&&(t===R?$():n===R&&$(!0))}),T(l+"."+R,function(){$()})},getIframe:function(n,r){var i=n.src,o=t.st.iframe;e.each(o.patterns,function(){return i.indexOf(this.index)>-1?(this.id&&(i="string"==typeof this.id?i.substr(i.lastIndexOf(this.id)+this.id.length,i.length):this.id.call(this,i)),i=this.src.replace("%id%",i),!1):void 0});var a={};return o.srcAction&&(a[o.srcAction]=i),t._parseMarkup(r,a,n),t.updateStatus("ready"),r}}});var X=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},U=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',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,r=".mfp-gallery",o=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",T(p+r,function(){n.navigateByImgClick&&t.wrap.on("click"+r,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),i.on("keydown"+r,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),T("UpdateStatus"+r,function(e,n){n.text&&(n.text=U(n.text,t.currItem.index,t.items.length))}),T(f+r,function(e,r,i,o){var a=t.items.length;i.counter=a>1?U(n.tCounter,o.index,a):""}),T("BuildControls"+r,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var r=n.arrowMarkup,i=t.arrowLeft=e(r.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(b),a=t.arrowRight=e(r.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(b),s=o?"mfpFastClick":"click";i[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",i[0],!1,!0),k("a",i[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(i.add(a))}}),T(h+r,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void T(l+r,function(){i.off(r),t.wrap.off("click"+r),t.arrowLeft&&o&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=X(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=X(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,r=Math.min(n[0],t.items.length),i=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?i:r);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?r:i);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=X(n),!t.items[n].preloaded){var r=t.items[n];r.parsed||(r=t.parseEl(n)),E("LazyLoad",r),"image"===r.type&&(r.img=e('<img class="mfp-img" />').on("load.mfploader",function(){r.hasSize=!0}).on("error.mfploader",function(){r.hasSize=!0,r.loadError=!0,E("LazyLoadError",r)}).attr("src",r.src)),r.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,n=e.ratio;n=isNaN(n)?n():n,n>1&&(T("ImageHasSize."+Y,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),T("ElementParse."+Y,function(t,r){r.src=e.replaceSrc(r,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,r=function(){C.off("touchmove"+o+" touchend"+o)},i="mfpFastClick",o="."+i;e.fn.mfpFastClick=function(i){return e(this).each(function(){var a,s=e(this);if(n){var l,u,c,d,f,p;s.on("touchstart"+o,function(e){d=!1,p=1,f=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],u=f.clientX,c=f.clientY,C.on("touchmove"+o,function(e){f=e.originalEvent?e.originalEvent.touches:e.touches,p=f.length,f=f[0],(Math.abs(f.clientX-u)>10||Math.abs(f.clientY-c)>10)&&(d=!0,r())}).on("touchend"+o,function(e){r(),d||p>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),i())})})}s.on("click"+o,function(){a||i()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+o+" click"+o),n&&C.off("touchmove"+o+" touchend"+o)}}(),N()}(window.jQuery||window.Zepto),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e){var t="1.7.2",n={},r={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},i=function(t){var n=[],r=!1,i=t.dir&&"left"===t.dir?"scrollLeft":"scrollTop";return this.each(function(){var t=e(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(t[i]()>0?n.push(this):(t[i](1),r=t[i]()>0,r&&n.push(this),t[i](0))):(n.push(document.scrollingElement),!1):void 0}),n.length||this.each(function(){this===document.documentElement&&"smooth"===e(this).css("scrollBehavior")&&(n=[this]),n.length||"BODY"!==this.nodeName||(n=[this])}),"first"===t.el&&n.length>1&&(n=[n[0]]),n};e.fn.extend({scrollable:function(e){var t=i.call(this,{dir:e});return this.pushStack(t)},firstScrollable:function(e){var t=i.call(this,{el:"first",dir:e});return this.pushStack(t)},smoothScroll:function(t,n){if(t=t||{},"options"===t)return n?this.each(function(){var t=e(this),r=e.extend(t.data("ssOpts")||{},n);e(this).data("ssOpts",r)}):this.first().data("ssOpts");var r=e.extend({},e.fn.smoothScroll.defaults,t),i=function(t){var n=function(e){return e.replace(/(:|\.|\/)/g,"\\$1")},i=this,o=e(this),a=e.extend({},r,o.data("ssOpts")||{}),s=r.exclude,l=a.excludeWithin,u=0,c=0,d=!0,f={},p=e.smoothScroll.filterPath(location.pathname),h=e.smoothScroll.filterPath(i.pathname),m=location.hostname===i.hostname||!i.hostname,g=a.scrollTarget||h===p,v=n(i.hash);if(v&&!e(v).length&&(d=!1),a.scrollTarget||m&&g&&v){for(;d&&u<s.length;)o.is(n(s[u++]))&&(d=!1);for(;d&&c<l.length;)o.closest(l[c++]).length&&(d=!1)}else d=!1;d&&(a.preventDefault&&t.preventDefault(),e.extend(f,a,{scrollTarget:a.scrollTarget||v,link:i}),e.smoothScroll(f))};return null!==t.delegateSelector?this.undelegate(t.delegateSelector,"click.smoothscroll").delegate(t.delegateSelector,"click.smoothscroll",i):this.unbind("click.smoothscroll").bind("click.smoothscroll",i),this}}),e.smoothScroll=function(t,r){if("options"===t&&"object"==typeof r)return e.extend(n,r);var i,o,a,s,l,u=0,c="offset",d="scrollTop",f={},p={};"number"==typeof t?(i=e.extend({link:null},e.fn.smoothScroll.defaults,n),a=t):(i=e.extend({link:null},e.fn.smoothScroll.defaults,t||{},n),i.scrollElement&&(c="position","static"===i.scrollElement.css("position")&&i.scrollElement.css("position","relative"))),d="left"===i.direction?"scrollLeft":d,i.scrollElement?(o=i.scrollElement,/^(?:HTML|BODY)$/.test(o[0].nodeName)||(u=o[d]())):o=e("html, body").firstScrollable(i.direction),i.beforeScroll.call(o,i),a="number"==typeof t?t:r||e(i.scrollTarget)[c]()&&e(i.scrollTarget)[c]()[i.direction]||0,f[d]=a+u+i.offset,s=i.speed,"auto"===s&&(l=Math.abs(f[d]-o[d]()),s=l/i.autoCoefficient),p={duration:s,easing:i.easing,complete:function(){i.afterScroll.call(i.link,i)}},i.step&&(p.step=i.step),o.length?o.stop().animate(f,p):i.afterScroll.call(i.link,i)},e.smoothScroll.version=t,e.smoothScroll.filterPath=function(e){return e=e||"",e.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},e.fn.smoothScroll.defaults=r}),$(document).ready(function(){var e=function(){$("body").css("margin-bottom",$(".page__footer").outerHeight(!0))},t=!1;e(),$(window).resize(function(){t=!0}),setInterval(function(){t&&(t=!1,e())},250),$("#main").fitVids(),$(".author__urls-wrapper button").on("click",function(){$(".author__urls").toggleClass("is--visible"),$(".author__urls-wrapper button").toggleClass("open")}),$("a").smoothScroll({offset:-20}),$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup"),$(".image-popup").magnificPopup({type:"image",tLoading:"Loading image #%curr%...",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'<a href="%url%">Image #%curr%</a> could not be loaded.'},removalDelay:500,mainClass:"mfp-zoom-in",callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim")}},closeOnContentClick:!0,midClick:!0})});
6
+ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"!==n&&!me.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return me.isFunction(t)?me.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return se.call(t,e)>-1!==n}):Se.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return me.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function u(e){throw e}function c(e,t,n,r){var i;try{e&&me.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&me.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){ne.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),me.ready()}function d(){this.expando=me.expando+d.uid++}function p(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Me.test(e)?JSON.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(_e,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=p(n)}catch(i){}Fe.set(e,t,n)}else n=void 0;return n}function m(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return me.css(e,t,"")},l=s(),u=n&&n[3]||(me.cssNumber[t]?"":"px"),c=(me.cssNumber[t]||"px"!==u&&+l)&&Re.exec(me.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,me.style(e,t,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function g(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ue[r];return i?i:(t=n.body.appendChild(n.createElement(r)),i=me.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ue[r]=i,i)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;a>o;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=He.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ze(r)&&(i[o]=g(r))):"none"!==n&&(i[o]="none",He.set(r,"display",n)));for(o=0;a>o;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function y(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&i(e,t)?me.merge([e],n):n}function x(e,t){for(var n=0,r=e.length;r>n;n++)He.set(e[n],"globalEval",!t||He.get(t[n],"globalEval"))}function b(e,t,n,r,i){for(var o,a,s,l,u,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;h>p;p++)if(o=e[p],o||0===o)if("object"===me.type(o))me.merge(d,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Ve.exec(o)||["",""])[1].toLowerCase(),l=Ge[s]||Ge._default,a.innerHTML=l[1]+me.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;me.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&me.inArray(o,r)>-1)i&&i.push(o);else if(u=me.contains(o.ownerDocument,o),a=y(f.appendChild(o),"script"),u&&x(a),n)for(c=0;o=a[c++];)Ye.test(o.type||"")&&n.push(o);return f}function w(){return!0}function C(){return!1}function T(){try{return ne.activeElement}catch(e){}}function k(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)k(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=C;else if(!i)return e;return 1===o&&(a=i,i=function(e){return me().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=me.guid++)),e.each(function(){me.event.add(this,t,i,r,n)})}function S(e,t){return i(e,"table")&&i(11!==t.nodeType?t:t.firstChild,"tr")?me(">tbody",e)[0]||e:e}function E(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function j(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){var n,r,i,o,a,s,l,u;if(1===t.nodeType){if(He.hasData(e)&&(o=He.access(e),a=He.set(t,o),u=o.events)){delete a.handle,a.events={};for(i in u)for(n=0,r=u[i].length;r>n;n++)me.event.add(t,i,u[i][n])}Fe.hasData(e)&&(s=Fe.access(e),l=me.extend({},s),Fe.set(t,l))}}function A(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Xe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function I(e,t,r,i){t=oe.apply([],t);var o,a,s,l,u,c,f=0,d=e.length,p=d-1,h=t[0],m=me.isFunction(h);if(m||d>1&&"string"==typeof h&&!pe.checkClone&&rt.test(h))return e.each(function(n){var o=e.eq(n);m&&(t[0]=h.call(this,n,o.html())),I(o,t,r,i)});if(d&&(o=b(t,e[0].ownerDocument,!1,e,i),a=o.firstChild,1===o.childNodes.length&&(o=a),a||i)){for(s=me.map(y(o,"script"),E),l=s.length;d>f;f++)u=o,f!==p&&(u=me.clone(u,!0,!0),l&&me.merge(s,y(u,"script"))),r.call(e[f],u,f);if(l)for(c=s[s.length-1].ownerDocument,me.map(s,j),f=0;l>f;f++)u=s[f],Ye.test(u.type||"")&&!He.access(u,"globalEval")&&me.contains(c,u)&&(u.src?me._evalUrl&&me._evalUrl(u.src):n(u.textContent.replace(ot,""),c))}return e}function D(e,t,n){for(var r,i=t?me.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||me.cleanData(y(r)),r.parentNode&&(n&&me.contains(r.ownerDocument,r)&&x(y(r,"script")),r.parentNode.removeChild(r));return e}function L(e,t,n){var r,i,o,a,s=e.style;return n=n||lt(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||me.contains(e.ownerDocument,e)||(a=me.style(e,t)),!pe.pixelMarginRight()&&st.test(a)&&at.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function O(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function P(e){if(e in ht)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=pt.length;n--;)if(e=pt[n]+t,e in ht)return e}function q(e){var t=me.cssProps[e];return t||(t=me.cssProps[e]=P(e)||e),t}function H(e,t,n){var r=Re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function F(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;4>o;o+=2)"margin"===n&&(a+=me.css(e,n+$e[o],!0,i)),r?("content"===n&&(a-=me.css(e,"padding"+$e[o],!0,i)),"margin"!==n&&(a-=me.css(e,"border"+$e[o]+"Width",!0,i))):(a+=me.css(e,"padding"+$e[o],!0,i),"padding"!==n&&(a+=me.css(e,"border"+$e[o]+"Width",!0,i)));return a}function M(e,t,n){var r,i=lt(e),o=L(e,t,i),a="border-box"===me.css(e,"boxSizing",!1,i);return st.test(o)?o:(r=a&&(pe.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),o=parseFloat(o)||0,o+F(e,t,n||(a?"border":"content"),r,i)+"px")}function _(e,t,n,r,i){return new _.prototype.init(e,t,n,r,i)}function B(){gt&&(ne.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(B):e.setTimeout(B,me.fx.interval),me.fx.tick())}function R(){return e.setTimeout(function(){mt=void 0}),mt=me.now()}function $(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=$e[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function z(e,t,n){for(var r,i=(X.tweeners[t]||[]).concat(X.tweeners["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function W(e,t,n){var r,i,o,a,s,l,u,c,f="width"in t||"height"in t,d=this,p={},h=e.style,m=e.nodeType&&ze(e),g=He.get(e,"fxshow");n.queue||(a=me._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,me.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],vt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}p[r]=g&&g[r]||me.style(e,r)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=g&&g.display,null==u&&(u=He.get(e,"display")),c=me.css(e,"display"),"none"===c&&(u?c=u:(v([e],!0),u=e.style.display||u,c=me.css(e,"display"),v([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===me.css(e,"float")&&(l||(d.done(function(){h.display=u}),null==u&&(c=h.display,u="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1;for(r in p)l||(g?"hidden"in g&&(m=g.hidden):g=He.access(e,"fxshow",{display:u}),o&&(g.hidden=!m),m&&v([e],!0),d.done(function(){m||v([e]),He.remove(e,"fxshow");for(r in p)me.style(e,r,p[r])})),l=z(m?g[r]:0,r,d),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}}function U(e,t){var n,r,i,o,a;for(n in e)if(r=me.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=me.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function X(e,t,n){var r,i,o=0,a=X.prefilters.length,s=me.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=mt||R(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(l||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:mt||R(),duration:n.duration,tweens:[],createTween:function(t,n){var r=me.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(U(c,u.opts.specialEasing);a>o;o++)if(r=X.prefilters[o].call(u,e,c,u.opts))return me.isFunction(r.stop)&&(me._queueHooks(u.elem,u.opts.queue).stop=me.proxy(r.stop,r)),r;return me.map(c,z,u),me.isFunction(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),me.fx.timer(me.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}function V(e){var t=e.match(De)||[];return t.join(" ")}function Y(e){return e.getAttribute&&e.getAttribute("class")||""}function G(e,t,n,r){var i;if(Array.isArray(t))me.each(t,function(t,i){n||Nt.test(e)?r(e,i):G(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==me.type(t))r(e,t);else for(i in t)G(e+"["+i+"]",t[i],n,r)}function Z(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(De)||[];if(me.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function K(e,t,n,r){function i(s){var l;return o[s]=!0,me.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),i(u),!1)}),l}var o={},a=e===Bt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function Q(e,t){var n,r,i=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&me.extend(!0,e,r),e}function J(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function ee(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var te=[],ne=e.document,re=Object.getPrototypeOf,ie=te.slice,oe=te.concat,ae=te.push,se=te.indexOf,le={},ue=le.toString,ce=le.hasOwnProperty,fe=ce.toString,de=fe.call(Object),pe={},he="3.2.1",me=function(e,t){return new me.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ve=/^-ms-/,ye=/-([a-z])/g,xe=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:he,constructor:me,length:0,toArray:function(){return ie.call(this)},get:function(e){return null==e?ie.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:te.sort,splice:te.splice},me.extend=me.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||me.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(u&&r&&(me.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&me.isPlainObject(n)?n:{},a[t]=me.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},me.extend({expando:"jQuery"+(he+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ue.call(e)||(t=re(e))&&(n=ce.call(t,"constructor")&&t.constructor,"function"!=typeof n||fe.call(n)!==de))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ue.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(ve,"ms-").replace(ye,xe)},each:function(e,t){var n,i=0;if(r(e))for(n=e.length;n>i&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(r(Object(e))?me.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;a>o;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,n){var i,o,a=0,s=[];if(r(e))for(i=e.length;i>a;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e)?(r=ie.call(arguments,2),i=function(){return e.apply(t||this,r.concat(ie.call(arguments)))},i.guid=e.guid=e.guid||me.guid++,i):void 0},now:Date.now,support:pe}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=te[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var be=function(e){function t(e,t,n,r){var i,o,a,s,l,u,c,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:R)!==O&&L(t),t=t||O,q)){if(11!==h&&(l=ve.exec(e)))if(i=l[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(d&&(a=d.getElementById(i))&&_(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&C.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(C.qsa&&!X[e+" "]&&(!H||!H.test(e))){if(1!==h)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(we,Ce):t.setAttribute("id",s=B),u=E(e),o=u.length;o--;)u[o]="#"+s+" "+p(u[o]);c=u.join(","),d=ye.test(e)&&f(t.parentNode)||t}if(c)try{return Q.apply(n,d.querySelectorAll(c)),n}catch(m){}finally{s===B&&t.removeAttribute("id")}}}return N(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[B]=!0,e}function i(e){var t=O.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ke(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=z++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var u,c,f,d=[$,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[B]||(t[B]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((u=c[o])&&u[0]===$&&u[1]===s)return d[2]=u[2];if(c[o]=d,d[2]=e(t,n,l))return!0}return!1}}function m(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function v(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function y(e,t,n,i,o,a){return i&&!i[B]&&(i=y(i)),o&&!o[B]&&(o=y(o,a)),r(function(r,a,s,l){var u,c,f,d=[],p=[],h=a.length,m=r||g(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:v(m,d,e,s,l),x=n?o||(r?e:h||i)?[]:a:y;if(n&&n(y,x,s,l),i)for(u=v(x,p),i(u,[],s,l),c=u.length;c--;)(f=u[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(u=[],c=x.length;c--;)(f=x[c])&&u.push(y[c]=f);o(null,x=[],u,l)}for(c=x.length;c--;)(f=x[c])&&(u=o?ee(r,f):d[c])>-1&&(r[u]=!(a[u]=f))}}else x=v(x===a?x.splice(h,x.length):x),o?o(null,a,x,l):Q.apply(a,x)})}function x(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),u=h(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];i>s;s++)if(n=T.relative[e[s].type])c=[h(m(c),n)];else{if(n=T.filter[e[s].type].apply(null,e[s].matches),n[B]){for(r=++s;i>r&&!T.relative[e[r].type];r++);return y(s>1&&m(c),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&x(e.slice(s,r)),i>r&&x(e=e.slice(r)),i>r&&p(e))}c.push(n)}return m(c)}function b(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,l,u){var c,f,d,p=0,h="0",m=r&&[],g=[],y=A,x=r||o&&T.find.TAG("*",u),b=$+=null==y?1:Math.random()||.1,w=x.length;for(u&&(A=a===O||a||u);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===O||(L(c),s=!q);d=e[f++];)if(d(c,a||O,s)){l.push(c);break}u&&($=b)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(m,g,a,s);if(r){if(p>0)for(;h--;)m[h]||g[h]||(g[h]=Z.call(l));g=v(g)}Q.apply(l,g),u&&!r&&g.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&($=b,A=y),m};return i?r(a):a}var w,C,T,k,S,E,j,N,A,I,D,L,O,P,q,H,F,M,_,B="sizzle"+1*new Date,R=e.document,$=0,z=0,W=n(),U=n(),X=n(),V=function(e,t){return e===t&&(D=!0),0},Y={}.hasOwnProperty,G=[],Z=G.pop,K=G.push,Q=G.push,J=G.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ce=function(e,t){return t?"\x00"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Te=function(){L()},ke=h(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(G=J.call(R.childNodes),R.childNodes),G[R.childNodes.length].nodeType}catch(Se){Q={apply:G.length?function(e,t){K.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}C=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==O&&9===r.nodeType&&r.documentElement?(O=r,P=O.documentElement,q=!S(O),R!==O&&(n=O.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),C.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=i(function(e){return e.appendChild(O.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=ge.test(O.getElementsByClassName),C.getById=i(function(e){return P.appendChild(e).id=B,!O.getElementsByName||!O.getElementsByName(B).length}),C.getById?(T.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n=t.getElementById(e);return n?[n]:[]}}):(T.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),T.find.TAG=C.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):C.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=C.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&q?t.getElementsByClassName(e):void 0},F=[],H=[],(C.qsa=ge.test(O.querySelectorAll))&&(i(function(e){P.appendChild(e).innerHTML="<a id='"+B+"'></a><select id='"+B+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+B+"-]").length||H.push("~="),e.querySelectorAll(":checked").length||H.push(":checked"),e.querySelectorAll("a#"+B+"+*").length||H.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=O.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&H.push(":enabled",":disabled"),P.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(C.matchesSelector=ge.test(M=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(e){C.disconnectedMatch=M.call(e,"*"),M.call(e,"[s!='']:x"),F.push("!=",oe)}),H=H.length&&new RegExp(H.join("|")),F=F.length&&new RegExp(F.join("|")),t=ge.test(P.compareDocumentPosition),_=t||ge.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!C.sortDetached&&t.compareDocumentPosition(e)===n?e===O||e.ownerDocument===R&&_(R,e)?-1:t===O||t.ownerDocument===R&&_(R,t)?1:I?ee(I,e)-ee(I,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!i||!o)return e===O?-1:t===O?1:i?-1:o?1:I?ee(I,e)-ee(I,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[r]===l[r];)r++;return r?a(s[r],l[r]):s[r]===R?-1:l[r]===R?1:0},O):O},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==O&&L(e),n=n.replace(ce,"='$1']"),C.matchesSelector&&q&&!X[n+" "]&&(!F||!F.test(n))&&(!H||!H.test(n)))try{var r=M.call(e,n);if(r||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,O,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==O&&L(e),_(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==O&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==r?r:C.attributes||!q?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Ce)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!C.detectDuplicates,I=!C.sortStable&&e.slice(0),e.sort(V),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return I=null,e},k=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=k(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,d,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,x=!1;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(d=g,f=d[B]||(d[B]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),u=c[e]||[],p=u[0]===$&&u[1],x=p&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[$,p,x];break}}else if(y&&(d=t,f=d[B]||(d[B]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),u=c[e]||[],p=u[0]===$&&u[1],x=p),x===!1)for(;(d=++p&&d&&d[m]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&(f=d[B]||(d[B]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[$,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[B]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=j(e.replace(se,"$1"));return i[B]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);
7
+ return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:u(!1),disabled:u(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},T.pseudos.nth=T.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})T.pseudos[w]=l(w);return d.prototype=T.filters=T.pseudos,T.setFilters=new d,E=t.tokenize=function(e,n){var r,i,o,a,s,l,u,c=U[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=T.preFilter;s;){r&&!(i=le.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ue.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in T.filter)!(i=pe[a].exec(s))||u[a]&&!(i=u[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):U(e,l).slice(0)},j=t.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=E(e)),n=t.length;n--;)o=x(t[n]),o[B]?r.push(o):i.push(o);o=X(e,b(i,r)),o.selector=e}return o},N=t.select=function(e,t,n,r){var i,o,a,s,l,u="function"==typeof e&&e,c=!r&&E(e=u.selector||e);if(n=n||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&q&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(xe,be),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((l=T.find[s])&&(r=l(a.matches[0].replace(xe,be),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Q.apply(n,r),n;break}}return(u||j(e,c))(r,t,!q,n,!t||ye.test(e)&&f(t.parentNode)||t),n},C.sortStable=B.split("").sort(V).join("")===B,C.detectDuplicates=!!D,L(),C.sortDetached=i(function(e){return 1&e.compareDocumentPosition(O.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);me.find=be,me.expr=be.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=be.uniqueSort,me.text=be.getText,me.isXMLDoc=be.isXML,me.contains=be.contains,me.escapeSelector=be.escape;var we=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&me(e).is(n))break;r.push(e)}return r},Ce=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Te=me.expr.match.needsContext,ke=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Se=/^.[^:#\[\.,]*$/;me.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?me.find.matchesSelector(r,e)?[r]:[]:me.find.matches(e,me.grep(t,function(e){return 1===e.nodeType}))},me.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(me(e).filter(function(){for(t=0;r>t;t++)if(me.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;r>t;t++)me.find(e,i[t],n);return r>1?me.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Te.test(e)?me(e):e||[],!1).length}});var Ee,je=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ne=me.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:je.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),ke.test(r[1])&&me.isPlainObject(t))for(r in t)me.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=ne.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):me.isFunction(e)?void 0!==n.ready?n.ready(e):e(me):me.makeArray(e,this)};Ne.prototype=me.fn,Ee=me(ne);var Ae=/^(?:parents|prev(?:Until|All))/,Ie={children:!0,contents:!0,next:!0,prev:!0};me.fn.extend({has:function(e){var t=me(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(me.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&me(e);if(!Te.test(e))for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&me.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?me.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(me(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(me.uniqueSort(me.merge(this.get(),me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,n){return we(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,n){return we(e,"nextSibling",n)},prevUntil:function(e,t,n){return we(e,"previousSibling",n)},siblings:function(e){return Ce((e.parentNode||{}).firstChild,e)},children:function(e){return Ce(e.firstChild)},contents:function(e){return i(e,"iframe")?e.contentDocument:(i(e,"template")&&(e=e.content||e),me.merge([],e.childNodes))}},function(e,t){me.fn[e]=function(n,r){var i=me.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=me.filter(r,i)),this.length>1&&(Ie[e]||me.uniqueSort(i),Ae.test(e)&&i.reverse()),this.pushStack(i)}});var De=/[^\x20\t\r\n\f]+/g;me.Callbacks=function(e){e="string"==typeof e?s(e):me.extend({},e);var t,n,r,i,o=[],a=[],l=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;l=-1)for(n=a.shift();++l<o.length;)o[l].apply(n[0],n[1])===!1&&e.stopOnFalse&&(l=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(l=o.length-1,a.push(n)),function r(t){me.each(t,function(t,n){me.isFunction(n)?e.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==me.type(n)&&r(n)})}(arguments),n&&!t&&u()),this},remove:function(){return me.each(arguments,function(e,t){for(var n;(n=me.inArray(t,o,n))>-1;)o.splice(n,1),l>=n&&l--}),this},has:function(e){return e?me.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},me.extend({Deferred:function(t){var n=[["notify","progress",me.Callbacks("memory"),me.Callbacks("memory"),2],["resolve","done",me.Callbacks("once memory"),me.Callbacks("once memory"),0,"resolved"],["reject","fail",me.Callbacks("once memory"),me.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return me.Deferred(function(t){me.each(n,function(n,r){var i=me.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,c=arguments,f=function(){var e,f;if(!(a>t)){if(e=r.apply(s,c),e===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,me.isFunction(f)?i?f.call(e,o(a,n,l,i),o(a,n,u,i)):(a++,f.call(e,o(a,n,l,i),o(a,n,u,i),o(a,n,l,n.notifyWith))):(r!==l&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},d=i?f:function(){try{f()}catch(e){me.Deferred.exceptionHook&&me.Deferred.exceptionHook(e,d.stackTrace),t+1>=a&&(r!==u&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?d():(me.Deferred.getStackHook&&(d.stackTrace=me.Deferred.getStackHook()),e.setTimeout(d))}}var a=0;return me.Deferred(function(e){n[0][3].add(o(0,e,me.isFunction(i)?i:l,e.notifyWith)),n[1][3].add(o(0,e,me.isFunction(t)?t:l)),n[2][3].add(o(0,e,me.isFunction(r)?r:u))}).promise()},promise:function(e){return null!=e?me.extend(e,i):i}},o={};return me.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=ie.call(arguments),o=me.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?ie.call(arguments):n,--t||o.resolveWith(r,i)}};if(1>=t&&(c(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||me.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)c(i[n],a(n),o.reject);return o.promise()}});var Le=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;me.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Le.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},me.readyException=function(t){e.setTimeout(function(){throw t})};var Oe=me.Deferred();me.fn.ready=function(e){return Oe.then(e)["catch"](function(e){me.readyException(e)}),this},me.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--me.readyWait:me.isReady)||(me.isReady=!0,e!==!0&&--me.readyWait>0||Oe.resolveWith(ne,[me]))}}),me.ready.then=Oe.then,"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(me.ready):(ne.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f));var Pe=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===me.type(n)){i=!0;for(s in n)Pe(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,me.isFunction(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(me(e),n)})),t))for(;l>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},qe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};d.uid=1,d.prototype={cache:function(e){var t=e[this.expando];return t||(t={},qe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[me.camelCase(t)]=n;else for(r in t)i[me.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][me.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(me.camelCase):(t=me.camelCase(t),t=t in r?[t]:t.match(De)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||me.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!me.isEmptyObject(t)}};var He=new d,Fe=new d,Me=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/[A-Z]/g;me.extend({hasData:function(e){return Fe.hasData(e)||He.hasData(e)},data:function(e,t,n){return Fe.access(e,t,n)},removeData:function(e,t){Fe.remove(e,t)},_data:function(e,t,n){return He.access(e,t,n)},_removeData:function(e,t){He.remove(e,t)}}),me.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Fe.get(o),1===o.nodeType&&!He.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=me.camelCase(r.slice(5)),h(o,r,i[r])));He.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Fe.set(this,e)}):Pe(this,function(t){var n;if(o&&void 0===t){if(n=Fe.get(o,e),void 0!==n)return n;if(n=h(o,e),void 0!==n)return n}else this.each(function(){Fe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Fe.remove(this,e)})}}),me.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=He.get(e,t),n&&(!r||Array.isArray(n)?r=He.access(e,t,me.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),r=n.length,i=n.shift(),o=me._queueHooks(e,t),a=function(){me.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return He.get(e,n)||He.access(e,n,{empty:me.Callbacks("once memory").add(function(){He.remove(e,[t+"queue",n])})})}}),me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?me.queue(this[0],e):void 0===t?this:this.each(function(){var n=me.queue(this,e,t);me._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&me.dequeue(this,e)})},dequeue:function(e){return this.each(function(){me.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=me.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=He.get(o[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Re=new RegExp("^(?:([+-])=|)("+Be+")([a-z%]*)$","i"),$e=["Top","Right","Bottom","Left"],ze=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&me.contains(e.ownerDocument,e)&&"none"===me.css(e,"display")},We=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Ue={};me.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ze(this)?me(this).show():me(this).hide()})}});var Xe=/^(?:checkbox|radio)$/i,Ve=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ye=/^$|\/(?:java|ecma)script/i,Ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td;var Ze=/<|&#?\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement("div")),n=ne.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),pe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",pe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ke=ne.documentElement,Qe=/^key/,Je=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;me.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,m,g=He.get(e);if(g)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&me.find.matchesSelector(Ke,i),n.guid||(n.guid=me.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return"undefined"!=typeof me&&me.event.triggered!==t.type?me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(De)||[""],u=t.length;u--;)s=et.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p&&(f=me.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=me.event.special[p]||{},c=me.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&me.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),me.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,m,g=He.hasData(e)&&He.get(e);if(g&&(l=g.events)){for(t=(t||"").match(De)||[""],u=t.length;u--;)if(s=et.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p){for(f=me.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=l[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&f.teardown.call(e,h,g.handle)!==!1||me.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)me.event.remove(e,p+t[u],n,r,!0);me.isEmptyObject(l)&&He.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=me.event.fix(e),l=new Array(arguments.length),u=(He.get(this,"events")||{})[s.type]||[],c=me.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,s)!==!1){for(a=me.event.handlers.call(this,s,u),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,r=((me.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,l),void 0!==r&&(s.result=r)===!1&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||u.disabled!==!0)){for(o=[],a={},n=0;l>n;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?me(i,this).index(u)>-1:me.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(me.Event.prototype,e,{enumerable:!0,configurable:!0,get:me.isFunction(t)?function(){return this.originalEvent?t(this.originalEvent):void 0}:function(){return this.originalEvent?this.originalEvent[e]:void 0},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[me.expando]?e:new me.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==T()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===T()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&i(this,"input")?(this.click(),!1):void 0},_default:function(e){return i(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},me.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},me.Event=function(e,t){return this instanceof me.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?w:C,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&me.extend(this,t),this.timeStamp=e&&e.timeStamp||me.now(),void(this[me.expando]=!0)):new me.Event(e,t)},me.Event.prototype={constructor:me.Event,isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=w,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=w,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=w,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},me.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Qe.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Je.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},me.event.addProp),me.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){me.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||me.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),me.fn.extend({on:function(e,t,n,r){return k(this,e,t,n,r)},one:function(e,t,n,r){return k(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,me(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=C),this.each(function(){me.event.remove(this,e,n,t)})}});var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,nt=/<script|<style|<link/i,rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;me.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=me.contains(e.ownerDocument,e);if(!(pe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(a=y(s),o=y(e),r=0,i=o.length;i>r;r++)A(o[r],a[r]);if(t)if(n)for(o=o||y(e),a=a||y(s),r=0,i=o.length;i>r;r++)N(o[r],a[r]);else N(e,s);return a=y(s,"script"),a.length>0&&x(a,!l&&y(e,"script")),s},cleanData:function(e){for(var t,n,r,i=me.event.special,o=0;void 0!==(n=e[o]);o++)if(qe(n)){if(t=n[He.expando]){if(t.events)for(r in t.events)i[r]?me.event.remove(n,r):me.removeEvent(n,r,t.handle);n[He.expando]=void 0}n[Fe.expando]&&(n[Fe.expando]=void 0)}}}),me.fn.extend({detach:function(e){return D(this,e,!0)},remove:function(e){return D(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?me.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return I(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.appendChild(e)}})},prepend:function(){return I(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return I(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return I(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(me.cleanData(y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!nt.test(e)&&!Ge[(Ve.exec(e)||["",""])[1].toLowerCase()]){e=me.htmlPrefilter(e);try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(me.cleanData(y(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return I(this,arguments,function(t){var n=this.parentNode;me.inArray(this,e)<0&&(me.cleanData(y(this)),n&&n.replaceChild(t,this))},e)}}),me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){me.fn[e]=function(e){for(var n,r=[],i=me(e),o=i.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),me(i[a])[t](n),ae.apply(r,n.get());return this.pushStack(r)}});var at=/^margin/,st=new RegExp("^("+Be+")(?!px)[a-z%]+$","i"),lt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Ke.appendChild(a);var t=e.getComputedStyle(s);n="1%"!==t.top,o="2px"===t.marginLeft,r="4px"===t.width,s.style.marginRight="50%",i="4px"===t.marginRight,Ke.removeChild(a),s=null}}var n,r,i,o,a=ne.createElement("div"),s=ne.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",pe.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),me.extend(pe,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),r},pixelMarginRight:function(){return t(),i},reliableMarginLeft:function(){return t(),o}}))}();var ut=/^(none|table(?!-c[ea]).+)/,ct=/^--/,ft={position:"absolute",visibility:"hidden",display:"block"},dt={letterSpacing:"0",fontWeight:"400"},pt=["Webkit","Moz","ms"],ht=ne.createElement("div").style;me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=L(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=me.camelCase(t),l=ct.test(t),u=e.style;return l||(t=q(s)),a=me.cssHooks[t]||me.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t]:(o=typeof n,"string"===o&&(i=Re.exec(n))&&i[1]&&(n=m(e,t,i),o="number"),void(null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(me.cssNumber[s]?"":"px")),pe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))))}},css:function(e,t,n,r){var i,o,a,s=me.camelCase(t),l=ct.test(t);return l||(t=q(s)),a=me.cssHooks[t]||me.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=L(e,t,r)),"normal"===i&&t in dt&&(i=dt[t]),""===n||n?(o=parseFloat(i),n===!0||isFinite(o)?o||0:i):i}}),me.each(["height","width"],function(e,t){me.cssHooks[t]={get:function(e,n,r){return n?!ut.test(me.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?M(e,t,r):We(e,ft,function(){return M(e,t,r)}):void 0},set:function(e,n,r){var i,o=r&&lt(e),a=r&&F(e,t,r,"border-box"===me.css(e,"boxSizing",!1,o),o);return a&&(i=Re.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=me.css(e,t)),H(e,n,a)}}}),me.cssHooks.marginLeft=O(pe.reliableMarginLeft,function(e,t){return t?(parseFloat(L(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),me.each({margin:"",padding:"",border:"Width"},function(e,t){me.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+$e[r]+t]=o[r]||o[r-2]||o[0];return i}},at.test(e)||(me.cssHooks[e+t].set=H)}),me.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=lt(e),i=t.length;i>a;a++)o[t[a]]=me.css(e,t[a],!1,r);return o}return void 0!==n?me.style(e,t,n):me.css(e,t)},e,t,arguments.length>1)}}),me.Tween=_,_.prototype={constructor:_,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(me.cssNumber[n]?"":"px")},cur:function(){var e=_.propHooks[this.prop];return e&&e.get?e.get(this):_.propHooks._default.get(this)},run:function(e){var t,n=_.propHooks[this.prop];return this.options.duration?this.pos=t=me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):_.propHooks._default.set(this),this}},_.prototype.init.prototype=_.prototype,_.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[me.cssProps[e.prop]]&&!me.cssHooks[e.prop]?e.elem[e.prop]=e.now:me.style(e.elem,e.prop,e.now+e.unit)}}},_.propHooks.scrollTop=_.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},me.fx=_.prototype.init,me.fx.step={};var mt,gt,vt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;me.Animation=me.extend(X,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,Re.exec(t),n),n}]},tweener:function(e,t){me.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;i>r;r++)n=e[r],X.tweeners[n]=X.tweeners[n]||[],X.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?X.prefilters.unshift(e):X.prefilters.push(e)}}),me.speed=function(e,t,n){var r=e&&"object"==typeof e?me.extend({},e):{complete:n||!n&&t||me.isFunction(e)&&e,duration:e,easing:n&&t||t&&!me.isFunction(t)&&t};return me.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in me.fx.speeds?r.duration=me.fx.speeds[r.duration]:r.duration=me.fx.speeds._default),null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){me.isFunction(r.old)&&r.old.call(this),r.queue&&me.dequeue(this,r.queue)},r},me.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ze).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=me.isEmptyObject(e),o=me.speed(t,n,r),a=function(){var t=X(this,me.extend({},e),o);(i||He.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=me.timers,a=He.get(this);
8
+ if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&yt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||me.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=He.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=me.timers,a=r?r.length:0;for(n.finish=!0,me.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),me.each(["toggle","show","hide"],function(e,t){var n=me.fn[t];me.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate($(t,!0),e,r,i)}}),me.each({slideDown:$("show"),slideUp:$("hide"),slideToggle:$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){me.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),me.timers=[],me.fx.tick=function(){var e,t=0,n=me.timers;for(mt=me.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||me.fx.stop(),mt=void 0},me.fx.timer=function(e){me.timers.push(e),me.fx.start()},me.fx.interval=13,me.fx.start=function(){gt||(gt=!0,B())},me.fx.stop=function(){gt=null},me.fx.speeds={slow:600,fast:200,_default:400},me.fn.delay=function(t,n){return t=me.fx?me.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=ne.createElement("input"),t=ne.createElement("select"),n=t.appendChild(ne.createElement("option"));e.type="checkbox",pe.checkOn=""!==e.value,pe.optSelected=n.selected,e=ne.createElement("input"),e.value="t",e.type="radio",pe.radioValue="t"===e.value}();var xt,bt=me.expr.attrHandle;me.fn.extend({attr:function(e,t){return Pe(this,me.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var r,i,o=e.nodeType;return 3!==o&&8!==o&&2!==o?"undefined"==typeof e.getAttribute?me.prop(e,t,n):(1===o&&me.isXMLDoc(e)||(i=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void me.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=me.find.attr(e,t),null==r?void 0:r)):void 0},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&"radio"===t&&i(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(De);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return t===!1?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=bt[t]||me.find.attr;bt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=bt[a],bt[a]=i,i=null!=n(e,t,r)?a:null,bt[a]=o),i}});var wt=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return Pe(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var r,i,o=e.nodeType;return 3!==o&&8!==o&&2!==o?(1===o&&me.isXMLDoc(e)||(t=me.propFix[t]||t,i=me.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]):void 0},propHooks:{tabIndex:{get:function(e){var t=me.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),pe.optSelected||(me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.propFix[this.toLowerCase()]=this}),me.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).addClass(e.call(this,t,Y(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[l++];)if(i=Y(n),r=1===n.nodeType&&" "+V(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=V(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).removeClass(e.call(this,t,Y(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[l++];)if(i=Y(n),r=1===n.nodeType&&" "+V(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=V(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):me.isFunction(e)?this.each(function(n){me(this).toggleClass(e.call(this,n,Y(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=me(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Y(this),t&&He.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":He.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+V(Y(n))+" ").indexOf(t)>-1)return!0;return!1}});var Tt=/\r/g;me.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=me.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,me(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=me.map(i,function(e){return null==e?"":e+""})),t=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=me.valHooks[i.type]||me.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Tt,""):null==n?"":n)):void 0}}),me.extend({valHooks:{option:{get:function(e){var t=me.find.attr(e,"value");return null!=t?t:V(me.text(e))}},select:{get:function(e){var t,n,r,o=e.options,a=e.selectedIndex,s="select-one"===e.type,l=s?null:[],u=s?a+1:o.length;for(r=0>a?u:s?a:0;u>r;r++)if(n=o[r],(n.selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!i(n.parentNode,"optgroup"))){if(t=me(n).val(),s)return t;l.push(t)}return l},set:function(e,t){for(var n,r,i=e.options,o=me.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=me.inArray(me.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]={set:function(e,t){return Array.isArray(t)?e.checked=me.inArray(me(e).val(),t)>-1:void 0}},pe.checkOn||(me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var kt=/^(?:focusinfocus|focusoutblur)$/;me.extend(me.event,{trigger:function(t,n,r,i){var o,a,s,l,u,c,f,d=[r||ne],p=ce.call(t,"type")?t.type:t,h=ce.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||ne,3!==r.nodeType&&8!==r.nodeType&&!kt.test(p+me.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),u=p.indexOf(":")<0&&"on"+p,t=t[me.expando]?t:new me.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:me.makeArray(n,[t]),f=me.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!me.isWindow(r)){for(l=f.delegateType||p,kt.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||ne)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)t.type=o>1?l:f.bindType||p,c=(He.get(a,"events")||{})[t.type]&&He.get(a,"handle"),c&&c.apply(a,n),c=u&&a[u],c&&c.apply&&qe(a)&&(t.result=c.apply(a,n),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!qe(r)||u&&me.isFunction(r[p])&&!me.isWindow(r)&&(s=r[u],s&&(r[u]=null),me.event.triggered=p,r[p](),me.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=me.extend(new me.Event,n,{type:e,isSimulated:!0});me.event.trigger(r,null,t)}}),me.fn.extend({trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?me.event.trigger(e,t,n,!0):void 0}}),me.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin="onfocusin"in e,pe.focusin||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){me.event.simulate(t,e.target,me.event.fix(e))};me.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=He.access(r,t);i||r.addEventListener(e,n,!0),He.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=He.access(r,t)-1;i?He.access(r,t,i):(r.removeEventListener(e,n,!0),He.remove(r,t))}}});var St=e.location,Et=me.now(),jt=/\?/;me.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(r){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||me.error("Invalid XML: "+t),n};var Nt=/\[\]$/,At=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;me.param=function(e,t){var n,r=[],i=function(e,t){var n=me.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){i(this.name,this.value)});else for(n in e)G(n,e[n],t,i);return r.join("&")},me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&Dt.test(this.nodeName)&&!It.test(e)&&(this.checked||!Xe.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:Array.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}});var Lt=/%20/g,Ot=/#.*$/,Pt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ft=/^(?:GET|HEAD)$/,Mt=/^\/\//,_t={},Bt={},Rt="*/".concat("*"),$t=ne.createElement("a");$t.href=St.href,me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:Ht.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Q(Q(e,me.ajaxSettings),t):Q(me.ajaxSettings,e)},ajaxPrefilter:Z(_t),ajaxTransport:Z(Bt),ajax:function(t,n){function r(t,n,r,s){var u,d,p,b,w,C=n;c||(c=!0,l&&e.clearTimeout(l),i=void 0,a=s||"",T.readyState=t>0?4:0,u=t>=200&&300>t||304===t,r&&(b=J(h,T,r)),b=ee(h,b,T,u),u?(h.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(me.lastModified[o]=w),w=T.getResponseHeader("etag"),w&&(me.etag[o]=w)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,d=b.data,p=b.error,u=!p)):(p=C,!t&&C||(C="error",0>t&&(t=0))),T.status=t,T.statusText=(n||C)+"",u?v.resolveWith(m,[d,C,T]):v.rejectWith(m,[T,C,p]),T.statusCode(x),x=void 0,f&&g.trigger(u?"ajaxSuccess":"ajaxError",[T,h,u?d:p]),y.fireWith(m,[T,C]),f&&(g.trigger("ajaxComplete",[T,h]),--me.active||me.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,l,u,c,f,d,p,h=me.ajaxSetup({},n),m=h.context||h,g=h.context&&(m.nodeType||m.jquery)?me(m):me.event,v=me.Deferred(),y=me.Callbacks("once memory"),x=h.statusCode||{},b={},w={},C="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=qt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)T.always(e[T.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),r(0,t),this}};if(v.promise(T),h.url=((t||h.url||St.href)+"").replace(Mt,St.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(De)||[""],null==h.crossDomain){u=ne.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=$t.protocol+"//"+$t.host!=u.protocol+"//"+u.host}catch(k){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=me.param(h.data,h.traditional)),K(_t,h,n,T),c)return T;f=me.event&&h.global,f&&0===me.active++&&me.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ft.test(h.type),o=h.url.replace(Ot,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Lt,"+")):(p=h.url.slice(o.length),h.data&&(o+=(jt.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(o=o.replace(Pt,"$1"),p=(jt.test(o)?"&":"?")+"_="+Et++ +p),h.url=o+p),h.ifModified&&(me.lastModified[o]&&T.setRequestHeader("If-Modified-Since",me.lastModified[o]),me.etag[o]&&T.setRequestHeader("If-None-Match",me.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",h.contentType),T.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Rt+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)T.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(h.beforeSend.call(m,T,h)===!1||c))return T.abort();if(C="abort",y.add(h.complete),T.done(h.success),T.fail(h.error),i=K(Bt,h,n,T)){if(T.readyState=1,f&&g.trigger("ajaxSend",[T,h]),c)return T;h.async&&h.timeout>0&&(l=e.setTimeout(function(){T.abort("timeout")},h.timeout));try{c=!1,i.send(b,r)}catch(k){if(c)throw k;r(-1,k)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return me.get(e,t,n,"json")},getScript:function(e,t){return me.get(e,void 0,t,"script")}}),me.each(["get","post"],function(e,t){me[t]=function(e,n,r,i){return me.isFunction(n)&&(i=i||r,r=n,n=void 0),me.ajax(me.extend({url:e,type:t,dataType:i,data:n,success:r},me.isPlainObject(e)&&e))}}),me._evalUrl=function(e){return me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},me.fn.extend({wrapAll:function(e){var t;return this[0]&&(me.isFunction(e)&&(e=e.call(this[0])),t=me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return me.isFunction(e)?this.each(function(t){me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=me.isFunction(e);return this.each(function(n){me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){me(this).replaceWith(this.childNodes)}),this}}),me.expr.pseudos.hidden=function(e){return!me.expr.pseudos.visible(e)},me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},me.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var zt={0:200,1223:204},Wt=me.ajaxSettings.xhr();pe.cors=!!Wt&&"withCredentials"in Wt,pe.ajax=Wt=!!Wt,me.ajaxTransport(function(t){var n,r;return pe.cors||Wt&&!t.crossDomain?{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(zt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}:void 0}),me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return me.globalEval(e),e}}}),me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=me("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),ne.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Ut=[],Xt=/(=)\?(?=&|$)|\?\?/;me.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ut.pop()||me.expando+"_"+Et++;return this[e]=!0,e}}),me.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(Xt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xt.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=me.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xt,"$1"+i):t.jsonp!==!1&&(t.url+=(jt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||me.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?me(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Ut.push(i)),a&&me.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),pe.createHTMLDocument=function(){var e=ne.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),me.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(pe.createHTMLDocument?(t=ne.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=ne.location.href,t.head.appendChild(r)):t=ne),i=ke.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=b([e],t,o),o&&o.length&&me(o).remove(),me.merge([],i.childNodes))},me.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=V(e.slice(s)),e=e.slice(0,s)),me.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&me.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?me("<div>").append(me.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},me.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){me.fn[t]=function(e){return this.on(t,e)}}),me.expr.pseudos.animated=function(e){return me.grep(me.timers,function(t){return e===t.elem}).length},me.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u,c=me.css(e,"position"),f=me(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=me.css(e,"top"),l=me.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,u?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),me.isFunction(t)&&(t=t.call(e,n,me.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},me.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){me.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];return o?o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===me.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),i(e[0],"html")||(r=e.offset()),r={top:r.top+me.css(e[0],"borderTopWidth",!0),left:r.left+me.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-me.css(n,"marginTop",!0),left:t.left-r.left-me.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===me.css(e,"position");)e=e.offsetParent;return e||Ke})}}),me.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;me.fn[e]=function(r){return Pe(this,function(e,r,i){var o;return me.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i?o?o[t]:e[r]:void(o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i)},e,r,arguments.length)}}),me.each(["top","left"],function(e,t){me.cssHooks[t]=O(pe.pixelPosition,function(e,n){return n?(n=L(e,t),st.test(n)?me(e).position()[t]+"px":n):void 0})}),me.each({Height:"height",Width:"width"},function(e,t){me.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){me.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||o===!0?"margin":"border");return Pe(this,function(t,n,i){var o;return me.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?me.css(t,n,s):me.style(t,n,i,s)},t,a?i:void 0,a)}})}),me.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),me.holdReady=function(e){e?me.readyWait++:me.ready(!0)},me.isArray=Array.isArray,me.parseJSON=JSON.parse,me.nodeName=i,"function"==typeof define&&define.amd&&define("jquery",[],function(){return me});var Vt=e.jQuery,Yt=e.$;return me.noConflict=function(t){return e.$===me&&(e.$=Yt),t&&e.jQuery===me&&(e.jQuery=Vt),me},t||(e.jQuery=e.$=me),me}),function(e){"use strict";e.fn.fitVids=function(t){var n={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],i=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",o=document.createElement("div");o.innerHTML='<p>x</p><style id="fit-vids-style">'+i+"</style>",r.appendChild(o.childNodes[1])}return t&&e.extend(n,t),this.each(function(){var t=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&t.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);var i=e(this).find(t.join(","));i=i.not("object object"),i=i.not(r),i.each(function(t){var n=e(this);if(!(n.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&n.parent("object").length||n.parent(".fluid-width-video-wrapper").length)){n.css("height")||n.css("width")||!isNaN(n.attr("height"))&&!isNaN(n.attr("width"))||(n.attr("height",9),n.attr("width",16));var i="object"===this.tagName.toLowerCase()||n.attr("height")&&!isNaN(parseInt(n.attr("height"),10))?parseInt(n.attr("height"),10):n.height(),o=isNaN(parseInt(n.attr("width"),10))?n.width():parseInt(n.attr("width"),10),a=i/o;if(!n.attr("id")){var s="fitvid"+t;n.attr("id",s)}n.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*a+"%"),n.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto),$(document).ready(function(){function e(){l=n.width()-10,u=n.children().length,c=s[u-1],c>l?(n.children().last().prependTo(r),u-=1,e()):l>s[u]&&(r.children().first().appendTo(n),u+=1,e()),t.attr("count",i-u),u===i?t.addClass("hidden"):t.removeClass("hidden")}var t=$("nav.greedy-nav button"),n=$("nav.greedy-nav .visible-links"),r=$("nav.greedy-nav .hidden-links"),i=0,o=0,a=1e3,s=[];n.children().outerWidth(function(e,t){o+=t,i+=1,s.push(o)});var l,u,c,f;$(window).resize(function(){e()}),t.on("click",function(){r.toggleClass("hidden"),$(this).toggleClass("close"),clearTimeout(f)}),r.on("mouseleave",function(){f=setTimeout(function(){r.addClass("hidden"),t.toggleClass("close")},a)}).on("mouseenter",function(){clearTimeout(f)}),e()}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(e){var t,n,r,i,o,a,s="Close",l="BeforeClose",u="AfterClose",c="BeforeAppend",f="MarkupParse",d="Open",p="Change",h="mfp",m="."+h,g="mfp-ready",v="mfp-removing",y="mfp-prevent-close",x=function(){},b=!!window.jQuery,w=e(window),C=function(e,n){t.ev.on(h+e+m,n)},T=function(t,n,r,i){var o=document.createElement("div");return o.className="mfp-"+t,r&&(o.innerHTML=r),i?n&&n.appendChild(o):(o=e(o),n&&o.appendTo(n)),o},k=function(n,r){t.ev.triggerHandler(h+n,r),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(r)?r:[r]))},S=function(n){return n===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=n),t.currTemplate.closeBtn},E=function(){e.magnificPopup.instance||(t=new x,t.init(),e.magnificPopup.instance=t)},j=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};x.prototype={constructor:x,init:function(){var n=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=j(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),r=e(document),t.popupsCache={}},open:function(n){var i;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var a,s=n.items;for(i=0;i<s.length;i++)if(a=s[i],a.parsed&&(a=a.el[0]),a===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 void t.updateItemHTML();t.types=[],o="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=r,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=T("bg").on("click"+m,function(){t.close()}),t.wrap=T("wrap").attr("tabindex",-1).on("click"+m,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=T("container",t.wrap)),t.contentContainer=T("content"),t.st.preloader&&(t.preloader=T("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(i=0;i<l.length;i++){var u=l[i];u=u.charAt(0).toUpperCase()+u.slice(1),t["init"+u].call(t)}k("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(C(f,function(e,t,n,r){n.close_replaceWith=S(r.type)}),o+=" mfp-close-btn-in"):t.wrap.append(S())),t.st.alignTop&&(o+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:w.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:r.height(),position:"absolute"}),t.st.enableEscapeKey&&r.on("keyup"+m,function(e){27===e.keyCode&&t.close()}),w.on("resize"+m,function(){t.updateSize()}),t.st.closeOnContentClick||(o+=" mfp-auto-cursor"),o&&t.wrap.addClass(o);var c=t.wH=w.height(),p={};if(t.fixedContentPos&&t._hasScrollBar(c)){var h=t._getScrollbarSize();h&&(p.marginRight=h)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):p.overflow="hidden");var v=t.st.mainClass;return t.isIE7&&(v+=" mfp-ie7"),v&&t._addClassToMFP(v),t.updateItemHTML(),k("BuildControls"),e("html").css(p),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(g),t._setFocus()):t.bgOverlay.addClass(g),r.on("focusin"+m,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(c),k(d),n},close:function(){t.isOpen&&(k(l),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(v),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){k(s);var n=v+" "+g+" ";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)}r.off("keyup"+m+" focusin"+m),t.ev.off(m),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.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,k(u)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,r=window.innerHeight*n;t.wrap.css("height",r),t.wH=r}else t.wH=e||w.height();t.fixedContentPos||t.wrap.css("height",t.wH),k("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 r=n.type;if(k("BeforeChange",[t.currItem?t.currItem.type:"",r]),t.currItem=n,!t.currTemplate[r]){var o=t.st[r]?t.st[r].markup:!1;k("FirstMarkupParse",o),o?t.currTemplate[r]=e(o):t.currTemplate[r]=!0}i&&i!==n.type&&t.container.removeClass("mfp-"+i+"-holder");var a=t["get"+r.charAt(0).toUpperCase()+r.slice(1)](n,t.currTemplate[r]);t.appendContent(a,r),n.preloaded=!0,k(p,n),i=n.type,t.container.prepend(t.contentContainer),k("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(S()):t.content=e:t.content="",k(c),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var r,i=t.items[n];if(i.tagName?i={el:e(i)}:(r=i.type,i={data:i,src:i.src}),i.el){for(var o=t.types,a=0;a<o.length;a++)if(i.el.hasClass("mfp-"+o[a])){r=o[a];break}i.src=i.el.attr("data-mfp-src"),i.src||(i.src=i.el.attr("href"))}return i.type=r||t.st.type||"inline",i.index=n,i.parsed=!0,t.items[n]=i,k("ElementParse",i),t.items[n]},addGroup:function(e,n){var r=function(r){r.mfpEl=this,t._openClick(r,e,n);
9
+ };n||(n={});var i="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(i).on(i,r)):(n.isObj=!1,n.delegate?e.off(i).on(i,n.delegate,r):(n.items=e,e.off(i).on(i,r)))},_openClick:function(n,r,i){var o=void 0!==i.midClick?i.midClick:e.magnificPopup.defaults.midClick;if(o||!(2===n.which||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)){var a=void 0!==i.disableOn?i.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(w.width()<a)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),i.el=e(n.mfpEl),i.delegate&&(i.items=r.find(i.delegate)),t.open(i)}},updateStatus:function(e,r){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),r||"loading"!==e||(r=t.st.tLoading);var i={status:e,text:r};k("UpdateStatus",i),e=i.status,r=i.text,t.preloader.html(r),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 r=t.st.closeOnContentClick,i=t.st.closeOnBgClick;if(r&&i)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(r)return!0}else if(i&&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?r.height():document.body.scrollHeight)>(e||w.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,r){var i;r.data&&(n=e.extend(r.data,n)),k(f,[t,n,r]),e.each(n,function(n,r){if(void 0===r||r===!1)return!0;if(i=n.split("_"),i.length>1){var o=t.find(m+"-"+i[0]);if(o.length>0){var a=i[1];"replaceWith"===a?o[0]!==r[0]&&o.replaceWith(r):"img"===a?o.is("img")?o.attr("src",r):o.replaceWith(e("<img>").attr("src",r).attr("class",o.attr("class"))):o.attr(i[1],r)}}else t.find(m+"-"+n).html(r)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");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:x.prototype,modules:[],open:function(t,n){return E(),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,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(n){E();var r=e(this);if("string"==typeof n)if("open"===n){var i,o=b?r.data("magnificPopup"):r[0].magnificPopup,a=parseInt(arguments[1],10)||0;o.items?i=o.items[a]:(i=r,o.delegate&&(i=i.find(o.delegate)),i=i.eq(a)),t._openClick({mfpEl:i},r,o)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?r.data("magnificPopup",n):r[0].magnificPopup=n,t.addGroup(r,n);return r};var N,A,I,D="inline",L=function(){I&&(A.after(I.addClass(N)).detach(),I=null)};e.magnificPopup.registerModule(D,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(D),C(s+"."+D,function(){L()})},getInline:function(n,r){if(L(),n.src){var i=t.st.inline,o=e(n.src);if(o.length){var a=o[0].parentNode;a&&a.tagName&&(A||(N=i.hiddenClass,A=T(N),N="mfp-"+N),I=o.after(A).detach().removeClass(N)),t.updateStatus("ready")}else t.updateStatus("error",i.tNotFound),o=e("<div>");return n.inlineElement=o,o}return t.updateStatus("ready"),t._parseMarkup(r,{},n),r}}});var O,P="ajax",q=function(){O&&e(document.body).removeClass(O)},H=function(){q(),t.req&&t.req.abort()};e.magnificPopup.registerModule(P,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(P),O=t.st.ajax.cursor,C(s+"."+P,H),C("BeforeChange."+P,H)},getAjax:function(n){O&&e(document.body).addClass(O),t.updateStatus("loading");var r=e.extend({url:n.src,success:function(r,i,o){var a={data:r,xhr:o};k("ParseAjax",a),t.appendContent(e(a.data),P),n.finished=!0,q(),t._setFocus(),setTimeout(function(){t.wrap.addClass(g)},16),t.updateStatus("ready"),k("AjaxContentAdded")},error:function(){q(),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(r),""}}});var F,M=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var r=t.st.image.titleSrc;if(r){if(e.isFunction(r))return r.call(t,n);if(n.el)return n.el.attr(r)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var n=t.st.image,r=".image";t.types.push("image"),C(d+r,function(){"image"===t.currItem.type&&n.cursor&&e(document.body).addClass(n.cursor)}),C(s+r,function(){n.cursor&&e(document.body).removeClass(n.cursor),w.off("resize"+m)}),C("Resize"+r,t.resizeImage),t.isLowIE&&C("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,F&&clearInterval(F),e.isCheckingImgSize=!1,k("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,r=e.img[0],i=function(o){F&&clearInterval(F),F=setInterval(function(){return r.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(F),n++,void(3===n?i(10):40===n?i(50):100===n&&i(500)))},o)};i(1)},getImage:function(n,r){var i=0,o=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,k("ImageLoadComplete")):(i++,200>i?setTimeout(o,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=r.find(".mfp-img");if(l.length){var u=document.createElement("img");u.className="mfp-img",n.el&&n.el.find("img").length&&(u.alt=n.el.find("img").attr("alt")),n.img=e(u).on("load.mfploader",o).on("error.mfploader",a),u.src=n.src,l.is("img")&&(n.img=n.img.clone()),u=n.img[0],u.naturalWidth>0?n.hasSize=!0:u.width||(n.hasSize=!1)}return t._parseMarkup(r,{title:M(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(F&&clearInterval(F),n.loadError?(r.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(r.removeClass("mfp-loading"),t.updateStatus("ready")),r):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,r.addClass("mfp-loading"),t.findImageSize(n)),r)}}});var _,B=function(){return void 0===_&&(_=void 0!==document.createElement("p").style.MozTransform),_};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,r=".zoom";if(n.enabled&&t.supportsTransition){var i,o,a=n.duration,u=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),r="all "+n.duration/1e3+"s "+n.easing,i={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return i["-webkit-"+o]=i["-moz-"+o]=i["-o-"+o]=i[o]=r,t.css(i),t},c=function(){t.content.css("visibility","visible")};C("BuildControls"+r,function(){if(t._allowZoom()){if(clearTimeout(i),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void c();o=u(e),o.css(t._getOffset()),t.wrap.append(o),i=setTimeout(function(){o.css(t._getOffset(!0)),i=setTimeout(function(){c(),setTimeout(function(){o.remove(),e=o=null,k("ZoomAnimationEnded")},16)},a)},16)}}),C(l+r,function(){if(t._allowZoom()){if(clearTimeout(i),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;o=u(e)}o.css(t._getOffset(!0)),t.wrap.append(o),t.content.css("visibility","hidden"),setTimeout(function(){o.css(t._getOffset())},16)}}),C(s+r,function(){t._allowZoom()&&(c(),o&&o.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var r;r=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var i=r.offset(),o=parseInt(r.css("padding-top"),10),a=parseInt(r.css("padding-bottom"),10);i.top-=e(window).scrollTop()-o;var s={width:r.width(),height:(b?r.innerHeight():r[0].offsetHeight)-a-o};return B()?s["-moz-transform"]=s.transform="translate("+i.left+"px,"+i.top+"px)":(s.left=i.left,s.top=i.top),s}}});var R="iframe",$="//about:blank",z=function(e){if(t.currTemplate[R]){var n=t.currTemplate[R].find("iframe");n.length&&(e||(n[0].src=$),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(R,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',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(R),C("BeforeChange",function(e,t,n){t!==n&&(t===R?z():n===R&&z(!0))}),C(s+"."+R,function(){z()})},getIframe:function(n,r){var i=n.src,o=t.st.iframe;e.each(o.patterns,function(){return i.indexOf(this.index)>-1?(this.id&&(i="string"==typeof this.id?i.substr(i.lastIndexOf(this.id)+this.id.length,i.length):this.id.call(this,i)),i=this.src.replace("%id%",i),!1):void 0});var a={};return o.srcAction&&(a[o.srcAction]=i),t._parseMarkup(r,a,n),t.updateStatus("ready"),r}}});var W=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},U=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',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";return t.direction=!0,n&&n.enabled?(o+=" mfp-gallery",C(d+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),r.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),C("UpdateStatus"+i,function(e,n){n.text&&(n.text=U(n.text,t.currItem.index,t.items.length))}),C(f+i,function(e,r,i,o){var a=t.items.length;i.counter=a>1?U(n.tCounter,o.index,a):""}),C("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var r=n.arrowMarkup,i=t.arrowLeft=e(r.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),o=t.arrowRight=e(r.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y);i.click(function(){t.prev()}),o.click(function(){t.next()}),t.container.append(i.add(o))}}),C(p+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void C(s+i,function(){r.off(i),t.wrap.off("click"+i),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=W(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=W(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,r=Math.min(n[0],t.items.length),i=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?i:r);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?r:i);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=W(n),!t.items[n].preloaded){var r=t.items[n];r.parsed||(r=t.parseEl(n)),k("LazyLoad",r),"image"===r.type&&(r.img=e('<img class="mfp-img" />').on("load.mfploader",function(){r.hasSize=!0}).on("error.mfploader",function(){r.hasSize=!0,r.loadError=!0,k("LazyLoadError",r)}).attr("src",r.src)),r.preloaded=!0}}}});var X="retina";e.magnificPopup.registerModule(X,{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&&(C("ImageHasSize."+X,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),C("ElementParse."+X,function(t,r){r.src=e.replaceSrc(r,n)}))}}}}),E()}),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e){var t={},n={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,autoFocus:!1,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},r=function(t){var n=[],r=!1,i=t.dir&&"left"===t.dir?"scrollLeft":"scrollTop";return this.each(function(){var t=e(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(t[i]()>0?n.push(this):(t[i](1),r=t[i]()>0,r&&n.push(this),t[i](0))):(n.push(document.scrollingElement),!1):void 0}),n.length||this.each(function(){this===document.documentElement&&"smooth"===e(this).css("scrollBehavior")&&(n=[this]),n.length||"BODY"!==this.nodeName||(n=[this])}),"first"===t.el&&n.length>1&&(n=[n[0]]),n},i=/^([\-\+]=)(\d+)/;e.fn.extend({scrollable:function(e){var t=r.call(this,{dir:e});return this.pushStack(t)},firstScrollable:function(e){var t=r.call(this,{el:"first",dir:e});return this.pushStack(t)},smoothScroll:function(t,n){if("options"===(t=t||{}))return n?this.each(function(){var t=e(this),r=e.extend(t.data("ssOpts")||{},n);e(this).data("ssOpts",r)}):this.first().data("ssOpts");var r=e.extend({},e.fn.smoothScroll.defaults,t),i=function(t){var n=function(e){return e.replace(/(:|\.|\/)/g,"\\$1")},i=this,o=e(this),a=e.extend({},r,o.data("ssOpts")||{}),s=r.exclude,l=a.excludeWithin,u=0,c=0,f=!0,d={},p=e.smoothScroll.filterPath(location.pathname),h=e.smoothScroll.filterPath(i.pathname),m=location.hostname===i.hostname||!i.hostname,g=a.scrollTarget||h===p,v=n(i.hash);if(v&&!e(v).length&&(f=!1),a.scrollTarget||m&&g&&v){for(;f&&u<s.length;)o.is(n(s[u++]))&&(f=!1);for(;f&&c<l.length;)o.closest(l[c++]).length&&(f=!1)}else f=!1;f&&(a.preventDefault&&t.preventDefault(),e.extend(d,a,{scrollTarget:a.scrollTarget||v,link:i}),e.smoothScroll(d))};return null!==t.delegateSelector?this.off("click.smoothscroll",t.delegateSelector).on("click.smoothscroll",t.delegateSelector,i):this.off("click.smoothscroll").on("click.smoothscroll",i),this}});var o=function(e){var t={relative:""},n="string"==typeof e&&i.exec(e);return"number"==typeof e?t.px=e:n&&(t.relative=n[1],t.px=parseFloat(n[2])||0),t},a=function(t){var n=e(t.scrollTarget);t.autoFocus&&n.length&&(n[0].focus(),n.is(document.activeElement)||(n.prop({tabIndex:-1}),n[0].focus())),t.afterScroll.call(t.link,t)};e.smoothScroll=function(n,r){if("options"===n&&"object"==typeof r)return e.extend(t,r);var i,s,l,u,c=o(n),f={},d=0,p="offset",h="scrollTop",m={},g={};c.px?i=e.extend({link:null},e.fn.smoothScroll.defaults,t):(i=e.extend({link:null},e.fn.smoothScroll.defaults,n||{},t),i.scrollElement&&(p="position","static"===i.scrollElement.css("position")&&i.scrollElement.css("position","relative")),r&&(c=o(r))),h="left"===i.direction?"scrollLeft":h,i.scrollElement?(s=i.scrollElement,c.px||/^(?:HTML|BODY)$/.test(s[0].nodeName)||(d=s[h]())):s=e("html, body").firstScrollable(i.direction),i.beforeScroll.call(s,i),f=c.px?c:{relative:"",px:e(i.scrollTarget)[p]()&&e(i.scrollTarget)[p]()[i.direction]||0},m[h]=f.relative+(f.px+d+i.offset),l=i.speed,"auto"===l&&(u=Math.abs(m[h]-s[h]()),l=u/i.autoCoefficient),g={duration:l,easing:i.easing,complete:function(){a(i)}},i.step&&(g.step=i.step),s.length?s.stop().animate(m,g):a(i)},e.smoothScroll.version="2.2.0",e.smoothScroll.filterPath=function(e){return e=e||"",e.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},e.fn.smoothScroll.defaults=n}),$(document).ready(function(){var e=function(){$("body").css("margin-bottom",$(".page__footer").outerHeight(!0))},t=!1;e(),$(window).resize(function(){t=!0}),setInterval(function(){t&&(t=!1,e())},250),$("#main").fitVids(),$(".author__urls-wrapper button").on("click",function(){$(".author__urls").toggleClass("is--visible"),$(".author__urls-wrapper button").toggleClass("open")}),$("a").smoothScroll({offset:-20}),$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup"),$(".image-popup").magnificPopup({type:"image",tLoading:"Loading image #%curr%...",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'<a href="%url%">Image #%curr%</a> could not be loaded.'},removalDelay:500,mainClass:"mfp-zoom-in",callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim")}},closeOnContentClick:!0,midClick:!0})});
@@ -1,2049 +1,1860 @@
1
- /*! Magnific Popup - v0.9.9 - 2013-12-27
2
- * http://dimsemenov.com/plugins/magnific-popup/
3
- * Copyright (c) 2013 Dmitry Semenov; */
4
- ;(function($) {
5
-
6
- /*>>core*/
7
- /**
8
- *
9
- * Magnific Popup Core JS file
10
- *
11
- */
12
-
13
-
14
- /**
15
- * Private static constants
16
- */
17
- var CLOSE_EVENT = 'Close',
18
- BEFORE_CLOSE_EVENT = 'BeforeClose',
19
- AFTER_CLOSE_EVENT = 'AfterClose',
20
- BEFORE_APPEND_EVENT = 'BeforeAppend',
21
- MARKUP_PARSE_EVENT = 'MarkupParse',
22
- OPEN_EVENT = 'Open',
23
- CHANGE_EVENT = 'Change',
24
- NS = 'mfp',
25
- EVENT_NS = '.' + NS,
26
- READY_CLASS = 'mfp-ready',
27
- REMOVING_CLASS = 'mfp-removing',
28
- PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
29
-
30
-
31
- /**
32
- * Private vars
33
- */
34
- var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
35
- MagnificPopup = function(){},
36
- _isJQ = !!(window.jQuery),
37
- _prevStatus,
38
- _window = $(window),
39
- _body,
40
- _document,
41
- _prevContentType,
42
- _wrapClasses,
43
- _currPopupType;
44
-
45
-
46
- /**
47
- * Private functions
48
- */
49
- var _mfpOn = function(name, f) {
50
- mfp.ev.on(NS + name + EVENT_NS, f);
51
- },
52
- _getEl = function(className, appendTo, html, raw) {
53
- var el = document.createElement('div');
54
- el.className = 'mfp-'+className;
55
- if(html) {
56
- el.innerHTML = html;
57
- }
58
- if(!raw) {
59
- el = $(el);
60
- if(appendTo) {
61
- el.appendTo(appendTo);
62
- }
63
- } else if(appendTo) {
64
- appendTo.appendChild(el);
65
- }
66
- return el;
67
- },
68
- _mfpTrigger = function(e, data) {
69
- mfp.ev.triggerHandler(NS + e, data);
70
-
71
- if(mfp.st.callbacks) {
72
- // converts "mfpEventName" to "eventName" callback and triggers it if it's present
73
- e = e.charAt(0).toLowerCase() + e.slice(1);
74
- if(mfp.st.callbacks[e]) {
75
- mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
76
- }
77
- }
78
- },
79
- _getCloseBtn = function(type) {
80
- if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
81
- mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
82
- _currPopupType = type;
83
- }
84
- return mfp.currTemplate.closeBtn;
85
- },
86
- // Initialize Magnific Popup only when called at least once
87
- _checkInstance = function() {
88
- if(!$.magnificPopup.instance) {
89
- mfp = new MagnificPopup();
90
- mfp.init();
91
- $.magnificPopup.instance = mfp;
92
- }
93
- },
94
- // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
95
- supportsTransitions = function() {
96
- var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
97
- v = ['ms','O','Moz','Webkit']; // 'v' for vendor
98
-
99
- if( s['transition'] !== undefined ) {
100
- return true;
101
- }
102
-
103
- while( v.length ) {
104
- if( v.pop() + 'Transition' in s ) {
105
- return true;
106
- }
107
- }
108
-
109
- return false;
110
- };
111
-
112
-
113
-
114
- /**
115
- * Public functions
116
- */
117
- MagnificPopup.prototype = {
118
-
119
- constructor: MagnificPopup,
120
-
121
- /**
122
- * Initializes Magnific Popup plugin.
123
- * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
124
- */
125
- init: function() {
126
- var appVersion = navigator.appVersion;
127
- mfp.isIE7 = appVersion.indexOf("MSIE 7.") !== -1;
128
- mfp.isIE8 = appVersion.indexOf("MSIE 8.") !== -1;
129
- mfp.isLowIE = mfp.isIE7 || mfp.isIE8;
130
- mfp.isAndroid = (/android/gi).test(appVersion);
131
- mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
132
- mfp.supportsTransition = supportsTransitions();
133
-
134
- // We disable fixed positioned lightbox on devices that don't handle it nicely.
135
- // If you know a better way of detecting this - let me know.
136
- mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
137
- _document = $(document);
138
-
139
- mfp.popupsCache = {};
140
- },
141
-
142
- /**
143
- * Opens popup
144
- * @param data [description]
145
- */
146
- open: function(data) {
147
-
148
- if(!_body) {
149
- _body = $(document.body);
150
- }
151
-
152
- var i;
153
-
154
- if(data.isObj === false) {
155
- // convert jQuery collection to array to avoid conflicts later
156
- mfp.items = data.items.toArray();
157
-
158
- mfp.index = 0;
159
- var items = data.items,
160
- item;
161
- for(i = 0; i < items.length; i++) {
162
- item = items[i];
163
- if(item.parsed) {
164
- item = item.el[0];
165
- }
166
- if(item === data.el[0]) {
167
- mfp.index = i;
168
- break;
169
- }
170
- }
171
- } else {
172
- mfp.items = $.isArray(data.items) ? data.items : [data.items];
173
- mfp.index = data.index || 0;
174
- }
175
-
176
- // if popup is already opened - we just update the content
177
- if(mfp.isOpen) {
178
- mfp.updateItemHTML();
179
- return;
180
- }
181
-
182
- mfp.types = [];
183
- _wrapClasses = '';
184
- if(data.mainEl && data.mainEl.length) {
185
- mfp.ev = data.mainEl.eq(0);
186
- } else {
187
- mfp.ev = _document;
188
- }
189
-
190
- if(data.key) {
191
- if(!mfp.popupsCache[data.key]) {
192
- mfp.popupsCache[data.key] = {};
193
- }
194
- mfp.currTemplate = mfp.popupsCache[data.key];
195
- } else {
196
- mfp.currTemplate = {};
197
- }
198
-
199
-
200
-
201
- mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data );
202
- mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
203
-
204
- if(mfp.st.modal) {
205
- mfp.st.closeOnContentClick = false;
206
- mfp.st.closeOnBgClick = false;
207
- mfp.st.showCloseBtn = false;
208
- mfp.st.enableEscapeKey = false;
209
- }
210
-
211
-
212
- // Building markup
213
- // main containers are created only once
214
- if(!mfp.bgOverlay) {
215
-
216
- // Dark overlay
217
- mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
218
- mfp.close();
219
- });
220
-
221
- mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
222
- if(mfp._checkIfClose(e.target)) {
223
- mfp.close();
224
- }
225
- });
226
-
227
- mfp.container = _getEl('container', mfp.wrap);
228
- }
229
-
230
- mfp.contentContainer = _getEl('content');
231
- if(mfp.st.preloader) {
232
- mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
233
- }
234
-
235
-
236
- // Initializing modules
237
- var modules = $.magnificPopup.modules;
238
- for(i = 0; i < modules.length; i++) {
239
- var n = modules[i];
240
- n = n.charAt(0).toUpperCase() + n.slice(1);
241
- mfp['init'+n].call(mfp);
242
- }
243
- _mfpTrigger('BeforeOpen');
244
-
245
-
246
- if(mfp.st.showCloseBtn) {
247
- // Close button
248
- if(!mfp.st.closeBtnInside) {
249
- mfp.wrap.append( _getCloseBtn() );
250
- } else {
251
- _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
252
- values.close_replaceWith = _getCloseBtn(item.type);
253
- });
254
- _wrapClasses += ' mfp-close-btn-in';
255
- }
256
- }
257
-
258
- if(mfp.st.alignTop) {
259
- _wrapClasses += ' mfp-align-top';
260
- }
261
-
262
-
263
-
264
- if(mfp.fixedContentPos) {
265
- mfp.wrap.css({
266
- overflow: mfp.st.overflowY,
267
- overflowX: 'hidden',
268
- overflowY: mfp.st.overflowY
269
- });
270
- } else {
271
- mfp.wrap.css({
272
- top: _window.scrollTop(),
273
- position: 'absolute'
274
- });
275
- }
276
- if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
277
- mfp.bgOverlay.css({
278
- height: _document.height(),
279
- position: 'absolute'
280
- });
281
- }
282
-
283
-
284
-
285
- if(mfp.st.enableEscapeKey) {
286
- // Close on ESC key
287
- _document.on('keyup' + EVENT_NS, function(e) {
288
- if(e.keyCode === 27) {
289
- mfp.close();
290
- }
291
- });
292
- }
293
-
294
- _window.on('resize' + EVENT_NS, function() {
295
- mfp.updateSize();
296
- });
297
-
298
-
299
- if(!mfp.st.closeOnContentClick) {
300
- _wrapClasses += ' mfp-auto-cursor';
301
- }
302
-
303
- if(_wrapClasses)
304
- mfp.wrap.addClass(_wrapClasses);
305
-
306
-
307
- // this triggers recalculation of layout, so we get it once to not to trigger twice
308
- var windowHeight = mfp.wH = _window.height();
309
-
310
-
311
- var windowStyles = {};
312
-
313
- if( mfp.fixedContentPos ) {
314
- if(mfp._hasScrollBar(windowHeight)){
315
- var s = mfp._getScrollbarSize();
316
- if(s) {
317
- windowStyles.marginRight = s;
318
- }
319
- }
320
- }
321
-
322
- if(mfp.fixedContentPos) {
323
- if(!mfp.isIE7) {
324
- windowStyles.overflow = 'hidden';
325
- } else {
326
- // ie7 double-scroll bug
327
- $('body, html').css('overflow', 'hidden');
328
- }
329
- }
330
-
331
-
332
-
333
- var classesToadd = mfp.st.mainClass;
334
- if(mfp.isIE7) {
335
- classesToadd += ' mfp-ie7';
336
- }
337
- if(classesToadd) {
338
- mfp._addClassToMFP( classesToadd );
339
- }
340
-
341
- // add content
342
- mfp.updateItemHTML();
343
-
344
- _mfpTrigger('BuildControls');
345
-
346
- // remove scrollbar, add margin e.t.c
347
- $('html').css(windowStyles);
348
-
349
- // add everything to DOM
350
- mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || _body );
351
-
352
- // Save last focused element
353
- mfp._lastFocusedEl = document.activeElement;
354
-
355
- // Wait for next cycle to allow CSS transition
356
- setTimeout(function() {
357
-
358
- if(mfp.content) {
359
- mfp._addClassToMFP(READY_CLASS);
360
- mfp._setFocus();
361
- } else {
362
- // if content is not defined (not loaded e.t.c) we add class only for BG
363
- mfp.bgOverlay.addClass(READY_CLASS);
364
- }
365
-
366
- // Trap the focus in popup
367
- _document.on('focusin' + EVENT_NS, mfp._onFocusIn);
368
-
369
- }, 16);
370
-
371
- mfp.isOpen = true;
372
- mfp.updateSize(windowHeight);
373
- _mfpTrigger(OPEN_EVENT);
374
-
375
- return data;
376
- },
377
-
378
- /**
379
- * Closes the popup
380
- */
381
- close: function() {
382
- if(!mfp.isOpen) return;
383
- _mfpTrigger(BEFORE_CLOSE_EVENT);
384
-
385
- mfp.isOpen = false;
386
- // for CSS3 animation
387
- if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {
388
- mfp._addClassToMFP(REMOVING_CLASS);
389
- setTimeout(function() {
390
- mfp._close();
391
- }, mfp.st.removalDelay);
392
- } else {
393
- mfp._close();
394
- }
395
- },
396
-
397
- /**
398
- * Helper for close() function
399
- */
400
- _close: function() {
401
- _mfpTrigger(CLOSE_EVENT);
402
-
403
- var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
404
-
405
- mfp.bgOverlay.detach();
406
- mfp.wrap.detach();
407
- mfp.container.empty();
408
-
409
- if(mfp.st.mainClass) {
410
- classesToRemove += mfp.st.mainClass + ' ';
411
- }
412
-
413
- mfp._removeClassFromMFP(classesToRemove);
414
-
415
- if(mfp.fixedContentPos) {
416
- var windowStyles = {marginRight: ''};
417
- if(mfp.isIE7) {
418
- $('body, html').css('overflow', '');
419
- } else {
420
- windowStyles.overflow = '';
421
- }
422
- $('html').css(windowStyles);
423
- }
424
-
425
- _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
426
- mfp.ev.off(EVENT_NS);
427
-
428
- // clean up DOM elements that aren't removed
429
- mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
430
- mfp.bgOverlay.attr('class', 'mfp-bg');
431
- mfp.container.attr('class', 'mfp-container');
432
-
433
- // remove close button from target element
434
- if(mfp.st.showCloseBtn &&
435
- (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
436
- if(mfp.currTemplate.closeBtn)
437
- mfp.currTemplate.closeBtn.detach();
438
- }
439
-
440
-
441
- if(mfp._lastFocusedEl) {
442
- $(mfp._lastFocusedEl).focus(); // put tab focus back
443
- }
444
- mfp.currItem = null;
445
- mfp.content = null;
446
- mfp.currTemplate = null;
447
- mfp.prevHeight = 0;
448
-
449
- _mfpTrigger(AFTER_CLOSE_EVENT);
450
- },
451
-
452
- updateSize: function(winHeight) {
453
-
454
- if(mfp.isIOS) {
455
- // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
456
- var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
457
- var height = window.innerHeight * zoomLevel;
458
- mfp.wrap.css('height', height);
459
- mfp.wH = height;
460
- } else {
461
- mfp.wH = winHeight || _window.height();
462
- }
463
- // Fixes #84: popup incorrectly positioned with position:relative on body
464
- if(!mfp.fixedContentPos) {
465
- mfp.wrap.css('height', mfp.wH);
466
- }
467
-
468
- _mfpTrigger('Resize');
469
-
470
- },
471
-
472
- /**
473
- * Set content of popup based on current index
474
- */
475
- updateItemHTML: function() {
476
- var item = mfp.items[mfp.index];
477
-
478
- // Detach and perform modifications
479
- mfp.contentContainer.detach();
480
-
481
- if(mfp.content)
482
- mfp.content.detach();
483
-
484
- if(!item.parsed) {
485
- item = mfp.parseEl( mfp.index );
486
- }
487
-
488
- var type = item.type;
489
-
490
- _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
491
- // BeforeChange event works like so:
492
- // _mfpOn('BeforeChange', function(e, prevType, newType) { });
493
-
494
- mfp.currItem = item;
495
-
496
-
497
-
498
-
499
-
500
- if(!mfp.currTemplate[type]) {
501
- var markup = mfp.st[type] ? mfp.st[type].markup : false;
502
-
503
- // allows to modify markup
504
- _mfpTrigger('FirstMarkupParse', markup);
505
-
506
- if(markup) {
507
- mfp.currTemplate[type] = $(markup);
508
- } else {
509
- // if there is no markup found we just define that template is parsed
510
- mfp.currTemplate[type] = true;
511
- }
512
- }
513
-
514
- if(_prevContentType && _prevContentType !== item.type) {
515
- mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
516
- }
517
-
518
- var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
519
- mfp.appendContent(newContent, type);
520
-
521
- item.preloaded = true;
522
-
523
- _mfpTrigger(CHANGE_EVENT, item);
524
- _prevContentType = item.type;
525
-
526
- // Append container back after its content changed
527
- mfp.container.prepend(mfp.contentContainer);
528
-
529
- _mfpTrigger('AfterChange');
530
- },
531
-
532
-
533
- /**
534
- * Set HTML content of popup
535
- */
536
- appendContent: function(newContent, type) {
537
- mfp.content = newContent;
538
-
539
- if(newContent) {
540
- if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
541
- mfp.currTemplate[type] === true) {
542
- // if there is no markup, we just append close button element inside
543
- if(!mfp.content.find('.mfp-close').length) {
544
- mfp.content.append(_getCloseBtn());
545
- }
546
- } else {
547
- mfp.content = newContent;
548
- }
549
- } else {
550
- mfp.content = '';
551
- }
552
-
553
- _mfpTrigger(BEFORE_APPEND_EVENT);
554
- mfp.container.addClass('mfp-'+type+'-holder');
555
-
556
- mfp.contentContainer.append(mfp.content);
557
- },
558
-
559
-
560
-
561
-
562
- /**
563
- * Creates Magnific Popup data object based on given data
564
- * @param {int} index Index of item to parse
565
- */
566
- parseEl: function(index) {
567
- var item = mfp.items[index],
568
- type;
569
-
570
- if(item.tagName) {
571
- item = { el: $(item) };
572
- } else {
573
- type = item.type;
574
- item = { data: item, src: item.src };
575
- }
576
-
577
- if(item.el) {
578
- var types = mfp.types;
579
-
580
- // check for 'mfp-TYPE' class
581
- for(var i = 0; i < types.length; i++) {
582
- if( item.el.hasClass('mfp-'+types[i]) ) {
583
- type = types[i];
584
- break;
585
- }
586
- }
587
-
588
- item.src = item.el.attr('data-mfp-src');
589
- if(!item.src) {
590
- item.src = item.el.attr('href');
591
- }
592
- }
593
-
594
- item.type = type || mfp.st.type || 'inline';
595
- item.index = index;
596
- item.parsed = true;
597
- mfp.items[index] = item;
598
- _mfpTrigger('ElementParse', item);
599
-
600
- return mfp.items[index];
601
- },
602
-
603
-
604
- /**
605
- * Initializes single popup or a group of popups
606
- */
607
- addGroup: function(el, options) {
608
- var eHandler = function(e) {
609
- e.mfpEl = this;
610
- mfp._openClick(e, el, options);
611
- };
612
-
613
- if(!options) {
614
- options = {};
615
- }
616
-
617
- var eName = 'click.magnificPopup';
618
- options.mainEl = el;
619
-
620
- if(options.items) {
621
- options.isObj = true;
622
- el.off(eName).on(eName, eHandler);
623
- } else {
624
- options.isObj = false;
625
- if(options.delegate) {
626
- el.off(eName).on(eName, options.delegate , eHandler);
627
- } else {
628
- options.items = el;
629
- el.off(eName).on(eName, eHandler);
630
- }
631
- }
632
- },
633
- _openClick: function(e, el, options) {
634
- var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
635
-
636
-
637
- if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey ) ) {
638
- return;
639
- }
640
-
641
- var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
642
-
643
- if(disableOn) {
644
- if($.isFunction(disableOn)) {
645
- if( !disableOn.call(mfp) ) {
646
- return true;
647
- }
648
- } else { // else it's number
649
- if( _window.width() < disableOn ) {
650
- return true;
651
- }
652
- }
653
- }
654
-
655
- if(e.type) {
656
- e.preventDefault();
657
-
658
- // This will prevent popup from closing if element is inside and popup is already opened
659
- if(mfp.isOpen) {
660
- e.stopPropagation();
661
- }
662
- }
663
-
664
-
665
- options.el = $(e.mfpEl);
666
- if(options.delegate) {
667
- options.items = el.find(options.delegate);
668
- }
669
- mfp.open(options);
670
- },
671
-
672
-
673
- /**
674
- * Updates text on preloader
675
- */
676
- updateStatus: function(status, text) {
677
-
678
- if(mfp.preloader) {
679
- if(_prevStatus !== status) {
680
- mfp.container.removeClass('mfp-s-'+_prevStatus);
681
- }
682
-
683
- if(!text && status === 'loading') {
684
- text = mfp.st.tLoading;
685
- }
686
-
687
- var data = {
688
- status: status,
689
- text: text
690
- };
691
- // allows to modify status
692
- _mfpTrigger('UpdateStatus', data);
693
-
694
- status = data.status;
695
- text = data.text;
696
-
697
- mfp.preloader.html(text);
698
-
699
- mfp.preloader.find('a').on('click', function(e) {
700
- e.stopImmediatePropagation();
701
- });
702
-
703
- mfp.container.addClass('mfp-s-'+status);
704
- _prevStatus = status;
705
- }
706
- },
707
-
708
-
709
- /*
710
- "Private" helpers that aren't private at all
711
- */
712
- // Check to close popup or not
713
- // "target" is an element that was clicked
714
- _checkIfClose: function(target) {
715
-
716
- if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
717
- return;
718
- }
719
-
720
- var closeOnContent = mfp.st.closeOnContentClick;
721
- var closeOnBg = mfp.st.closeOnBgClick;
722
-
723
- if(closeOnContent && closeOnBg) {
724
- return true;
725
- } else {
726
-
727
- // We close the popup if click is on close button or on preloader. Or if there is no content.
728
- if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
729
- return true;
730
- }
731
-
732
- // if click is outside the content
733
- if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
734
- if(closeOnBg) {
735
- // last check, if the clicked element is in DOM, (in case it's removed onclick)
736
- if( $.contains(document, target) ) {
737
- return true;
738
- }
739
- }
740
- } else if(closeOnContent) {
741
- return true;
742
- }
743
-
744
- }
745
- return false;
746
- },
747
- _addClassToMFP: function(cName) {
748
- mfp.bgOverlay.addClass(cName);
749
- mfp.wrap.addClass(cName);
750
- },
751
- _removeClassFromMFP: function(cName) {
752
- this.bgOverlay.removeClass(cName);
753
- mfp.wrap.removeClass(cName);
754
- },
755
- _hasScrollBar: function(winHeight) {
756
- return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
757
- },
758
- _setFocus: function() {
759
- (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
760
- },
761
- _onFocusIn: function(e) {
762
- if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
763
- mfp._setFocus();
764
- return false;
765
- }
766
- },
767
- _parseMarkup: function(template, values, item) {
768
- var arr;
769
- if(item.data) {
770
- values = $.extend(item.data, values);
771
- }
772
- _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
773
-
774
- $.each(values, function(key, value) {
775
- if(value === undefined || value === false) {
776
- return true;
777
- }
778
- arr = key.split('_');
779
- if(arr.length > 1) {
780
- var el = template.find(EVENT_NS + '-'+arr[0]);
781
-
782
- if(el.length > 0) {
783
- var attr = arr[1];
784
- if(attr === 'replaceWith') {
785
- if(el[0] !== value[0]) {
786
- el.replaceWith(value);
787
- }
788
- } else if(attr === 'img') {
789
- if(el.is('img')) {
790
- el.attr('src', value);
791
- } else {
792
- el.replaceWith( '<img src="'+value+'" class="' + el.attr('class') + '" />' );
793
- }
794
- } else {
795
- el.attr(arr[1], value);
796
- }
797
- }
798
-
799
- } else {
800
- template.find(EVENT_NS + '-'+key).html(value);
801
- }
802
- });
803
- },
804
-
805
- _getScrollbarSize: function() {
806
- // thx David
807
- if(mfp.scrollbarSize === undefined) {
808
- var scrollDiv = document.createElement("div");
809
- scrollDiv.id = "mfp-sbm";
810
- scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
811
- document.body.appendChild(scrollDiv);
812
- mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
813
- document.body.removeChild(scrollDiv);
814
- }
815
- return mfp.scrollbarSize;
816
- }
817
-
818
- }; /* MagnificPopup core prototype end */
819
-
820
-
821
-
822
-
823
- /**
824
- * Public static functions
825
- */
826
- $.magnificPopup = {
827
- instance: null,
828
- proto: MagnificPopup.prototype,
829
- modules: [],
830
-
831
- open: function(options, index) {
832
- _checkInstance();
833
-
834
- if(!options) {
835
- options = {};
836
- } else {
837
- options = $.extend(true, {}, options);
838
- }
839
-
840
-
841
- options.isObj = true;
842
- options.index = index || 0;
843
- return this.instance.open(options);
844
- },
845
-
846
- close: function() {
847
- return $.magnificPopup.instance && $.magnificPopup.instance.close();
848
- },
849
-
850
- registerModule: function(name, module) {
851
- if(module.options) {
852
- $.magnificPopup.defaults[name] = module.options;
853
- }
854
- $.extend(this.proto, module.proto);
855
- this.modules.push(name);
856
- },
857
-
858
- defaults: {
859
-
860
- // Info about options is in docs:
861
- // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
862
-
863
- disableOn: 0,
864
-
865
- key: null,
866
-
867
- midClick: false,
868
-
869
- mainClass: '',
870
-
871
- preloader: true,
872
-
873
- focus: '', // CSS selector of input to focus after popup is opened
874
-
875
- closeOnContentClick: false,
876
-
877
- closeOnBgClick: true,
878
-
879
- closeBtnInside: true,
880
-
881
- showCloseBtn: true,
882
-
883
- enableEscapeKey: true,
884
-
885
- modal: false,
886
-
887
- alignTop: false,
888
-
889
- removalDelay: 0,
890
-
891
- prependTo: null,
892
-
893
- fixedContentPos: 'auto',
894
-
895
- fixedBgPos: 'auto',
896
-
897
- overflowY: 'auto',
898
-
899
- closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
900
-
901
- tClose: 'Close (Esc)',
902
-
903
- tLoading: 'Loading...'
904
-
905
- }
906
- };
907
-
908
-
909
-
910
- $.fn.magnificPopup = function(options) {
911
- _checkInstance();
912
-
913
- var jqEl = $(this);
914
-
915
- // We call some API method of first param is a string
916
- if (typeof options === "string" ) {
917
-
918
- if(options === 'open') {
919
- var items,
920
- itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
921
- index = parseInt(arguments[1], 10) || 0;
922
-
923
- if(itemOpts.items) {
924
- items = itemOpts.items[index];
925
- } else {
926
- items = jqEl;
927
- if(itemOpts.delegate) {
928
- items = items.find(itemOpts.delegate);
929
- }
930
- items = items.eq( index );
931
- }
932
- mfp._openClick({mfpEl:items}, jqEl, itemOpts);
933
- } else {
934
- if(mfp.isOpen)
935
- mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
936
- }
937
-
938
- } else {
939
- // clone options obj
940
- options = $.extend(true, {}, options);
941
-
942
- /*
943
- * As Zepto doesn't support .data() method for objects
944
- * and it works only in normal browsers
945
- * we assign "options" object directly to the DOM element. FTW!
946
- */
947
- if(_isJQ) {
948
- jqEl.data('magnificPopup', options);
949
- } else {
950
- jqEl[0].magnificPopup = options;
951
- }
952
-
953
- mfp.addGroup(jqEl, options);
954
-
955
- }
956
- return jqEl;
957
- };
958
-
959
-
960
- //Quick benchmark
961
- /*
962
- var start = performance.now(),
963
- i,
964
- rounds = 1000;
965
-
966
- for(i = 0; i < rounds; i++) {
967
-
968
- }
969
- console.log('Test #1:', performance.now() - start);
970
-
971
- start = performance.now();
972
- for(i = 0; i < rounds; i++) {
973
-
974
- }
975
- console.log('Test #2:', performance.now() - start);
976
- */
977
-
978
-
979
- /*>>core*/
980
-
981
- /*>>inline*/
982
-
983
- var INLINE_NS = 'inline',
984
- _hiddenClass,
985
- _inlinePlaceholder,
986
- _lastInlineElement,
987
- _putInlineElementsBack = function() {
988
- if(_lastInlineElement) {
989
- _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
990
- _lastInlineElement = null;
991
- }
992
- };
993
-
994
- $.magnificPopup.registerModule(INLINE_NS, {
995
- options: {
996
- hiddenClass: 'hide', // will be appended with `mfp-` prefix
997
- markup: '',
998
- tNotFound: 'Content not found'
999
- },
1000
- proto: {
1001
-
1002
- initInline: function() {
1003
- mfp.types.push(INLINE_NS);
1004
-
1005
- _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
1006
- _putInlineElementsBack();
1007
- });
1008
- },
1009
-
1010
- getInline: function(item, template) {
1011
-
1012
- _putInlineElementsBack();
1013
-
1014
- if(item.src) {
1015
- var inlineSt = mfp.st.inline,
1016
- el = $(item.src);
1017
-
1018
- if(el.length) {
1019
-
1020
- // If target element has parent - we replace it with placeholder and put it back after popup is closed
1021
- var parent = el[0].parentNode;
1022
- if(parent && parent.tagName) {
1023
- if(!_inlinePlaceholder) {
1024
- _hiddenClass = inlineSt.hiddenClass;
1025
- _inlinePlaceholder = _getEl(_hiddenClass);
1026
- _hiddenClass = 'mfp-'+_hiddenClass;
1027
- }
1028
- // replace target inline element with placeholder
1029
- _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
1030
- }
1031
-
1032
- mfp.updateStatus('ready');
1033
- } else {
1034
- mfp.updateStatus('error', inlineSt.tNotFound);
1035
- el = $('<div>');
1036
- }
1037
-
1038
- item.inlineElement = el;
1039
- return el;
1040
- }
1041
-
1042
- mfp.updateStatus('ready');
1043
- mfp._parseMarkup(template, {}, item);
1044
- return template;
1045
- }
1046
- }
1047
- });
1048
-
1049
- /*>>inline*/
1050
-
1051
- /*>>ajax*/
1052
- var AJAX_NS = 'ajax',
1053
- _ajaxCur,
1054
- _removeAjaxCursor = function() {
1055
- if(_ajaxCur) {
1056
- _body.removeClass(_ajaxCur);
1057
- }
1058
- },
1059
- _destroyAjaxRequest = function() {
1060
- _removeAjaxCursor();
1061
- if(mfp.req) {
1062
- mfp.req.abort();
1063
- }
1064
- };
1065
-
1066
- $.magnificPopup.registerModule(AJAX_NS, {
1067
-
1068
- options: {
1069
- settings: null,
1070
- cursor: 'mfp-ajax-cur',
1071
- tError: '<a href="%url%">The content</a> could not be loaded.'
1072
- },
1073
-
1074
- proto: {
1075
- initAjax: function() {
1076
- mfp.types.push(AJAX_NS);
1077
- _ajaxCur = mfp.st.ajax.cursor;
1078
-
1079
- _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
1080
- _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
1081
- },
1082
- getAjax: function(item) {
1083
-
1084
- if(_ajaxCur)
1085
- _body.addClass(_ajaxCur);
1086
-
1087
- mfp.updateStatus('loading');
1088
-
1089
- var opts = $.extend({
1090
- url: item.src,
1091
- success: function(data, textStatus, jqXHR) {
1092
- var temp = {
1093
- data:data,
1094
- xhr:jqXHR
1095
- };
1096
-
1097
- _mfpTrigger('ParseAjax', temp);
1098
-
1099
- mfp.appendContent( $(temp.data), AJAX_NS );
1100
-
1101
- item.finished = true;
1102
-
1103
- _removeAjaxCursor();
1104
-
1105
- mfp._setFocus();
1106
-
1107
- setTimeout(function() {
1108
- mfp.wrap.addClass(READY_CLASS);
1109
- }, 16);
1110
-
1111
- mfp.updateStatus('ready');
1112
-
1113
- _mfpTrigger('AjaxContentAdded');
1114
- },
1115
- error: function() {
1116
- _removeAjaxCursor();
1117
- item.finished = item.loadError = true;
1118
- mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
1119
- }
1120
- }, mfp.st.ajax.settings);
1121
-
1122
- mfp.req = $.ajax(opts);
1123
-
1124
- return '';
1125
- }
1126
- }
1127
- });
1128
-
1129
-
1130
-
1131
-
1132
-
1133
-
1134
-
1135
- /*>>ajax*/
1136
-
1137
- /*>>image*/
1138
- var _imgInterval,
1139
- _getTitle = function(item) {
1140
- if(item.data && item.data.title !== undefined)
1141
- return item.data.title;
1142
-
1143
- var src = mfp.st.image.titleSrc;
1144
-
1145
- if(src) {
1146
- if($.isFunction(src)) {
1147
- return src.call(mfp, item);
1148
- } else if(item.el) {
1149
- return item.el.attr(src) || '';
1150
- }
1151
- }
1152
- return '';
1153
- };
1154
-
1155
- $.magnificPopup.registerModule('image', {
1156
-
1157
- options: {
1158
- markup: '<div class="mfp-figure">'+
1159
- '<div class="mfp-close"></div>'+
1160
- '<figure>'+
1161
- '<div class="mfp-img"></div>'+
1162
- '<figcaption>'+
1163
- '<div class="mfp-bottom-bar">'+
1164
- '<div class="mfp-title"></div>'+
1165
- '<div class="mfp-counter"></div>'+
1166
- '</div>'+
1167
- '</figcaption>'+
1168
- '</figure>'+
1169
- '</div>',
1170
- cursor: 'mfp-zoom-out-cur',
1171
- titleSrc: 'title',
1172
- verticalFit: true,
1173
- tError: '<a href="%url%">The image</a> could not be loaded.'
1174
- },
1175
-
1176
- proto: {
1177
- initImage: function() {
1178
- var imgSt = mfp.st.image,
1179
- ns = '.image';
1180
-
1181
- mfp.types.push('image');
1182
-
1183
- _mfpOn(OPEN_EVENT+ns, function() {
1184
- if(mfp.currItem.type === 'image' && imgSt.cursor) {
1185
- _body.addClass(imgSt.cursor);
1186
- }
1187
- });
1188
-
1189
- _mfpOn(CLOSE_EVENT+ns, function() {
1190
- if(imgSt.cursor) {
1191
- _body.removeClass(imgSt.cursor);
1192
- }
1193
- _window.off('resize' + EVENT_NS);
1194
- });
1195
-
1196
- _mfpOn('Resize'+ns, mfp.resizeImage);
1197
- if(mfp.isLowIE) {
1198
- _mfpOn('AfterChange', mfp.resizeImage);
1199
- }
1200
- },
1201
- resizeImage: function() {
1202
- var item = mfp.currItem;
1203
- if(!item || !item.img) return;
1204
-
1205
- if(mfp.st.image.verticalFit) {
1206
- var decr = 0;
1207
- // fix box-sizing in ie7/8
1208
- if(mfp.isLowIE) {
1209
- decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
1210
- }
1211
- item.img.css('max-height', mfp.wH-decr);
1212
- }
1213
- },
1214
- _onImageHasSize: function(item) {
1215
- if(item.img) {
1216
-
1217
- item.hasSize = true;
1218
-
1219
- if(_imgInterval) {
1220
- clearInterval(_imgInterval);
1221
- }
1222
-
1223
- item.isCheckingImgSize = false;
1224
-
1225
- _mfpTrigger('ImageHasSize', item);
1226
-
1227
- if(item.imgHidden) {
1228
- if(mfp.content)
1229
- mfp.content.removeClass('mfp-loading');
1230
-
1231
- item.imgHidden = false;
1232
- }
1233
-
1234
- }
1235
- },
1236
-
1237
- /**
1238
- * Function that loops until the image has size to display elements that rely on it asap
1239
- */
1240
- findImageSize: function(item) {
1241
-
1242
- var counter = 0,
1243
- img = item.img[0],
1244
- mfpSetInterval = function(delay) {
1245
-
1246
- if(_imgInterval) {
1247
- clearInterval(_imgInterval);
1248
- }
1249
- // decelerating interval that checks for size of an image
1250
- _imgInterval = setInterval(function() {
1251
- if(img.naturalWidth > 0) {
1252
- mfp._onImageHasSize(item);
1253
- return;
1254
- }
1255
-
1256
- if(counter > 200) {
1257
- clearInterval(_imgInterval);
1258
- }
1259
-
1260
- counter++;
1261
- if(counter === 3) {
1262
- mfpSetInterval(10);
1263
- } else if(counter === 40) {
1264
- mfpSetInterval(50);
1265
- } else if(counter === 100) {
1266
- mfpSetInterval(500);
1267
- }
1268
- }, delay);
1269
- };
1270
-
1271
- mfpSetInterval(1);
1272
- },
1273
-
1274
- getImage: function(item, template) {
1275
-
1276
- var guard = 0,
1277
-
1278
- // image load complete handler
1279
- onLoadComplete = function() {
1280
- if(item) {
1281
- if (item.img[0].complete) {
1282
- item.img.off('.mfploader');
1283
-
1284
- if(item === mfp.currItem){
1285
- mfp._onImageHasSize(item);
1286
-
1287
- mfp.updateStatus('ready');
1288
- }
1289
-
1290
- item.hasSize = true;
1291
- item.loaded = true;
1292
-
1293
- _mfpTrigger('ImageLoadComplete');
1294
-
1295
- }
1296
- else {
1297
- // if image complete check fails 200 times (20 sec), we assume that there was an error.
1298
- guard++;
1299
- if(guard < 200) {
1300
- setTimeout(onLoadComplete,100);
1301
- } else {
1302
- onLoadError();
1303
- }
1304
- }
1305
- }
1306
- },
1307
-
1308
- // image error handler
1309
- onLoadError = function() {
1310
- if(item) {
1311
- item.img.off('.mfploader');
1312
- if(item === mfp.currItem){
1313
- mfp._onImageHasSize(item);
1314
- mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1315
- }
1316
-
1317
- item.hasSize = true;
1318
- item.loaded = true;
1319
- item.loadError = true;
1320
- }
1321
- },
1322
- imgSt = mfp.st.image;
1323
-
1324
-
1325
- var el = template.find('.mfp-img');
1326
- if(el.length) {
1327
- var img = document.createElement('img');
1328
- img.className = 'mfp-img';
1329
- item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
1330
- img.src = item.src;
1331
-
1332
- // without clone() "error" event is not firing when IMG is replaced by new IMG
1333
- // TODO: find a way to avoid such cloning
1334
- if(el.is('img')) {
1335
- item.img = item.img.clone();
1336
- }
1337
-
1338
- img = item.img[0];
1339
- if(img.naturalWidth > 0) {
1340
- item.hasSize = true;
1341
- } else if(!img.width) {
1342
- item.hasSize = false;
1343
- }
1344
- }
1345
-
1346
- mfp._parseMarkup(template, {
1347
- title: _getTitle(item),
1348
- img_replaceWith: item.img
1349
- }, item);
1350
-
1351
- mfp.resizeImage();
1352
-
1353
- if(item.hasSize) {
1354
- if(_imgInterval) clearInterval(_imgInterval);
1355
-
1356
- if(item.loadError) {
1357
- template.addClass('mfp-loading');
1358
- mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1359
- } else {
1360
- template.removeClass('mfp-loading');
1361
- mfp.updateStatus('ready');
1362
- }
1363
- return template;
1364
- }
1365
-
1366
- mfp.updateStatus('loading');
1367
- item.loading = true;
1368
-
1369
- if(!item.hasSize) {
1370
- item.imgHidden = true;
1371
- template.addClass('mfp-loading');
1372
- mfp.findImageSize(item);
1373
- }
1374
-
1375
- return template;
1376
- }
1377
- }
1378
- });
1379
-
1380
-
1381
-
1382
- /*>>image*/
1383
-
1384
- /*>>zoom*/
1385
- var hasMozTransform,
1386
- getHasMozTransform = function() {
1387
- if(hasMozTransform === undefined) {
1388
- hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
1389
- }
1390
- return hasMozTransform;
1391
- };
1392
-
1393
- $.magnificPopup.registerModule('zoom', {
1394
-
1395
- options: {
1396
- enabled: false,
1397
- easing: 'ease-in-out',
1398
- duration: 300,
1399
- opener: function(element) {
1400
- return element.is('img') ? element : element.find('img');
1401
- }
1402
- },
1403
-
1404
- proto: {
1405
-
1406
- initZoom: function() {
1407
- var zoomSt = mfp.st.zoom,
1408
- ns = '.zoom',
1409
- image;
1410
-
1411
- if(!zoomSt.enabled || !mfp.supportsTransition) {
1412
- return;
1413
- }
1414
-
1415
- var duration = zoomSt.duration,
1416
- getElToAnimate = function(image) {
1417
- var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
1418
- transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
1419
- cssObj = {
1420
- position: 'fixed',
1421
- zIndex: 9999,
1422
- left: 0,
1423
- top: 0,
1424
- '-webkit-backface-visibility': 'hidden'
1425
- },
1426
- t = 'transition';
1427
-
1428
- cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
1429
-
1430
- newImg.css(cssObj);
1431
- return newImg;
1432
- },
1433
- showMainContent = function() {
1434
- mfp.content.css('visibility', 'visible');
1435
- },
1436
- openTimeout,
1437
- animatedImg;
1438
-
1439
- _mfpOn('BuildControls'+ns, function() {
1440
- if(mfp._allowZoom()) {
1441
-
1442
- clearTimeout(openTimeout);
1443
- mfp.content.css('visibility', 'hidden');
1444
-
1445
- // Basically, all code below does is clones existing image, puts in on top of the current one and animated it
1446
-
1447
- image = mfp._getItemToZoom();
1448
-
1449
- if(!image) {
1450
- showMainContent();
1451
- return;
1452
- }
1453
-
1454
- animatedImg = getElToAnimate(image);
1455
-
1456
- animatedImg.css( mfp._getOffset() );
1457
-
1458
- mfp.wrap.append(animatedImg);
1459
-
1460
- openTimeout = setTimeout(function() {
1461
- animatedImg.css( mfp._getOffset( true ) );
1462
- openTimeout = setTimeout(function() {
1463
-
1464
- showMainContent();
1465
-
1466
- setTimeout(function() {
1467
- animatedImg.remove();
1468
- image = animatedImg = null;
1469
- _mfpTrigger('ZoomAnimationEnded');
1470
- }, 16); // avoid blink when switching images
1471
-
1472
- }, duration); // this timeout equals animation duration
1473
-
1474
- }, 16); // by adding this timeout we avoid short glitch at the beginning of animation
1475
-
1476
-
1477
- // Lots of timeouts...
1478
- }
1479
- });
1480
- _mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
1481
- if(mfp._allowZoom()) {
1482
-
1483
- clearTimeout(openTimeout);
1484
-
1485
- mfp.st.removalDelay = duration;
1486
-
1487
- if(!image) {
1488
- image = mfp._getItemToZoom();
1489
- if(!image) {
1490
- return;
1491
- }
1492
- animatedImg = getElToAnimate(image);
1493
- }
1494
-
1495
-
1496
- animatedImg.css( mfp._getOffset(true) );
1497
- mfp.wrap.append(animatedImg);
1498
- mfp.content.css('visibility', 'hidden');
1499
-
1500
- setTimeout(function() {
1501
- animatedImg.css( mfp._getOffset() );
1502
- }, 16);
1503
- }
1504
-
1505
- });
1506
-
1507
- _mfpOn(CLOSE_EVENT+ns, function() {
1508
- if(mfp._allowZoom()) {
1509
- showMainContent();
1510
- if(animatedImg) {
1511
- animatedImg.remove();
1512
- }
1513
- image = null;
1514
- }
1515
- });
1516
- },
1517
-
1518
- _allowZoom: function() {
1519
- return mfp.currItem.type === 'image';
1520
- },
1521
-
1522
- _getItemToZoom: function() {
1523
- if(mfp.currItem.hasSize) {
1524
- return mfp.currItem.img;
1525
- } else {
1526
- return false;
1527
- }
1528
- },
1529
-
1530
- // Get element postion relative to viewport
1531
- _getOffset: function(isLarge) {
1532
- var el;
1533
- if(isLarge) {
1534
- el = mfp.currItem.img;
1535
- } else {
1536
- el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
1537
- }
1538
-
1539
- var offset = el.offset();
1540
- var paddingTop = parseInt(el.css('padding-top'),10);
1541
- var paddingBottom = parseInt(el.css('padding-bottom'),10);
1542
- offset.top -= ( $(window).scrollTop() - paddingTop );
1543
-
1544
-
1545
- /*
1546
-
1547
- Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
1548
-
1549
- */
1550
- var obj = {
1551
- width: el.width(),
1552
- // fix Zepto height+padding issue
1553
- height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
1554
- };
1555
-
1556
- // I hate to do this, but there is no another option
1557
- if( getHasMozTransform() ) {
1558
- obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
1559
- } else {
1560
- obj.left = offset.left;
1561
- obj.top = offset.top;
1562
- }
1563
- return obj;
1564
- }
1565
-
1566
- }
1567
- });
1568
-
1569
-
1570
-
1571
- /*>>zoom*/
1572
-
1573
- /*>>iframe*/
1574
-
1575
- var IFRAME_NS = 'iframe',
1576
- _emptyPage = '//about:blank',
1577
-
1578
- _fixIframeBugs = function(isShowing) {
1579
- if(mfp.currTemplate[IFRAME_NS]) {
1580
- var el = mfp.currTemplate[IFRAME_NS].find('iframe');
1581
- if(el.length) {
1582
- // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
1583
- if(!isShowing) {
1584
- el[0].src = _emptyPage;
1585
- }
1586
-
1587
- // IE8 black screen bug fix
1588
- if(mfp.isIE8) {
1589
- el.css('display', isShowing ? 'block' : 'none');
1590
- }
1591
- }
1592
- }
1593
- };
1594
-
1595
- $.magnificPopup.registerModule(IFRAME_NS, {
1596
-
1597
- options: {
1598
- markup: '<div class="mfp-iframe-scaler">'+
1599
- '<div class="mfp-close"></div>'+
1600
- '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
1601
- '</div>',
1602
-
1603
- srcAction: 'iframe_src',
1604
-
1605
- // we don't care and support only one default type of URL by default
1606
- patterns: {
1607
- youtube: {
1608
- index: 'youtube.com',
1609
- id: 'v=',
1610
- src: '//www.youtube.com/embed/%id%?autoplay=1'
1611
- },
1612
- vimeo: {
1613
- index: 'vimeo.com/',
1614
- id: '/',
1615
- src: '//player.vimeo.com/video/%id%?autoplay=1'
1616
- },
1617
- gmaps: {
1618
- index: '//maps.google.',
1619
- src: '%id%&output=embed'
1620
- }
1621
- }
1622
- },
1623
-
1624
- proto: {
1625
- initIframe: function() {
1626
- mfp.types.push(IFRAME_NS);
1627
-
1628
- _mfpOn('BeforeChange', function(e, prevType, newType) {
1629
- if(prevType !== newType) {
1630
- if(prevType === IFRAME_NS) {
1631
- _fixIframeBugs(); // iframe if removed
1632
- } else if(newType === IFRAME_NS) {
1633
- _fixIframeBugs(true); // iframe is showing
1634
- }
1635
- }// else {
1636
- // iframe source is switched, don't do anything
1637
- //}
1638
- });
1639
-
1640
- _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
1641
- _fixIframeBugs();
1642
- });
1643
- },
1644
-
1645
- getIframe: function(item, template) {
1646
- var embedSrc = item.src;
1647
- var iframeSt = mfp.st.iframe;
1648
-
1649
- $.each(iframeSt.patterns, function() {
1650
- if(embedSrc.indexOf( this.index ) > -1) {
1651
- if(this.id) {
1652
- if(typeof this.id === 'string') {
1653
- embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
1654
- } else {
1655
- embedSrc = this.id.call( this, embedSrc );
1656
- }
1657
- }
1658
- embedSrc = this.src.replace('%id%', embedSrc );
1659
- return false; // break;
1660
- }
1661
- });
1662
-
1663
- var dataObj = {};
1664
- if(iframeSt.srcAction) {
1665
- dataObj[iframeSt.srcAction] = embedSrc;
1666
- }
1667
- mfp._parseMarkup(template, dataObj, item);
1668
-
1669
- mfp.updateStatus('ready');
1670
-
1671
- return template;
1672
- }
1673
- }
1674
- });
1675
-
1676
-
1677
-
1678
- /*>>iframe*/
1679
-
1680
- /*>>gallery*/
1681
- /**
1682
- * Get looped index depending on number of slides
1683
- */
1684
- var _getLoopedId = function(index) {
1685
- var numSlides = mfp.items.length;
1686
- if(index > numSlides - 1) {
1687
- return index - numSlides;
1688
- } else if(index < 0) {
1689
- return numSlides + index;
1690
- }
1691
- return index;
1692
- },
1693
- _replaceCurrTotal = function(text, curr, total) {
1694
- return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
1695
- };
1696
-
1697
- $.magnificPopup.registerModule('gallery', {
1698
-
1699
- options: {
1700
- enabled: false,
1701
- arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
1702
- preload: [0,2],
1703
- navigateByImgClick: true,
1704
- arrows: true,
1705
-
1706
- tPrev: 'Previous (Left arrow key)',
1707
- tNext: 'Next (Right arrow key)',
1708
- tCounter: '%curr% of %total%'
1709
- },
1710
-
1711
- proto: {
1712
- initGallery: function() {
1713
-
1714
- var gSt = mfp.st.gallery,
1715
- ns = '.mfp-gallery',
1716
- supportsFastClick = Boolean($.fn.mfpFastClick);
1717
-
1718
- mfp.direction = true; // true - next, false - prev
1719
-
1720
- if(!gSt || !gSt.enabled ) return false;
1721
-
1722
- _wrapClasses += ' mfp-gallery';
1723
-
1724
- _mfpOn(OPEN_EVENT+ns, function() {
1725
-
1726
- if(gSt.navigateByImgClick) {
1727
- mfp.wrap.on('click'+ns, '.mfp-img', function() {
1728
- if(mfp.items.length > 1) {
1729
- mfp.next();
1730
- return false;
1731
- }
1732
- });
1733
- }
1734
-
1735
- _document.on('keydown'+ns, function(e) {
1736
- if (e.keyCode === 37) {
1737
- mfp.prev();
1738
- } else if (e.keyCode === 39) {
1739
- mfp.next();
1740
- }
1741
- });
1742
- });
1743
-
1744
- _mfpOn('UpdateStatus'+ns, function(e, data) {
1745
- if(data.text) {
1746
- data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
1747
- }
1748
- });
1749
-
1750
- _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
1751
- var l = mfp.items.length;
1752
- values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
1753
- });
1754
-
1755
- _mfpOn('BuildControls' + ns, function() {
1756
- if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
1757
- var markup = gSt.arrowMarkup,
1758
- arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
1759
- arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
1760
-
1761
- var eName = supportsFastClick ? 'mfpFastClick' : 'click';
1762
- arrowLeft[eName](function() {
1763
- mfp.prev();
1764
- });
1765
- arrowRight[eName](function() {
1766
- mfp.next();
1767
- });
1768
-
1769
- // Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)
1770
- if(mfp.isIE7) {
1771
- _getEl('b', arrowLeft[0], false, true);
1772
- _getEl('a', arrowLeft[0], false, true);
1773
- _getEl('b', arrowRight[0], false, true);
1774
- _getEl('a', arrowRight[0], false, true);
1775
- }
1776
-
1777
- mfp.container.append(arrowLeft.add(arrowRight));
1778
- }
1779
- });
1780
-
1781
- _mfpOn(CHANGE_EVENT+ns, function() {
1782
- if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
1783
-
1784
- mfp._preloadTimeout = setTimeout(function() {
1785
- mfp.preloadNearbyImages();
1786
- mfp._preloadTimeout = null;
1787
- }, 16);
1788
- });
1789
-
1790
-
1791
- _mfpOn(CLOSE_EVENT+ns, function() {
1792
- _document.off(ns);
1793
- mfp.wrap.off('click'+ns);
1794
-
1795
- if(mfp.arrowLeft && supportsFastClick) {
1796
- mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
1797
- }
1798
- mfp.arrowRight = mfp.arrowLeft = null;
1799
- });
1800
-
1801
- },
1802
- next: function() {
1803
- mfp.direction = true;
1804
- mfp.index = _getLoopedId(mfp.index + 1);
1805
- mfp.updateItemHTML();
1806
- },
1807
- prev: function() {
1808
- mfp.direction = false;
1809
- mfp.index = _getLoopedId(mfp.index - 1);
1810
- mfp.updateItemHTML();
1811
- },
1812
- goTo: function(newIndex) {
1813
- mfp.direction = (newIndex >= mfp.index);
1814
- mfp.index = newIndex;
1815
- mfp.updateItemHTML();
1816
- },
1817
- preloadNearbyImages: function() {
1818
- var p = mfp.st.gallery.preload,
1819
- preloadBefore = Math.min(p[0], mfp.items.length),
1820
- preloadAfter = Math.min(p[1], mfp.items.length),
1821
- i;
1822
-
1823
- for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
1824
- mfp._preloadItem(mfp.index+i);
1825
- }
1826
- for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
1827
- mfp._preloadItem(mfp.index-i);
1828
- }
1829
- },
1830
- _preloadItem: function(index) {
1831
- index = _getLoopedId(index);
1832
-
1833
- if(mfp.items[index].preloaded) {
1834
- return;
1835
- }
1836
-
1837
- var item = mfp.items[index];
1838
- if(!item.parsed) {
1839
- item = mfp.parseEl( index );
1840
- }
1841
-
1842
- _mfpTrigger('LazyLoad', item);
1843
-
1844
- if(item.type === 'image') {
1845
- item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
1846
- item.hasSize = true;
1847
- }).on('error.mfploader', function() {
1848
- item.hasSize = true;
1849
- item.loadError = true;
1850
- _mfpTrigger('LazyLoadError', item);
1851
- }).attr('src', item.src);
1852
- }
1853
-
1854
-
1855
- item.preloaded = true;
1856
- }
1857
- }
1858
- });
1859
-
1860
- /*
1861
- Touch Support that might be implemented some day
1862
-
1863
- addSwipeGesture: function() {
1864
- var startX,
1865
- moved,
1866
- multipleTouches;
1867
-
1868
- return;
1869
-
1870
- var namespace = '.mfp',
1871
- addEventNames = function(pref, down, move, up, cancel) {
1872
- mfp._tStart = pref + down + namespace;
1873
- mfp._tMove = pref + move + namespace;
1874
- mfp._tEnd = pref + up + namespace;
1875
- mfp._tCancel = pref + cancel + namespace;
1876
- };
1877
-
1878
- if(window.navigator.msPointerEnabled) {
1879
- addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
1880
- } else if('ontouchstart' in window) {
1881
- addEventNames('touch', 'start', 'move', 'end', 'cancel');
1882
- } else {
1883
- return;
1884
- }
1885
- _window.on(mfp._tStart, function(e) {
1886
- var oE = e.originalEvent;
1887
- multipleTouches = moved = false;
1888
- startX = oE.pageX || oE.changedTouches[0].pageX;
1889
- }).on(mfp._tMove, function(e) {
1890
- if(e.originalEvent.touches.length > 1) {
1891
- multipleTouches = e.originalEvent.touches.length;
1892
- } else {
1893
- //e.preventDefault();
1894
- moved = true;
1895
- }
1896
- }).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {
1897
- if(moved && !multipleTouches) {
1898
- var oE = e.originalEvent,
1899
- diff = startX - (oE.pageX || oE.changedTouches[0].pageX);
1900
-
1901
- if(diff > 20) {
1902
- mfp.next();
1903
- } else if(diff < -20) {
1904
- mfp.prev();
1905
- }
1906
- }
1907
- });
1908
- },
1909
- */
1910
-
1911
-
1912
- /*>>gallery*/
1913
-
1914
- /*>>retina*/
1915
-
1916
- var RETINA_NS = 'retina';
1917
-
1918
- $.magnificPopup.registerModule(RETINA_NS, {
1919
- options: {
1920
- replaceSrc: function(item) {
1921
- return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
1922
- },
1923
- ratio: 1 // Function or number. Set to 1 to disable.
1924
- },
1925
- proto: {
1926
- initRetina: function() {
1927
- if(window.devicePixelRatio > 1) {
1928
-
1929
- var st = mfp.st.retina,
1930
- ratio = st.ratio;
1931
-
1932
- ratio = !isNaN(ratio) ? ratio : ratio();
1933
-
1934
- if(ratio > 1) {
1935
- _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
1936
- item.img.css({
1937
- 'max-width': item.img[0].naturalWidth / ratio,
1938
- 'width': '100%'
1939
- });
1940
- });
1941
- _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
1942
- item.src = st.replaceSrc(item, ratio);
1943
- });
1944
- }
1945
- }
1946
-
1947
- }
1948
- }
1949
- });
1950
-
1951
- /*>>retina*/
1952
-
1953
- /*>>fastclick*/
1954
- /**
1955
- * FastClick event implementation. (removes 300ms delay on touch devices)
1956
- * Based on https://developers.google.com/mobile/articles/fast_buttons
1957
- *
1958
- * You may use it outside the Magnific Popup by calling just:
1959
- *
1960
- * $('.your-el').mfpFastClick(function() {
1961
- * console.log('Clicked!');
1962
- * });
1963
- *
1964
- * To unbind:
1965
- * $('.your-el').destroyMfpFastClick();
1966
- *
1967
- *
1968
- * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
1969
- * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick
1970
- *
1971
- */
1972
-
1973
- (function() {
1974
- var ghostClickDelay = 1000,
1975
- supportsTouch = 'ontouchstart' in window,
1976
- unbindTouchMove = function() {
1977
- _window.off('touchmove'+ns+' touchend'+ns);
1978
- },
1979
- eName = 'mfpFastClick',
1980
- ns = '.'+eName;
1981
-
1982
-
1983
- // As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way
1984
- $.fn.mfpFastClick = function(callback) {
1985
-
1986
- return $(this).each(function() {
1987
-
1988
- var elem = $(this),
1989
- lock;
1990
-
1991
- if( supportsTouch ) {
1992
-
1993
- var timeout,
1994
- startX,
1995
- startY,
1996
- pointerMoved,
1997
- point,
1998
- numPointers;
1999
-
2000
- elem.on('touchstart' + ns, function(e) {
2001
- pointerMoved = false;
2002
- numPointers = 1;
2003
-
2004
- point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];
2005
- startX = point.clientX;
2006
- startY = point.clientY;
2007
-
2008
- _window.on('touchmove'+ns, function(e) {
2009
- point = e.originalEvent ? e.originalEvent.touches : e.touches;
2010
- numPointers = point.length;
2011
- point = point[0];
2012
- if (Math.abs(point.clientX - startX) > 10 ||
2013
- Math.abs(point.clientY - startY) > 10) {
2014
- pointerMoved = true;
2015
- unbindTouchMove();
2016
- }
2017
- }).on('touchend'+ns, function(e) {
2018
- unbindTouchMove();
2019
- if(pointerMoved || numPointers > 1) {
2020
- return;
2021
- }
2022
- lock = true;
2023
- e.preventDefault();
2024
- clearTimeout(timeout);
2025
- timeout = setTimeout(function() {
2026
- lock = false;
2027
- }, ghostClickDelay);
2028
- callback();
2029
- });
2030
- });
2031
-
2032
- }
2033
-
2034
- elem.on('click' + ns, function() {
2035
- if(!lock) {
2036
- callback();
2037
- }
2038
- });
2039
- });
2040
- };
2041
-
2042
- $.fn.destroyMfpFastClick = function() {
2043
- $(this).off('touchstart' + ns + ' click' + ns);
2044
- if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);
2045
- };
2046
- })();
2047
-
2048
- /*>>fastclick*/
2049
- _checkInstance(); })(window.jQuery || window.Zepto);
1
+ /*! Magnific Popup - v1.1.0 - 2016-02-20
2
+ * http://dimsemenov.com/plugins/magnific-popup/
3
+ * Copyright (c) 2016 Dmitry Semenov; */
4
+ ;(function (factory) {
5
+ if (typeof define === 'function' && define.amd) {
6
+ // AMD. Register as an anonymous module.
7
+ define(['jquery'], factory);
8
+ } else if (typeof exports === 'object') {
9
+ // Node/CommonJS
10
+ factory(require('jquery'));
11
+ } else {
12
+ // Browser globals
13
+ factory(window.jQuery || window.Zepto);
14
+ }
15
+ }(function($) {
16
+
17
+ /*>>core*/
18
+ /**
19
+ *
20
+ * Magnific Popup Core JS file
21
+ *
22
+ */
23
+
24
+
25
+ /**
26
+ * Private static constants
27
+ */
28
+ var CLOSE_EVENT = 'Close',
29
+ BEFORE_CLOSE_EVENT = 'BeforeClose',
30
+ AFTER_CLOSE_EVENT = 'AfterClose',
31
+ BEFORE_APPEND_EVENT = 'BeforeAppend',
32
+ MARKUP_PARSE_EVENT = 'MarkupParse',
33
+ OPEN_EVENT = 'Open',
34
+ CHANGE_EVENT = 'Change',
35
+ NS = 'mfp',
36
+ EVENT_NS = '.' + NS,
37
+ READY_CLASS = 'mfp-ready',
38
+ REMOVING_CLASS = 'mfp-removing',
39
+ PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
40
+
41
+
42
+ /**
43
+ * Private vars
44
+ */
45
+ /*jshint -W079 */
46
+ var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
47
+ MagnificPopup = function(){},
48
+ _isJQ = !!(window.jQuery),
49
+ _prevStatus,
50
+ _window = $(window),
51
+ _document,
52
+ _prevContentType,
53
+ _wrapClasses,
54
+ _currPopupType;
55
+
56
+
57
+ /**
58
+ * Private functions
59
+ */
60
+ var _mfpOn = function(name, f) {
61
+ mfp.ev.on(NS + name + EVENT_NS, f);
62
+ },
63
+ _getEl = function(className, appendTo, html, raw) {
64
+ var el = document.createElement('div');
65
+ el.className = 'mfp-'+className;
66
+ if(html) {
67
+ el.innerHTML = html;
68
+ }
69
+ if(!raw) {
70
+ el = $(el);
71
+ if(appendTo) {
72
+ el.appendTo(appendTo);
73
+ }
74
+ } else if(appendTo) {
75
+ appendTo.appendChild(el);
76
+ }
77
+ return el;
78
+ },
79
+ _mfpTrigger = function(e, data) {
80
+ mfp.ev.triggerHandler(NS + e, data);
81
+
82
+ if(mfp.st.callbacks) {
83
+ // converts "mfpEventName" to "eventName" callback and triggers it if it's present
84
+ e = e.charAt(0).toLowerCase() + e.slice(1);
85
+ if(mfp.st.callbacks[e]) {
86
+ mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
87
+ }
88
+ }
89
+ },
90
+ _getCloseBtn = function(type) {
91
+ if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
92
+ mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
93
+ _currPopupType = type;
94
+ }
95
+ return mfp.currTemplate.closeBtn;
96
+ },
97
+ // Initialize Magnific Popup only when called at least once
98
+ _checkInstance = function() {
99
+ if(!$.magnificPopup.instance) {
100
+ /*jshint -W020 */
101
+ mfp = new MagnificPopup();
102
+ mfp.init();
103
+ $.magnificPopup.instance = mfp;
104
+ }
105
+ },
106
+ // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
107
+ supportsTransitions = function() {
108
+ var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
109
+ v = ['ms','O','Moz','Webkit']; // 'v' for vendor
110
+
111
+ if( s['transition'] !== undefined ) {
112
+ return true;
113
+ }
114
+
115
+ while( v.length ) {
116
+ if( v.pop() + 'Transition' in s ) {
117
+ return true;
118
+ }
119
+ }
120
+
121
+ return false;
122
+ };
123
+
124
+
125
+
126
+ /**
127
+ * Public functions
128
+ */
129
+ MagnificPopup.prototype = {
130
+
131
+ constructor: MagnificPopup,
132
+
133
+ /**
134
+ * Initializes Magnific Popup plugin.
135
+ * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
136
+ */
137
+ init: function() {
138
+ var appVersion = navigator.appVersion;
139
+ mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener;
140
+ mfp.isAndroid = (/android/gi).test(appVersion);
141
+ mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
142
+ mfp.supportsTransition = supportsTransitions();
143
+
144
+ // We disable fixed positioned lightbox on devices that don't handle it nicely.
145
+ // If you know a better way of detecting this - let me know.
146
+ mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
147
+ _document = $(document);
148
+
149
+ mfp.popupsCache = {};
150
+ },
151
+
152
+ /**
153
+ * Opens popup
154
+ * @param data [description]
155
+ */
156
+ open: function(data) {
157
+
158
+ var i;
159
+
160
+ if(data.isObj === false) {
161
+ // convert jQuery collection to array to avoid conflicts later
162
+ mfp.items = data.items.toArray();
163
+
164
+ mfp.index = 0;
165
+ var items = data.items,
166
+ item;
167
+ for(i = 0; i < items.length; i++) {
168
+ item = items[i];
169
+ if(item.parsed) {
170
+ item = item.el[0];
171
+ }
172
+ if(item === data.el[0]) {
173
+ mfp.index = i;
174
+ break;
175
+ }
176
+ }
177
+ } else {
178
+ mfp.items = $.isArray(data.items) ? data.items : [data.items];
179
+ mfp.index = data.index || 0;
180
+ }
181
+
182
+ // if popup is already opened - we just update the content
183
+ if(mfp.isOpen) {
184
+ mfp.updateItemHTML();
185
+ return;
186
+ }
187
+
188
+ mfp.types = [];
189
+ _wrapClasses = '';
190
+ if(data.mainEl && data.mainEl.length) {
191
+ mfp.ev = data.mainEl.eq(0);
192
+ } else {
193
+ mfp.ev = _document;
194
+ }
195
+
196
+ if(data.key) {
197
+ if(!mfp.popupsCache[data.key]) {
198
+ mfp.popupsCache[data.key] = {};
199
+ }
200
+ mfp.currTemplate = mfp.popupsCache[data.key];
201
+ } else {
202
+ mfp.currTemplate = {};
203
+ }
204
+
205
+
206
+
207
+ mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data );
208
+ mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
209
+
210
+ if(mfp.st.modal) {
211
+ mfp.st.closeOnContentClick = false;
212
+ mfp.st.closeOnBgClick = false;
213
+ mfp.st.showCloseBtn = false;
214
+ mfp.st.enableEscapeKey = false;
215
+ }
216
+
217
+
218
+ // Building markup
219
+ // main containers are created only once
220
+ if(!mfp.bgOverlay) {
221
+
222
+ // Dark overlay
223
+ mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
224
+ mfp.close();
225
+ });
226
+
227
+ mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
228
+ if(mfp._checkIfClose(e.target)) {
229
+ mfp.close();
230
+ }
231
+ });
232
+
233
+ mfp.container = _getEl('container', mfp.wrap);
234
+ }
235
+
236
+ mfp.contentContainer = _getEl('content');
237
+ if(mfp.st.preloader) {
238
+ mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
239
+ }
240
+
241
+
242
+ // Initializing modules
243
+ var modules = $.magnificPopup.modules;
244
+ for(i = 0; i < modules.length; i++) {
245
+ var n = modules[i];
246
+ n = n.charAt(0).toUpperCase() + n.slice(1);
247
+ mfp['init'+n].call(mfp);
248
+ }
249
+ _mfpTrigger('BeforeOpen');
250
+
251
+
252
+ if(mfp.st.showCloseBtn) {
253
+ // Close button
254
+ if(!mfp.st.closeBtnInside) {
255
+ mfp.wrap.append( _getCloseBtn() );
256
+ } else {
257
+ _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
258
+ values.close_replaceWith = _getCloseBtn(item.type);
259
+ });
260
+ _wrapClasses += ' mfp-close-btn-in';
261
+ }
262
+ }
263
+
264
+ if(mfp.st.alignTop) {
265
+ _wrapClasses += ' mfp-align-top';
266
+ }
267
+
268
+
269
+
270
+ if(mfp.fixedContentPos) {
271
+ mfp.wrap.css({
272
+ overflow: mfp.st.overflowY,
273
+ overflowX: 'hidden',
274
+ overflowY: mfp.st.overflowY
275
+ });
276
+ } else {
277
+ mfp.wrap.css({
278
+ top: _window.scrollTop(),
279
+ position: 'absolute'
280
+ });
281
+ }
282
+ if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
283
+ mfp.bgOverlay.css({
284
+ height: _document.height(),
285
+ position: 'absolute'
286
+ });
287
+ }
288
+
289
+
290
+
291
+ if(mfp.st.enableEscapeKey) {
292
+ // Close on ESC key
293
+ _document.on('keyup' + EVENT_NS, function(e) {
294
+ if(e.keyCode === 27) {
295
+ mfp.close();
296
+ }
297
+ });
298
+ }
299
+
300
+ _window.on('resize' + EVENT_NS, function() {
301
+ mfp.updateSize();
302
+ });
303
+
304
+
305
+ if(!mfp.st.closeOnContentClick) {
306
+ _wrapClasses += ' mfp-auto-cursor';
307
+ }
308
+
309
+ if(_wrapClasses)
310
+ mfp.wrap.addClass(_wrapClasses);
311
+
312
+
313
+ // this triggers recalculation of layout, so we get it once to not to trigger twice
314
+ var windowHeight = mfp.wH = _window.height();
315
+
316
+
317
+ var windowStyles = {};
318
+
319
+ if( mfp.fixedContentPos ) {
320
+ if(mfp._hasScrollBar(windowHeight)){
321
+ var s = mfp._getScrollbarSize();
322
+ if(s) {
323
+ windowStyles.marginRight = s;
324
+ }
325
+ }
326
+ }
327
+
328
+ if(mfp.fixedContentPos) {
329
+ if(!mfp.isIE7) {
330
+ windowStyles.overflow = 'hidden';
331
+ } else {
332
+ // ie7 double-scroll bug
333
+ $('body, html').css('overflow', 'hidden');
334
+ }
335
+ }
336
+
337
+
338
+
339
+ var classesToadd = mfp.st.mainClass;
340
+ if(mfp.isIE7) {
341
+ classesToadd += ' mfp-ie7';
342
+ }
343
+ if(classesToadd) {
344
+ mfp._addClassToMFP( classesToadd );
345
+ }
346
+
347
+ // add content
348
+ mfp.updateItemHTML();
349
+
350
+ _mfpTrigger('BuildControls');
351
+
352
+ // remove scrollbar, add margin e.t.c
353
+ $('html').css(windowStyles);
354
+
355
+ // add everything to DOM
356
+ mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );
357
+
358
+ // Save last focused element
359
+ mfp._lastFocusedEl = document.activeElement;
360
+
361
+ // Wait for next cycle to allow CSS transition
362
+ setTimeout(function() {
363
+
364
+ if(mfp.content) {
365
+ mfp._addClassToMFP(READY_CLASS);
366
+ mfp._setFocus();
367
+ } else {
368
+ // if content is not defined (not loaded e.t.c) we add class only for BG
369
+ mfp.bgOverlay.addClass(READY_CLASS);
370
+ }
371
+
372
+ // Trap the focus in popup
373
+ _document.on('focusin' + EVENT_NS, mfp._onFocusIn);
374
+
375
+ }, 16);
376
+
377
+ mfp.isOpen = true;
378
+ mfp.updateSize(windowHeight);
379
+ _mfpTrigger(OPEN_EVENT);
380
+
381
+ return data;
382
+ },
383
+
384
+ /**
385
+ * Closes the popup
386
+ */
387
+ close: function() {
388
+ if(!mfp.isOpen) return;
389
+ _mfpTrigger(BEFORE_CLOSE_EVENT);
390
+
391
+ mfp.isOpen = false;
392
+ // for CSS3 animation
393
+ if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {
394
+ mfp._addClassToMFP(REMOVING_CLASS);
395
+ setTimeout(function() {
396
+ mfp._close();
397
+ }, mfp.st.removalDelay);
398
+ } else {
399
+ mfp._close();
400
+ }
401
+ },
402
+
403
+ /**
404
+ * Helper for close() function
405
+ */
406
+ _close: function() {
407
+ _mfpTrigger(CLOSE_EVENT);
408
+
409
+ var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
410
+
411
+ mfp.bgOverlay.detach();
412
+ mfp.wrap.detach();
413
+ mfp.container.empty();
414
+
415
+ if(mfp.st.mainClass) {
416
+ classesToRemove += mfp.st.mainClass + ' ';
417
+ }
418
+
419
+ mfp._removeClassFromMFP(classesToRemove);
420
+
421
+ if(mfp.fixedContentPos) {
422
+ var windowStyles = {marginRight: ''};
423
+ if(mfp.isIE7) {
424
+ $('body, html').css('overflow', '');
425
+ } else {
426
+ windowStyles.overflow = '';
427
+ }
428
+ $('html').css(windowStyles);
429
+ }
430
+
431
+ _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
432
+ mfp.ev.off(EVENT_NS);
433
+
434
+ // clean up DOM elements that aren't removed
435
+ mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
436
+ mfp.bgOverlay.attr('class', 'mfp-bg');
437
+ mfp.container.attr('class', 'mfp-container');
438
+
439
+ // remove close button from target element
440
+ if(mfp.st.showCloseBtn &&
441
+ (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
442
+ if(mfp.currTemplate.closeBtn)
443
+ mfp.currTemplate.closeBtn.detach();
444
+ }
445
+
446
+
447
+ if(mfp.st.autoFocusLast && mfp._lastFocusedEl) {
448
+ $(mfp._lastFocusedEl).focus(); // put tab focus back
449
+ }
450
+ mfp.currItem = null;
451
+ mfp.content = null;
452
+ mfp.currTemplate = null;
453
+ mfp.prevHeight = 0;
454
+
455
+ _mfpTrigger(AFTER_CLOSE_EVENT);
456
+ },
457
+
458
+ updateSize: function(winHeight) {
459
+
460
+ if(mfp.isIOS) {
461
+ // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
462
+ var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
463
+ var height = window.innerHeight * zoomLevel;
464
+ mfp.wrap.css('height', height);
465
+ mfp.wH = height;
466
+ } else {
467
+ mfp.wH = winHeight || _window.height();
468
+ }
469
+ // Fixes #84: popup incorrectly positioned with position:relative on body
470
+ if(!mfp.fixedContentPos) {
471
+ mfp.wrap.css('height', mfp.wH);
472
+ }
473
+
474
+ _mfpTrigger('Resize');
475
+
476
+ },
477
+
478
+ /**
479
+ * Set content of popup based on current index
480
+ */
481
+ updateItemHTML: function() {
482
+ var item = mfp.items[mfp.index];
483
+
484
+ // Detach and perform modifications
485
+ mfp.contentContainer.detach();
486
+
487
+ if(mfp.content)
488
+ mfp.content.detach();
489
+
490
+ if(!item.parsed) {
491
+ item = mfp.parseEl( mfp.index );
492
+ }
493
+
494
+ var type = item.type;
495
+
496
+ _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
497
+ // BeforeChange event works like so:
498
+ // _mfpOn('BeforeChange', function(e, prevType, newType) { });
499
+
500
+ mfp.currItem = item;
501
+
502
+ if(!mfp.currTemplate[type]) {
503
+ var markup = mfp.st[type] ? mfp.st[type].markup : false;
504
+
505
+ // allows to modify markup
506
+ _mfpTrigger('FirstMarkupParse', markup);
507
+
508
+ if(markup) {
509
+ mfp.currTemplate[type] = $(markup);
510
+ } else {
511
+ // if there is no markup found we just define that template is parsed
512
+ mfp.currTemplate[type] = true;
513
+ }
514
+ }
515
+
516
+ if(_prevContentType && _prevContentType !== item.type) {
517
+ mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
518
+ }
519
+
520
+ var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
521
+ mfp.appendContent(newContent, type);
522
+
523
+ item.preloaded = true;
524
+
525
+ _mfpTrigger(CHANGE_EVENT, item);
526
+ _prevContentType = item.type;
527
+
528
+ // Append container back after its content changed
529
+ mfp.container.prepend(mfp.contentContainer);
530
+
531
+ _mfpTrigger('AfterChange');
532
+ },
533
+
534
+
535
+ /**
536
+ * Set HTML content of popup
537
+ */
538
+ appendContent: function(newContent, type) {
539
+ mfp.content = newContent;
540
+
541
+ if(newContent) {
542
+ if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
543
+ mfp.currTemplate[type] === true) {
544
+ // if there is no markup, we just append close button element inside
545
+ if(!mfp.content.find('.mfp-close').length) {
546
+ mfp.content.append(_getCloseBtn());
547
+ }
548
+ } else {
549
+ mfp.content = newContent;
550
+ }
551
+ } else {
552
+ mfp.content = '';
553
+ }
554
+
555
+ _mfpTrigger(BEFORE_APPEND_EVENT);
556
+ mfp.container.addClass('mfp-'+type+'-holder');
557
+
558
+ mfp.contentContainer.append(mfp.content);
559
+ },
560
+
561
+
562
+ /**
563
+ * Creates Magnific Popup data object based on given data
564
+ * @param {int} index Index of item to parse
565
+ */
566
+ parseEl: function(index) {
567
+ var item = mfp.items[index],
568
+ type;
569
+
570
+ if(item.tagName) {
571
+ item = { el: $(item) };
572
+ } else {
573
+ type = item.type;
574
+ item = { data: item, src: item.src };
575
+ }
576
+
577
+ if(item.el) {
578
+ var types = mfp.types;
579
+
580
+ // check for 'mfp-TYPE' class
581
+ for(var i = 0; i < types.length; i++) {
582
+ if( item.el.hasClass('mfp-'+types[i]) ) {
583
+ type = types[i];
584
+ break;
585
+ }
586
+ }
587
+
588
+ item.src = item.el.attr('data-mfp-src');
589
+ if(!item.src) {
590
+ item.src = item.el.attr('href');
591
+ }
592
+ }
593
+
594
+ item.type = type || mfp.st.type || 'inline';
595
+ item.index = index;
596
+ item.parsed = true;
597
+ mfp.items[index] = item;
598
+ _mfpTrigger('ElementParse', item);
599
+
600
+ return mfp.items[index];
601
+ },
602
+
603
+
604
+ /**
605
+ * Initializes single popup or a group of popups
606
+ */
607
+ addGroup: function(el, options) {
608
+ var eHandler = function(e) {
609
+ e.mfpEl = this;
610
+ mfp._openClick(e, el, options);
611
+ };
612
+
613
+ if(!options) {
614
+ options = {};
615
+ }
616
+
617
+ var eName = 'click.magnificPopup';
618
+ options.mainEl = el;
619
+
620
+ if(options.items) {
621
+ options.isObj = true;
622
+ el.off(eName).on(eName, eHandler);
623
+ } else {
624
+ options.isObj = false;
625
+ if(options.delegate) {
626
+ el.off(eName).on(eName, options.delegate , eHandler);
627
+ } else {
628
+ options.items = el;
629
+ el.off(eName).on(eName, eHandler);
630
+ }
631
+ }
632
+ },
633
+ _openClick: function(e, el, options) {
634
+ var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
635
+
636
+
637
+ if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
638
+ return;
639
+ }
640
+
641
+ var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
642
+
643
+ if(disableOn) {
644
+ if($.isFunction(disableOn)) {
645
+ if( !disableOn.call(mfp) ) {
646
+ return true;
647
+ }
648
+ } else { // else it's number
649
+ if( _window.width() < disableOn ) {
650
+ return true;
651
+ }
652
+ }
653
+ }
654
+
655
+ if(e.type) {
656
+ e.preventDefault();
657
+
658
+ // This will prevent popup from closing if element is inside and popup is already opened
659
+ if(mfp.isOpen) {
660
+ e.stopPropagation();
661
+ }
662
+ }
663
+
664
+ options.el = $(e.mfpEl);
665
+ if(options.delegate) {
666
+ options.items = el.find(options.delegate);
667
+ }
668
+ mfp.open(options);
669
+ },
670
+
671
+
672
+ /**
673
+ * Updates text on preloader
674
+ */
675
+ updateStatus: function(status, text) {
676
+
677
+ if(mfp.preloader) {
678
+ if(_prevStatus !== status) {
679
+ mfp.container.removeClass('mfp-s-'+_prevStatus);
680
+ }
681
+
682
+ if(!text && status === 'loading') {
683
+ text = mfp.st.tLoading;
684
+ }
685
+
686
+ var data = {
687
+ status: status,
688
+ text: text
689
+ };
690
+ // allows to modify status
691
+ _mfpTrigger('UpdateStatus', data);
692
+
693
+ status = data.status;
694
+ text = data.text;
695
+
696
+ mfp.preloader.html(text);
697
+
698
+ mfp.preloader.find('a').on('click', function(e) {
699
+ e.stopImmediatePropagation();
700
+ });
701
+
702
+ mfp.container.addClass('mfp-s-'+status);
703
+ _prevStatus = status;
704
+ }
705
+ },
706
+
707
+
708
+ /*
709
+ "Private" helpers that aren't private at all
710
+ */
711
+ // Check to close popup or not
712
+ // "target" is an element that was clicked
713
+ _checkIfClose: function(target) {
714
+
715
+ if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
716
+ return;
717
+ }
718
+
719
+ var closeOnContent = mfp.st.closeOnContentClick;
720
+ var closeOnBg = mfp.st.closeOnBgClick;
721
+
722
+ if(closeOnContent && closeOnBg) {
723
+ return true;
724
+ } else {
725
+
726
+ // We close the popup if click is on close button or on preloader. Or if there is no content.
727
+ if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
728
+ return true;
729
+ }
730
+
731
+ // if click is outside the content
732
+ if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
733
+ if(closeOnBg) {
734
+ // last check, if the clicked element is in DOM, (in case it's removed onclick)
735
+ if( $.contains(document, target) ) {
736
+ return true;
737
+ }
738
+ }
739
+ } else if(closeOnContent) {
740
+ return true;
741
+ }
742
+
743
+ }
744
+ return false;
745
+ },
746
+ _addClassToMFP: function(cName) {
747
+ mfp.bgOverlay.addClass(cName);
748
+ mfp.wrap.addClass(cName);
749
+ },
750
+ _removeClassFromMFP: function(cName) {
751
+ this.bgOverlay.removeClass(cName);
752
+ mfp.wrap.removeClass(cName);
753
+ },
754
+ _hasScrollBar: function(winHeight) {
755
+ return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
756
+ },
757
+ _setFocus: function() {
758
+ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
759
+ },
760
+ _onFocusIn: function(e) {
761
+ if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
762
+ mfp._setFocus();
763
+ return false;
764
+ }
765
+ },
766
+ _parseMarkup: function(template, values, item) {
767
+ var arr;
768
+ if(item.data) {
769
+ values = $.extend(item.data, values);
770
+ }
771
+ _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
772
+
773
+ $.each(values, function(key, value) {
774
+ if(value === undefined || value === false) {
775
+ return true;
776
+ }
777
+ arr = key.split('_');
778
+ if(arr.length > 1) {
779
+ var el = template.find(EVENT_NS + '-'+arr[0]);
780
+
781
+ if(el.length > 0) {
782
+ var attr = arr[1];
783
+ if(attr === 'replaceWith') {
784
+ if(el[0] !== value[0]) {
785
+ el.replaceWith(value);
786
+ }
787
+ } else if(attr === 'img') {
788
+ if(el.is('img')) {
789
+ el.attr('src', value);
790
+ } else {
791
+ el.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) );
792
+ }
793
+ } else {
794
+ el.attr(arr[1], value);
795
+ }
796
+ }
797
+
798
+ } else {
799
+ template.find(EVENT_NS + '-'+key).html(value);
800
+ }
801
+ });
802
+ },
803
+
804
+ _getScrollbarSize: function() {
805
+ // thx David
806
+ if(mfp.scrollbarSize === undefined) {
807
+ var scrollDiv = document.createElement("div");
808
+ scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
809
+ document.body.appendChild(scrollDiv);
810
+ mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
811
+ document.body.removeChild(scrollDiv);
812
+ }
813
+ return mfp.scrollbarSize;
814
+ }
815
+
816
+ }; /* MagnificPopup core prototype end */
817
+
818
+
819
+
820
+
821
+ /**
822
+ * Public static functions
823
+ */
824
+ $.magnificPopup = {
825
+ instance: null,
826
+ proto: MagnificPopup.prototype,
827
+ modules: [],
828
+
829
+ open: function(options, index) {
830
+ _checkInstance();
831
+
832
+ if(!options) {
833
+ options = {};
834
+ } else {
835
+ options = $.extend(true, {}, options);
836
+ }
837
+
838
+ options.isObj = true;
839
+ options.index = index || 0;
840
+ return this.instance.open(options);
841
+ },
842
+
843
+ close: function() {
844
+ return $.magnificPopup.instance && $.magnificPopup.instance.close();
845
+ },
846
+
847
+ registerModule: function(name, module) {
848
+ if(module.options) {
849
+ $.magnificPopup.defaults[name] = module.options;
850
+ }
851
+ $.extend(this.proto, module.proto);
852
+ this.modules.push(name);
853
+ },
854
+
855
+ defaults: {
856
+
857
+ // Info about options is in docs:
858
+ // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
859
+
860
+ disableOn: 0,
861
+
862
+ key: null,
863
+
864
+ midClick: false,
865
+
866
+ mainClass: '',
867
+
868
+ preloader: true,
869
+
870
+ focus: '', // CSS selector of input to focus after popup is opened
871
+
872
+ closeOnContentClick: false,
873
+
874
+ closeOnBgClick: true,
875
+
876
+ closeBtnInside: true,
877
+
878
+ showCloseBtn: true,
879
+
880
+ enableEscapeKey: true,
881
+
882
+ modal: false,
883
+
884
+ alignTop: false,
885
+
886
+ removalDelay: 0,
887
+
888
+ prependTo: null,
889
+
890
+ fixedContentPos: 'auto',
891
+
892
+ fixedBgPos: 'auto',
893
+
894
+ overflowY: 'auto',
895
+
896
+ closeMarkup: '<button title="%title%" type="button" class="mfp-close">&#215;</button>',
897
+
898
+ tClose: 'Close (Esc)',
899
+
900
+ tLoading: 'Loading...',
901
+
902
+ autoFocusLast: true
903
+
904
+ }
905
+ };
906
+
907
+
908
+
909
+ $.fn.magnificPopup = function(options) {
910
+ _checkInstance();
911
+
912
+ var jqEl = $(this);
913
+
914
+ // We call some API method of first param is a string
915
+ if (typeof options === "string" ) {
916
+
917
+ if(options === 'open') {
918
+ var items,
919
+ itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
920
+ index = parseInt(arguments[1], 10) || 0;
921
+
922
+ if(itemOpts.items) {
923
+ items = itemOpts.items[index];
924
+ } else {
925
+ items = jqEl;
926
+ if(itemOpts.delegate) {
927
+ items = items.find(itemOpts.delegate);
928
+ }
929
+ items = items.eq( index );
930
+ }
931
+ mfp._openClick({mfpEl:items}, jqEl, itemOpts);
932
+ } else {
933
+ if(mfp.isOpen)
934
+ mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
935
+ }
936
+
937
+ } else {
938
+ // clone options obj
939
+ options = $.extend(true, {}, options);
940
+
941
+ /*
942
+ * As Zepto doesn't support .data() method for objects
943
+ * and it works only in normal browsers
944
+ * we assign "options" object directly to the DOM element. FTW!
945
+ */
946
+ if(_isJQ) {
947
+ jqEl.data('magnificPopup', options);
948
+ } else {
949
+ jqEl[0].magnificPopup = options;
950
+ }
951
+
952
+ mfp.addGroup(jqEl, options);
953
+
954
+ }
955
+ return jqEl;
956
+ };
957
+
958
+ /*>>core*/
959
+
960
+ /*>>inline*/
961
+
962
+ var INLINE_NS = 'inline',
963
+ _hiddenClass,
964
+ _inlinePlaceholder,
965
+ _lastInlineElement,
966
+ _putInlineElementsBack = function() {
967
+ if(_lastInlineElement) {
968
+ _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
969
+ _lastInlineElement = null;
970
+ }
971
+ };
972
+
973
+ $.magnificPopup.registerModule(INLINE_NS, {
974
+ options: {
975
+ hiddenClass: 'hide', // will be appended with `mfp-` prefix
976
+ markup: '',
977
+ tNotFound: 'Content not found'
978
+ },
979
+ proto: {
980
+
981
+ initInline: function() {
982
+ mfp.types.push(INLINE_NS);
983
+
984
+ _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
985
+ _putInlineElementsBack();
986
+ });
987
+ },
988
+
989
+ getInline: function(item, template) {
990
+
991
+ _putInlineElementsBack();
992
+
993
+ if(item.src) {
994
+ var inlineSt = mfp.st.inline,
995
+ el = $(item.src);
996
+
997
+ if(el.length) {
998
+
999
+ // If target element has parent - we replace it with placeholder and put it back after popup is closed
1000
+ var parent = el[0].parentNode;
1001
+ if(parent && parent.tagName) {
1002
+ if(!_inlinePlaceholder) {
1003
+ _hiddenClass = inlineSt.hiddenClass;
1004
+ _inlinePlaceholder = _getEl(_hiddenClass);
1005
+ _hiddenClass = 'mfp-'+_hiddenClass;
1006
+ }
1007
+ // replace target inline element with placeholder
1008
+ _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
1009
+ }
1010
+
1011
+ mfp.updateStatus('ready');
1012
+ } else {
1013
+ mfp.updateStatus('error', inlineSt.tNotFound);
1014
+ el = $('<div>');
1015
+ }
1016
+
1017
+ item.inlineElement = el;
1018
+ return el;
1019
+ }
1020
+
1021
+ mfp.updateStatus('ready');
1022
+ mfp._parseMarkup(template, {}, item);
1023
+ return template;
1024
+ }
1025
+ }
1026
+ });
1027
+
1028
+ /*>>inline*/
1029
+
1030
+ /*>>ajax*/
1031
+ var AJAX_NS = 'ajax',
1032
+ _ajaxCur,
1033
+ _removeAjaxCursor = function() {
1034
+ if(_ajaxCur) {
1035
+ $(document.body).removeClass(_ajaxCur);
1036
+ }
1037
+ },
1038
+ _destroyAjaxRequest = function() {
1039
+ _removeAjaxCursor();
1040
+ if(mfp.req) {
1041
+ mfp.req.abort();
1042
+ }
1043
+ };
1044
+
1045
+ $.magnificPopup.registerModule(AJAX_NS, {
1046
+
1047
+ options: {
1048
+ settings: null,
1049
+ cursor: 'mfp-ajax-cur',
1050
+ tError: '<a href="%url%">The content</a> could not be loaded.'
1051
+ },
1052
+
1053
+ proto: {
1054
+ initAjax: function() {
1055
+ mfp.types.push(AJAX_NS);
1056
+ _ajaxCur = mfp.st.ajax.cursor;
1057
+
1058
+ _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
1059
+ _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
1060
+ },
1061
+ getAjax: function(item) {
1062
+
1063
+ if(_ajaxCur) {
1064
+ $(document.body).addClass(_ajaxCur);
1065
+ }
1066
+
1067
+ mfp.updateStatus('loading');
1068
+
1069
+ var opts = $.extend({
1070
+ url: item.src,
1071
+ success: function(data, textStatus, jqXHR) {
1072
+ var temp = {
1073
+ data:data,
1074
+ xhr:jqXHR
1075
+ };
1076
+
1077
+ _mfpTrigger('ParseAjax', temp);
1078
+
1079
+ mfp.appendContent( $(temp.data), AJAX_NS );
1080
+
1081
+ item.finished = true;
1082
+
1083
+ _removeAjaxCursor();
1084
+
1085
+ mfp._setFocus();
1086
+
1087
+ setTimeout(function() {
1088
+ mfp.wrap.addClass(READY_CLASS);
1089
+ }, 16);
1090
+
1091
+ mfp.updateStatus('ready');
1092
+
1093
+ _mfpTrigger('AjaxContentAdded');
1094
+ },
1095
+ error: function() {
1096
+ _removeAjaxCursor();
1097
+ item.finished = item.loadError = true;
1098
+ mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
1099
+ }
1100
+ }, mfp.st.ajax.settings);
1101
+
1102
+ mfp.req = $.ajax(opts);
1103
+
1104
+ return '';
1105
+ }
1106
+ }
1107
+ });
1108
+
1109
+ /*>>ajax*/
1110
+
1111
+ /*>>image*/
1112
+ var _imgInterval,
1113
+ _getTitle = function(item) {
1114
+ if(item.data && item.data.title !== undefined)
1115
+ return item.data.title;
1116
+
1117
+ var src = mfp.st.image.titleSrc;
1118
+
1119
+ if(src) {
1120
+ if($.isFunction(src)) {
1121
+ return src.call(mfp, item);
1122
+ } else if(item.el) {
1123
+ return item.el.attr(src) || '';
1124
+ }
1125
+ }
1126
+ return '';
1127
+ };
1128
+
1129
+ $.magnificPopup.registerModule('image', {
1130
+
1131
+ options: {
1132
+ markup: '<div class="mfp-figure">'+
1133
+ '<div class="mfp-close"></div>'+
1134
+ '<figure>'+
1135
+ '<div class="mfp-img"></div>'+
1136
+ '<figcaption>'+
1137
+ '<div class="mfp-bottom-bar">'+
1138
+ '<div class="mfp-title"></div>'+
1139
+ '<div class="mfp-counter"></div>'+
1140
+ '</div>'+
1141
+ '</figcaption>'+
1142
+ '</figure>'+
1143
+ '</div>',
1144
+ cursor: 'mfp-zoom-out-cur',
1145
+ titleSrc: 'title',
1146
+ verticalFit: true,
1147
+ tError: '<a href="%url%">The image</a> could not be loaded.'
1148
+ },
1149
+
1150
+ proto: {
1151
+ initImage: function() {
1152
+ var imgSt = mfp.st.image,
1153
+ ns = '.image';
1154
+
1155
+ mfp.types.push('image');
1156
+
1157
+ _mfpOn(OPEN_EVENT+ns, function() {
1158
+ if(mfp.currItem.type === 'image' && imgSt.cursor) {
1159
+ $(document.body).addClass(imgSt.cursor);
1160
+ }
1161
+ });
1162
+
1163
+ _mfpOn(CLOSE_EVENT+ns, function() {
1164
+ if(imgSt.cursor) {
1165
+ $(document.body).removeClass(imgSt.cursor);
1166
+ }
1167
+ _window.off('resize' + EVENT_NS);
1168
+ });
1169
+
1170
+ _mfpOn('Resize'+ns, mfp.resizeImage);
1171
+ if(mfp.isLowIE) {
1172
+ _mfpOn('AfterChange', mfp.resizeImage);
1173
+ }
1174
+ },
1175
+ resizeImage: function() {
1176
+ var item = mfp.currItem;
1177
+ if(!item || !item.img) return;
1178
+
1179
+ if(mfp.st.image.verticalFit) {
1180
+ var decr = 0;
1181
+ // fix box-sizing in ie7/8
1182
+ if(mfp.isLowIE) {
1183
+ decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
1184
+ }
1185
+ item.img.css('max-height', mfp.wH-decr);
1186
+ }
1187
+ },
1188
+ _onImageHasSize: function(item) {
1189
+ if(item.img) {
1190
+
1191
+ item.hasSize = true;
1192
+
1193
+ if(_imgInterval) {
1194
+ clearInterval(_imgInterval);
1195
+ }
1196
+
1197
+ item.isCheckingImgSize = false;
1198
+
1199
+ _mfpTrigger('ImageHasSize', item);
1200
+
1201
+ if(item.imgHidden) {
1202
+ if(mfp.content)
1203
+ mfp.content.removeClass('mfp-loading');
1204
+
1205
+ item.imgHidden = false;
1206
+ }
1207
+
1208
+ }
1209
+ },
1210
+
1211
+ /**
1212
+ * Function that loops until the image has size to display elements that rely on it asap
1213
+ */
1214
+ findImageSize: function(item) {
1215
+
1216
+ var counter = 0,
1217
+ img = item.img[0],
1218
+ mfpSetInterval = function(delay) {
1219
+
1220
+ if(_imgInterval) {
1221
+ clearInterval(_imgInterval);
1222
+ }
1223
+ // decelerating interval that checks for size of an image
1224
+ _imgInterval = setInterval(function() {
1225
+ if(img.naturalWidth > 0) {
1226
+ mfp._onImageHasSize(item);
1227
+ return;
1228
+ }
1229
+
1230
+ if(counter > 200) {
1231
+ clearInterval(_imgInterval);
1232
+ }
1233
+
1234
+ counter++;
1235
+ if(counter === 3) {
1236
+ mfpSetInterval(10);
1237
+ } else if(counter === 40) {
1238
+ mfpSetInterval(50);
1239
+ } else if(counter === 100) {
1240
+ mfpSetInterval(500);
1241
+ }
1242
+ }, delay);
1243
+ };
1244
+
1245
+ mfpSetInterval(1);
1246
+ },
1247
+
1248
+ getImage: function(item, template) {
1249
+
1250
+ var guard = 0,
1251
+
1252
+ // image load complete handler
1253
+ onLoadComplete = function() {
1254
+ if(item) {
1255
+ if (item.img[0].complete) {
1256
+ item.img.off('.mfploader');
1257
+
1258
+ if(item === mfp.currItem){
1259
+ mfp._onImageHasSize(item);
1260
+
1261
+ mfp.updateStatus('ready');
1262
+ }
1263
+
1264
+ item.hasSize = true;
1265
+ item.loaded = true;
1266
+
1267
+ _mfpTrigger('ImageLoadComplete');
1268
+
1269
+ }
1270
+ else {
1271
+ // if image complete check fails 200 times (20 sec), we assume that there was an error.
1272
+ guard++;
1273
+ if(guard < 200) {
1274
+ setTimeout(onLoadComplete,100);
1275
+ } else {
1276
+ onLoadError();
1277
+ }
1278
+ }
1279
+ }
1280
+ },
1281
+
1282
+ // image error handler
1283
+ onLoadError = function() {
1284
+ if(item) {
1285
+ item.img.off('.mfploader');
1286
+ if(item === mfp.currItem){
1287
+ mfp._onImageHasSize(item);
1288
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1289
+ }
1290
+
1291
+ item.hasSize = true;
1292
+ item.loaded = true;
1293
+ item.loadError = true;
1294
+ }
1295
+ },
1296
+ imgSt = mfp.st.image;
1297
+
1298
+
1299
+ var el = template.find('.mfp-img');
1300
+ if(el.length) {
1301
+ var img = document.createElement('img');
1302
+ img.className = 'mfp-img';
1303
+ if(item.el && item.el.find('img').length) {
1304
+ img.alt = item.el.find('img').attr('alt');
1305
+ }
1306
+ item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
1307
+ img.src = item.src;
1308
+
1309
+ // without clone() "error" event is not firing when IMG is replaced by new IMG
1310
+ // TODO: find a way to avoid such cloning
1311
+ if(el.is('img')) {
1312
+ item.img = item.img.clone();
1313
+ }
1314
+
1315
+ img = item.img[0];
1316
+ if(img.naturalWidth > 0) {
1317
+ item.hasSize = true;
1318
+ } else if(!img.width) {
1319
+ item.hasSize = false;
1320
+ }
1321
+ }
1322
+
1323
+ mfp._parseMarkup(template, {
1324
+ title: _getTitle(item),
1325
+ img_replaceWith: item.img
1326
+ }, item);
1327
+
1328
+ mfp.resizeImage();
1329
+
1330
+ if(item.hasSize) {
1331
+ if(_imgInterval) clearInterval(_imgInterval);
1332
+
1333
+ if(item.loadError) {
1334
+ template.addClass('mfp-loading');
1335
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1336
+ } else {
1337
+ template.removeClass('mfp-loading');
1338
+ mfp.updateStatus('ready');
1339
+ }
1340
+ return template;
1341
+ }
1342
+
1343
+ mfp.updateStatus('loading');
1344
+ item.loading = true;
1345
+
1346
+ if(!item.hasSize) {
1347
+ item.imgHidden = true;
1348
+ template.addClass('mfp-loading');
1349
+ mfp.findImageSize(item);
1350
+ }
1351
+
1352
+ return template;
1353
+ }
1354
+ }
1355
+ });
1356
+
1357
+ /*>>image*/
1358
+
1359
+ /*>>zoom*/
1360
+ var hasMozTransform,
1361
+ getHasMozTransform = function() {
1362
+ if(hasMozTransform === undefined) {
1363
+ hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
1364
+ }
1365
+ return hasMozTransform;
1366
+ };
1367
+
1368
+ $.magnificPopup.registerModule('zoom', {
1369
+
1370
+ options: {
1371
+ enabled: false,
1372
+ easing: 'ease-in-out',
1373
+ duration: 300,
1374
+ opener: function(element) {
1375
+ return element.is('img') ? element : element.find('img');
1376
+ }
1377
+ },
1378
+
1379
+ proto: {
1380
+
1381
+ initZoom: function() {
1382
+ var zoomSt = mfp.st.zoom,
1383
+ ns = '.zoom',
1384
+ image;
1385
+
1386
+ if(!zoomSt.enabled || !mfp.supportsTransition) {
1387
+ return;
1388
+ }
1389
+
1390
+ var duration = zoomSt.duration,
1391
+ getElToAnimate = function(image) {
1392
+ var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
1393
+ transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
1394
+ cssObj = {
1395
+ position: 'fixed',
1396
+ zIndex: 9999,
1397
+ left: 0,
1398
+ top: 0,
1399
+ '-webkit-backface-visibility': 'hidden'
1400
+ },
1401
+ t = 'transition';
1402
+
1403
+ cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
1404
+
1405
+ newImg.css(cssObj);
1406
+ return newImg;
1407
+ },
1408
+ showMainContent = function() {
1409
+ mfp.content.css('visibility', 'visible');
1410
+ },
1411
+ openTimeout,
1412
+ animatedImg;
1413
+
1414
+ _mfpOn('BuildControls'+ns, function() {
1415
+ if(mfp._allowZoom()) {
1416
+
1417
+ clearTimeout(openTimeout);
1418
+ mfp.content.css('visibility', 'hidden');
1419
+
1420
+ // Basically, all code below does is clones existing image, puts in on top of the current one and animated it
1421
+
1422
+ image = mfp._getItemToZoom();
1423
+
1424
+ if(!image) {
1425
+ showMainContent();
1426
+ return;
1427
+ }
1428
+
1429
+ animatedImg = getElToAnimate(image);
1430
+
1431
+ animatedImg.css( mfp._getOffset() );
1432
+
1433
+ mfp.wrap.append(animatedImg);
1434
+
1435
+ openTimeout = setTimeout(function() {
1436
+ animatedImg.css( mfp._getOffset( true ) );
1437
+ openTimeout = setTimeout(function() {
1438
+
1439
+ showMainContent();
1440
+
1441
+ setTimeout(function() {
1442
+ animatedImg.remove();
1443
+ image = animatedImg = null;
1444
+ _mfpTrigger('ZoomAnimationEnded');
1445
+ }, 16); // avoid blink when switching images
1446
+
1447
+ }, duration); // this timeout equals animation duration
1448
+
1449
+ }, 16); // by adding this timeout we avoid short glitch at the beginning of animation
1450
+
1451
+
1452
+ // Lots of timeouts...
1453
+ }
1454
+ });
1455
+ _mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
1456
+ if(mfp._allowZoom()) {
1457
+
1458
+ clearTimeout(openTimeout);
1459
+
1460
+ mfp.st.removalDelay = duration;
1461
+
1462
+ if(!image) {
1463
+ image = mfp._getItemToZoom();
1464
+ if(!image) {
1465
+ return;
1466
+ }
1467
+ animatedImg = getElToAnimate(image);
1468
+ }
1469
+
1470
+ animatedImg.css( mfp._getOffset(true) );
1471
+ mfp.wrap.append(animatedImg);
1472
+ mfp.content.css('visibility', 'hidden');
1473
+
1474
+ setTimeout(function() {
1475
+ animatedImg.css( mfp._getOffset() );
1476
+ }, 16);
1477
+ }
1478
+
1479
+ });
1480
+
1481
+ _mfpOn(CLOSE_EVENT+ns, function() {
1482
+ if(mfp._allowZoom()) {
1483
+ showMainContent();
1484
+ if(animatedImg) {
1485
+ animatedImg.remove();
1486
+ }
1487
+ image = null;
1488
+ }
1489
+ });
1490
+ },
1491
+
1492
+ _allowZoom: function() {
1493
+ return mfp.currItem.type === 'image';
1494
+ },
1495
+
1496
+ _getItemToZoom: function() {
1497
+ if(mfp.currItem.hasSize) {
1498
+ return mfp.currItem.img;
1499
+ } else {
1500
+ return false;
1501
+ }
1502
+ },
1503
+
1504
+ // Get element postion relative to viewport
1505
+ _getOffset: function(isLarge) {
1506
+ var el;
1507
+ if(isLarge) {
1508
+ el = mfp.currItem.img;
1509
+ } else {
1510
+ el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
1511
+ }
1512
+
1513
+ var offset = el.offset();
1514
+ var paddingTop = parseInt(el.css('padding-top'),10);
1515
+ var paddingBottom = parseInt(el.css('padding-bottom'),10);
1516
+ offset.top -= ( $(window).scrollTop() - paddingTop );
1517
+
1518
+
1519
+ /*
1520
+
1521
+ Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
1522
+
1523
+ */
1524
+ var obj = {
1525
+ width: el.width(),
1526
+ // fix Zepto height+padding issue
1527
+ height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
1528
+ };
1529
+
1530
+ // I hate to do this, but there is no another option
1531
+ if( getHasMozTransform() ) {
1532
+ obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
1533
+ } else {
1534
+ obj.left = offset.left;
1535
+ obj.top = offset.top;
1536
+ }
1537
+ return obj;
1538
+ }
1539
+
1540
+ }
1541
+ });
1542
+
1543
+
1544
+
1545
+ /*>>zoom*/
1546
+
1547
+ /*>>iframe*/
1548
+
1549
+ var IFRAME_NS = 'iframe',
1550
+ _emptyPage = '//about:blank',
1551
+
1552
+ _fixIframeBugs = function(isShowing) {
1553
+ if(mfp.currTemplate[IFRAME_NS]) {
1554
+ var el = mfp.currTemplate[IFRAME_NS].find('iframe');
1555
+ if(el.length) {
1556
+ // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
1557
+ if(!isShowing) {
1558
+ el[0].src = _emptyPage;
1559
+ }
1560
+
1561
+ // IE8 black screen bug fix
1562
+ if(mfp.isIE8) {
1563
+ el.css('display', isShowing ? 'block' : 'none');
1564
+ }
1565
+ }
1566
+ }
1567
+ };
1568
+
1569
+ $.magnificPopup.registerModule(IFRAME_NS, {
1570
+
1571
+ options: {
1572
+ markup: '<div class="mfp-iframe-scaler">'+
1573
+ '<div class="mfp-close"></div>'+
1574
+ '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
1575
+ '</div>',
1576
+
1577
+ srcAction: 'iframe_src',
1578
+
1579
+ // we don't care and support only one default type of URL by default
1580
+ patterns: {
1581
+ youtube: {
1582
+ index: 'youtube.com',
1583
+ id: 'v=',
1584
+ src: '//www.youtube.com/embed/%id%?autoplay=1'
1585
+ },
1586
+ vimeo: {
1587
+ index: 'vimeo.com/',
1588
+ id: '/',
1589
+ src: '//player.vimeo.com/video/%id%?autoplay=1'
1590
+ },
1591
+ gmaps: {
1592
+ index: '//maps.google.',
1593
+ src: '%id%&output=embed'
1594
+ }
1595
+ }
1596
+ },
1597
+
1598
+ proto: {
1599
+ initIframe: function() {
1600
+ mfp.types.push(IFRAME_NS);
1601
+
1602
+ _mfpOn('BeforeChange', function(e, prevType, newType) {
1603
+ if(prevType !== newType) {
1604
+ if(prevType === IFRAME_NS) {
1605
+ _fixIframeBugs(); // iframe if removed
1606
+ } else if(newType === IFRAME_NS) {
1607
+ _fixIframeBugs(true); // iframe is showing
1608
+ }
1609
+ }// else {
1610
+ // iframe source is switched, don't do anything
1611
+ //}
1612
+ });
1613
+
1614
+ _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
1615
+ _fixIframeBugs();
1616
+ });
1617
+ },
1618
+
1619
+ getIframe: function(item, template) {
1620
+ var embedSrc = item.src;
1621
+ var iframeSt = mfp.st.iframe;
1622
+
1623
+ $.each(iframeSt.patterns, function() {
1624
+ if(embedSrc.indexOf( this.index ) > -1) {
1625
+ if(this.id) {
1626
+ if(typeof this.id === 'string') {
1627
+ embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
1628
+ } else {
1629
+ embedSrc = this.id.call( this, embedSrc );
1630
+ }
1631
+ }
1632
+ embedSrc = this.src.replace('%id%', embedSrc );
1633
+ return false; // break;
1634
+ }
1635
+ });
1636
+
1637
+ var dataObj = {};
1638
+ if(iframeSt.srcAction) {
1639
+ dataObj[iframeSt.srcAction] = embedSrc;
1640
+ }
1641
+ mfp._parseMarkup(template, dataObj, item);
1642
+
1643
+ mfp.updateStatus('ready');
1644
+
1645
+ return template;
1646
+ }
1647
+ }
1648
+ });
1649
+
1650
+
1651
+
1652
+ /*>>iframe*/
1653
+
1654
+ /*>>gallery*/
1655
+ /**
1656
+ * Get looped index depending on number of slides
1657
+ */
1658
+ var _getLoopedId = function(index) {
1659
+ var numSlides = mfp.items.length;
1660
+ if(index > numSlides - 1) {
1661
+ return index - numSlides;
1662
+ } else if(index < 0) {
1663
+ return numSlides + index;
1664
+ }
1665
+ return index;
1666
+ },
1667
+ _replaceCurrTotal = function(text, curr, total) {
1668
+ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
1669
+ };
1670
+
1671
+ $.magnificPopup.registerModule('gallery', {
1672
+
1673
+ options: {
1674
+ enabled: false,
1675
+ arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
1676
+ preload: [0,2],
1677
+ navigateByImgClick: true,
1678
+ arrows: true,
1679
+
1680
+ tPrev: 'Previous (Left arrow key)',
1681
+ tNext: 'Next (Right arrow key)',
1682
+ tCounter: '%curr% of %total%'
1683
+ },
1684
+
1685
+ proto: {
1686
+ initGallery: function() {
1687
+
1688
+ var gSt = mfp.st.gallery,
1689
+ ns = '.mfp-gallery';
1690
+
1691
+ mfp.direction = true; // true - next, false - prev
1692
+
1693
+ if(!gSt || !gSt.enabled ) return false;
1694
+
1695
+ _wrapClasses += ' mfp-gallery';
1696
+
1697
+ _mfpOn(OPEN_EVENT+ns, function() {
1698
+
1699
+ if(gSt.navigateByImgClick) {
1700
+ mfp.wrap.on('click'+ns, '.mfp-img', function() {
1701
+ if(mfp.items.length > 1) {
1702
+ mfp.next();
1703
+ return false;
1704
+ }
1705
+ });
1706
+ }
1707
+
1708
+ _document.on('keydown'+ns, function(e) {
1709
+ if (e.keyCode === 37) {
1710
+ mfp.prev();
1711
+ } else if (e.keyCode === 39) {
1712
+ mfp.next();
1713
+ }
1714
+ });
1715
+ });
1716
+
1717
+ _mfpOn('UpdateStatus'+ns, function(e, data) {
1718
+ if(data.text) {
1719
+ data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
1720
+ }
1721
+ });
1722
+
1723
+ _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
1724
+ var l = mfp.items.length;
1725
+ values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
1726
+ });
1727
+
1728
+ _mfpOn('BuildControls' + ns, function() {
1729
+ if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
1730
+ var markup = gSt.arrowMarkup,
1731
+ arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
1732
+ arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
1733
+
1734
+ arrowLeft.click(function() {
1735
+ mfp.prev();
1736
+ });
1737
+ arrowRight.click(function() {
1738
+ mfp.next();
1739
+ });
1740
+
1741
+ mfp.container.append(arrowLeft.add(arrowRight));
1742
+ }
1743
+ });
1744
+
1745
+ _mfpOn(CHANGE_EVENT+ns, function() {
1746
+ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
1747
+
1748
+ mfp._preloadTimeout = setTimeout(function() {
1749
+ mfp.preloadNearbyImages();
1750
+ mfp._preloadTimeout = null;
1751
+ }, 16);
1752
+ });
1753
+
1754
+
1755
+ _mfpOn(CLOSE_EVENT+ns, function() {
1756
+ _document.off(ns);
1757
+ mfp.wrap.off('click'+ns);
1758
+ mfp.arrowRight = mfp.arrowLeft = null;
1759
+ });
1760
+
1761
+ },
1762
+ next: function() {
1763
+ mfp.direction = true;
1764
+ mfp.index = _getLoopedId(mfp.index + 1);
1765
+ mfp.updateItemHTML();
1766
+ },
1767
+ prev: function() {
1768
+ mfp.direction = false;
1769
+ mfp.index = _getLoopedId(mfp.index - 1);
1770
+ mfp.updateItemHTML();
1771
+ },
1772
+ goTo: function(newIndex) {
1773
+ mfp.direction = (newIndex >= mfp.index);
1774
+ mfp.index = newIndex;
1775
+ mfp.updateItemHTML();
1776
+ },
1777
+ preloadNearbyImages: function() {
1778
+ var p = mfp.st.gallery.preload,
1779
+ preloadBefore = Math.min(p[0], mfp.items.length),
1780
+ preloadAfter = Math.min(p[1], mfp.items.length),
1781
+ i;
1782
+
1783
+ for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
1784
+ mfp._preloadItem(mfp.index+i);
1785
+ }
1786
+ for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
1787
+ mfp._preloadItem(mfp.index-i);
1788
+ }
1789
+ },
1790
+ _preloadItem: function(index) {
1791
+ index = _getLoopedId(index);
1792
+
1793
+ if(mfp.items[index].preloaded) {
1794
+ return;
1795
+ }
1796
+
1797
+ var item = mfp.items[index];
1798
+ if(!item.parsed) {
1799
+ item = mfp.parseEl( index );
1800
+ }
1801
+
1802
+ _mfpTrigger('LazyLoad', item);
1803
+
1804
+ if(item.type === 'image') {
1805
+ item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
1806
+ item.hasSize = true;
1807
+ }).on('error.mfploader', function() {
1808
+ item.hasSize = true;
1809
+ item.loadError = true;
1810
+ _mfpTrigger('LazyLoadError', item);
1811
+ }).attr('src', item.src);
1812
+ }
1813
+
1814
+
1815
+ item.preloaded = true;
1816
+ }
1817
+ }
1818
+ });
1819
+
1820
+ /*>>gallery*/
1821
+
1822
+ /*>>retina*/
1823
+
1824
+ var RETINA_NS = 'retina';
1825
+
1826
+ $.magnificPopup.registerModule(RETINA_NS, {
1827
+ options: {
1828
+ replaceSrc: function(item) {
1829
+ return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
1830
+ },
1831
+ ratio: 1 // Function or number. Set to 1 to disable.
1832
+ },
1833
+ proto: {
1834
+ initRetina: function() {
1835
+ if(window.devicePixelRatio > 1) {
1836
+
1837
+ var st = mfp.st.retina,
1838
+ ratio = st.ratio;
1839
+
1840
+ ratio = !isNaN(ratio) ? ratio : ratio();
1841
+
1842
+ if(ratio > 1) {
1843
+ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
1844
+ item.img.css({
1845
+ 'max-width': item.img[0].naturalWidth / ratio,
1846
+ 'width': '100%'
1847
+ });
1848
+ });
1849
+ _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
1850
+ item.src = st.replaceSrc(item, ratio);
1851
+ });
1852
+ }
1853
+ }
1854
+
1855
+ }
1856
+ }
1857
+ });
1858
+
1859
+ /*>>retina*/
1860
+ _checkInstance(); }));