PageSourceSearch

https://www.brustoperation-hannover.de/typo3temp/compressor/merged…3932fd627d1b0256ef5b3ecb3cedc.1763990915.js

js brustoperation-hannover.de collected 2026-10-07 04:06:29 UTC 525,063 bytes, 9,069 lines download raw bytes

vendor: 4,041 bytes, lines 1-3
1
2/*! jQuery v1.12.3 | (c) jQuery Foundation | jquery.org/license */
3!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date}
vendor: 3,521 bytes, line 3
3,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}
vendor: 9,959 bytes, line 3
3function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)}
vendor: 14,558 bytes, line 3
3,input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0;
3�
vendor: 20,723 bytes, lines 3-4
3
4}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.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",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="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 ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={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:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);
vendor: 11,307 bytes, line 4
4if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.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%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ra(b),i=l.boxSizing&&"border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Sa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Oa.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+eb(b,c,e||(i?"border":"content"),f,h)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},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":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){
4
5return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{
vendor: 20,468 bytes, line 5
5marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];
vendor: 4,549 bytes, line 5
5else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};
vendor: 6,874 bytes, line 5
5if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0
vendor: 2,793 bytes, lines 5-8
5;
6})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});
7
8!function(e){"use strict";var t={i18n:{ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]}
8,pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","ons","Tor","Fre","lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,closeOnDateSelect:!1,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,a=this.length;n<a;n++)if(this[n]===e)return n;return-1}),e.fn.xdsoftScroller=function(t){return this.each(function(){var n=e(this);if(!e(this).hasClass("xdsoft_scroller_box")){var a=function(e){var t={x:0,y:0};if("touchstart"==e.type||"touchmove"==e.type||"touchend"==e.type||"touchcancel"==e.type){var n=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];t.x=n.pageX,t.y=n.pageY}else"mousedown"!=e.type&&"mouseup"!=e.type&&"mousemove"!=e.type&&"mouseover"!=e.type&&"mouseout"!=e.type&&"mouseenter"!=e.type&&"mouseleave"!=e.type||(t.x=e.pageX,t.y=e.pageY);return t},r=0,o=n.children().eq(0),s=n[0].clientHeight,i=o[0].offsetHeight,d=e('<div class="xdsoft_scrollbar"></div>'),u=e('<div class="xdsoft_scroller"></div>'),c=100,l=!1;d.append(u),n.addClass("xdsoft_scroller_box").append(d),u.on("mousedown.xdsoft_scroller",function(a){s||n.trigger("resize_scroll.xdsoft_scroller",[t]);var o=a.pageY,i=parseInt(u.css("margin-top")),l=d[0].offsetHeight;e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function f(){e([document.body,window]).off("mouseup.xdsoft_scroller",f).off("mousemove.xdsoft_scroller",r).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",r=function(e){var t=e.pageY-o+i;t<0&&(t=0),t+u[0].offsetHeight>l&&(t=l-u[0].offsetHeight),n.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])})}),n.on("scroll_element.xdsoft_scroller",function(e,t){s||n.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:t<0||isNaN(t)?0:t,u.css("margin-top",c*t),o.css("marginTop",-parseInt((i-s)*t))}).on("resize_scroll.xdsoft_scroller",function(e,t,a){s=n[0].clientHeight,i=o[0].offsetHeight;var r=s/i,l=r*d[0].offsetHeight;r>1?u.hide():(u.show(),u.css("height",parseInt(l>10?l:10)),c=d[0].offsetHeight-u[0].offsetHeight,a!==!0&&n.trigger("scroll_element.xdsoft_scroller",[t?t:Math.abs(parseInt(o.css("marginTop")))/(i-s)]))}),n.mousewheel&&n.mousewheel(function(e,t,a,r){var d=Math.abs(parseInt(o.css("marginTop")));return n.trigger("scroll_element.xdsoft_scroller",[(d-20*t)/(i-s)]),e.stopPropagation(),!1}),n.on("touchstart",function(e){l=a(e)}),n.on("touchmove",function(e){if(l){var t=a(e),r=Math.abs(parseInt(o.css("marginTop")));n.trigger("scroll_element.xdsoft_scroller",[(r-(t.y-l.y))/(i-s)]),e.stopPropagation(),e.preventDefault()}}),n.on("touchend touchcancel",function(e){l=!1})}n.trigger("resize_scroll.xdsoft_scroller",[t])})},e.fn.datetimepicker=function(n){var a=48,r=57,o=96,s=105,i=17,d=46,u=13,c=27,l=8,f=37,m=38,h=39,g=40,p=9,x=116,v=65,y=67,D=86,T=90,w=89,b=!1,_=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend({},t),M=0,k=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(n){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(
8M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||S(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})},S=function(t){function n(){var e=_.value?_.value:t&&t.val&&t.val()?t.val():"";return e&&W.isValidDate(e=Date.parseDate(e,_.format))?M.data("changed",!0):e="",e||_.startDate===!1||(e=W.strToDateTime(_.startDate)),e?e:0}var M=e("<div "+(_.id?'id="'+_.id+'"':"")+" "+(_.style?'style="'+_.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_noselect '+_.className+'"></div>'),k=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),S=e('<div class="xdsoft_datepicker active"></div>'),O=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span></div><div class="xdsoft_label xdsoft_year"><span></span></div><button type="button" class="xdsoft_next"></button></div>'),F=e('<div class="xdsoft_calendar"></div>'),I=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),C=I.find(".xdsoft_time_box").eq(0),H=e('<div class="xdsoft_time_variant"></div>'),Y=e('<div class="xdsoft_scrollbar"></div>'),P=(e('<div class="xdsoft_scroller"></div>'),e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>')),A=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>');O.find(".xdsoft_month span").after(P),O.find(".xdsoft_year span").after(A),O.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){O.find(".xdsoft_select").hide();var n=e(this).find(".xdsoft_select").eq(0),a=0,r=0;W.currentTime&&(a=W.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n.show();for(var o=n.find("div.xdsoft_option"),s=0;s<o.length&&o.eq(s).data("value")!=a;s++)r+=o[0].offsetHeight;return n.xdsoftScroller(r/(n.children()[0].offsetHeight-n[0].clientHeight)),t.stopPropagation(),!1}),O.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(t){W&&W.currentTime&&W.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),M.trigger("xchange.xdsoft"),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input"))}),M.setOptions=function(n){if(_=e.extend(!0,{},_,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(_.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(_.weekends=e.extend(!0,[],n.weekends)),!_.open&&!_.opened||_.inline||t.trigger("open.xdsoft"),_.inline&&(M.addClass("xdsoft_inline"),t.after(M).hide(),M.trigger("afterOpen.xdsoft")),_.inverseButton&&(_.next="xdsoft_prev",_.prev="xdsoft_next"),_.datepicker?S.addClass("active"):S.removeClass("active"),_.timepicker?I.addClass("active"):I.removeClass("active"),_.value&&(t&&t.val&&t.val(_.value),W.setCurrentTime(_.value)),isNaN(_.dayOfWeekStart)||parseInt(_.dayOfWeekStart)<0||parseInt(_.dayOfWeekStart)>6?_.dayOfWeekStart=0:_.dayOfWeekStart=parseInt(_.dayOfWeekStart),_.timepickerScrollbar||Y.hide(),_.minDate&&/^-(.*)$/.test(_.minDate)&&(_.minDate=W.strToDateTime(_.minDate).dateFormat(_.formatDate)),_.maxDate&&/^\+(.*)$/.test(_.maxDate)&&(_.maxDate=W.strToDateTime(_.maxDate).dateFormat(_.formatDate)),O.find(".xdsoft_today_button").css("visibility",_.todayButton?"visible":"hidden"),_.mask){var k=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},F=function(e,t){var e="string"==typeof e||e instanceof String?document.getElementById(e):e;if(!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd(t),n.moveStart(t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)},C=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(n).test(t)};switch(t.off("keydown.xdsoft"),!0){case _.mask===!0:_.mask=_.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59");case"string"==e.type(_.mask):C(_.mask,t.val())||t.val(_.mask.replace(/[0-9]/g,"_")),t.on("key
8down.xdsoft",function(n){var M=this.value,S=n.which;switch(!0){case S>=a&&S<=r||S>=o&&S<=s||S==l||S==d:var O=k(this),I=S!=l&&S!=d?String.fromCharCode(o<=S&&S<=s?S-a:S):"_";for(S!=l&&S!=d||!O||(O--,I="_");/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;if(M=M.substr(0,O)+I+M.substr(O+1),""==e.trim(M))M=_.mask.replace(/[0-9]/g,"_");else if(O==_.mask.length)break;for(O+=S==l||S==d?0:1;/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;C(_.mask,M)?(this.value=M,F(this,O)):""==e.trim(M)?this.value=_.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft");break;case!!~[v,y,D,T,w].indexOf(S)&&b:case!!~[c,m,g,f,h,x,i,p,u].indexOf(S):return!0}return n.preventDefault(),!1})}}_.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){_.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),M.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),_.format)?M.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(W.now().dateFormat(_.format)),M.data("xdsoft_datetime").setCurrentTime(e(this).val())),M.trigger("changedatetime.xdsoft")}),_.dayOfWeekStartPrev=0==_.dayOfWeekStart?6:_.dayOfWeekStart-1,M.trigger("xchange.xdsoft")},M.data("options",_).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),P.hide(),!1});var N=I.find(".xdsoft_time_box");N.append(H),N.xdsoftScroller(),M.on("afterOpen.xdsoft",function(){N.xdsoftScroller()}),M.append(S).append(I),_.withoutCopyright!==!0&&M.append(k),S.append(O).append(F),e("body").append(M);var W=new function(){var e=this;e.now=function(){var e=new Date;return _.yearOffset&&e.setFullYear(e.getFullYear()+_.yearOffset),e},e.currentTime=this.now(),e.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),M.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var t=e.currentTime.getMonth()+1;return 12==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),t=0),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.prevMonth=function(){var t=e.currentTime.getMonth()-1;return t==-1&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),t=11),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.strToDateTime=function(t){var n,a,r=[];return(r=/^(\+|\-)(.*)$/.exec(t))&&(r[2]=Date.parseDate(r[2],_.formatDate))?(n=r[2].getTime()-1*r[2].getTimezoneOffset()*6e4,a=new Date(W.now().getTime()+parseInt(r[1]+"1")*n)):a=t?Date.parseDate(t,_.format):e.now(),e.isValidDate(a)||(a=e.now()),a},e.strtodate=function(t){var n=t?Date.parseDate(t,_.formatDate):e.now();return e.isValidDate(n)||(n=e.now()),n},e.strtotime=function(t){var n=t?Date.parseDate(t,_.formatTime):e.now();return e.isValidDate(n)||(n=e.now()),n},e.str=function(){return e.currentTime.dateFormat(_.format)}};O.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){M.data("changed",!0),W.setCurrentTime(0),M.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(W.str()),M.trigger("close.xdsoft")}),O.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1;!function r(e){W.currentTime.getMonth();t.hasClass(_.next)?W.nextMonth():t.hasClass(_.prev)&&W.prevMonth(),!a&&(n=setTimeout(r,e?e:100))}(500),e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",o)})}),I.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1,r=110;!function o(e){var s=C[0].clientHeight,i=H[0].offsetHeight,d=Math.abs(parseInt(H.css("marginTop")));t.hasClass(_.next)&&i-s-_.timeHeightInTimePicker>=d?H.css("marginTop","-"+(d+_.timeHeightInTimePicker)+"px"):t.hasClass(_.prev)&&d-_.timeHeightInTimePicker>
8=0&&H.css("marginTop","-"+(d-_.timeHeightInTimePicker)+"px"),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(i-s))]),r=r>10?10:r-10,!a&&(n=setTimeout(o,e?e:r))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})});var z=0;M.on("xchange.xdsoft",function(t){clearTimeout(z),z=setTimeout(function(){for(var t="",n=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),a=0,r=W.now();n.getDay()!=_.dayOfWeekStart;)n.setDate(n.getDate()-1);t+="<table><thead><tr>";for(var o=0;o<7;o++)t+="<th>"+_.i18n[_.lang].dayOfWeek[o+_.dayOfWeekStart>6?0:o+_.dayOfWeekStart]+"</th>";t+="</tr></thead>",t+="<tbody><tr>";var s=!1,i=!1;_.maxDate!==!1&&(s=W.strtodate(_.maxDate),s=new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59,999)),_.minDate!==!1&&(i=W.strtodate(_.minDate),i=new Date(i.getFullYear(),i.getMonth(),i.getDate()));for(var d,u,c,l=[];a<W.currentTime.getDaysInMonth()||n.getDay()!=_.dayOfWeekStart||W.currentTime.getMonth()==n.getMonth();)l=[],a++,d=n.getDate(),u=n.getFullYear(),c=n.getMonth(),l.push("xdsoft_date"),(s!==!1&&n>s||i!==!1&&n<i)&&l.push("xdsoft_disabled"),W.currentTime.getMonth()!=c&&l.push("xdsoft_other_month"),(_.defaultSelect||M.data("changed"))&&W.currentTime.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_current"),r.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_today"),(0==n.getDay()||6==n.getDay()||~_.weekends.indexOf(n.dateFormat("d.m.Y")))&&l.push("xdsoft_weekend"),_.beforeShowDay&&"function"==typeof _.beforeShowDay&&l.push(_.beforeShowDay(n)),t+='<td data-date="'+d+'" data-month="'+c+'" data-year="'+u+'" class="xdsoft_date xdsoft_day_of_week'+n.getDay()+" "+l.join(" ")+'"><div>'+d+"</div></td>",n.getDay()==_.dayOfWeekStartPrev&&(t+="</tr>"),n.setDate(d+1);t+="</tbody></table>",F.html(t),O.find(".xdsoft_label span").eq(0).text(_.i18n[_.lang].months[W.currentTime.getMonth()]),O.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear());var f="",m="",c="",h=function(e,t){var n=W.now();n.setHours(e),e=parseInt(n.getHours()),n.setMinutes(t),t=parseInt(n.getMinutes()),l=[],(_.maxTime!==!1&&W.strtotime(_.maxTime).getTime()<n.getTime()||_.minTime!==!1&&W.strtotime(_.minTime).getTime()>n.getTime())&&l.push("xdsoft_disabled"),(_.initTime||_.defaultSelect||M.data("changed"))&&parseInt(W.currentTime.getHours())==parseInt(e)&&(_.step>59||Math[_.roundTime](W.currentTime.getMinutes()/_.step)*_.step==parseInt(t))&&(_.defaultSelect||M.data("changed")?l.push("xdsoft_current"):_.initTime&&l.push("xdsoft_init_time")),parseInt(r.getHours())==parseInt(e)&&parseInt(r.getMinutes())==parseInt(t)&&l.push("xdsoft_today"),f+='<div class="xdsoft_time '+l.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+n.dateFormat(_.formatTime)+"</div>"};if(_.allowTimes&&e.isArray(_.allowTimes)&&_.allowTimes.length)for(var a=0;a<_.allowTimes.length;a++)m=W.strtotime(_.allowTimes[a]).getHours(),c=W.strtotime(_.allowTimes[a]).getMinutes(),h(m,c);else for(var a=0,o=0;a<(_.hours12?12:24);a++)for(o=0;o<60;o+=_.step)m=(a<10?"0":"")+a,c=(o<10?"0":"")+o,h(m,c);H.html(f);var g="",a=0;for(a=parseInt(_.yearStart,10)+_.yearOffset;a<=parseInt(_.yearEnd,10)+_.yearOffset;a++)g+='<div class="xdsoft_option '+(W.currentTime.getFullYear()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+a+"</div>";for(A.children().eq(0).html(g),a=0,g="";a<=11;a++)g+='<div class="xdsoft_option '+(W.currentTime.getMonth()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+_.i18n[_.lang].months[a]+"</div>";P.children().eq(0).html(g),e(this).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(_.timepicker){var e;if(H.find(".xdsoft_current").length?e=".xdsoft_current":H.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e){var t=C[0].clientHeight,n=H[0].offsetHeight,a=H.find(e).index()*_.timeHeightInTimePicker+1;n-t<a&&(a=n-t),H.css("marginTop","-"+parseInt(a)+"px"),C.trigger("scroll_element.xdsoft_scroller",[parseInt(a)/(n-t)])}}});var J=0;F.on("click.xdsoft","td",function(n){n.stopPropagation(),J++;var a=e(this),r=W.currentTime;return!a.hasClass("xdsoft_disabled")&&(r.setDate(a.data("date")),r.setMonth(a.data("month")),r.setFullYear(a.data("year")),M.trigger("select.xdsoft",[r]),t.val(W.str()),(J>1||_.closeOnDateSelect===!0||0===_.closeOnDateSelect&&!_.timepicker)&&!_.inline&&M.trigger("close.xdsoft"),_.onSelectDate&&_.onSelectDate.call&&_.onSelectDate.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),void setTimeout(function(){J=0},200))}),H.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),a=W.currentTime;return!n.hasClass("xdsoft_disabled")&&(a.setHours(n.data("hour")),a.setMinutes(n.data("minute")),M.trigger("select.xdsoft",[a]),M.data("input").val(W.str()),!_.inline&&M.trigger("close.xdsoft"),_.onSelectTime&&_.onSelectTime.call&&_.onSelectTime.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),void M.trigger("changedatetime.xdsoft"))}),M.mousewheel&&S.mousewheel(function(e,t,n,a){return!_.scrollMonth||(t
8<0?W.nextMonth():W.prevMonth(),!1)}),M.mousewheel&&C.unmousewheel().mousewheel(function(e,t,n,a){if(!_.scrollTime)return!0;var r=C[0].clientHeight,o=H[0].offsetHeight,s=Math.abs(parseInt(H.css("marginTop"))),i=!0;return t<0&&o-r-_.timeHeightInTimePicker>=s?(H.css("marginTop","-"+(s+_.timeHeightInTimePicker)+"px"),i=!1):t>0&&s-_.timeHeightInTimePicker>=0&&(H.css("marginTop","-"+(s-_.timeHeightInTimePicker)+"px"),i=!1),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(o-r))]),e.stopPropagation(),i}),M.on("changedatetime.xdsoft",function(){if(_.onChangeDateTime&&_.onChangeDateTime.call){var e=M.data("input");_.onChangeDateTime.call(M,W.currentTime,e),e.trigger("change")}}).on("generate.xdsoft",function(){_.onGenerate&&_.onGenerate.call&&_.onGenerate.call(M,W.currentTime,M.data("input"))});var j=0;t.mousewheel&&t.mousewheel(function(e,n,a,r){return!_.scrollInput||(!_.datepicker&&_.timepicker?(j=H.find(".xdsoft_current").length?H.find(".xdsoft_current").eq(0).index():0,j+n>=0&&j+n<H.children().length&&(j+=n),H.children().eq(j).length&&H.children().eq(j).trigger("mousedown"),!1):_.datepicker&&!_.timepicker?(S.trigger(e,[n,a,r]),t.val&&t.val(W.str()),M.trigger("changedatetime.xdsoft"),!1):void 0)});var L=function(){var t=M.data("input").offset(),n=t.top+M.data("input")[0].offsetHeight-1,a=t.left;n+M[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-M[0].offsetHeight+1),n<0&&(n=0),a+M[0].offsetWidth>e(window).width()&&(a=t.left-M[0].offsetWidth+M.data("input")[0].offsetWidth),M.css({left:a,top:n})};M.on("open.xdsoft",function(){var t=!0;_.onShow&&_.onShow.call&&(t=_.onShow.call(M,W.currentTime,M.data("input"))),t!==!1&&(M.show(),M.trigger("afterOpen.xdsoft"),L(),e(window).off("resize.xdsoft",L).on("resize.xdsoft",L),_.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function n(){M.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(e){var t=!0;_.onClose&&_.onClose.call&&(t=_.onClose.call(M,W.currentTime,M.data("input"))),t===!1||_.opened||_.inline||M.hide(),e.stopPropagation()}).data("input",t);var E=0;M.data("xdsoft_datetime",W),M.setOptions(_),W.setCurrentTime(n()),M.trigger("afterOpen.xdsoft"),t.data("xdsoft_datetimepicker",M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(e){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(E),E=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(W.setCurrentTime(n()),M.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n=(this.value,t.which);switch(!0){case!!~[u].indexOf(n):var a=e("input:visible,textarea:visible");return M.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1;case!!~[p].indexOf(n):return M.trigger("close.xdsoft"),!0}})},O=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};return e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode==i&&(b=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode==i&&(b=!1)}),this.each(function(){var t;if(t=e(this).data("xdsoft_datetimepicker")){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":O(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,_.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!_.lazyInit||_.open||_.inline?S(e(this)):k(e(this)))})}}(jQuery),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";
8case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};
8case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return e<0?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return e<0?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var a=new String(e);for(null==n&&(n=" ");a.length<t;)a=n+a;return a},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2,
9Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"},function(e){"function"==typeof define&&define.amd?define(["jquery.flot.min"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r,o=t||window.event,s=[].slice.call(arguments,1),i=0,d=0,u=0,c=0,l=0;return t=e.event.fix(o),t.type="mousewheel",o.wheelDelta&&(i=o.wheelDelta),o.detail&&(i=o.detail*-1),o.deltaY&&(u=o.deltaY*-1,i=u),o.deltaX&&(d=o.deltaX,i=d*-1),void 0!==o.wheelDeltaY&&(u=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(d=o.wheelDeltaX*-1),c=Math.abs(i),(!n||c<n)&&(n=c),l=Math.max(Math.abs(u),Math.abs(d)),(!a||l<a)&&(a=l),r=i>0?"floor":"ceil",i=Math[r](i/n),d=Math[r](d/a),u=Math[r](u/a),s.unshift(t,i,d,u),(e.event.dispatch||e.event.handle).apply(this,s)}var n,a,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var s=r.length;s;)e.event.fixHooks[r[--s]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});
10function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice,_slicedToArray=function(){function e(e,t){var i=[],n=!0,r=!1,s=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(l){r=!0,s=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);
10throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||T,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched="0.0.3";for(var n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;r<n.length;r++){var s=n[r];e(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(".inputevent")}})}var r=1,s={},a={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if(!e)return i;for(s=e.attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.hasAttribute(t+i)},setAttr:function(e,t,i,n){e.setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+r++},deserializeValue:function(t){var i;try{return t?"true"==t||"false"!=t&&("null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){s[e]||(s[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){s={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},parse:{date:function S(e){var t=e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!t)return null;var i=t.map(function(e){return parseInt(e,10)}),n=_slicedToArray(i,4),r=(n[0],n[1]),s=n[2],a=n[3],S=new Date(r,s-1,a);return S.getFullYear()!==r||S.getMonth()+1!==s||S.getDate()!==a?null:S},string:function(e){return e},integer:function(e){return isNaN(e)?null:parseInt(e,10)},number:function(e){if(isNaN(e))throw null;return parseFloat(e)},"boolean":function(e){return!/^\s*false\s*$/i.test(e)},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},parseRequirement:function(e,t){var i=this.parse[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';var n=i(t);if(null===n)throw"Requirement is not a "+e+': "'+t+'"';return n},namespaceEvents:function(t,i){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},difference:function(t,i){var n=[];return e.each(t,function(e,t){i.indexOf(t)==-1&&n.push(t)}),n},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}(),_SubmitSelector:'input[type="submit"], button:submit'},o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focu
10s:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){this.__id__=a.generateID()};l.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,i=function(){var i=e.Deferred();return!0!==t.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return a.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return!this.parent||this.parent.trigger(e,t,i)},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?e(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var u=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},d=function(e,t,i){var n=null,r={};for(var s in e)if(s){var o=i(s);"string"==typeof o&&(o=a.parseRequirement(e[s],o)),r[s]=o}else n=a.parseRequirement(e[s],t);return[n,r]},h=function(t){e.extend(!0,this,t)};h.prototype={validate:function(e,t){if(this.fn)return arguments.length>3&&(t=[].slice.call(arguments,1,-1)),this.fn(e,t);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var i=arguments[arguments.length-1];if(this.validateDate&&i._isDateInput())return arguments[0]=a.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return Array.isArray(t)?t:[t];var n=this.requirementType;if(Array.isArray(n)){for(var r=u(t,n.length),s=0;s<r.length;s++)r[s]=a.parseRequirement(n[s],r[s]);return r}return e.isPlainObject(n)?d(n,t,i):[a.parseRequirement(n,t)]},requirementType:"string",priority:2};var p=function(e,t){this.__class__="ValidatorRegistry",this.locale="en",this.init(e||{},t||{})},c={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(e){return null!==a.parse.date(e)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};c.range=c.number;var f=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},m=function(e,t){return t.map(a.parse[e])},g=function(e,t){return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.pop(),t.apply(void 0,[i].concat(_toConsumableArray(m(e,r))))}},v=function(e){return{validateDate:g("date",e),validateNumber:g("number",e),requirementType:e.length<=2?"string":["string","string"],priority:30}};p.prototype={init:function(e,t){this.catalog=t,this.validators=_extends({},this.validators);for(var i in e)this.addValidator(i,e[i].fn,e[i].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)}
10,updateValidator:function(e,t,i){return this.validators[e]?this._setValidator.apply(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new h(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"any":n,s=i.base,a=void 0===s?0:s,o=c[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(f(r),f(a));if(f(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:v(function(e,t){return e>=t}),max:v(function(e,t){return e<=t}),range:v(function(e,t,i){return e>=t&&e<=i}),equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y={},_=function k(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:k(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",a._SubmitSelector,function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=_(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.updateClass,n=void 0===i||i;this._buildUI(),this._removeError(e),n&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&
10!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.element.setAttribute(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler)return 0===e(this.options.classHandler).length&&ParsleyUtils.warn("No elements found that match the selector `"+this.options.classHandler+"` set in options.classHandler or data-parsley-class-handler"),e(this.options.classHandler);if("function"==typeof this.options.classHandler)var t=this.options.classHandler.call(this,this);return"undefined"!=typeof t&&t.length?t:this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);a.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));return"undefined"!=typeof t&&t.length?t.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(a.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t._validateIfNeeded()}):(e=a.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(e,function(e){t._validateIfNeeded(e)})},_validateIfNeeded:function(e){var t=this;e&&/key|input/.test(e.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return t.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var w=function(t,i,n){this.__class__="Form",this.element=t,this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},b={pending:null,resolved:!0,rejected:!1};w.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._submitSource||this.$element.find(a._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i||null===i.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(e){this._submitSource=e.currentTarget},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(_extends(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return b[this.whenValidate(t).state()]},whenValidate:function(){var t,i=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.group,s=n.force,o=n.event;this.submitEvent=o,o&&(this.submitEvent=_extends({},o,{preventDefault:function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(i.fields,function(e){return e.whenValidate({force:s,group:r})})});return(t=a.all(l).done(function(){i._trigger("success")}).fail(function(){i.validationResult=!1,i.focus(),i._trigger("error")}).always(function(){i._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return b[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return a.all(s)},reset:function(){for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);if(("Field"===n.__class__||"FieldMultiple"===n.__class__)&&!0!==n.options.excluded){var r=n.__class__+"-"+n.__id__;"undefined"==typeof t.fieldsMappedById[r]&&(t.fieldsMappedById[r]=n,t.fields.push(n))}}),e.each(a.difference(i,t.fields),function(e,t){t.reset()})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var F=function(e,t,i,n,r){var s=window.Parsley._validatorRegistry.validators[t],a=new h(s);n=n||e.options[t+"Priority"]||a.priority,r=!0===r,_extends(this,{validator:a,name:t,requirements:i,priority:n,isDomConstraint:r}),this._parseRequirements(e.options)},C=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};F.prototype={validate:function(e,t){var i;
10return(i=this.validator).validate.apply(i,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+C(i)]})}};var E=function(t,i,n,r){this.__class__="Field",this.element=t,this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},A={pending:null,resolved:!0,rejected:!1};E.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=i.group;if(this.refreshConstraints(),!r||this._isInGroup(r))return this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:n,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return!s||A[s.state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0!==n&&n,s=i.value,o=i.group,l=i._refreshed;if(l||this.refreshConstraints(),!o||this._isInGroup(o)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof s&&null!==s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var u=this._getGroupedConstraints(),d=[];return e.each(u,function(i,n){var r=a.all(e.map(n,function(e){return t._validateConstraint(s,e)}));if(d.push(r),"rejected"===r.state())return!1}),a.all(d)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),a.all([r]).fail(function(e){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new F(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var e=this.element.getAttribute("min"),t=this.element.getAttribute("max");null!==e&&null!==t?this.addConstraint("range",[e,t],void 0,!0):null!==e?this.addConstraint("min",e,void 0,!0):null!==t&&this.addConstraint("max",t,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var i=this.element.type;return"number"===i?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base
10:e||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(i)?this.addConstraint("type",i,void 0,!0):this},_isRequired:function(){return"undefined"!=typeof this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=a.trimString(e)),e},_isDateInput:function(){var e=this.constraintsByName.type;return e&&"date"===e.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var x=E,$=function(){this.__class__="FieldMultiple"};$.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),
11this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("FieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){if("radio"===this.element.type)return this._findRelated().filter(":checked").val()||"";if("checkbox"===this.element.type){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var P=function(t,i,n){this.element=t,this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),"object"==typeof i&&_extends(r.options,i),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"Form"!==n.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=n||window.Parsley,this.init(i)};P.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.7.2",this.__id__=a.generateID(),this._resetOptions(e),"FORM"===this.element.nodeName||a.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return"radio"===this.element.type||"checkbox"===this.element.type||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple=this.options.multiple||(t=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),t&&e('input[name="'+t+'"]').each(function(e,t){"radio"!==t.type&&"checkbox"!==t.type||t.setAttribute(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("FieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new w(this.element,this.domOptions,this.options),new l,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new l,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new $,new l,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("FieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
11V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var O=_extends(new l,{element:document,$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:P,version:"2.7.2"});_extends(x.prototype,y.Field,l.prototype),_extends(w.prototype,y.Form,l.prototype),_extends(P.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new P(this[0],t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),O.options=_extends(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=O.options,window.Parsley=window.psly=O,O.Utils=a,window.ParsleyUtils={},e.each(a,function(e,t){"function"==typeof t&&(window.ParsleyUtils[e]=function(){return a.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),a[e].apply(a,arguments)})});var M=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(e,t){window.Parsley[t]=function(){return M[t].apply(M,arguments)},window.ParsleyValidator[t]=function(){var e;return a.warnOnce("Accessing the method '"+t+"' through Validator is deprecated. Simply call 'window.Parsley."+t+"(...)'"),(e=window.Parsley)[t].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return a.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return a.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var o=!0!==s;return a.warnOnce("Accessing UI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:o})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var T=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof x||e instanceof w))throw new Error("Mu
11st give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof x||t instanceof w,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,O,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return O.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),O.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof O.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=O.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.element.getAttribute("name")||r.element.getAttribute("id")]=t;var u=e.extend(!0,n.options||{},O.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof O._remoteCache&&(O._remoteCache={});var d=O._remoteCache[a]=O._remoteCache[a]||e.ajax(s),h=function(){var t=O.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),O.on("form:submit",function(){O._remoteCache={}}),l.prototype.addAsyncValidator=function(){return a.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),O.addAsyncValidator.apply(O,arguments)},O.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),O.setLocale("en");var I=new n;I.install();var q=O;return q});
12jQuery(document).ready(function(e){function a(e,a){l(e,a),e.find(a.container).first().show()}function n(a,n){if(n.tabs){var t=e("<div />",{"class":n.tabMenuClassName}).insertBefore(a.children(n.container).filter(":first"));a.children(n.container).each(function(i,r){var l=e("<button/>").html(e(this).children(n.header).html()).addClass(0==i?n.tabMenuItemActiveClassName:"").addClass("item"+i).addClass("btn btn-default").prop("type","button").on("click keypress",{container:a.children(n.container),fieldset:e(r)},function(){var t=e(this),i=t.parent().children().index(t);s(a,n,t,i)});n.tabIndex&&l.prop("tabindex",i),t.append(l)})}}function t(a,n){n.navigation&&a.children(n.container).each(function(t){var i=e("<div />").addClass("powermail_fieldwrap").addClass("powermail_tab_navigation").appendTo(e(this));t>0&&i.append(c(a,n)),t<a.children(n.container).length-1&&i.append(o(a,n))})}function i(a,n){e.fn.parsley&&"data-parsley-validate"===a.data("parsley-validate")&&a.parsley().subscribe("parsley:field:validated",function(){v(a,n),C(a,n)})}function r(a,n){n.openTabOnError&&e.listen("parsley:field:error",function(){setTimeout(function(){a.find("."+n.tabMenuClassName+" > ."+n.tabMenuItemErrorClassName+":first").click()},50)})}function s(a,n,t,i){$activeTab=p(a,n),$activeTab.removeClass(n.tabMenuItemActiveClassName),t.addClass(n.tabMenuItemActiveClassName),l(a,n),e(".powermail_fieldset",a).slice(i,i+1).show()}function l(e,a){e.children(a.container).hide()}function c(a,n){return e("<a />").prop("href","#").addClass("btn btn-warning").html("<").click(function(e){e.preventDefault(),u(a,n)})}function o(a,n){return e("<a />").prop("href","#").addClass("btn btn-primary pull-right").html(">").click(function(e){e.preventDefault(),d(a,n)})}function d(e,a){var n=m(e,a);$activeTab=p(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).next().addClass(a.tabMenuItemActiveClassName),f(e,a,n+1)}function u(e,a){var n=m(e,a);$activeTab=p(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).prev().addClass(a.tabMenuItemActiveClassName),f(e,a,n-1)}function f(e,a,n){l(e,a),e.find(".powermail_fieldset").slice(n,n+1).show()}function m(e,a){var n=b(e,a),t=n.index(p(e,a));return parseInt(t)}function b(e,a){return e.find("."+a.tabMenuClassName).children()}function p(e,a){var n=b(e,a);return n.filter("."+a.tabMenuItemActiveClassName)}function v(e,a){var n=b(e,a);n.removeClass(a.tabMenuItemErrorClassName)}function C(a,n){a.parsley().isValid()||a.find(".parsley-error").each(function(){var t=a.find(".powermail_fieldset").index(e(this).closest(".powermail_fieldset")),i=b(a,n),r=i.slice(t,t+1);r.addClass(n.tabMenuItemErrorClassName)})}e.fn.powermailTabs=function(e){"use strict";var s=jQuery(this);e=jQuery.extend({container:"fieldset",header:"legend",tabs:!0,navigation:!0,openTabOnError:!0,tabIndex:!0,tabMenuClassName:"btn-group",tabMenuItemActiveClassName:"btn-primary",tabMenuItemErrorClassName:"btn-danger"},e),a(s,e),n(s,e),t(s,e),i(s,e),r(s,e)}});
13function PowermailForm(e){"use strict";this.initialize=function(){a(),t(),i(),r(),o(),n(),c(),l()};var a=function(){e.fn.powermailTabs&&e(".powermail_morestep").each(function(){e(this).powermailTabs()})},t=function(){e("form[data-powermail-ajax]").length&&p()},i=function(){if(e('*[data-powermail-location="prefill"]').length&&navigator.geolocation){e(this);navigator.geolocation.getCurrentPosition(function(a){var t=a.coords.latitude,i=a.coords.longitude,r=D()+"/index.php?eID=powermailEidGetLocation";jQuery.ajax({url:r,data:"lat="+t+"&lng="+i,cache:!1,success:function(a){a&&e('*[data-powermail-location="prefill"]').val(a)}})})}},r=function(){e.fn.datetimepicker&&e(".powermail_date").each(function(){var a=e(this);if("date"===a.prop("type")||"datetime-local"===a.prop("type")||"time"===a.prop("type")){if(!a.data("datepicker-force")){if(e(this).data("date-value")){var t=v(e(this).data("date-value"),e(this).data("datepicker-format"),a.prop("type"));null!==t&&e(this).val(t)}return}a.prop("type","text")}var i=!0,r=!0;"date"===a.data("datepicker-settings")?r=!1:"time"===a.data("datepicker-settings")&&(i=!1),a.datetimepicker({format:a.data("datepicker-format"),timepicker:r,datepicker:i,lang:"en",i18n:{en:{months:a.data("datepicker-months").split(","),dayOfWeek:a.data("datepicker-days").split(",")}}})})},o=function(){e(".powermail_all_type_password.powermail_all_value").html("********")},n=function(){e.fn.parsley&&e(".powermail_reset").on("click","",function(){e('form[data-parsley-validate="data-parsley-validate"]').parsley().reset()})},l=function(){window.Parsley&&(_(),x())},p=function(){var a,t=!1;e(document).on("submit","form[data-powermail-ajax]",function(i){var r=e(this);r.data("powermail-ajax-uri")&&(a=r.data("powermail-ajax-uri"));var o=r.data("powermail-form");t||(e.ajax({type:"POST",url:r.prop("action"),data:new FormData(r.get(0)),c
13ontentType:!1,processData:!1,beforeSend:function(){s(r)},complete:function(){d(r),c()},success:function(i){var n=e('*[data-powermail-form="'+o+'"]:first',i);n.length?(e('*[data-powermail-form="'+o+'"]:first').closest(".tx-powermail").html(n),e.fn.powermailTabs&&e(".powermail_morestep").powermailTabs(),e.fn.parsley&&e('form[data-parsley-validate="data-parsley-validate"]').parsley(),m()):(a?j(a):r.submit(),t=!0)}}),i.preventDefault())})},s=function(a){d(a),e(".powermail_submit",a).length?e(".powermail_submit",a).parent().append(g()):a.closest(".tx-powermail").append(g())},d=function(e){e.closest(".tx-powermail").find(".powermail_progressbar").remove()},c=function(){e(".powermail_fieldwrap_file").find(".deleteAllFiles").each(function(){f(e(this).closest(".powermail_fieldwrap_file").find('input[type="file"]'))}),e(".deleteAllFiles").click(function(){u(e(this).closest(".powermail_fieldwrap_file").find('input[type="hidden"]')),e(this).closest("ul").fadeOut(function(){e(this).remove()})})},f=function(e){e.prop("disabled","disabled").addClass("hide").prop("type","hidden")},u=function(e){e.prop("disabled",!1).removeClass("hide").prop("type","file")},m=function(){e("img.powermail_captchaimage").each(function(){var a=w(e(this).prop("src"));e(this).prop("src",a+"?hash="+h(5))})},w=function(e){var a=e.split("?");return a[0]},h=function(e){for(var a="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<e;i++)a+=t.charAt(Math.floor(Math.random()*t.length));return a},v=function(e,a,t){var i=Date.parseDate(e,a);if(null===i)return null;var r=new Date(i),o=r.getFullYear()+"-";o+=("0"+(r.getMonth()+1)).slice(-2)+"-",o+=("0"+r.getDate()).slice(-2);var n=("0"+r.getHours()).slice(-2)+":"+("0"+r.getMinutes()).slice(-2),l=o+"T"+n;return"date"===t?o:"datetime-local"===t?l:"time"===t?n:null},g=function(){return e("<div />").addClass("powermail_progressbar").html(e("<div />").addClass("powermail_progress").html(e("<div />").addClass("powermail_progess_inner")))},y=function(e){for(var a=e.get(0),t=0,i=0;i<a.files.length;i++){var r=a.files[i];r.size>t&&(t=r.size)}return parseInt(t)},_=function(){window.Parsley.addValidator("powermailfilesize",function(a,t){if(t.indexOf(",")!==-1){var i=t.split(","),r=parseInt(i[0]),o=e('*[name="tx_powermail_pi1[field]['+i[1]+'][]"]');if(o.length&&y(o)>r)return!1}return!0},32).addMessage("en","powermailfilesize","Error")},x=function(){window.Parsley.addValidator("powermailfileextensions",function(a,t){var i=e('*[name="tx_powermail_pi1[field]['+t+'][]"]');return!i.length||b(k(a),i.prop("accept"))},32).addMessage("en","powermailfileextensions","Error")},b=function(e,a){return a.indexOf("."+e)!==-1},k=function(e){return e.split(".").pop().toLowerCase()},j=function(e){e.indexOf("http")!==-1?window.location=e:window.location.pathname=e},D=function(){var a;return a=e("base").length>0?jQuery("base").prop("href"):"https:"!=window.location.protocol?"http://"+window.location.hostname:"https://"+window.location.hostname}}jQuery(document).ready(function(e){"use strict";var a=new window.PowermailForm(e);a.initialize()});
14!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=getComputedStyle(t)||{},o=e.position,n=[];if("fixed"===o)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return n.push(i),n;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(i)}return n.push(document.body),n}function r(){x&&document.body.removeChild(x),x=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,n={},i=t.getBoundingClientRect();for(var r in i)n[r]=i[r];var s=S();return n.top-=s.top,n.left-=s.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.r
vendor: 5,642 bytes, line 14
14ight),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-o.clientTop,n.left=n.left-o.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function a(t){return t.offsetParent||document.documentElement}function f(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");l(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;o===n&&(n=e.clientWidth),document.body.removeChild(e);var i=o-n;return{width:i,height:i}}function l(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=p(t).replace(o," ");c(t,n)}}function d(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);var o=p(t)+(" "+e);c(t,o)}}function u(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=p(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function p(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className}function c(t,e){t.setAttribute("class",e)}function g(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&u(t,o)&&h(t,o)}),e.forEach(function(e){u(t,e)||d(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function v(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function y(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function b(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];return o.forEach(function(e){var o=e.top,n=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=o,t.left+=n}),t}function w(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function C(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=s(e),o=t,n=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],V.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(n["border"+t+"Width"]):e[o]-=parseFloat(n["border"+t+"Width"])})}(),e}var O=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),E=void 0;"undefined"==typeof E&&(E={modules:[]});var x=null,T=function(){var t=0;return function(){return++t}}(),A={},S=function(){var t=x;t||(t=document.createElement("div"),t.setAttribute("data-tether-id",T()),l(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),x=t);var e=t.getAttribute("data-tether-id");if("undefined"==typeof A[e]){A[e]={};var o=t.getBoundingClientRect();for(var n in o)A[e][n]=o[n];W(function(){delete A[e]})}return A[e]},P=[],W=function(t){P.push(t)},M=function(){for(var t=void 0;t=P.pop();)t()},_=function(){function t(){n(this,t)}return O(t,[{key:"on",value:function(t,e,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:n})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[t])if("undefined"==typeof e)delete this.bindings[t];else for(var o=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,o=arguments.length,n=Array(o>1?o-1:0),i=1;o>i;i++)n[i-1]=arguments[i];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,f=r.once,l=a;"undefined"==typeof l&&(l=this),s.apply(l,n),f?this.bindings[t].splice(e,1):++e}}}}]),t}();E.Utils={getScrollParents:i,getBounds:s,getOffsetParent:a,extend:l,addClass:d,removeClass:h,hasClass:u,updateClasses:g,defer:W,flush:M,uniqueId:T,Evented:_,getScrollBarSize:f,removeUtilElements:r};var k=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);
14throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),B=function(t,e,o){for(var n=!0;n;){var i=t,r=e,s=o;n=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,r);if(void 0!==a){if("value"in a)return a.value;var f=a.get;if(void 0===f)return;return f.call(s)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=r,o=s,n=!0,a=l=void 0}};if("undefined"==typeof E)throw new Error("You must include the utils.js file before tether.js");var z=E.Utils,i=z.getScrollParents,s=z.getBounds,a=z.getOffsetParent,l=z.extend,d=z.addClass,h=z.removeClass,g=z.updateClasses,W=z.defer,M=z.flush,f=z.getScrollBarSize,r=z.removeUtilElements,j=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){var n=e[o];if(void 0!==t.style[n])return n}}(),L=[],Y=function(){L.forEach(function(t){t.position(!1)}),M()};!function(){var t=null,e=null,o=null,n=function i(){return"undefined"!=typeof e&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(i,250))):void("undefined"!=typeof t&&y()-t<10||(null!=o&&(clearTimeout(o),o=null),t=y(),Y(),e=y()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var F={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},X={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},N=function(t,e){var o=t.left,n=t.top;return"auto"===o&&(o=F[e.left]),"auto"===n&&(n=H[e.top]),{left:o,top:n}},U=function(t){var e=t.left,o=t.top;return"undefined"!=typeof X[t.left]&&(e=X[t.left]),"undefined"!=typeof X[t.top]&&(o=X[t.top]),{left:e,top:o}},R=function(t){var e=t.split(" "),o=k(e,2),n=o[0],i=o[1];return{top:n,left:i}},q=R,D=function(t){function e(t){var o=this;n(this,e),B(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),L.push(this),this.history=[],this.setOptions(t,!1),E.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return m(e,t),O(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=l(n,t);var r=this.options,s=r.element,a=r.target,f=r.targetModifier;if(this.element=s,this.target=a,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=q(this.options.targetAttachment),this.attachment=q(this.options.attachment),this.offset=R(this.options.offset),this.targetOffset=R(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=i(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=s(this.target),e={height:t.height,width:t.width,top:t.top,left
vendor: 8,436 bytes, line 14
14:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=s(o);var n=getComputedStyle(o),i=o.scrollWidth>o.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;i&&(r=15);var a=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-a);return e.top=l*(a-e.height-f)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==document&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),L.forEach(function(e,o){e===t&&L.splice(o,1)}),0===L.length&&r()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;t.top&&i.push(this.getClass("element-attached")+"-"+t.top),t.left&&i.push(this.getClass("element-attached")+"-"+t.left),e.top&&i.push(this.getClass("target-attached")+"-"+e.top),e.left&&i.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),W(function(){"undefined"!=typeof o._addAttachClasses&&(g(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&g(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=N(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",function(){return s(t.element)}),i=n.width,r=n.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var l=this.lastSize;i=l.width,r=l.height}else this.lastSize={width:i,height:r};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=h,u=w(U(this.attachment),{width:i,height:r}),p=w(U(o),d),c=w(this.offset,{width:i,height:r}),g=w(this.targetOffset,d);u=b(u,c),p=b(p,g);for(var m=h.left+p.left-u.left,v=h.top+p.top-u.top,y=0;y<E.modules.length;++y){var C=E.modules[y],O=C.position.call(this,{left:m,top:v,targetAttachment:o,targetPos:h,elementPos:n,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:T,attachment:this.attachment});if(O===!1)return!1;"undefined"!=typeof O&&"object"==typeof O&&(v=O.top,m=O.left)}var x={page:{top:v,left:m},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-r+innerHeight,left:m-pageXOffset,right:pageXOffset-m-i+innerWidth}},T=void 0;return document.body.scrollWidth>window.innerWidth&&(T=this.cache("scrollbar-size",f),x.viewport.bottom-=T.height),document.body.scrollHeight>window.innerHeight&&(T=this.cache("scrollbar-size",f),x.viewport.right-=T.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-v-r,x.page.right=document.body.scrollWidth-m-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return a(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return s(e)}),n=getComputedStyle(e),i=o,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-i.width+r.right,o.bottom=document.body.scrollHeight-o.top-i.height+r.bottom,x.page.top>=o.top+r.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+r.left&&x.page.right>=o.right){var f=e.scrollTop,l=e.scrollLeft;x.offset={top:x.page.top-o.top+f-r.top,left:x.page.left-o.left+l-r.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&M(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var n in t){o[n]={};for(var i in t[n]){for(var r=!1,s=0;s<this.history.length;++s){var f=this.history[s];if("undefined"!=typeof f[n]&&!v(f[n][i],t[n][i])){r=!0;break}}r||(o[n][i]=!0)}}var h={top:"",left:"",right:"",bottom:""},d=function(t,o){var n="undefined"!=typeof e.options.optimizations,i=n?e.options.optimizations.gpu:null;if(i!==!1){var r=void 0,s=void 0;t.top?(h.top=0,r=o.top):(h.bottom=0,r=-o.bottom),t.left?(h.left=0,s=o.left):(h.right=0,s=-o.right),h[j]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==j&&(h[j]+=" translateZ(0)")}else t.top?h.top=o.top+"px":h.bottom=o.bottom+"px",t.left?h.left=o.left+"px":h.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(h.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(h.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeof o.offset&&o.offset.top&&o.offset.left?!function(){h.position="absolute";var n=e.cache("target-offsetparent",function(){return a(e.target)});a(e.element)!==n&&W(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(h.position="absolute",d({top:!0,left:!0},t.page)),!u){for(var p=!0,c=this.element.parentNode;c&&1===c.nodeType&&"BODY"!==c.tagName;){if("static"!==getComputedStyle(c).position){p=!1;break}c=c.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}var g={},m=!1;for(var i in h){var y=h[i],b=this.element.style[i];b!==y&&(m=!0,g[i]=y)}m&&W(function(){l(e.element.style,g)})}}}]),e}(_);D.modules=[],E.position=Y;var I=l(D,E),k=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),z=E.Utils,s=z.getBounds,l=z.extend,g=z.updateClasses,W=z.defer,V=["left","top","right","bottom"];E.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return s(e.element)}),a=r.height,f=r.width;if(0===f&&0===a&&"undefined"!=typeof this.lastSize){var h=this.lastSize;f=h.width,a=h.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,c=[this.getClass("pinned"),this.getClass("out-of-bounds")];
14this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&c.push(e),o&&c.push(o)}),c.forEach(function(t){["left","top","right","bottom"].forEach(function(e){c.push(t+"-"+e)})});var m=[],v=l({},i),y=l({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,l=t.pin;"undefined"==typeof s&&(s="");var h=void 0,d=void 0;if(s.indexOf(" ")>=0){var c=s.split(" "),g=k(c,2);d=g[0],h=g[1]}else h=d=s;var b=C(e,r);("target"===d||"both"===d)&&(o<b[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+a>b[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&("top"===v.top&&("bottom"===y.top&&o<b[1]?(o+=u,v.top="bottom",o+=a,y.top="top"):"top"===y.top&&o+a>b[3]&&o-(a-u)>=b[1]&&(o-=a-u,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+a>b[3]?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&o<b[1]&&o+(2*a-u)<=b[3]&&(o+=a-u,v.top="top",y.top="top")),"middle"===v.top&&(o+a>b[3]&&"top"===y.top?(o-=a,y.top="bottom"):o<b[1]&&"bottom"===y.top&&(o+=a,y.top="top"))),("target"===h||"both"===h)&&(n<b[0]&&"left"===v.left&&(n+=p,v.left="right"),n+f>b[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(n<b[0]&&"left"===v.left?"right"===y.left?(n+=p,v.left="right",n+=f,y.left="left"):"left"===y.left&&(n+=p,v.left="right",n-=f,y.left="right"):n+f>b[2]&&"right"===v.left?"left"===y.left?(n-=p,v.left="left",n-=f,y.left="right"):"right"===y.left&&(n-=p,v.left="left",n+=f,y.left="left"):"center"===v.left&&(n+f>b[2]&&"left"===y.left?(n-=f,y.left="right"):n<b[0]&&"right"===y.left&&(n+=f,y.left="left"))),("element"===d||"both"===d)&&(o<b[1]&&"bottom"===y.top&&(o+=a,y.top="top"),o+a>b[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===h||"both"===h)&&(n<b[0]&&("right"===y.left?(n+=f,y.left="left"):"center"===y.left&&(n+=f/2,y.left="left")),n+f>b[2]&&("left"===y.left?(n-=f,y.left="right"):"center"===y.left&&(n-=f/2,y.left="right"))),"string"==typeof l?l=l.split(",").map(function(t){return t.trim()}):l===!0&&(l=["top","left","right","bottom"]),l=l||[];var w=[],O=[];o<b[1]&&(l.indexOf("top")>=0?(o=b[1],w.push("top")):O.push("top")),o+a>b[3]&&(l.indexOf("bottom")>=0?(o=b[3]-a,w.push("bottom")):O.push("bottom")),n<b[0]&&(l.indexOf("left")>=0?(n=b[0],w.push("left")):O.push("left")),n+f>b[2]&&(l.indexOf("right")>=0?(n=b[2]-f,w.push("right")):O.push("right")),w.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),w.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==i.top||v.left!==i.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),W(function(){e.options.addTargetClasses!==!1&&g(e.target,m,c),g(e.element,m,c)}),{top:o,left:n}}});var z=E.Utils,s=z.getBounds,g=z.updateClasses,W=z.defer;E.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=this.cache("element-bounds",function(){return s(e.element)}),r=i.height,a=i.width,f=this.getTargetBounds(),l=o+r,h=n+a,d=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===n||e===h)&&d.push(t)}),n<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===l)&&d.push(t)});var u=[],p=[],c=["left","top","right","bottom"];return u.push(this.getClass("abutted")),c.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),W(function(){e.options.addTargetClasses!==!1&&g(e.target,p,u),g(e.element,p,u)}),!0}});var k=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);
14throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return E.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:o}));var i=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var s=n,a=k(s,2);i=a[0],r=a[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=n.top,r=n.left;return e+=i,o+=r,{top:e,left:o}}}}),I});
15/*!
16 * Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com)
17 * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
18 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
19 */
20
21if (typeof jQuery === 'undefined') {
22  throw new Error('Bootstrap\'s JavaScript requires jQuery')
23}
24
25+function ($) {
26  var version = $.fn.jquery.split(' ')[0].split('.')
27  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
28    throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
29  }
30}(jQuery);
31
32
33+function ($) {
34
35/**
36 * --------------------------------------------------------------------------
37 * Bootstrap (v4.0.0-alpha.4): util.js
38 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
39 * --------------------------------------------------------------------------
40 */
41
42'use strict';
43
44var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
45
46var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
47
48function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
49
50function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
51
52var Util = (function ($) {
53
54  /**
55   * ------------------------------------------------------------------------
56   * Private TransitionEnd Helpers
57   * ------------------------------------------------------------------------
58   */
59
60  var transition = false;
61
62  var MAX_UID = 1000000;
63
64  var TransitionEndEvent = {
65    WebkitTransition: 'webkitTransitionEnd',
66    MozTransition: 'transitionend',
67    OTransition: 'oTransitionEnd otransitionend',
68    transition: 'transitionend'
69  };
70
71  // shoutout AngusCroll (https://goo.gl/pxwQGp)
72  function toType(obj) {
73    return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
74  }
75
76  function isElement(obj) {
77    return (obj[0] || obj).nodeType;
78  }
79
80  function getSpecialTransitionEndEvent() {
81    return {
82      bindType: transition.end,
83      delegateType: transition.end,
84      handle: function handle(event) {
85        if ($(event.target).is(this)) {
86          return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
87        }
88        return undefined;
89      }
90    };
91  }
92
93  function transitionEndTest() {
94    if (window.QUnit) {
95      return false;
96    }
97
98    var el = document.createElement('bootstrap');
99
100    for (var _name in TransitionEndEvent) {
101      if (el.style[_name] !== undefined) {
102        return { end: TransitionEndEvent[_name] };
103      }
104    }
105
106    return false;
107  }
108
109  function transitionEndEmulator(duration) {
110    var _this = this;
111
112    var called = false;
113
114    $(this).one(Util.TRANSITION_END, function () {
115      called = true;
116    });
117
118    setTimeout(function () {
119      if (!called) {
120        Util.triggerTransitionEnd(_this);
121      }
122    }, duration);
123
124    return this;
125  }
126
127  function setTransitionEndSupport() {
128    transition = transitionEndTest();
129
130    $.fn.emulateTransitionEnd = transitionEndEmulator;
131
132    if (Util.supportsTransitionEnd()) {
133      $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
134    }
135  }
136
137  /**
138   * --------------------------------------------------------------------------
139   * Public Util Api
140   * --------------------------------------------------------------------------
141   */
142
143  var Util = {
144
145    TRANSITION_END: 'bsTransitionEnd',
146
147    getUID: function getUID(prefix) {
148      do {
149        /* eslint-disable no-bitwise */
150        prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
151        /* eslint-enable no-bitwise */
152      } while (document.getElementById(prefix));
153      return prefix;
154    },
155
156    getSelectorFromElement: function getSelectorFromElement(element) {
157      var selector = element.getAttribute('data-target');
158
159      if (!selector) {
160        selector = element.getAttribute('href') || '';
161        selector = /^#[a-z]/i.test(selector) ? selector : null;
162      }
163
164      return selector;
165    },
166
167    reflow: function reflow(element) {
168      new Function('bs', 'return bs')(element.offsetHeight);
169    },
170
171    triggerTransitionEnd: function triggerTransitionEnd(element) {
172      $(element).trigger(transition.end);
173    },
174
175    supportsTransitionEnd: function supportsTransitionEnd() {
176      return Boolean(transition);
177    },
178
179    typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
180      for (var property in configTypes) {
181        if (configTypes.hasOwnProperty(property)) {
182          var expectedTypes = configTypes[property];
183          var value = config[property];
184          var valueType = undefined;
185
186          if (value && isElement(value)) {
187            valueType = 'element';
188          } else {
189            valueType = toType(value);
190          }
191
192          if (!new RegExp(expectedTypes).test(valueType)) {
193            throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".'));
194          }
195        }
196      }
197    }
198  };
199
200  setTransitionEndSupport();
201
202  return Util;
203})(jQuery);
204
205/**
206 * --------------------------------------------------------------------------
207 * Bootstrap (v4.0.0-alpha.4): alert.js
208 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
209 * --------------------------------------------------------------------------
210 */
211
212var Alert = (function ($) {
213
214  /**
215   * ------------------------------------------------------------------------
216   * Constants
217   * ------------------------------------------------------------------------
218   */
219
220  var NAME = 'alert';
221  var VERSION = '4.0.0-alpha.4';
222  var DATA_KEY = 'bs.alert';
223  var EVENT_KEY = '.' + DATA_KEY;
224  var DATA_API_KEY = '.data-api';
225  var JQUERY_NO_CONFLICT = $.fn[NAME];
226  var TRANSITION_DURATION = 150;
227
228  var Selector = {
229    DISMISS: '[data-dismiss="alert"]'
230  };
231
232  var Event = {
233    CLOSE: 'close' + EVENT_KEY,
234    CLOSED: 'closed' + EVENT_KEY,
235    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
236  };
237
238  var ClassName = {
239    ALERT: 'alert',
240    FADE: 'fade',
241    IN: 'in'
242  };
243
244  /**
245   * ------------------------------------------------------------------------
246   * Class Definition
247   * ------------------------------------------------------------------------
248   */
249
250  var Alert = (function () {
251    function Alert(element) {
252      _classCallCheck(this, Alert);
253
254      this._element = element;
255    }
256
257    /**
258     * ------------------------------------------------------------------------
259     * Data Api implementation
260     * ------------------------------------------------------------------------
261     */
262
263    // getters
264
265    _createClass(Alert, [{
266      key: 'close',
267
268      // public
269
270      value: function close(element) {
271        element = element || this._element;
272
273        var rootElement = this._getRootElement(element);
274        var customEvent = this._triggerCloseEvent(rootElement);
275
276        if (customEvent.isDefaultPrevented()) {
277          return;
278        }
279
280        this._removeElement(rootElement);
281      }
282    }, {
283      key: 'dispose',
284      value: function dispose() {
285        $.removeData(this._element, DATA_KEY);
286        this._element = null;
287      }
288
289      // private
290
291    }, {
292      key: '_getRootElement',
293      value: function _getRootElement(element) {
294        var selector = Util.getSelectorFromElement(element);
295        var parent = false;
296
297        if (selector) {
298          parent = $(selector)[0];
299        }
300
301        if (!parent) {
302          parent = $(element).closest('.' + ClassName.ALERT)[0];
303        }
304
305        return parent;
306      }
307    }, {
308      key: '_triggerCloseEvent',
309      value: function _triggerCloseEvent(element) {
310        var closeEvent = $.Event(Event.CLOSE);
311
312        $(element).trigger(closeEvent);
313        return closeEvent;
314      }
315    }, {
316      key: '_removeElement',
317      value: function _removeElement(element) {
318        $(element).removeClass(ClassName.IN);
319
320        if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
321          this._destroyElement(element);
322          return;
323        }
324
325        $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
326      }
327    }, {
328      key: '_destroyElement',
329      value: function _destroyElement(element) {
330        $(element).detach().trigger(Event.CLOSED).remove();
331      }
332
333      // static
334
335    }], [{
336      key: '_jQueryInterface',
337      value: function _jQueryInterface(config) {
338        return this.each(function () {
339          var $element = $(this);
340          var data = $element.data(DATA_KEY);
341
342          if (!data) {
343            data = new Alert(this);
344            $element.data(DATA_KEY, data);
345          }
346
347          if (config === 'close') {
348            data[config](this);
349          }
350        });
351      }
352    }, {
353      key: '_handleDismiss',
354      value: function _handleDismiss(alertInstance) {
355        return function (event) {
356          if (event) {
357            event.preventDefault();
358          }
359
360          alertInstance.close(this);
361        };
362      }
363    }, {
364      key: 'VERSION',
365      get: function get() {
366        return VERSION;
367      }
368    }]);
369
370    return Alert;
371  })();
372
373  $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
374
375  /**
376   * ------------------------------------------------------------------------
377   * jQuery
378   * ------------------------------------------------------------------------
379   */
380
381  $.fn[NAME] = Alert._jQueryInterface;
382  $.fn[NAME].Constructor = Alert;
383  $.fn[NAME].noConflict = function () {
384    $.fn[NAME] = JQUERY_NO_CONFLICT;
385    return Alert._jQueryInterface;
386  };
387
388  return Alert;
389})(jQuery);
390
391/**
392 * --------------------------------------------------------------------------
393 * Bootstrap (v4.0.0-alpha.4): button.js
394 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
395 * --------------------------------------------------------------------------
396 */
397
398var Button = (function ($) {
399
400  /**
401   * ------------------------------------------------------------------------
402   * Constants
403   * ------------------------------------------------------------------------
404   */
405
406  var NAME = 'button';
407  var VERSION = '4.0.0-alpha.4';
408  var DATA_KEY = 'bs.button';
409  var EVENT_KEY = '.' + DATA_KEY;
410  var DATA_API_KEY = '.data-api';
411  var JQUERY_NO_CONFLICT = $.fn[NAME];
412
413  var ClassName = {
414    ACTIVE: 'active',
415    BUTTON: 'btn',
416    FOCUS: 'focus'
417  };
418
419  var Selector = {
420    DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
421    DATA_TOGGLE: '[data-toggle="buttons"]',
422    INPUT: 'input',
423    ACTIVE: '.active',
424    BUTTON: '.btn'
425  };
426
427  var Event = {
428    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
429    FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY)
430  };
431
432  /**
433   * ------------------------------------------------------------------------
434   * Class Definition
435   * ------------------------------------------------------------------------
436   */
437
438  var Button = (function () {
439    function Button(element) {
440      _classCallCheck(this, Button);
441
442      this._element = element;
443    }
444
445    /**
446     * ------------------------------------------------------------------------
447     * Data Api implementation
448     * ------------------------------------------------------------------------
449     */
450
451    // getters
452
453    _createClass(Button, [{
454      key: 'toggle',
455
456      // public
457
458      value: function toggle() {
459        var triggerChangeEvent = true;
460        var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
461
462        if (rootElement) {
463          var input = $(this._element).find(Selector.INPUT)[0];
464
465          if (input) {
466            if (input.type === 'radio') {
467              if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
468                triggerChangeEvent = false;
469              } else {
470                var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
471
472                if (activeElement) {
473                  $(activeElement).removeClass(ClassName.ACTIVE);
474                }
475              }
476            }
477
478            if (triggerChangeEvent) {
479              input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
480              $(this._element).trigger('change');
481            }
482
483            input.focus();
484          }
485        } else {
486          this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
487        }
488
489        if (triggerChangeEvent) {
490          $(this._element).toggleClass(ClassName.ACTIVE);
491        }
492      }
493    }, {
494      key: 'dispose',
495      value: function dispose() {
496        $.removeData(this._element, DATA_KEY);
497        this._element = null;
498      }
499
500      // static
501
502    }], [{
503      key: '_jQueryInterface',
504      value: function _jQueryInterface(config) {
505        return this.each(function () {
506          var data = $(this).data(DATA_KEY);
507
508          if (!data) {
509            data = new Button(this);
510            $(this).data(DATA_KEY, data);
511          }
512
513          if (config === 'toggle') {
514            data[config]();
515          }
516        });
517      }
518    }, {
519      key: 'VERSION',
520      get: function get() {
521        return VERSION;
522      }
523    }]);
524
525    return Button;
526  })();
527
528  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
529    event.preventDefault();
530
531    var button = event.target;
532
533    if (!$(button).hasClass(ClassName.BUTTON)) {
534      button = $(button).closest(Selector.BUTTON);
535    }
536
537    Button._jQueryInterface.call($(button), 'toggle');
538  }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
539    var button = $(event.target).closest(Selector.BUTTON)[0];
540    $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
541  });
542
543  /**
544   * ------------------------------------------------------------------------
545   * jQuery
546   * ------------------------------------------------------------------------
547   */
548
549  $.fn[NAME] = Button._jQueryInterface;
550  $.fn[NAME].Constructor = Button;
551  $.fn[NAME].noConflict = function () {
552    $.fn[NAME] = JQUERY_NO_CONFLICT;
553    return Button._jQueryInterface;
554  };
555
556  return Button;
557})(jQuery);
558
559/**
560 * --------------------------------------------------------------------------
561 * Bootstrap (v4.0.0-alpha.4): carousel.js
562 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
563 * --------------------------------------------------------------------------
564 */
565
566var Carousel = (function ($) {
567
568  /**
569   * ------------------------------------------------------------------------
570   * Constants
571   * ------------------------------------------------------------------------
572   */
573
574  var NAME = 'carousel';
575  var VERSION = '4.0.0-alpha.4';
576  var DATA_KEY = 'bs.carousel';
577  var EVENT_KEY = '.' + DATA_KEY;
578  var DATA_API_KEY = '.data-api';
579  var JQUERY_NO_CONFLICT = $.fn[NAME];
580  var TRANSITION_DURATION = 600;
581  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
582  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
583
584  var Default = {
585    interval: 5000,
586    keyboard: true,
587    slide: false,
588    pause: 'hover',
589    wrap: true
590  };
591
592  var DefaultType = {
593    interval: '(number|boolean)',
594    keyboard: 'boolean',
595    slide: '(boolean|string)',
596    pause: '(string|boolean)',
597    wrap: 'boolean'
598  };
599
600  var Direction = {
601    NEXT: 'next',
602    PREVIOUS: 'prev'
603  };
604
605  var Event = {
606    SLIDE: 'slide' + EVENT_KEY,
607    SLID: 'slid' + EVENT_KEY,
608    KEYDOWN: 'keydown' + EVENT_KEY,
609    MOUSEENTER: 'mouseenter' + EVENT_KEY,
610    MOUSELEAVE: 'mouseleave' + EVENT_KEY,
611    LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
612    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
613  };
614
615  var ClassName = {
616    CAROUSEL: 'carousel',
617    ACTIVE: 'active',
618    SLIDE: 'slide',
619    RIGHT: 'right',
620    LEFT: 'left',
621    ITEM: 'carousel-item'
622  };
623
624  var Selector = {
625    ACTIVE: '.active',
626    ACTIVE_ITEM: '.active.carousel-item',
627    ITEM: '.carousel-item',
628    NEXT_PREV: '.next, .prev',
629    INDICATORS: '.carousel-indicators',
630    DATA_SLIDE: '[data-slide], [data-slide-to]',
631    DATA_RIDE: '[data-ride="carousel"]'
632  };
633
634  /**
635   * ------------------------------------------------------------------------
636   * Class Definition
637   * ------------------------------------------------------------------------
638   */
639
640  var Carousel = (function () {
641    function Carousel(element, config) {
642      _classCallCheck(this, Carousel);
643
644      this._items = null;
645      this._interval = null;
646      this._activeElement = null;
647
648      this._isPaused = false;
649      this._isSliding = false;
650
651      this._config = this._getConfig(config);
652      this._element = $(element)[0];
653      this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
654
655      this._addEventListeners();
656    }
657
658    /**
659     * ------------------------------------------------------------------------
660     * Data Api implementation
661     * ------------------------------------------------------------------------
662     */
663
664    // getters
665
666    _createClass(Carousel, [{
667      key: 'next',
668
669      // public
670
671      value: function next() {
672        if (!this._isSliding) {
673          this._slide(Direction.NEXT);
674        }
675      }
676    }, {
677      key: 'nextWhenVisible',
678      value: function nextWhenVisible() {
679        // Don't call next when the page isn't visible
680        if (!document.hidden) {
681          this.next();
682        }
683      }
684    }, {
685      key: 'prev',
686      value: function prev() {
687        if (!this._isSliding) {
688          this._slide(Direction.PREVIOUS);
689        }
690      }
691    }, {
692      key: 'pause',
693      value: function pause(event) {
694        if (!event) {
695          this._isPaused = true;
696        }
697
698        if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
699          Util.triggerTransitionEnd(this._element);
700          this.cycle(true);
701        }
702
703        clearInterval(this._interval);
704        this._interval = null;
705      }
706    }, {
707      key: 'cycle',
708      value: function cycle(event) {
709        if (!event) {
710          this._isPaused = false;
711        }
712
713        if (this._interval) {
714          clearInterval(this._interval);
715          this._interval = null;
716        }
717
718        if (this._config.interval && !this._isPaused) {
719          this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
720        }
721      }
722    }, {
723      key: 'to',
724      value: function to(index) {
725        var _this2 = this;
726
727        this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
728
729        var activeIndex = this._getItemIndex(this._activeElement);
730
731        if (index > this._items.length - 1 || index < 0) {
732          return;
733        }
734
735        if (this._isSliding) {
736          $(this._element).one(Event.SLID, function () {
737            return _this2.to(index);
738          });
739          return;
740        }
741
742        if (activeIndex === index) {
743          this.pause();
744          this.cycle();
745          return;
746        }
747
748        var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
749
750        this._slide(direction, this._items[index]);
751      }
752    }, {
753      key: 'dispose',
754      value: function dispose() {
755        $(this._element).off(EVENT_KEY);
756        $.removeData(this._element, DATA_KEY);
757
758        this._items = null;
759        this._config = null;
760        this._element = null;
761        this._interval = null;
762        this._isPaused = null;
763        this._isSliding = null;
764        this._activeElement = null;
765        this._indicatorsElement = null;
766      }
767
768      // private
769
770    }, {
771      key: '_getConfig',
772      value: function _getConfig(config) {
773        config = $.extend({}, Default, config);
774        Util.typeCheckConfig(NAME, config, DefaultType);
775        return config;
776      }
777    }, {
778      key: '_addEventListeners',
779      value: function _addEventListeners() {
780        if (this._config.keyboard) {
781          $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
782        }
783
784        if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
785          $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
786        }
787      }
788    }, {
789      key: '_keydown',
790      value: function _keydown(event) {
791        event.preventDefault();
792
793        if (/input|textarea/i.test(event.target.tagName)) {
794          return;
795        }
796
797        switch (event.which) {
798          case ARROW_LEFT_KEYCODE:
799            this.prev();
800            break;
801          case ARROW_RIGHT_KEYCODE:
802            this.next();
803            break;
804          default:
805            return;
806        }
807      }
808    }, {
809      key: '_getItemIndex',
810      value: function _getItemIndex(element) {
811        this._items = $.makeArray($(element).parent().find(Selector.ITEM));
812        return this._items.indexOf(element);
813      }
814    }, {
815      key: '_getItemByDirection',
816      value: function _getItemByDirection(direction, activeElement) {
817        var isNextDirection = direction === Direction.NEXT;
818        var isPrevDirection = direction === Direction.PREVIOUS;
819        var activeIndex = this._getItemIndex(activeElement);
820        var lastItemIndex = this._items.length - 1;
821        var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
822
823        if (isGoingToWrap && !this._config.wrap) {
824          return activeElement;
825        }
826
827        var delta = direction === Direction.PREVIOUS ? -1 : 1;
828        var itemIndex = (activeIndex + delta) % this._items.length;
829
830        return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
831      }
832    }, {
833      key: '_triggerSlideEvent',
834      value: function _triggerSlideEvent(relatedTarget, directionalClassname) {
835        var slideEvent = $.Event(Event.SLIDE, {
836          relatedTarget: relatedTarget,
837          direction: directionalClassname
838        });
839
840        $(this._element).trigger(slideEvent);
841
842        return slideEvent;
843      }
844    }, {
845      key: '_setActiveIndicatorElement',
846      value: function _setActiveIndicatorElement(element) {
847        if (this._indicatorsElement) {
848          $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
849
850          var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
851
852          if (nextIndicator) {
853            $(nextIndicator).addClass(ClassName.ACTIVE);
854          }
855        }
856      }
857    }, {
858      key: '_slide',
859      value: function _slide(direction, element) {
860        var _this3 = this;
861
862        var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
863        var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
864
865        var isCycling = Boolean(this._interval);
866
867        var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;
868
869        if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
870          this._isSliding = false;
871          return;
872        }
873
874        var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
875        if (slideEvent.isDefaultPrevented()) {
876          return;
877        }
878
879        if (!activeElement || !nextElement) {
880          // some weirdness is happening, so we bail
881          return;
882        }
883
884        this._isSliding = true;
885
886        if (isCycling) {
887          this.pause();
888        }
889
890        this._setActiveIndicatorElement(nextElement);
891
892        var slidEvent = $.Event(Event.SLID, {
893          relatedTarget: nextElement,
894          direction: directionalClassName
895        });
896
897        if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
898
899          $(nextElement).addClass(direction);
900
901          Util.reflow(nextElement);
902
903          $(activeElement).addClass(directionalClassName);
904          $(nextElement).addClass(directionalClassName);
905
906          $(activeElement).one(Util.TRANSITION_END, function () {
907            $(nextElement).removeClass(directionalClassName).removeClass(direction);
908
909            $(nextElement).addClass(ClassName.ACTIVE);
910
911            $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
912
913            _this3._isSliding = false;
914
915            setTimeout(function () {
916              return $(_this3._element).trigger(slidEvent);
917            }, 0);
918          }).emulateTransitionEnd(TRANSITION_DURATION);
919        } else {
920          $(activeElement).removeClass(ClassName.ACTIVE);
921          $(nextElement).addClass(ClassName.ACTIVE);
922
923          this._isSliding = false;
924          $(this._element).trigger(slidEvent);
925        }
926
927        if (isCycling) {
928          this.cycle();
929        }
930      }
931
932      // static
933
934    }], [{
935      key: '_jQueryInterface',
936      value: function _jQueryInterface(config) {
937        return this.each(function () {
938          var data = $(this).data(DATA_KEY);
939          var _config = $.extend({}, Default, $(this).data());
940
941          if (typeof config === 'object') {
942            $.extend(_config, config);
943          }
944
945          var action = typeof config === 'string' ? config : _config.slide;
946
947          if (!data) {
948            data = new Carousel(this, _config);
949            $(this).data(DATA_KEY, data);
950          }
951
952          if (typeof config === 'number') {
953            data.to(config);
954          } else if (typeof action === 'string') {
955            if (data[action] === undefined) {
956              throw new Error('No method named "' + action + '"');
957            }
958            data[action]();
959          } else if (_config.interval) {
960            data.pause();
961            data.cycle();
962          }
963        });
964      }
965    }, {
966      key: '_dataApiClickHandler',
967      value: function _dataApiClickHandler(event) {
968        var selector = Util.getSelectorFromElement(this);
969
970        if (!selector) {
971          return;
972        }
973
974        var target = $(selector)[0];
975
976        if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
977          return;
978        }
979
980        var config = $.extend({}, $(target).data(), $(this).data());
981        var slideIndex = this.getAttribute('data-slide-to');
982
983        if (slideIndex) {
984          config.interval = false;
985        }
986
987        Carousel._jQueryInterface.call($(target), config);
988
989        if (slideIndex) {
990          $(target).data(DATA_KEY).to(slideIndex);
991        }
992
993        event.preventDefault();
994      }
995    }, {
996      key: 'VERSION',
997      get: function get() {
998        return VERSION;
999      }
1000    }, {
1001      key: 'Default',
1002      get: function get() {
1003        return Default;
1004      }
1005    }]);
1006
1007    return Carousel;
1008  })();
1009
1010  $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
1011
1012  $(window).on(Event.LOAD_DATA_API, function () {
1013    $(Selector.DATA_RIDE).each(function () {
1014      var $carousel = $(this);
1015      Carousel._jQueryInterface.call($carousel, $carousel.data());
1016    });
1017  });
1018
1019  /**
1020   * ------------------------------------------------------------------------
1021   * jQuery
1022   * ------------------------------------------------------------------------
1023   */
1024
1025  $.fn[NAME] = Carousel._jQueryInterface;
1026  $.fn[NAME].Constructor = Carousel;
1027  $.fn[NAME].noConflict = function () {
1028    $.fn[NAME] = JQUERY_NO_CONFLICT;
1029    return Carousel._jQueryInterface;
1030  };
1031
1032  return Carousel;
1033})(jQuery);
1034
1035/**
1036 * --------------------------------------------------------------------------
1037 * Bootstrap (v4.0.0-alpha.4): collapse.js
1038 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1039 * --------------------------------------------------------------------------
1040 */
1041
1042var Collapse = (function ($) {
1043
1044  /**
1045   * ------------------------------------------------------------------------
1046   * Constants
1047   * ------------------------------------------------------------------------
1048   */
1049
1050  var NAME = 'collapse';
1051  var VERSION = '4.0.0-alpha.4';
1052  var DATA_KEY = 'bs.collapse';
1053  var EVENT_KEY = '.' + DATA_KEY;
1054  var DATA_API_KEY = '.data-api';
1055  var JQUERY_NO_CONFLICT = $.fn[NAME];
1056  var TRANSITION_DURATION = 600;
1057
1058  var Default = {
1059    toggle: true,
1060    parent: ''
1061  };
1062
1063  var DefaultType = {
1064    toggle: 'boolean',
1065    parent: 'string'
1066  };
1067
1068  var Event = {
1069    SHOW: 'show' + EVENT_KEY,
1070    SHOWN: 'shown' + EVENT_KEY,
1071    HIDE: 'hide' + EVENT_KEY,
1072    HIDDEN: 'hidden' + EVENT_KEY,
1073    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
1074  };
1075
1076  var ClassName = {
1077    IN: 'in',
1078    COLLAPSE: 'collapse',
1079    COLLAPSING: 'collapsing',
1080    COLLAPSED: 'collapsed'
1081  };
1082
1083  var Dimension = {
1084    WIDTH: 'width',
1085    HEIGHT: 'height'
1086  };
1087
1088  var Selector = {
1089    ACTIVES: '.panel > .in, .panel > .collapsing',
1090    DATA_TOGGLE: '[data-toggle="collapse"]'
1091  };
1092
1093  /**
1094   * ------------------------------------------------------------------------
1095   * Class Definition
1096   * ------------------------------------------------------------------------
1097   */
1098
1099  var Collapse = (function () {
1100    function Collapse(element, config) {
1101      _classCallCheck(this, Collapse);
1102
1103      this._isTransitioning = false;
1104      this._element = element;
1105      this._config = this._getConfig(config);
1106      this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));
1107
1108      this._parent = this._config.parent ? this._getParent() : null;
1109
1110      if (!this._config.parent) {
1111        this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1112      }
1113
1114      if (this._config.toggle) {
1115        this.toggle();
1116      }
1117    }
1118
1119    /**
1120     * ------------------------------------------------------------------------
1121     * Data Api implementation
1122     * ------------------------------------------------------------------------
1123     */
1124
1125    // getters
1126
1127    _createClass(Collapse, [{
1128      key: 'toggle',
1129
1130      // public
1131
1132      value: function toggle() {
1133        if ($(this._element).hasClass(ClassName.IN)) {
1134          this.hide();
1135        } else {
1136          this.show();
1137        }
1138      }
1139    }, {
1140      key: 'show',
1141      value: function show() {
1142        var _this4 = this;
1143
1144        if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) {
1145          return;
1146        }
1147
1148        var actives = undefined;
1149        var activesData = undefined;
1150
1151        if (this._parent) {
1152          actives = $.makeArray($(Selector.ACTIVES));
1153          if (!actives.length) {
1154            actives = null;
1155          }
1156        }
1157
1158        if (actives) {
1159          activesData = $(actives).data(DATA_KEY);
1160          if (activesData && activesData._isTransitioning) {
1161            return;
1162          }
1163        }
1164
1165        var startEvent = $.Event(Event.SHOW);
1166        $(this._element).trigger(startEvent);
1167        if (startEvent.isDefaultPrevented()) {
1168          return;
1169        }
1170
1171        if (actives) {
1172          Collapse._jQueryInterface.call($(actives), 'hide');
1173          if (!activesData) {
1174            $(actives).data(DATA_KEY, null);
1175          }
1176        }
1177
1178        var dimension = this._getDimension();
1179
1180        $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
1181
1182        this._element.style[dimension] = 0;
1183        this._element.setAttribute('aria-expanded', true);
1184
1185        if (this._triggerArray.length) {
1186          $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
1187        }
1188
1189        this.setTransitioning(true);
1190
1191        var complete = function complete() {
1192          $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN);
1193
1194          _this4._element.style[dimension] = '';
1195
1196          _this4.setTransitioning(false);
1197
1198          $(_this4._element).trigger(Event.SHOWN);
1199        };
1200
1201        if (!Util.supportsTransitionEnd()) {
1202          complete();
1203          return;
1204        }
1205
1206        var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1207        var scrollSize = 'scroll' + capitalizedDimension;
1208
1209        $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1210
1211        this._element.style[dimension] = this._element[scrollSize] + 'px';
1212      }
1213    }, {
1214      key: 'hide',
1215      value: function hide() {
1216        var _this5 = this;
1217
1218        if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) {
1219          return;
1220        }
1221
1222        var startEvent = $.Event(Event.HIDE);
1223        $(this._element).trigger(startEvent);
1224        if (startEvent.isDefaultPrevented()) {
1225          return;
1226        }
1227
1228        var dimension = this._getDimension();
1229        var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight';
1230
1231        this._element.style[dimension] = this._element[offsetDimension] + 'px';
1232
1233        Util.reflow(this._element);
1234
1235        $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN);
1236
1237        this._element.setAttribute('aria-expanded', false);
1238
1239        if (this._triggerArray.length) {
1240          $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
1241        }
1242
1243        this.setTransitioning(true);
1244
1245        var complete = function complete() {
1246          _this5.setTransitioning(false);
1247          $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
1248        };
1249
1250        this._element.style[dimension] = 0;
1251
1252        if (!Util.supportsTransitionEnd()) {
1253          complete();
1254          return;
1255        }
1256
1257        $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1258      }
1259    }, {
1260      key: 'setTransitioning',
1261      value: function setTransitioning(isTransitioning) {
1262        this._isTransitioning = isTransitioning;
1263      }
1264    }, {
1265      key: 'dispose',
1266      value: function dispose() {
1267        $.removeData(this._element, DATA_KEY);
1268
1269        this._config = null;
1270        this._parent = null;
1271        this._element = null;
1272        this._triggerArray = null;
1273        this._isTransitioning = null;
1274      }
1275
1276      // private
1277
1278    }, {
1279      key: '_getConfig',
1280      value: function _getConfig(config) {
1281        config = $.extend({}, Default, config);
1282        config.toggle = Boolean(config.toggle); // coerce string values
1283        Util.typeCheckConfig(NAME, config, DefaultType);
1284        return config;
1285      }
1286    }, {
1287      key: '_getDimension',
1288      value: function _getDimension() {
1289        var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
1290        return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1291      }
1292    }, {
1293      key: '_getParent',
1294      value: function _getParent() {
1295        var _this6 = this;
1296
1297        var parent = $(this._config.parent)[0];
1298        var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';
1299
1300        $(parent).find(selector).each(function (i, element) {
1301          _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1302        });
1303
1304        return parent;
1305      }
1306    }, {
1307      key: '_addAriaAndCollapsedClass',
1308      value: function _addAriaAndCollapsedClass(element, triggerArray) {
1309        if (element) {
1310          var isOpen = $(element).hasClass(ClassName.IN);
1311          element.setAttribute('aria-expanded', isOpen);
1312
1313          if (triggerArray.length) {
1314            $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1315          }
1316        }
1317      }
1318
1319      // static
1320
1321    }], [{
1322      key: '_getTargetFromElement',
1323      value: function _getTargetFromElement(element) {
1324        var selector = Util.getSelectorFromElement(element);
1325        return selector ? $(selector)[0] : null;
1326      }
1327    }, {
1328      key: '_jQueryInterface',
1329      value: function _jQueryInterface(config) {
1330        return this.each(function () {
1331          var $this = $(this);
1332          var data = $this.data(DATA_KEY);
1333          var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
1334
1335          if (!data && _config.toggle && /show|hide/.test(config)) {
1336            _config.toggle = false;
1337          }
1338
1339          if (!data) {
1340            data = new Collapse(this, _config);
1341            $this.data(DATA_KEY, data);
1342          }
1343
1344          if (typeof config === 'string') {
1345            if (data[config] === undefined) {
1346              throw new Error('No method named "' + config + '"');
1347            }
1348            data[config]();
1349          }
1350        });
1351      }
1352    }, {
1353      key: 'VERSION',
1354      get: function get() {
1355        return VERSION;
1356      }
1357    }, {
1358      key: 'Default',
1359      get: function get() {
1360        return Default;
1361      }
1362    }]);
1363
1364    return Collapse;
1365  })();
1366
1367  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
1368    event.preventDefault();
1369
1370    var target = Collapse._getTargetFromElement(this);
1371    var data = $(target).data(DATA_KEY);
1372    var config = data ? 'toggle' : $(this).data();
1373
1374    Collapse._jQueryInterface.call($(target), config);
1375  });
1376
1377  /**
1378   * ------------------------------------------------------------------------
1379   * jQuery
1380   * ------------------------------------------------------------------------
1381   */
1382
1383  $.fn[NAME] = Collapse._jQueryInterface;
1384  $.fn[NAME].Constructor = Collapse;
1385  $.fn[NAME].noConflict = function () {
1386    $.fn[NAME] = JQUERY_NO_CONFLICT;
1387    return Collapse._jQueryInterface;
1388  };
1389
1390  return Collapse;
1391})(jQuery);
1392
1393/**
1394 * --------------------------------------------------------------------------
1395 * Bootstrap (v4.0.0-alpha.4): dropdown.js
1396 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1397 * --------------------------------------------------------------------------
1398 */
1399
1400var Dropdown = (function ($) {
1401
1402  /**
1403   * ------------------------------------------------------------------------
1404   * Constants
1405   * ------------------------------------------------------------------------
1406   */
1407
1408  var NAME = 'dropdown';
1409  var VERSION = '4.0.0-alpha.4';
1410  var DATA_KEY = 'bs.dropdown';
1411  var EVENT_KEY = '.' + DATA_KEY;
1412  var DATA_API_KEY = '.data-api';
1413  var JQUERY_NO_CONFLICT = $.fn[NAME];
1414  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1415  var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
1416  var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
1417  var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
1418
1419  var Event = {
1420    HIDE: 'hide' + EVENT_KEY,
1421    HIDDEN: 'hidden' + EVENT_KEY,
1422    SHOW: 'show' + EVENT_KEY,
1423    SHOWN: 'shown' + EVENT_KEY,
1424    CLICK: 'click' + EVENT_KEY,
1425    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY,
1426    KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY
1427  };
1428
1429  var ClassName = {
1430    BACKDROP: 'dropdown-backdrop',
1431    DISABLED: 'disabled',
1432    OPEN: 'open'
1433  };
1434
1435  var Selector = {
1436    BACKDROP: '.dropdown-backdrop',
1437    DATA_TOGGLE: '[data-toggle="dropdown"]',
1438    FORM_CHILD: '.dropdown form',
1439    ROLE_MENU: '[role="menu"]',
1440    ROLE_LISTBOX: '[role="listbox"]',
1441    NAVBAR_NAV: '.navbar-nav',
1442    VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a'
1443  };
1444
1445  /**
1446   * ------------------------------------------------------------------------
1447   * Class Definition
1448   * ------------------------------------------------------------------------
1449   */
1450
1451  var Dropdown = (function () {
1452    function Dropdown(element) {
1453      _classCallCheck(this, Dropdown);
1454
1455      this._element = element;
1456
1457      this._addEventListeners();
1458    }
1459
1460    /**
1461     * ------------------------------------------------------------------------
1462     * Data Api implementation
1463     * ------------------------------------------------------------------------
1464     */
1465
1466    // getters
1467
1468    _createClass(Dropdown, [{
1469      key: 'toggle',
1470
1471      // public
1472
1473      value: function toggle() {
1474        if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1475          return false;
1476        }
1477
1478        var parent = Dropdown._getParentFromElement(this);
1479        var isActive = $(parent).hasClass(ClassName.OPEN);
1480
1481        Dropdown._clearMenus();
1482
1483        if (isActive) {
1484          return false;
1485        }
1486
1487        if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
1488
1489          // if mobile we use a backdrop because click events don't delegate
1490          var dropdown = document.createElement('div');
1491          dropdown.className = ClassName.BACKDROP;
1492          $(dropdown).insertBefore(this);
1493          $(dropdown).on('click', Dropdown._clearMenus);
1494        }
1495
1496        var relatedTarget = { relatedTarget: this };
1497        var showEvent = $.Event(Event.SHOW, relatedTarget);
1498
1499        $(parent).trigger(showEvent);
1500
1501        if (showEvent.isDefaultPrevented()) {
1502          return false;
1503        }
1504
1505        this.focus();
1506        this.setAttribute('aria-expanded', 'true');
1507
1508        $(parent).toggleClass(ClassName.OPEN);
1509        $(parent).trigger($.Event(Event.SHOWN, relatedTarget));
1510
1511        return false;
1512      }
1513    }, {
1514      key: 'dispose',
1515      value: function dispose() {
1516        $.removeData(this._element, DATA_KEY);
1517        $(this._element).off(EVENT_KEY);
1518        this._element = null;
1519      }
1520
1521      // private
1522
1523    }, {
1524      key: '_addEventListeners',
1525      value: function _addEventListeners() {
1526        $(this._element).on(Event.CLICK, this.toggle);
1527      }
1528
1529      // static
1530
1531    }], [{
1532      key: '_jQueryInterface',
1533      value: function _jQueryInterface(config) {
1534        return this.each(function () {
1535          var data = $(this).data(DATA_KEY);
1536
1537          if (!data) {
1538            $(this).data(DATA_KEY, data = new Dropdown(this));
1539          }
1540
1541          if (typeof config === 'string') {
1542            if (data[config] === undefined) {
1543              throw new Error('No method named "' + config + '"');
1544            }
1545            data[config].call(this);
1546          }
1547        });
1548      }
1549    }, {
1550      key: '_clearMenus',
1551      value: function _clearMenus(event) {
1552        if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
1553          return;
1554        }
1555
1556        var backdrop = $(Selector.BACKDROP)[0];
1557        if (backdrop) {
1558          backdrop.parentNode.removeChild(backdrop);
1559        }
1560
1561        var toggles = $.makeArray($(Selector.DATA_TOGGLE));
1562
1563        for (var i = 0; i < toggles.length; i++) {
1564          var _parent = Dropdown._getParentFromElement(toggles[i]);
1565          var relatedTarget = { relatedTarget: toggles[i] };
1566
1567          if (!$(_parent).hasClass(ClassName.OPEN)) {
1568            continue;
1569          }
1570
1571          if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) {
1572            continue;
1573          }
1574
1575          var hideEvent = $.Event(Event.HIDE, relatedTarget);
1576          $(_parent).trigger(hideEvent);
1577          if (hideEvent.isDefaultPrevented()) {
1578            continue;
1579          }
1580
1581          toggles[i].setAttribute('aria-expanded', 'false');
1582
1583          $(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget));
1584        }
1585      }
1586    }, {
1587      key: '_getParentFromElement',
1588      value: function _getParentFromElement(element) {
1589        var parent = undefined;
1590        var selector = Util.getSelectorFromElement(element);
1591
1592        if (selector) {
1593          parent = $(selector)[0];
1594        }
1595
1596        return parent || element.parentNode;
1597      }
1598    }, {
1599      key: '_dataApiKeydownHandler',
1600      value: function _dataApiKeydownHandler(event) {
1601        if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) {
1602          return;
1603        }
1604
1605        event.preventDefault();
1606        event.stopPropagation();
1607
1608        if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
1609          return;
1610        }
1611
1612        var parent = Dropdown._getParentFromElement(this);
1613        var isActive = $(parent).hasClass(ClassName.OPEN);
1614
1615        if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
1616
1617          if (event.which === ESCAPE_KEYCODE) {
1618            var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
1619            $(toggle).trigger('focus');
1620          }
1621
1622          $(this).trigger('click');
1623          return;
1624        }
1625
1626        var items = $.makeArray($(Selector.VISIBLE_ITEMS));
1627
1628        items = items.filter(function (item) {
1629          return item.offsetWidth || item.offsetHeight;
1630        });
1631
1632        if (!items.length) {
1633          return;
1634        }
1635
1636        var index = items.indexOf(event.target);
1637
1638        if (event.which === ARROW_UP_KEYCODE && index > 0) {
1639          // up
1640          index--;
1641        }
1642
1643        if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
1644          // down
1645          index++;
1646        }
1647
1648        if (index < 0) {
1649          index = 0;
1650        }
1651
1652        items[index].focus();
1653      }
1654    }, {
1655      key: 'VERSION',
1656      get: function get() {
1657        return VERSION;
1658      }
1659    }]);
1660
1661    return Dropdown;
1662  })();
1663
1664  $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
1665    e.stopPropagation();
1666  });
1667
1668  /**
1669   * ------------------------------------------------------------------------
1670   * jQuery
1671   * ------------------------------------------------------------------------
1672   */
1673
1674  $.fn[NAME] = Dropdown._jQueryInterface;
1675  $.fn[NAME].Constructor = Dropdown;
1676  $.fn[NAME].noConflict = function () {
1677    $.fn[NAME] = JQUERY_NO_CONFLICT;
1678    return Dropdown._jQueryInterface;
1679  };
1680
1681  return Dropdown;
1682})(jQuery);
1683
1684/**
1685 * --------------------------------------------------------------------------
1686 * Bootstrap (v4.0.0-alpha.4): modal.js
1687 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1688 * --------------------------------------------------------------------------
1689 */
1690
1691var Modal = (function ($) {
1692
1693  /**
1694   * ------------------------------------------------------------------------
1695   * Constants
1696   * ------------------------------------------------------------------------
1697   */
1698
1699  var NAME = 'modal';
1700  var VERSION = '4.0.0-alpha.4';
1701  var DATA_KEY = 'bs.modal';
1702  var EVENT_KEY = '.' + DATA_KEY;
1703  var DATA_API_KEY = '.data-api';
1704  var JQUERY_NO_CONFLICT = $.fn[NAME];
1705  var TRANSITION_DURATION = 300;
1706  var BACKDROP_TRANSITION_DURATION = 150;
1707  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1708
1709  var Default = {
1710    backdrop: true,
1711    keyboard: true,
1712    focus: true,
1713    show: true
1714  };
1715
1716  var DefaultType = {
1717    backdrop: '(boolean|string)',
1718    keyboard: 'boolean',
1719    focus: 'boolean',
1720    show: 'boolean'
1721  };
1722
1723  var Event = {
1724    HIDE: 'hide' + EVENT_KEY,
1725    HIDDEN: 'hidden' + EVENT_KEY,
1726    SHOW: 'show' + EVENT_KEY,
1727    SHOWN: 'shown' + EVENT_KEY,
1728    FOCUSIN: 'focusin' + EVENT_KEY,
1729    RESIZE: 'resize' + EVENT_KEY,
1730    CLICK_DISMISS: 'click.dismiss' + EVENT_KEY,
1731    KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY,
1732    MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY,
1733    MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY,
1734    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
1735  };
1736
1737  var ClassName = {
1738    SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
1739    BACKDROP: 'modal-backdrop',
1740    OPEN: 'modal-open',
1741    FADE: 'fade',
1742    IN: 'in'
1743  };
1744
1745  var Selector = {
1746    DIALOG: '.modal-dialog',
1747    DATA_TOGGLE: '[data-toggle="modal"]',
1748    DATA_DISMISS: '[data-dismiss="modal"]',
1749    FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'
1750  };
1751
1752  /**
1753   * ------------------------------------------------------------------------
1754   * Class Definition
1755   * ------------------------------------------------------------------------
1756   */
1757
1758  var Modal = (function () {
1759    function Modal(element, config) {
1760      _classCallCheck(this, Modal);
1761
1762      this._config = this._getConfig(config);
1763      this._element = element;
1764      this._dialog = $(element).find(Selector.DIALOG)[0];
1765      this._backdrop = null;
1766      this._isShown = false;
1767      this._isBodyOverflowing = false;
1768      this._ignoreBackdropClick = false;
1769      this._originalBodyPadding = 0;
1770      this._scrollbarWidth = 0;
1771    }
1772
1773    /**
1774     * ------------------------------------------------------------------------
1775     * Data Api implementation
1776     * ------------------------------------------------------------------------
1777     */
1778
1779    // getters
1780
1781    _createClass(Modal, [{
1782      key: 'toggle',
1783
1784      // public
1785
1786      value: function toggle(relatedTarget) {
1787        return this._isShown ? this.hide() : this.show(relatedTarget);
1788      }
1789    }, {
1790      key: 'show',
1791      value: function show(relatedTarget) {
1792        var _this7 = this;
1793
1794        var showEvent = $.Event(Event.SHOW, {
1795          relatedTarget: relatedTarget
1796        });
1797
1798        $(this._element).trigger(showEvent);
1799
1800        if (this._isShown || showEvent.isDefaultPrevented()) {
1801          return;
1802        }
1803
1804        this._isShown = true;
1805
1806        this._checkScrollbar();
1807        this._setScrollbar();
1808
1809        $(document.body).addClass(ClassName.OPEN);
1810
1811        this._setEscapeEvent();
1812        this._setResizeEvent();
1813
1814        $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
1815
1816        $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
1817          $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) {
1818            if ($(event.target).is(_this7._element)) {
1819              _this7._ignoreBackdropClick = true;
1820            }
1821          });
1822        });
1823
1824        this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
1825      }
1826    }, {
1827      key: 'hide',
1828      value: function hide(event) {
1829        if (event) {
1830          event.preventDefault();
1831        }
1832
1833        var hideEvent = $.Event(Event.HIDE);
1834
1835        $(this._element).trigger(hideEvent);
1836
1837        if (!this._isShown || hideEvent.isDefaultPrevented()) {
1838          return;
1839        }
1840
1841        this._isShown = false;
1842
1843        this._setEscapeEvent();
1844        this._setResizeEvent();
1845
1846        $(document).off(Event.FOCUSIN);
1847
1848        $(this._element).removeClass(ClassName.IN);
1849
1850        $(this._element).off(Event.CLICK_DISMISS);
1851        $(this._dialog).off(Event.MOUSEDOWN_DISMISS);
1852
1853        if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
1854
1855          $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
1856        } else {
1857          this._hideModal();
1858        }
1859      }
1860    }, {
1861      key: 'dispose',
1862      value: function dispose() {
1863        $.removeData(this._element, DATA_KEY);
1864
1865        $(window).off(EVENT_KEY);
1866        $(document).off(EVENT_KEY);
1867        $(this._element).off(EVENT_KEY);
1868        $(this._backdrop).off(EVENT_KEY);
1869
1870        this._config = null;
1871        this._element = null;
1872        this._dialog = null;
1873        this._backdrop = null;
1874        this._isShown = null;
1875        this._isBodyOverflowing = null;
1876        this._ignoreBackdropClick = null;
1877        this._originalBodyPadding = null;
1878        this._scrollbarWidth = null;
1879      }
1880
1881      // private
1882
1883    }, {
1884      key: '_getConfig',
1885      value: function _getConfig(config) {
1886        config = $.extend({}, Default, config);
1887        Util.typeCheckConfig(NAME, config, DefaultType);
1888        return config;
1889      }
1890    }, {
1891      key: '_showElement',
1892      value: function _showElement(relatedTarget) {
1893        var _this8 = this;
1894
1895        var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
1896
1897        if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
1898          // don't move modals dom position
1899          document.body.appendChild(this._element);
1900        }
1901
1902        this._element.style.display = 'block';
1903        this._element.removeAttribute('aria-hidden');
1904        this._element.scrollTop = 0;
1905
1906        if (transition) {
1907          Util.reflow(this._element);
1908        }
1909
1910        $(this._element).addClass(ClassName.IN);
1911
1912        if (this._config.focus) {
1913          this._enforceFocus();
1914        }
1915
1916        var shownEvent = $.Event(Event.SHOWN, {
1917          relatedTarget: relatedTarget
1918        });
1919
1920        var transitionComplete = function transitionComplete() {
1921          if (_this8._config.focus) {
1922            _this8._element.focus();
1923          }
1924          $(_this8._element).trigger(shownEvent);
1925        };
1926
1927        if (transition) {
1928          $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION);
1929        } else {
1930          transitionComplete();
1931        }
1932      }
1933    }, {
1934      key: '_enforceFocus',
1935      value: function _enforceFocus() {
1936        var _this9 = this;
1937
1938        $(document).off(Event.FOCUSIN) // guard against infinite focus loop
1939        .on(Event.FOCUSIN, function (event) {
1940          if (document !== event.target && _this9._element !== event.target && !$(_this9._element).has(event.target).length) {
1941            _this9._element.focus();
1942          }
1943        });
1944      }
1945    }, {
1946      key: '_setEscapeEvent',
1947      value: function _setEscapeEvent() {
1948        var _this10 = this;
1949
1950        if (this._isShown && this._config.keyboard) {
1951          $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
1952            if (event.which === ESCAPE_KEYCODE) {
1953              _this10.hide();
1954            }
1955          });
1956        } else if (!this._isShown) {
1957          $(this._element).off(Event.KEYDOWN_DISMISS);
1958        }
1959      }
1960    }, {
1961      key: '_setResizeEvent',
1962      value: function _setResizeEvent() {
1963        if (this._isShown) {
1964          $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this));
1965        } else {
1966          $(window).off(Event.RESIZE);
1967        }
1968      }
1969    }, {
1970      key: '_hideModal',
1971      value: function _hideModal() {
1972        var _this11 = this;
1973
1974        this._element.style.display = 'none';
1975        this._element.setAttribute('aria-hidden', 'true');
1976        this._showBackdrop(function () {
1977          $(document.body).removeClass(ClassName.OPEN);
1978          _this11._resetAdjustments();
1979          _this11._resetScrollbar();
1980          $(_this11._element).trigger(Event.HIDDEN);
1981        });
1982      }
1983    }, {
1984      key: '_removeBackdrop',
1985      value: function _removeBackdrop() {
1986        if (this._backdrop) {
1987          $(this._backdrop).remove();
1988          this._backdrop = null;
1989        }
1990      }
1991    }, {
1992      key: '_showBackdrop',
1993      value: function _showBackdrop(callback) {
1994        var _this12 = this;
1995
1996        var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
1997
1998        if (this._isShown && this._config.backdrop) {
1999          var doAnimate = Util.supportsTransitionEnd() && animate;
2000
2001          this._backdrop = document.createElement('div');
2002          this._backdrop.className = ClassName.BACKDROP;
2003
2004          if (animate) {
2005            $(this._backdrop).addClass(animate);
2006          }
2007
2008          $(this._backdrop).appendTo(document.body);
2009
2010          $(this._element).on(Event.CLICK_DISMISS, function (event) {
2011            if (_this12._ignoreBackdropClick) {
2012              _this12._ignoreBackdropClick = false;
2013              return;
2014            }
2015            if (event.target !== event.currentTarget) {
2016              return;
2017            }
2018            if (_this12._config.backdrop === 'static') {
2019              _this12._element.focus();
2020            } else {
2021              _this12.hide();
2022            }
2023          });
2024
2025          if (doAnimate) {
2026            Util.reflow(this._backdrop);
2027          }
2028
2029          $(this._backdrop).addClass(ClassName.IN);
2030
2031          if (!callback) {
2032            return;
2033          }
2034
2035          if (!doAnimate) {
2036            callback();
2037            return;
2038          }
2039
2040          $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2041        } else if (!this._isShown && this._backdrop) {
2042          $(this._backdrop).removeClass(ClassName.IN);
2043
2044          var callbackRemove = function callbackRemove() {
2045            _this12._removeBackdrop();
2046            if (callback) {
2047              callback();
2048            }
2049          };
2050
2051          if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
2052            $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION);
2053          } else {
2054            callbackRemove();
2055          }
2056        } else if (callback) {
2057          callback();
2058        }
2059      }
2060
2061      // ----------------------------------------------------------------------
2062      // the following methods are used to handle overflowing modals
2063      // todo (fat): these should probably be refactored out of modal.js
2064      // ----------------------------------------------------------------------
2065
2066    }, {
2067      key: '_handleUpdate',
2068      value: function _handleUpdate() {
2069        this._adjustDialog();
2070      }
2071    }, {
2072      key: '_adjustDialog',
2073      value: function _adjustDialog() {
2074        var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2075
2076        if (!this._isBodyOverflowing && isModalOverflowing) {
2077          this._element.style.paddingLeft = this._scrollbarWidth + 'px';
2078        }
2079
2080        if (this._isBodyOverflowing && !isModalOverflowing) {
2081          this._element.style.paddingRight = this._scrollbarWidth + 'px';
2082        }
2083      }
2084    }, {
2085      key: '_resetAdjustments',
2086      value: function _resetAdjustments() {
2087        this._element.style.paddingLeft = '';
2088        this._element.style.paddingRight = '';
2089      }
2090    }, {
2091      key: '_checkScrollbar',
2092      value: function _checkScrollbar() {
2093        this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
2094        this._scrollbarWidth = this._getScrollbarWidth();
2095      }
2096    }, {
2097      key: '_setScrollbar',
2098      value: function _setScrollbar() {
2099        var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10);
2100
2101        this._originalBodyPadding = document.body.style.paddingRight || '';
2102
2103        if (this._isBodyOverflowing) {
2104          document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px';
2105        }
2106      }
2107    }, {
2108      key: '_resetScrollbar',
2109      value: function _resetScrollbar() {
2110        document.body.style.paddingRight = this._originalBodyPadding;
2111      }
2112    }, {
2113      key: '_getScrollbarWidth',
2114      value: function _getScrollbarWidth() {
2115        // thx d.walsh
2116        var scrollDiv = document.createElement('div');
2117        scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
2118        document.body.appendChild(scrollDiv);
2119        var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
2120        document.body.removeChild(scrollDiv);
2121        return scrollbarWidth;
2122      }
2123
2124      // static
2125
2126    }], [{
2127      key: '_jQueryInterface',
2128      value: function _jQueryInterface(config, relatedTarget) {
2129        return this.each(function () {
2130          var data = $(this).data(DATA_KEY);
2131          var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
2132
2133          if (!data) {
2134            data = new Modal(this, _config);
2135            $(this).data(DATA_KEY, data);
2136          }
2137
2138          if (typeof config === 'string') {
2139            if (data[config] === undefined) {
2140              throw new Error('No method named "' + config + '"');
2141            }
2142            data[config](relatedTarget);
2143          } else if (_config.show) {
2144            data.show(relatedTarget);
2145          }
2146        });
2147      }
2148    }, {
2149      key: 'VERSION',
2150      get: function get() {
2151        return VERSION;
2152      }
2153    }, {
2154      key: 'Default',
2155      get: function get() {
2156        return Default;
2157      }
2158    }]);
2159
2160    return Modal;
2161  })();
2162
2163  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
2164    var _this13 = this;
2165
2166    var target = undefined;
2167    var selector = Util.getSelectorFromElement(this);
2168
2169    if (selector) {
2170      target = $(selector)[0];
2171    }
2172
2173    var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());
2174
2175    if (this.tagName === 'A') {
2176      event.preventDefault();
2177    }
2178
2179    var $target = $(target).one(Event.SHOW, function (showEvent) {
2180      if (showEvent.isDefaultPrevented()) {
2181        // only register focus restorer if modal will actually get shown
2182        return;
2183      }
2184
2185      $target.one(Event.HIDDEN, function () {
2186        if ($(_this13).is(':visible')) {
2187          _this13.focus();
2188        }
2189      });
2190    });
2191
2192    Modal._jQueryInterface.call($(target), config, this);
2193  });
2194
2195  /**
2196   * ------------------------------------------------------------------------
2197   * jQuery
2198   * ------------------------------------------------------------------------
2199   */
2200
2201  $.fn[NAME] = Modal._jQueryInterface;
2202  $.fn[NAME].Constructor = Modal;
2203  $.fn[NAME].noConflict = function () {
2204    $.fn[NAME] = JQUERY_NO_CONFLICT;
2205    return Modal._jQueryInterface;
2206  };
2207
2208  return Modal;
2209})(jQuery);
2210
2211/**
2212 * --------------------------------------------------------------------------
2213 * Bootstrap (v4.0.0-alpha.4): scrollspy.js
2214 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2215 * --------------------------------------------------------------------------
2216 */
2217
2218var ScrollSpy = (function ($) {
2219
2220  /**
2221   * ------------------------------------------------------------------------
2222   * Constants
2223   * ------------------------------------------------------------------------
2224   */
2225
2226  var NAME = 'scrollspy';
2227  var VERSION = '4.0.0-alpha.4';
2228  var DATA_KEY = 'bs.scrollspy';
2229  var EVENT_KEY = '.' + DATA_KEY;
2230  var DATA_API_KEY = '.data-api';
2231  var JQUERY_NO_CONFLICT = $.fn[NAME];
2232
2233  var Default = {
2234    offset: 10,
2235    method: 'auto',
2236    target: ''
2237  };
2238
2239  var DefaultType = {
2240    offset: 'number',
2241    method: 'string',
2242    target: '(string|element)'
2243  };
2244
2245  var Event = {
2246    ACTIVATE: 'activate' + EVENT_KEY,
2247    SCROLL: 'scroll' + EVENT_KEY,
2248    LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY
2249  };
2250
2251  var ClassName = {
2252    DROPDOWN_ITEM: 'dropdown-item',
2253    DROPDOWN_MENU: 'dropdown-menu',
2254    NAV_LINK: 'nav-link',
2255    NAV: 'nav',
2256    ACTIVE: 'active'
2257  };
2258
2259  var Selector = {
2260    DATA_SPY: '[data-spy="scroll"]',
2261    ACTIVE: '.active',
2262    LIST_ITEM: '.list-item',
2263    LI: 'li',
2264    LI_DROPDOWN: 'li.dropdown',
2265    NAV_LINKS: '.nav-link',
2266    DROPDOWN: '.dropdown',
2267    DROPDOWN_ITEMS: '.dropdown-item',
2268    DROPDOWN_TOGGLE: '.dropdown-toggle'
2269  };
2270
2271  var OffsetMethod = {
2272    OFFSET: 'offset',
2273    POSITION: 'position'
2274  };
2275
2276  /**
2277   * ------------------------------------------------------------------------
2278   * Class Definition
2279   * ------------------------------------------------------------------------
2280   */
2281
2282  var ScrollSpy = (function () {
2283    function ScrollSpy(element, config) {
2284      _classCallCheck(this, ScrollSpy);
2285
2286      this._element = element;
2287      this._scrollElement = element.tagName === 'BODY' ? window : element;
2288      this._config = this._getConfig(config);
2289      this._selector = this._config.target + ' ' + Selector.NAV_LINKS + ',' + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS);
2290      this._offsets = [];
2291      this._targets = [];
2292      this._activeTarget = null;
2293      this._scrollHeight = 0;
2294
2295      $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this));
2296
2297      this.refresh();
2298      this._process();
2299    }
2300
2301    /**
2302     * ------------------------------------------------------------------------
2303     * Data Api implementation
2304     * ------------------------------------------------------------------------
2305     */
2306
2307    // getters
2308
2309    _createClass(ScrollSpy, [{
2310      key: 'refresh',
2311
2312      // public
2313
2314      value: function refresh() {
2315        var _this14 = this;
2316
2317        var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
2318
2319        var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
2320
2321        var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
2322
2323        this._offsets = [];
2324        this._targets = [];
2325
2326        this._scrollHeight = this._getScrollHeight();
2327
2328        var targets = $.makeArray($(this._selector));
2329
2330        targets.map(function (element) {
2331          var target = undefined;
2332          var targetSelector = Util.getSelectorFromElement(element);
2333
2334          if (targetSelector) {
2335            target = $(targetSelector)[0];
2336          }
2337
2338          if (target && (target.offsetWidth || target.offsetHeight)) {
2339            // todo (fat): remove sketch reliance on jQuery position/offset
2340            return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
2341          }
2342          return null;
2343        }).filter(function (item) {
2344          return item;
2345        }).sort(function (a, b) {
2346          return a[0] - b[0];
2347        }
2347).forEach(function (item) {
2348          _this14._offsets.push(item[0]);
2349          _this14._targets.push(item[1]);
2350        });
2351      }
2352    }, {
2353      key: 'dispose',
2354      value: function dispose() {
2355        $.removeData(this._element, DATA_KEY);
2356        $(this._scrollElement).off(EVENT_KEY);
2357
2358        this._element = null;
2359        this._scrollElement = null;
2360        this._config = null;
2361        this._selector = null;
2362        this._offsets = null;
2363        this._targets = null;
2364        this._activeTarget = null;
2365        this._scrollHeight = null;
2366      }
2367
2368      // private
2369
2370    }, {
2371      key: '_getConfig',
2372      value: function _getConfig(config) {
2373        config = $.extend({}, Default, config);
2374
2375        if (typeof config.target !== 'string') {
2376          var id = $(config.target).attr('id');
2377          if (!id) {
2378            id = Util.getUID(NAME);
2379            $(config.target).attr('id', id);
2380          }
2381          config.target = '#' + id;
2382        }
2383
2384        Util.typeCheckConfig(NAME, config, DefaultType);
2385
2386        return config;
2387      }
2388    }, {
2389      key: '_getScrollTop',
2390      value: function _getScrollTop() {
2391        return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop;
2392      }
2393    }, {
2394      key: '_getScrollHeight',
2395      value: function _getScrollHeight() {
2396        return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
2397      }
2398    }, {
2399      key: '_process',
2400      value: function _process() {
2401        var scrollTop = this._getScrollTop() + this._config.offset;
2402        var scrollHeight = this._getScrollHeight();
2403        var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight;
2404
2405        if (this._scrollHeight !== scrollHeight) {
2406          this.refresh();
2407        }
2408
2409        if (scrollTop >= maxScroll) {
2410          var target = this._targets[this._targets.length - 1];
2411
2412          if (this._activeTarget !== target) {
2413            this._activate(target);
2414          }
2415        }
2416
2417        if (this._activeTarget && scrollTop < this._offsets[0]) {
2418          this._activeTarget = null;
2419          this._clear();
2420          return;
2421        }
2422
2423        for (var i = this._offsets.length; i--;) {
2424          var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]);
2425
2426          if (isActiveTarget) {
2427            this._activate(this._targets[i]);
2428          }
2429        }
2430      }
2431    }, {
2432      key: '_activate',
2433      value: function _activate(target) {
2434        this._activeTarget = target;
2435
2436        this._clear();
2437
2438        var queries = this._selector.split(',');
2439        queries = queries.map(function (selector) {
2440          return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]');
2441        });
2442
2443        var $link = $(queries.join(','));
2444
2445        if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
2446          $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2447          $link.addClass(ClassName.ACTIVE);
2448        } else {
2449          // todo (fat) this is kinda sus...
2450          // recursively add actives to tested nav-links
2451          $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
2452        }
2453
2454        $(this._scrollElement).trigger(Event.ACTIVATE, {
2455          relatedTarget: target
2456        });
2457      }
2458    }, {
2459      key: '_clear',
2460      value: function _clear() {
2461        $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
2462      }
2463
2464      // static
2465
2466    }], [{
2467      key: '_jQueryInterface',
2468      value: function _jQueryInterface(config) {
2469        return this.each(function () {
2470          var data = $(this).data(DATA_KEY);
2471          var _config = typeof config === 'object' && config || null;
2472
2473          if (!data) {
2474            data = new ScrollSpy(this, _config);
2475            $(this).data(DATA_KEY, data);
2476          }
2477
2478          if (typeof config === 'string') {
2479            if (data[config] === undefined) {
2480              throw new Error('No method named "' + config + '"');
2481            }
2482            data[config]();
2483          }
2484        });
2485      }
2486    }, {
2487      key: 'VERSION',
2488      get: function get() {
2489        return VERSION;
2490      }
2491    }, {
2492      key: 'Default',
2493      get: function get() {
2494        return Default;
2495      }
2496    }]);
2497
2498    return ScrollSpy;
2499  })();
2500
2501  $(window).on(Event.LOAD_DATA_API, function () {
2502    var scrollSpys = $.makeArray($(Selector.DATA_SPY));
2503
2504    for (var i = scrollSpys.length; i--;) {
2505      var $spy = $(scrollSpys[i]);
2506      ScrollSpy._jQueryInterface.call($spy, $spy.data());
2507    }
2508  });
2509
2510  /**
2511   * ------------------------------------------------------------------------
2512   * jQuery
2513   * ------------------------------------------------------------------------
2514   */
2515
2516  $.fn[NAME] = ScrollSpy._jQueryInterface;
2517  $.fn[NAME].Constructor = ScrollSpy;
2518  $.fn[NAME].noConflict = function () {
2519    $.fn[NAME] = JQUERY_NO_CONFLICT;
2520    return ScrollSpy._jQueryInterface;
2521  };
2522
2523  return ScrollSpy;
2524})(jQuery);
2525
2526/**
2527 * --------------------------------------------------------------------------
2528 * Bootstrap (v4.0.0-alpha.4): tab.js
2529 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2530 * --------------------------------------------------------------------------
2531 */
2532
2533var Tab = (function ($) {
2534
2535  /**
2536   * ------------------------------------------------------------------------
2537   * Constants
2538   * ------------------------------------------------------------------------
2539   */
2540
2541  var NAME = 'tab';
2542  var VERSION = '4.0.0-alpha.4';
2543  var DATA_KEY = 'bs.tab';
2544  var EVENT_KEY = '.' + DATA_KEY;
2545  var DATA_API_KEY = '.data-api';
2546  var JQUERY_NO_CONFLICT = $.fn[NAME];
2547  var TRANSITION_DURATION = 150;
2548
2549  var Event = {
2550    HIDE: 'hide' + EVENT_KEY,
2551    HIDDEN: 'hidden' + EVENT_KEY,
2552    SHOW: 'show' + EVENT_KEY,
2553    SHOWN: 'shown' + EVENT_KEY,
2554    CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
2555  };
2556
2557  var ClassName = {
2558    DROPDOWN_MENU: 'dropdown-menu',
2559    ACTIVE: 'active',
2560    FADE: 'fade',
2561    IN: 'in'
2562  };
2563
2564  var Selector = {
2565    A: 'a',
2566    LI: 'li',
2567    DROPDOWN: '.dropdown',
2568    UL: 'ul:not(.dropdown-menu)',
2569    FADE_CHILD: '> .nav-item .fade, > .fade',
2570    ACTIVE: '.active',
2571    ACTIVE_CHILD: '> .nav-item > .active, > .active',
2572    DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]',
2573    DROPDOWN_TOGGLE: '.dropdown-toggle',
2574    DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
2575  };
2576
2577  /**
2578   * ------------------------------------------------------------------------
2579   * Class Definition
2580   * ------------------------------------------------------------------------
2581   */
2582
2583  var Tab = (function () {
2584    function Tab(element) {
2585      _classCallCheck(this, Tab);
2586
2587      this._element = element;
2588    }
2589
2590    /**
2591     * ------------------------------------------------------------------------
2592     * Data Api implementation
2593     * ------------------------------------------------------------------------
2594     */
2595
2596    // getters
2597
2598    _createClass(Tab, [{
2599      key: 'show',
2600
2601      // public
2602
2603      value: function show() {
2604        var _this15 = this;
2605
2606        if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) {
2607          return;
2608        }
2609
2610        var target = undefined;
2611        var previous = undefined;
2612        var ulElement = $(this._element).closest(Selector.UL)[0];
2613        var selector = Util.getSelectorFromElement(this._element);
2614
2615        if (ulElement) {
2616          previous = $.makeArray($(ulElement).find(Selector.ACTIVE));
2617          previous = previous[previous.length - 1];
2618        }
2619
2620        var hideEvent = $.Event(Event.HIDE, {
2621          relatedTarget: this._element
2622        });
2623
2624        var showEvent = $.Event(Event.SHOW, {
2625          relatedTarget: previous
2626        });
2627
2628        if (previous) {
2629          $(previous).trigger(hideEvent);
2630        }
2631
2632        $(this._element).trigger(showEvent);
2633
2634        if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
2635          return;
2636        }
2637
2638        if (selector) {
2639          target = $(selector)[0];
2640        }
2641
2642        this._activate(this._element, ulElement);
2643
2644        var complete = function complete() {
2645          var hiddenEvent = $.Event(Event.HIDDEN, {
2646            relatedTarget: _this15._element
2647          });
2648
2649          var shownEvent = $.Event(Event.SHOWN, {
2650            relatedTarget: previous
2651          });
2652
2653          $(previous).trigger(hiddenEvent);
2654          $(_this15._element).trigger(shownEvent);
2655        };
2656
2657        if (target) {
2658          this._activate(target, target.parentNode, complete);
2659        } else {
2660          complete();
2661        }
2662      }
2663    }, {
2664      key: 'dispose',
2665      value: function dispose() {
2666        $.removeClass(this._element, DATA_KEY);
2667        this._element = null;
2668      }
2669
2670      // private
2671
2672    }, {
2673      key: '_activate',
2674      value: function _activate(element, container, callback) {
2675        var active = $(container).find(Selector.ACTIVE_CHILD)[0];
2676        var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0]));
2677
2678        var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
2679
2680        if (active && isTransitioning) {
2681          $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
2682        } else {
2683          complete();
2684        }
2685
2686        if (active) {
2687          $(active).removeClass(ClassName.IN);
2688        }
2689      }
2690    }, {
2691      key: '_transitionComplete',
2692      value: function _transitionComplete(element, active, isTransitioning, callback) {
2693        if (active) {
2694          $(active).removeClass(ClassName.ACTIVE);
2695
2696          var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
2697
2698          if (dropdownChild) {
2699            $(dropdownChild).removeClass(ClassName.ACTIVE);
2700          }
2701
2702          active.setAttribute('aria-expanded', false);
2703        }
2704
2705        $(element).addClass(ClassName.ACTIVE);
2706        element.setAttribute('aria-expanded', true);
2707
2708        if (isTransitioning) {
2709          Util.reflow(element);
2710          $(element).addClass(ClassName.IN);
2711        } else {
2712          $(element).removeClass(ClassName.FADE);
2713        }
2714
2715        if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
2716
2717          var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
2718          if (dropdownElement) {
2719            $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2720          }
2721
2722          element.setAttribute('aria-expanded', true);
2723        }
2724
2725        if (callback) {
2726          callback();
2727        }
2728      }
2729
2730      // static
2731
2732    }], [{
2733      key: '_jQueryInterface',
2734      value: function _jQueryInterface(config) {
2735        return this.each(function () {
2736          var $this = $(this);
2737          var data = $this.data(DATA_KEY);
2738
2739          if (!data) {
2740            data = data = new Tab(this);
2741            $this.data(DATA_KEY, data);
2742          }
2743
2744          if (typeof config === 'string') {
2745            if (data[config] === undefined) {
2746              throw new Error('No method named "' + config + '"');
2747            }
2748            data[config]();
2749          }
2750        });
2751      }
2752    }, {
2753      key: 'VERSION',
2754      get: function get() {
2755        return VERSION;
2756      }
2757    }]);
2758
2759    return Tab;
2760  })();
2761
2762  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
2763    event.preventDefault();
2764    Tab._jQueryInterface.call($(this), 'show');
2765  });
2766
2767  /**
2768   * ------------------------------------------------------------------------
2769   * jQuery
2770   * ------------------------------------------------------------------------
2771   */
2772
2773  $.fn[NAME] = Tab._jQueryInterface;
2774  $.fn[NAME].Constructor = Tab;
2775  $.fn[NAME].noConflict = function () {
2776    $.fn[NAME] = JQUERY_NO_CONFLICT;
2777    return Tab._jQueryInterface;
2778  };
2779
2780  return Tab;
2781})(jQuery);
2782
2783/* global Tether */
2784
2785/**
2786 * --------------------------------------------------------------------------
2787 * Bootstrap (v4.0.0-alpha.4): tooltip.js
2788 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2789 * --------------------------------------------------------------------------
2790 */
2791
2792var Tooltip = (function ($) {
2793
2794  /**
2795   * Check for Tether dependency
2796   * Tether - http://github.hubspot.com/tether/
2797   */
2798  if (window.Tether === undefined) {
2799    throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
2800  }
2801
2802  /**
2803   * ------------------------------------------------------------------------
2804   * Constants
2805   * ------------------------------------------------------------------------
2806   */
2807
2808  var NAME = 'tooltip';
2809  var VERSION = '4.0.0-alpha.4';
2810  var DATA_KEY = 'bs.tooltip';
2811  var EVENT_KEY = '.' + DATA_KEY;
2812  var JQUERY_NO_CONFLICT = $.fn[NAME];
2813  var TRANSITION_DURATION = 150;
2814  var CLASS_PREFIX = 'bs-tether';
2815
2816  var Default = {
2817    animation: true,
2818    template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
2819    trigger: 'hover focus',
2820    title: '',
2821    delay: 0,
2822    html: false,
2823    selector: false,
2824    placement: 'top',
2825    offset: '0 0',
2826    constraints: []
2827  };
2828
2829  var DefaultType = {
2830    animation: 'boolean',
2831    template: 'string',
2832    title: '(string|element|function)',
2833    trigger: 'string',
2834    delay: '(number|object)',
2835    html: 'boolean',
2836    selector: '(string|boolean)',
2837    placement: '(string|function)',
2838    offset: 'string',
2839    constraints: 'array'
2840  };
2841
2842  var AttachmentMap = {
2843    TOP: 'bottom center',
2844    RIGHT: 'middle left',
2845    BOTTOM: 'top center',
2846    LEFT: 'middle right'
2847  };
2848
2849  var HoverState = {
2850    IN: 'in',
2851    OUT: 'out'
2852  };
2853
2854  var Event = {
2855    HIDE: 'hide' + EVENT_KEY,
2856    HIDDEN: 'hidden' + EVENT_KEY,
2857    SHOW: 'show' + EVENT_KEY,
2858    SHOWN: 'shown' + EVENT_KEY,
2859    INSERTED: 'inserted' + EVENT_KEY,
2860    CLICK: 'click' + EVENT_KEY,
2861    FOCUSIN: 'focusin' + EVENT_KEY,
2862    FOCUSOUT: 'focusout' + EVENT_KEY,
2863    MOUSEENTER: 'mouseenter' + EVENT_KEY,
2864    MOUSELEAVE: 'mouseleave' + EVENT_KEY
2865  };
2866
2867  var ClassName = {
2868    FADE: 'fade',
2869    IN: 'in'
2870  };
2871
2872  var Selector = {
2873    TOOLTIP: '.tooltip',
2874    TOOLTIP_INNER: '.tooltip-inner'
2875  };
2876
2877  var TetherClass = {
2878    element: false,
2879    enabled: false
2880  };
2881
2882  var Trigger = {
2883    HOVER: 'hover',
2884    FOCUS: 'focus',
2885    CLICK: 'click',
2886    MANUAL: 'manual'
2887  };
2888
2889  /**
2890   * ------------------------------------------------------------------------
2891   * Class Definition
2892   * ------------------------------------------------------------------------
2893   */
2894
2895  var Tooltip = (function () {
2896    function Tooltip(element, config) {
2897      _classCallCheck(this, Tooltip);
2898
2899      // private
2900      this._isEnabled = true;
2901      this._timeout = 0;
2902      this._hoverState = '';
2903      this._activeTrigger = {};
2904      this._tether = null;
2905
2906      // protected
2907      this.element = element;
2908      this.config = this._getConfig(config);
2909      this.tip = null;
2910
2911      this._setListeners();
2912    }
2913
2914    /**
2915     * ------------------------------------------------------------------------
2916     * jQuery
2917     * ------------------------------------------------------------------------
2918     */
2919
2920    // getters
2921
2922    _createClass(Tooltip, [{
2923      key: 'enable',
2924
2925      // public
2926
2927      value: function enable() {
2928        this._isEnabled = true;
2929      }
2930    }, {
2931      key: 'disable',
2932      value: function disable() {
2933        this._isEnabled = false;
2934      }
2935    }, {
2936      key: 'toggleEnabled',
2937      value: function toggleEnabled() {
2938        this._isEnabled = !this._isEnabled;
2939      }
2940    }, {
2941      key: 'toggle',
2942      value: function toggle(event) {
2943        if (event) {
2944          var dataKey = this.constructor.DATA_KEY;
2945          var context = $(event.currentTarget).data(dataKey);
2946
2947          if (!context) {
2948            context = new this.constructor(event.currentTarget, this._getDelegateConfig());
2949            $(event.currentTarget).data(dataKey, context);
2950          }
2951
2952          context._activeTrigger.click = !context._activeTrigger.click;
2953
2954          if (context._isWithActiveTrigger()) {
2955            context._enter(null, context);
2956          } else {
2957            context._leave(null, context);
2958          }
2959        } else {
2960
2961          if ($(this.getTipElement()).hasClass(ClassName.IN)) {
2962            this._leave(null, this);
2963            return;
2964          }
2965
2966          this._enter(null, this);
2967        }
2968      }
2969    }, {
2970      key: 'dispose',
2971      value: function dispose() {
2972        clearTimeout(this._timeout);
2973
2974        this.cleanupTether();
2975
2976        $.removeData(this.element, this.constructor.DATA_KEY);
2977
2978        $(this.element).off(this.constructor.EVENT_KEY);
2979
2980        if (this.tip) {
2981          $(this.tip).remove();
2982        }
2983
2984        this._isEnabled = null;
2985        this._timeout = null;
2986        this._hoverState = null;
2987        this._activeTrigger = null;
2988        this._tether = null;
2989
2990        this.element = null;
2991        this.config = null;
2992        this.tip = null;
2993      }
2994    }, {
2995      key: 'show',
2996      value: function show() {
2997        var _this16 = this;
2998
2999        var showEvent = $.Event(this.constructor.Event.SHOW);
3000
3001        if (this.isWithContent() && this._isEnabled) {
3002          $(this.element).trigger(showEvent);
3003
3004          var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
3005
3006          if (showEvent.isDefaultPrevented() || !isInTheDom) {
3007            return;
3008          }
3009
3010          var tip = this.getTipElement();
3011          var tipId = Util.getUID(this.constructor.NAME);
3012
3013          tip.setAttribute('id', tipId);
3014          this.element.setAttribute('aria-describedby', tipId);
3015
3016          this.setContent();
3017
3018          if (this.config.animation) {
3019            $(tip).addClass(ClassName.FADE);
3020          }
3021
3022          var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
3023
3024          var attachment = this._getAttachment(placement);
3025
3026          $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
3027
3028          $(this.element).trigger(this.constructor.Event.INSERTED);
3029
3030          this._tether = new Tether({
3031            attachment: attachment,
3032            element: tip,
3033            target: this.element,
3034            classes: TetherClass,
3035            classPrefix: CLASS_PREFIX,
3036            offset: this.config.offset,
3037            constraints: this.config.constraints,
3038            addTargetClasses: false
3039          });
3040
3041          Util.reflow(tip);
3042          this._tether.position();
3043
3044          $(tip).addClass(ClassName.IN);
3045
3046          var complete = function complete() {
3047            var prevHoverState = _this16._hoverState;
3048            _this16._hoverState = null;
3049
3050            $(_this16.element).trigger(_this16.constructor.Event.SHOWN);
3051
3052            if (prevHoverState === HoverState.OUT) {
3053              _this16._leave(null, _this16);
3054            }
3055          };
3056
3057          if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3058            $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
3059            return;
3060          }
3061
3062          complete();
3063        }
3064      }
3065    }, {
3066      key: 'hide',
3067      value: function hide(callback) {
3068        var _this17 = this;
3069
3070        var tip = this.getTipElement();
3071        var hideEvent = $.Event(this.constructor.Event.HIDE);
3072        var complete = function complete() {
3073          if (_this17._hoverState !== HoverState.IN && tip.parentNode) {
3074            tip.parentNode.removeChild(tip);
3075          }
3076
3077          _this17.element.removeAttribute('aria-describedby');
3078          $(_this17.element).trigger(_this17.constructor.Event.HIDDEN);
3079          _this17.cleanupTether();
3080
3081          if (callback) {
3082            callback();
3083          }
3084        };
3085
3086        $(this.element).trigger(hideEvent);
3087
3088        if (hideEvent.isDefaultPrevented()) {
3089          return;
3090        }
3091
3092        $(tip).removeClass(ClassName.IN);
3093
3094        if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
3095
3096          $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
3097        } else {
3098          complete();
3099        }
3100
3101        this._hoverState = '';
3102      }
3103
3104      // protected
3105
3106    }, {
3107      key: 'isWithContent',
3108      value: function isWithContent() {
3109        return Boolean(this.getTitle());
3110      }
3111    }, {
3112      key: 'getTipElement',
3113      value: function getTipElement() {
3114        return this.tip = this.tip || $(this.config.template)[0];
3115      }
3116    }, {
3117      key: 'setContent',
3118      value: function setContent() {
3119        var $tip = $(this.getTipElement());
3120
3121        this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
3122
3123        $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
3124
3125        this.cleanupTether();
3126      }
3127    }, {
3128      key: 'setElementContent',
3129      value: function setElementContent($element, content) {
3130        var html = this.config.html;
3131        if (typeof content === 'object' && (content.nodeType || content.jquery)) {
3132          // content is a DOM node or a jQuery
3133          if (html) {
3134            if (!$(content).parent().is($element)) {
3135              $element.empty().append(content);
3136            }
3137          } else {
3138            $element.text($(content).text());
3139          }
3140        } else {
3141          $element[html ? 'html' : 'text'](content);
3142        }
3143      }
3144    }, {
3145      key: 'getTitle',
3146      value: function getTitle() {
3147        var title = this.element.getAttribute('data-original-title');
3148
3149        if (!title) {
3150          title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
3151        }
3152
3153        return title;
3154      }
3155    }, {
3156      key: 'cleanupTether',
3157      value: function cleanupTether() {
3158        if (this._tether) {
3159          this._tether.destroy();
3160        }
3161      }
3162
3163      // private
3164
3165    }, {
3166      key: '_getAttachment',
3167      value: function _getAttachment(placement) {
3168        return AttachmentMap[placement.toUpperCase()];
3169      }
3170    }, {
3171      key: '_setListeners',
3172      value: function _setListeners() {
3173        var _this18 = this;
3174
3175        var triggers = this.config.trigger.split(' ');
3176
3177        triggers.forEach(function (trigger) {
3178          if (trigger === 'click') {
3179            $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18));
3180          } else if (trigger !== Trigger.MANUAL) {
3181            var eventIn = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN;
3182            var eventOut = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT;
3183
3184            $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18));
3185          }
3186        });
3187
3188        if (this.config.selector) {
3189          this.config = $.extend({}, this.config, {
3190            trigger: 'manual',
3191            selector: ''
3192          });
3193        } else {
3194          this._fixTitle();
3195        }
3196      }
3197    }, {
3198      key: '_fixTitle',
3199      value: function _fixTitle() {
3200        var titleType = typeof this.element.getAttribute('data-original-title');
3201        if (this.element.getAttribute('title') || titleType !== 'string') {
3202          this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3203          this.element.setAttribute('title', '');
3204        }
3205      }
3206    }, {
3207      key: '_enter',
3208      value: function _enter(event, context) {
3209        var dataKey = this.constructor.DATA_KEY;
3210
3211        context = context || $(event.currentTarget).data(dataKey);
3212
3213        if (!context) {
3214          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3215          $(event.currentTarget).data(dataKey, context);
3216        }
3217
3218        if (event) {
3219          context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
3220        }
3221
3222        if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) {
3223          context._hoverState = HoverState.IN;
3224          return;
3225        }
3226
3227        clearTimeout(context._timeout);
3228
3229        context._hoverState = HoverState.IN;
3230
3231        if (!context.config.delay || !context.config.delay.show) {
3232          context.show();
3233          return;
3234        }
3235
3236        context._timeout = setTimeout(function () {
3237          if (context._hoverState === HoverState.IN) {
3238            context.show();
3239          }
3240        }, context.config.delay.show);
3241      }
3242    }, {
3243      key: '_leave',
3244      value: function _leave(event, context) {
3245        var dataKey = this.constructor.DATA_KEY;
3246
3247        context = context || $(event.currentTarget).data(dataKey);
3248
3249        if (!context) {
3250          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3251          $(event.currentTarget).data(dataKey, context);
3252        }
3253
3254        if (event) {
3255          context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
3256        }
3257
3258        if (context._isWithActiveTrigger()) {
3259          return;
3260        }
3261
3262        clearTimeout(context._timeout);
3263
3264        context._hoverState = HoverState.OUT;
3265
3266        if (!context.config.delay || !context.config.delay.hide) {
3267          context.hide();
3268          return;
3269        }
3270
3271        context._timeout = setTimeout(function () {
3272          if (context._hoverState === HoverState.OUT) {
3273            context.hide();
3274          }
3275        }, context.config.delay.hide);
3276      }
3277    }, {
3278      key: '_isWithActiveTrigger',
3279      value: function _isWithActiveTrigger() {
3280        for (var trigger in this._activeTrigger) {
3281          if (this._activeTrigger[trigger]) {
3282            return true;
3283          }
3284        }
3285
3286        return false;
3287      }
3288    }, {
3289      key: '_getConfig',
3290      value: function _getConfig(config) {
3291        config = $.extend({}, this.constructor.Default, $(this.element).data(), config);
3292
3293        if (config.delay && typeof config.delay === 'number') {
3294          config.delay = {
3295            show: config.delay,
3296            hide: config.delay
3297          };
3298        }
3299
3300        Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
3301
3302        return config;
3303      }
3304    }, {
3305      key: '_getDelegateConfig',
3306      value: function _getDelegateConfig() {
3307        var config = {};
3308
3309        if (this.config) {
3310          for (var key in this.config) {
3311            if (this.constructor.Default[key] !== this.config[key]) {
3312              config[key] = this.config[key];
3313            }
3314          }
3315        }
3316
3317        return config;
3318      }
3319
3320      // static
3321
3322    }], [{
3323      key: '_jQueryInterface',
3324      value: function _jQueryInterface(config) {
3325        return this.each(function () {
3326          var data = $(this).data(DATA_KEY);
3327          var _config = typeof config === 'object' ? config : null;
3328
3329          if (!data && /destroy|hide/.test(config)) {
3330            return;
3331          }
3332
3333          if (!data) {
3334            data = new Tooltip(this, _config);
3335            $(this).data(DATA_KEY, data);
3336          }
3337
3338          if (typeof config === 'string') {
3339            if (data[config] === undefined) {
3340              throw new Error('No method named "' + config + '"');
3341            }
3342            data[config]();
3343          }
3344        });
3345      }
3346    }, {
3347      key: 'VERSION',
3348      get: function get() {
3349        return VERSION;
3350      }
3351    }, {
3352      key: 'Default',
3353      get: function get() {
3354        return Default;
3355      }
3356    }, {
3357      key: 'NAME',
3358      get: function get() {
3359        return NAME;
3360      }
3361    }, {
3362      key: 'DATA_KEY',
3363      get: function get() {
3364        return DATA_KEY;
3365      }
3366    }, {
3367      key: 'Event',
3368      get: function get() {
3369        return Event;
3370      }
3371    }, {
3372      key: 'EVENT_KEY',
3373      get: function get() {
3374        return EVENT_KEY;
3375      }
3376    }, {
3377      key: 'DefaultType',
3378      get: function get() {
3379        return DefaultType;
3380      }
3381    }]);
3382
3383    return Tooltip;
3384  })();
3385
3386  $.fn[NAME] = Tooltip._jQueryInterface;
3387  $.fn[NAME].Constructor = Tooltip;
3388  $.fn[NAME].noConflict = function () {
3389    $.fn[NAME] = JQUERY_NO_CONFLICT;
3390    return Tooltip._jQueryInterface;
3391  };
3392
3393  return Tooltip;
3394})(jQuery);
3395
3396/**
3397 * --------------------------------------------------------------------------
3398 * Bootstrap (v4.0.0-alpha.4): popover.js
3399 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3400 * --------------------------------------------------------------------------
3401 */
3402
3403var Popover = (function ($) {
3404
3405  /**
3406   * ------------------------------------------------------------------------
3407   * Constants
3408   * ------------------------------------------------------------------------
3409   */
3410
3411  var NAME = 'popover';
3412  var VERSION = '4.0.0-alpha.4';
3413  var DATA_KEY = 'bs.popover';
3414  var EVENT_KEY = '.' + DATA_KEY;
3415  var JQUERY_NO_CONFLICT = $.fn[NAME];
3416
3417  var Default = $.extend({}, Tooltip.Default, {
3418    placement: 'right',
3419    trigger: 'click',
3420    content: '',
3421    template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
3422  });
3423
3424  var DefaultType = $.extend({}, Tooltip.DefaultType, {
3425    content: '(string|element|function)'
3426  });
3427
3428  var ClassName = {
3429    FADE: 'fade',
3430    IN: 'in'
3431  };
3432
3433  var Selector = {
3434    TITLE: '.popover-title',
3435    CONTENT: '.popover-content',
3436    ARROW: '.popover-arrow'
3437  };
3438
3439  var Event = {
3440    HIDE: 'hide' + EVENT_KEY,
3441    HIDDEN: 'hidden' + EVENT_KEY,
3442    SHOW: 'show' + EVENT_KEY,
3443    SHOWN: 'shown' + EVENT_KEY,
3444    INSERTED: 'inserted' + EVENT_KEY,
3445    CLICK: 'click' + EVENT_KEY,
3446    FOCUSIN: 'focusin' + EVENT_KEY,
3447    FOCUSOUT: 'focusout' + EVENT_KEY,
3448    MOUSEENTER: 'mouseenter' + EVENT_KEY,
3449    MOUSELEAVE: 'mouseleave' + EVENT_KEY
3450  };
3451
3452  /**
3453   * ------------------------------------------------------------------------
3454   * Class Definition
3455   * ------------------------------------------------------------------------
3456   */
3457
3458  var Popover = (function (_Tooltip) {
3459    _inherits(Popover, _Tooltip);
3460
3461    function Popover() {
3462      _classCallCheck(this, Popover);
3463
3464      _get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments);
3465    }
3466
3467    /**
3468     * ------------------------------------------------------------------------
3469     * jQuery
3470     * ------------------------------------------------------------------------
3471     */
3472
3473    _createClass(Popover, [{
3474      key: 'isWithContent',
3475
3476      // overrides
3477
3478      value: function isWithContent() {
3479        return this.getTitle() || this._getContent();
3480      }
3481    }, {
3482      key: 'getTipElement',
3483      value: function getTipElement() {
3484        return this.tip = this.tip || $(this.config.template)[0];
3485      }
3486    }, {
3487      key: 'setContent',
3488      value: function setContent() {
3489        var $tip = $(this.getTipElement());
3490
3491        // we use append for html objects to maintain js events
3492        this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
3493        this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
3494
3495        $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN);
3496
3497        this.cleanupTether();
3498      }
3499
3500      // private
3501
3502    }, {
3503      key: '_getContent',
3504      value: function _getContent() {
3505        return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
3506      }
3507
3508      // static
3509
3510    }], [{
3511      key: '_jQueryInterface',
3512      value: function _jQueryInterface(config) {
3513        return this.each(function () {
3514          var data = $(this).data(DATA_KEY);
3515          var _config = typeof config === 'object' ? config : null;
3516
3517          if (!data && /destroy|hide/.test(config)) {
3518            return;
3519          }
3520
3521          if (!data) {
3522            data = new Popover(this, _config);
3523            $(this).data(DATA_KEY, data);
3524          }
3525
3526          if (typeof config === 'string') {
3527            if (data[config] === undefined) {
vendor: 19,710 bytes, lines 3528-3602
3528              throw new Error('No method named "' + config + '"');
3529            }
3530            data[config]();
3531          }
3532        });
3533      }
3534    }, {
3535      key: 'VERSION',
3536
3537      // getters
3538
3539      get: function get() {
3540        return VERSION;
3541      }
3542    }, {
3543      key: 'Default',
3544      get: function get() {
3545        return Default;
3546      }
3547    }, {
3548      key: 'NAME',
3549      get: function get() {
3550        return NAME;
3551      }
3552    }, {
3553      key: 'DATA_KEY',
3554      get: function get() {
3555        return DATA_KEY;
3556      }
3557    }, {
3558      key: 'Event',
3559      get: function get() {
3560        return Event;
3561      }
3562    }, {
3563      key: 'EVENT_KEY',
3564      get: function get() {
3565        return EVENT_KEY;
3566      }
3567    }, {
3568      key: 'DefaultType',
3569      get: function get() {
3570        return DefaultType;
3571      }
3572    }]);
3573
3574    return Popover;
3575  })(Tooltip);
3576
3577  $.fn[NAME] = Popover._jQueryInterface;
3578  $.fn[NAME].Constructor = Popover;
3579  $.fn[NAME].noConflict = function () {
3580    $.fn[NAME] = JQUERY_NO_CONFLICT;
3581    return Popover._jQueryInterface;
3582  };
3583
3584  return Popover;
3585})(jQuery);
3586
3587}(jQuery);
3588
3589/*!
3590 * @fileOverview TouchSwipe - jQuery Plugin
3591 * @version 1.6.18
3592 *
3593 * @author Matt Bryson http://www.github.com/mattbryson
3594 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
3595 * @see http://labs.rampinteractive.co.uk/touchSwipe/
3596 * @see http://plugins.jquery.com/project/touchSwipe
3597 * @license
3598 * Copyright (c) 2010-2015 Matt Bryson
3599 * Dual licensed under the MIT or GPL Version 2 licenses.
3600 *
3601 */
3602!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.cancelable!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&&currentPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null===options.pinchThreshold||pinchDistance>=options.pinchThreshold}function validateSwipeTime(){var result;return result=!options.maxTimeThreshold||!(duration>=options.maxTimeThreshold)}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&distance<DOUBLE_TAP_THRESHOLD}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){if(maximumsMap[direction])return maximumsMap[direction].distance}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return pinchZoom<1?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return angle<0&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return angle<=45&&angle>=0?LEFT:angle<=360&&angle>=315?LEFT:angle>=135&&angle<=225?RIGHT:angle>45&&angle<135?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",
3602NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}});
3603
3604!function(t){var i=t(window);t.fn.visible=function(t,e,o){if(!(this.length<1)){var r=this.length>1?this.eq(0):this,n=r.get(0),f=i.width(),h=i.height(),o=o?o:"both",l=e===!0?n.offsetWidth*n.offsetHeight:!0;if("function"==typeof n.getBoundingClientRect){var g=n.getBoundingClientRect(),u=g.top>=0&&g.top<h,s=g.bottom>0&&g.bottom<=h,c=g.left>=0&&g.left<f,a=g.right>0&&g.right<=f,v=t?u||s:u&&s,b=t?c||a:c&&a;if("both"===o)return l&&v&&b;if("vertical"===o)return l&&v;if("horizontal"===o)return l&&b}else{var d=i.scrollTop(),p=d+h,w=i.scrollLeft(),m=w+f,y=r.offset(),z=y.top,B=z+r.height(),C=y.left,R=C+r.width(),j=t===!0?B:z,q=t===!0?z:B,H=t===!0?R:C,L=t===!0?C:R;if("both"===o)return!!l&&p>=q&&j>=d&&m>=L&&H>=w;if("vertical"===o)return!!l&&p>=q&&j>=d;if("horizontal"===o)return!!l&&m>=L&&H>=w}}}}(jQuery);
3605
3606function setUrl(sUrl) {
3607	if (sUrl.substr(0, 4) !== 'http')
3608		sUrl = (sUrl.substr(0, 1) === '/' ? '' : '/') + sUrl;
3609	
3610	document.location.href = sUrl;
3611}
3612
3613$(document).ready(function() {
3614
3615	/* Set caching cookie */
3616	if (document.location.pathname.indexOf('index.php') > -1) 
3617		document.cookie = 'be_typo_user=1';
3618
3619	if ($.isFunction('tooltip')) {
3620		$('[data-toggle="tooltip"]').tooltip();
3621	}
3622
3623    /* fix for missing title attribute in lightbox a tags */
3624	if ($.fn.fancybox) {
3625//	if ($.isFunction('fancybox')) {
3626	
3627		// Auto lightbox gallery (local)
3628		$(".lightbox[href^='"+window.location.protocol+"//"+window.location.hostname+"']:not([href$='#'])").each(function(){
3629			if (this.title == "") {
3630				$(this).attr('title',$("img",$(this)).attr('title'));
3631			}
3632		}).fancybox();
3633		
3634		// Auto lightbox gallery (external iframe)
3635		$(".lightbox:not([href^='"+window.location.protocol+"//"+window.location.hostname+"'])").fancybox({type:'iframe',minHeight:320,afterShow: function() {
3636			window.setTimeout(() => {
3637				$.fancybox.update();
3638			},2000);
3639		}});
3640		
3641		// Manual lightbox gallery
3642		// Manual link must have rel-attribute "lightbox-gallery-[CE-ID]"
3643		$(".lightbox[href$='#']").each(function() {
3644
3645			if($(this).attr('rel') && window[$(this).attr('rel')]) {
3646				
3647				$(this).click(function(e) {
3648					var gallery = window[$(this).attr('rel')];
3649					e.preventDefault();
3650					$.fancybox.open(gallery, {'padding': 0,'transitionIn':'none','transitionOut':'none','type':'image','changeFade': 0});
3651					return false;
3652				});
3653			}
3654			 
3655		});
3656	}
3657	
3658    //$('.nav-tabs').tabCollapse();
3659
3660
3661	/* Init mmenu (not used) */
3662	if ($.isFunction('mmenu')) {
3663		$("#sidemenu").mmenu({
3664			extensions	: [ 'effect-slide-menu', 'pageshadow' ],
3665			navbar 		: {
3666				title	: $('title').html()
3667			},
3668			navbars     : [{
3669				position: 'top'
3670			}, {
3671				position: 'bottom',
3672				height: 2,
3673				content : ['<div id="mobile-footer"></div>']
3674			}]
3675		},{
3676			classNames  : {
3677				selected : 'current'
3678			}
3679		});
3680		$('#mobile-footer').html($('#nav-mobile-footer').html());
3681	}
3682	
3683	if ($.isFunction('cookieBar')) {
3684		$.cookieBar();
3685	}
3686
3687    /* flexslider im hero */
3688	if ($.isFunction('flexslider')) {
3689		$('.hero .flexslider').flexslider({
3690			'controlNav': false,
3691			'selector': '.slides > div'
3692		});
3693	}
3694	
3695//	$('.row.row-eq-height, .row-eq-height > .row > div').matchHeight();
3696
3697
3698	/* Reactivate dropdown toggle link */
3699	$('.navbar-nav.megamenu .dropdown-toggle').on('click', function(e) {
3700		if($(this).hasClass('nolink')) {
3701			e.preventDefault();
3702			return;
3703		}
3704		
3705		if($(window).width() > 768) {
3706			window.location.href = $(this).attr('href');
3707		}
3708	});
3709
3710	// set mobile menu position when scrolling
3711	if($('#mobilemenu').length) {
3712		$(window).scroll(function(event){
3713		   var st = $(this).scrollTop(),
3714				jNav = $('#mobilemenu');
3715		   
3716		   jNav.css('top', st);
3717		});
3718	}
3719			
3720			
3721	if($('.navbar-toggle').length) {
3722		// Update toggles
3723		$(window).scroll(function(event){
3724			setNavbarToggle();
3725		});
3726	}
3727	
3728	
3729
3730    /*********************************************************************/
3731	// Make linked card elements clickable (reduce content links)
3732	// With event delegation, 'click' does not catch middle mouse clicks ...
3733    $('body').on('click', '.linked-card', function(oEvt) {
3734		if ((oEvt.button == 1) || (oEvt.button == 2)) return;
3735		if($(this).hasClass('image-popup') || $(oEvt.target).parents('.not-linked').length) return;
3736
3737        oEvt.preventDefault();
3738        setUrl($(this).find('a').attr('href'));
3739    });
3740	$('body').on('mouseup', '.linked-card', function(oEvt) {
3741		if (oEvt.button !== 1) return;
3742		if($(this).hasClass('image-popup') || $(oEvt.target).parents('.not-linked').length) return;
3743
3744		oEvt.preventDefault();
3745		setUrl($(this).find('a').attr('href'));
3746	});
3747	
3748	
3749	// Set scroll top btn
3750	if($('#up-btn').length) {
3751		$(window).scroll(function(evt) {
3752			var st = $(document).scrollTop(),
3753				wh = $(window).height(),
3754				btn = $('#up-btn');
3755				
3756			if(st > wh && !btn.hasClass('active')) {
3757				btn.addClass('active');
3758			} else if(st < wh && btn.hasClass('active')) {
3759				btn.removeClass('active');
3760			}
3761		});
3762		$('#up-btn').click(function(evt){
3763			evt.preventDefault();
3764			$('html,body').animate({scrollTop:0}, '500', 'swing');
3765		});
3766	}
3767	if($('.up-btn').length) {
3768		$('.up-btn').click(function(evt){
3769			evt.preventDefault();
3770			$('html,body').animate({scrollTop:0}, '500', 'swing');
3771		});
3772	}
3773	
3774	// Set sticky sidebars
3775	if ($.isFunction('stick_in_parent')) {
3776		
3777		var stickyOptions = {offset_top: 10, inner_scrolling: false};
3778		if($(window).width() >= 544) {
3779			$('.sticky-sm, .sticky-md, .sticky-lg, .sticky-xl').stick_in_parent(stickyOptions);
3780		}
3781		if($(window).width() >= 768) {
3782			$('.sticky-md, .sticky-lg, .sticky-xl').stick_in_parent(stickyOptions);
3783		}
3784		if($(window).width() >= 992) {
3785			$('.sticky-lg, .sticky-xl').stick_in_parent(stickyOptions);
3786		}
3787		if($(window).width() >= 1200) {
3788			$('.sticky-xl').stick_in_parent(stickyOptions);
3789		}
3790		
3791	}
3792	
3793	// Carousel Swipe
3794	jQuery(".carousel-inner").swipe( {
3795		swipeLeft:function(event, direction, distance, duration, fingerCount) {
3796			$(this).parent().carousel('next'); 
3797		},
3798		swipeRight: function() {
3799			$(this).parent().carousel('prev'); 
3800		},
3801		threshold:40
3802	});
3803	
3804	// Accordion open-all (lg up)
3805	if(jQuery(window).width() < 992) {
3806		jQuery(".panel-collapse.in-lg-up").removeClass('in');
3807	} else {
3808		jQuery(".panel-collapse.in-lg-up").parent().find('.btn-accordion').attr('aria-expanded', 'true');
3809	}
3810});
3811
3812
3813jQuery(window).load(function() {
3814	
3815	if ($.fn.twentytwenty) {
3816		jQuery(".twentytwenty-container").twentytwenty({
3817			no_overlay:true
3818		});
3819	}
3820	
3821});
3822
3823
3824// set top fixed navigations (mobile / desktop)
3825var lastScrollTop = 0,
3826	sleepTime = 20, 
3827	startTime = new Date().getTime();
3828	
3829function setNavbarToggle() {
3830	/*
3831	var curTime = new Date().getTime();
3832	if(startTime + sleepTime > curTime)
3833		return;
3834	*/
3835	
3836   var st = $(this).scrollTop(),
3837		jNav = $('.navbar-toggle'),
3838		jNavMobile = $('.navbar-toggle.hidden-md-up, .navbar-toggle.hidden-lg-up'),
3839		jNavDesktop = $('.navbar-toggle.hidden-sm-down, .navbar-toggle.hidden-md-down'),
3840		hH = $('#header').outerHeight(),
3841		change = false;
3842   
3843	// Desktop menu
3844	if(st > hH) {
3845	   if(!jNavDesktop.hasClass('open')) {
3846			change = true;
3847			jNavDesktop.addClass('open');
3848			jNavDesktop.slideDown();
3849			$('body').addClass('navbar-toggle-open');
3850	   }
3851	} else if(jNavDesktop.hasClass('open')) {
3852		change = true;
3853		jNavDesktop.removeClass('open');
3854		jNavDesktop.fadeOut('fast');
3855		$('body').removeClass('navbar-toggle-open');
3856	}
3857   
3858	// Mobile menu
3859	if (st > hH){
3860	   if(!jNavMobile.hasClass('open') && !$('body').hasClass('menu-visible')) {
3861			change = true;
3862		   jNavMobile.addClass('open');
3863		   jNavMobile.slideDown();
3864			$('body').addClass('navbar-toggle-open');
3865	   }
3866	} else {
3867	   if(jNavMobile.hasClass('open')) {
3868			change = true;
3869		   jNavMobile.removeClass('open');
3870		   jNavMobile.fadeOut('fast');
3871			$('body').removeClass('navbar-toggle-open');
3872	   }
3873	}
3874   
3875	// Set change time after animation
3876	if(change) {
3877//		startTime = curTime;
3878		
3879		
3880		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-md-up'),		'sm');
3881		
3882		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-lg-up'),		'sm');
3883		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-lg-up'),		'md');
3884		
3885		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-sm-down'),		'md');
3886		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-sm-down'),		'lg');
3887		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-sm-down'),		'xl');
3888		
3889		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-md-down'),		'lg');
3890		setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-md-down'),		'xl');
3891	}
3892	   
3893//   lastScrollTop = st;
3894}
3895
3896function setStickyOffsetNavbarToggle(jNav, size) {	
3897	if(jNav.length == 0)
3898		return;
3899	
3900	if(jNav.css('display') == 'none')
3901		return;
3902	
3903	var offset = 10,
3904		jSticky = $('.sticky-offset-navbar-toggle.sticky-'+size);
3905	
3906	if(jNav.hasClass('open')) {
3907		// wait until navbar toggle has shown
3908		setTimeout(function(){
3909			var h = jNav.outerHeight() + parseInt(jNav.css('top'));
3910			jSticky.css('margin-top', h);
3911			//var h = jNav.outerHeight() + offset + parseInt(jNav.css('top'));
3912			//jSticky.css('top', h);
3913		}, 400);
3914	} else {
3915		//jSticky.css('top', offset);
3916		jSticky.css('margin-top', 0);
3917	}
3918}
3919// Avoid `console` errors in browsers that lack a console.
3920(function() {
3921    var method;
3922    var noop = function () {};
3923    var methods = [
3924        'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
3925        'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
3926        'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
3927        'timeStamp', 'trace', 'warn'
3928    ];
3929    var length = methods.length;
3930    var console = (window.console = window.console || {});
3931
3932    while (length--) {
3933        method = methods[length];
3934
3935        // Only stub undefined methods.
3936        if (!console[method]) {
3937            console[method] = noop;
3938        }
3939    }
3940}());
3941
3942// Place any jQuery/helper plugins in here.
3943
3944
3945/**
3946 * @author Kai Vier
3947 */
3948
3949
3950;jQuery(window).load(function () {
3951	jQuery('.wh-video > .embed-responsive').click(function(evt) {
3952		var jV = jQuery(this).parent();
3953		if(!jV.hasClass('loaded')) {
3954			evt.preventDefault();
3955			jV.addClass('loaded');
3956			if(jV.find('video').length) {
3957				var jVv = jV.find('video');
3958				var jVv2 = jVv.clone();
3959				jVv2.find('source').each(function(i) {
3960					var src = $(this).attr('data-src');
3961					$(this).attr('src', src);
3962				});
3963				jVv.after(jVv2);
3964				jVv.remove();
3965			} else {
3966				var src = jV.attr('data-src');
3967				if(typeof src !== 'undefined' && src !== false) {
3968					src += ((src.indexOf('?') >
3968 0) ? '&' : '?') + 'autoplay=1';
3969					jV.find('.embed-responsive').append('<iframe src="'+src+'" style="width:100%; height:100%;"></iframe>');
3970					jV.find('iframe').show();
3971				}
3972			}
3973			jV.find('i').fadeOut();
3974			jV.find('img').fadeOut('slow');
3975		}			
3976	});
3977	jQuery(window).scroll(onVideoVisibleStart);
3978	onVideoVisibleStart();
3979});
3980
3981function onVideoVisibleStart() {
3982	jQuery('.wh-video').each(function() {
3983		if (jQuery(this).find('video').length && jQuery(this).visible(true)) {
3984			jQuery(this).find('.embed-responsive').click();
3985		}
3986	})
3987}
3988/*!
3989 * SmartMenus jQuery Plugin - v1.0.0-beta1 - June 1, 2015
3990 * http://www.smartmenus.org/
3991 *
3992 * Copyright 2015 Vasil Dinkov, Vadikom Web Ltd.
3993 * http://vadikom.com
3994 *
3995 * Licensed MIT
3996 */
3997
3998(function($) {
3999
4000	var menuTrees = [],
4001		IE = !!window.createPopup, // detect it for the iframe shim
4002		mouse = false, // optimize for touch by default - we will detect for mouse input
4003		mouseDetectionEnabled = false;
4004
4005	// Handle detection for mouse input (i.e. desktop browsers, tablets with a mouse, etc.)
4006	function initMouseDetection(disable) {
4007		var eNS = '.smartmenus_mouse';
4008		if (!mouseDetectionEnabled && !disable) {
4009			// if we get two consecutive mousemoves within 2 pixels from each other and within 300ms, we assume a real mouse/cursor is present
4010			// in practice, this seems like impossible to trick unintentianally with a real mouse and a pretty safe detection on touch devices (even with older browsers that do not support touch events)
4011			var firstTime = true,
4012				lastMove = null;
4013			$(document).bind(getEventsNS([
4014				['mousemove', function(e) {
4015					var thisMove = { x: e.pageX, y: e.pageY, timeStamp: new Date().getTime() };
4016					if (lastMove) {
4017						var deltaX = Math.abs(lastMove.x - thisMove.x),
4018							deltaY = Math.abs(lastMove.y - thisMove.y);
4019	 					if ((deltaX > 0 || deltaY > 0) && deltaX <= 2 && deltaY <= 2 && thisMove.timeStamp - lastMove.timeStamp <= 300) {
4020							mouse = true;
4021							// if this is the first check after page load, check if we are not over some item by chance and call the mouseenter handler if yes
4022							if (firstTime) {
4023								var $a = $(e.target).closest('a');
4024								if ($a.is('a')) {
4025									$.each(menuTrees, function() {
4026										if ($.contains(this.$root[0], $a[0])) {
4027											this.itemEnter({ currentTarget: $a[0] });
4028											return false;
4029										}
4030									});
4031								}
4032								firstTime = false;
4033							}
4034						}
4035					}
4036					lastMove = thisMove;
4037				}],
4038				[touchEvents() ? 'touchstart' : 'pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut', function(e) {
4039					if (isTouchEvent(e.originalEvent)) {
4040						mouse = false;
4041					}
4042				}]
4043			], eNS));
4044			mouseDetectionEnabled = true;
4045		} else if (mouseDetectionEnabled && disable) {
4046			$(document).unbind(eNS);
4047			mouseDetectionEnabled = false;
4048		}
4049	}
4050
4051	function isTouchEvent(e) {
4052		return !/^(4|mouse)$/.test(e.pointerType);
4053	}
4054
4055	// we use this just to choose between toucn and pointer events when we need to, not for touch screen detection
4056	function touchEvents() {
4057		return 'ontouchstart' in window;
4058	}
4059
4060	// returns a jQuery bind() ready object
4061	function getEventsNS(defArr, eNS) {
4062		if (!eNS) {
4063			eNS = '';
4064		}
4065		var obj = {};
4066		$.each(defArr, function(index, value) {
4067			obj[value[0].split(' ').join(eNS + ' ') + eNS] = value[1];
4068		});
4069		return obj;
4070	}
4071
4072	$.SmartMenus = function(elm, options) {
4073		this.$root = $(elm);
4074		this.opts = options;
4075		this.rootId = ''; // internal
4076		this.accessIdPrefix = '';
4077		this.$subArrow = null;
4078		this.activatedItems = []; // stores last activated A's for each level
4079		this.visibleSubMenus = []; // stores visible sub menus UL's (might be in no particular order)
4080		this.showTimeout = 0;
4081		this.hideTimeout = 0;
4082		this.scrollTimeout = 0;
4083		this.clickActivated = false;
4084		this.focusActivated = false;
4085		this.zIndexInc = 0;
4086		this.idInc = 0;
4087		this.$firstLink = null; // we'll use these for some tests
4088		this.$firstSub = null; // at runtime so we'll cache them
4089		this.disabled = false;
4090		this.$disableOverlay = null;
4091		this.isTouchScrolling = false;
4092		this.wasCollapsible = false;
4093		this.init();
4094	};
4095
4096	$.extend($.SmartMenus, {
4097		hideAll: function() {
4098			$.each(menuTrees, function() {
4099				this.menuHideAll();
4100			});
4101		},
4102		destroy: function() {
4103			while (menuTrees.length) {
4104				menuTrees[0].destroy();
4105			}
4106			initMouseDetection(true);
4107		},
4108		prototype: {
4109			init: function(refresh) {
4110				var self = this;
4111
4112				if (!refresh) {
4113					menuTrees.push(this);
4114
4115					this.rootId = (new Date().getTime() + Math.random() + '').replace(/\D/g, '');
4116					this.accessIdPrefix = 'sm-' + this.rootId + '-';
4117
4118					if (this.$root.hasClass('sm-rtl')) {
4119						this.opts.rightToLeftSubMenus = true;
4120					}
4121
4122					// init root (main menu)
4123					var eNS = '.smartmenus';
4124					this.$root
4125						.data('smartmenus', this)
4126						.attr('data-smartmenus-id', this.rootId)
4127						.dataSM('level', 1)
4128						.bind(getEventsNS([
4129							['mouseover focusin', $.proxy(this.rootOver, this)],
4130							['mouseout focusout', $.proxy(this.rootOut, this)],
4131							['keydown', $.proxy(this.rootKeyDown, this)]
4132						], eNS))
4133						.delegate('a', getEventsNS([
4134							['mouseenter', $.proxy(this.itemEnter, this)],
4135							['mouseleave', $.proxy(this.itemLeave, this)],
4136							['mousedown', $.proxy(this.itemDown, this)],
4137							['focus', $.proxy(this.itemFocus, this)],
4138							['blur', $.proxy(this.itemBlur, this)],
4139							['click', $.proxy(this.itemClick, this)],
4140							['touchend', $.proxy(this.itemTouchEnd, this)]
4141						], eNS));
4142
4143					// hide menus on tap or click outside the root UL
4144					eNS += this.rootId;
4145					if (this.opts.hideOnClick) {
4146						$(document).bind(getEventsNS([
4147							['touchstart', $.proxy(this.docTouchStart, this)],
4148							['touchmove', $.proxy(this.docTouchMove, this)],
4149							['touchend', $.proxy(this.docTouchEnd, this)],
4150							// for Opera Mobile < 11.5, webOS browser, etc. we'll check click too
4151							['click', $.proxy(this.docClick, this)]
4152						], eNS));
4153					}
4154					// hide sub menus on resize
4155					$(window).bind(getEventsNS([['resize orientationchange', $.proxy(this.winResize, this)]], eNS));
4156
4157					if (this.opts.subIndicators) {
4158						this.$subArrow = $('<span/>').addClass('sub-arrow');
4159						if (this.opts.subIndicatorsText) {
4160							this.$subArrow.html(this.opts.subIndicatorsText);
4161						}
4162					}
4163
4164					// make sure mouse detection is enabled
4165					initMouseDetection();
4166				}
4167
4168				// init sub menus
4169				this.$firstSub = this.$root.find('ul').each(function() { self.menuInit($(this)); }).eq(0);
4170
4171				this.$firstLink = this.$root.find('a').eq(0);
4172
4173				// find current item
4174				if (this.opts.markCurrentItem) {
4175					var reDefaultDoc = /(index|default)\.[^#\?\/]*/i,
4176						reHash = /#.*/,
4177						locHref = window.location.href.replace(reDefaultDoc, ''),
4178						locHrefNoHash = locHref.replace(reHash, '');
4179					this.$root.find('a').each(function() {
4180						var href = this.href.replace(reDefaultDoc, ''),
4181							$this = $(this);
4182						if (href == locHref || href == locHrefNoHash) {
4183							$this.addClass('current');
4184							if (self.opts.markCurrentTree) {
4185								$this.parentsUntil('[data-smartmenus-id]', 'ul').each(function() {
4186									$(this).dataSM('parent-a').addClass('current');
4187								});
4188							}
4189						}
4190					});
4191				}
4192
4193				// save initial state
4194				this.wasCollapsible = this.isCollapsible();
4195			},
4196			destroy: function(refresh) {
4197				if (!refresh) {
4198					var eNS = '.smartmenus';
4199					this.$root
4200						.removeData('smartmenus')
4201						.removeAttr('data-smartmenus-id')
4202						.removeDataSM('level')
4203						.unbind(eNS)
4204						.undelegate(eNS);
4205					eNS += this.rootId;
4206					$(document).unbind(eNS);
4207					$(window).unbind(eNS);
4208					if (this.opts.subIndicators) {
4209						this.$subArrow = null;
4210					}
4211				}
4212				this.menuHideAll();
4213				var self = this;
4214				this.$root.find('ul').each(function() {
4215						var $this = $(this);
4216						if ($this.dataSM('scroll-arrows')) {
4217							$this.dataSM('scroll-arrows').remove();
4218						}
4219						if ($this.dataSM('shown-before')) {
4220							if (self.opts.subMenusMinWidth || self.opts.subMenusMaxWidth) {
4221								$this.css({ width: '', minWidth: '', maxWidth: '' }).removeClass('sm-nowrap');
4222							}
4223							if ($this.dataSM('scroll-arrows')) {
4224								$this.dataSM('scroll-arrows').remove();
4225							}
4226							$this.css({ zIndex: '', top: '', left: '', marginLeft: '', marginTop: '', display: '' });
4227						}
4228						if ($this.attr('id').indexOf(self.accessIdPrefix) == 0) {
4229							$this.removeAttr('id');
4230						}
4231					})
4232					.removeDataSM('in-mega')
4233					.removeDataSM('shown-before')
4234					.removeDataSM('ie-shim')
4235					.removeDataSM('scroll-arrows')
4236					.removeDataSM('parent-a')
4237					.removeDataSM('level')
4238					.removeDataSM('beforefirstshowfired')
4239					.removeAttr('role')
4240					.removeAttr('aria-hidden')
4241					.removeAttr('aria-labelledby')
4242					.removeAttr('aria-expanded');
4243				this.$root.find('a.has-submenu').each(function() {
4244						var $this = $(this);
4245						if ($this.attr('id').indexOf(self.accessIdPrefix) == 0) {
4246							$this.removeAttr('id');
4247						}
4248					})
4249					.removeClass('has-submenu')
4250					.removeDataSM('sub')
4251					.removeAttr('aria-haspopup')
4252					.removeAttr('aria-controls')
4253					.removeAttr('aria-expanded')
4254					.closest('li').removeDataSM('sub');
4255				if (this.opts.subIndicators) {
4256					this.$root.find('span.sub-arrow').remove();
4257				}
4258				if (this.opts.markCurrentItem) {
4259					this.$root.find('a.current').removeClass('current');
4260				}
4261				if (!refresh) {
4262					this.$root = null;
4263					this.$firstLink = null;
4264					this.$firstSub = null;
4265					if (this.$disableOverlay) {
4266						this.$disableOverlay.remove();
4267						this.$disableOverlay = null;
4268					}
4269					menuTrees.splice($.inArray(this, menuTrees), 1);
4270				}
4271			},
4272			disable: function(noOverlay) {
4273				if (!this.disabled) {
4274					this.menuHideAll();
4275					// display overlay over the menu to prevent interaction
4276					if (!noOverlay && !this.opts.isPopup && this.$root.is(':visible')) {
4277						var pos = this.$root.offset();
4278						this.$disableOverlay = $('<div class="sm-jquery-disable-overlay"/>').css({
4279							position: 'absolute',
4280							top: pos.top,
4281							left: pos.left,
4282							width: this.$root.outerWidth(),
4283							height: this.$root.outerHeight(),
4284							zIndex: this.getStartZIndex(true),
4285							opacity: 0
4286						}).appendTo(document.body);
4287					}
4288					this.disabled = true;
4289				}
4290			},
4291			docClick: function(e) {
4292				if (this.isTouchScrolling) {
4293					this.isTouchScrolling = false;
4294					return;
4295				}
4296				// hide on any click outside the menu or on a menu link
4297				if (this.visibleSubMenus.length && !$.contains(this.$root[0], e.target) || $(e.target).is('a')) {
4298					this.menuHideAll();
4299				}
4300			},
4301			docTouchEnd: function(e) {
4302				if (!this.lastTouch) {
4303					return;
4304				}
4305				if (this.visibleSubMenus.length && (this.lastTouch.x2 === undefined || this.lastTouch.x1 == this.lastTouch.x2) && (this.lastTouch.y2 === undefined || this.lastTouch.y1 == this.lastTouch.y2) && (!this.lastTouch.target || !$.contains(this.$root[0], this.lastTouch.target))) {
4306					if (this.hideTimeout) {
4307						clearTimeout(this.hideTimeout);
4308						this.hideTimeout = 0;
4309					}
4310					// hide with a delay to prevent triggering accidental unwanted click on some page element
4311					var self = this;
4312					this.hideTimeout = setTimeout(function() { self.menuHideAll(); }, 350);
4313				}
4314				this.lastTouch = null;
4315			},
4316			docTouchMove: function(e) {
4317				if (!this.lastTouch) {
4318					return;
4319				}
4320				var touchPoint = e.originalEvent.touches[0];
4321				this.lastTouch.x2 = touchPoint.pageX;
4322				this.lastTouch.y2 = touchPoint.pageY;
4323			},
4324			docTouchStart: function(e) {
4325				var touchPoint = e.originalEvent.touches[0];
4326				this.lastTouch = { x1: touchPoint.pageX, y1: touchPoint.pageY, target: touchPoint.target };
4327			},
4328			enable: function() {
4329				if (this.disabled) {
4330					if (this.$disableOverlay) {
4331						this.$disableOverlay.remove();
4332						this.$disableOverlay = null;
4333					}
4334					this.disabled = false;
4335				}
4336			},
4337			getClosestMenu: function(elm) {
4338				var $closestMenu = $(elm).closest('ul');
4339				while ($closestMenu.dataSM('in-mega')) {
4340					$closestMenu = $closestMenu.parent().closest('ul');
4341				}
4342				return $closestMenu[0] || null;
4343			},
4344			getHeight: function($elm) {
4345				return this.getOffset($elm, true);
4346			},
4347			// returns precise width/height float values
4348			getOffset: function($elm, height) {
4349				var old;
4350				if ($elm.css('display') == 'none') {
4351					old = { position: $elm[0].style.position, visibility: $elm[0].style.visibility };
4352					$elm.css({ position: 'absolute', visibility: 'hidden' }).show();
4353				}
4354				var box = $elm[0].getBoundingClientRect && $elm[0].getBoundingClientRect(),
4355					val = box && (height ? box.height || box.bottom - box.top : box.width || box.right - box.left);
4356				if (!val && val !== 0) {
4357					val = height ? $elm[0].offsetHeight : $elm[0].offsetWidth;
4358				}
4359				if (old) {
4360					$elm.hide().css(old);
4361				}
4362				return val;
4363			},
4364			getStartZIndex: function(root) {
4365				var zIndex = parseInt(this[root ? '$root' : '$firstSub'].css('z-index'));
4366				if (!root && isNaN(zIndex)) {
4367					zIndex = parseInt(this.$root.css('z-index'));
4368				}
4369				return !isNaN(zIndex) ? zIndex : 1;
4370			},
4371			getTouchPoint: function(e) {
4372				return e.touches && e.touches[0] || e.changedTouches && e.changedTouches[0] || e;
4373			},
4374			getViewport: function(height) {
4375				var name = height ? 'Height' : 'Width',
4376					val = document.documentElement['client' + name],
4377					val2 = window['inner' + name];
4378				if (val2) {
4379					val = Math.min(val, val2);
4380				}
4381				return val;
4382			},
4383			getViewportHeight: function() {
4384				return this.getViewport(true);
4385			},
4386			getViewportWidth: function() {
4387				return this.getViewport();
4388			},
4389			getWidth: function($elm) {
4390				return this.getOffset($elm);
4391			},
4392			handleEvents: function() {
4393				return !this.disabled && this.isCSSOn();
4394			},
4395			handleItemEvents: function($a) {
4396				return this.handleEvents() && !this.isLinkInMegaMenu($a);
4397			},
4398			isCollapsible: function() {
4399				return this.$firstSub.css('position') == 'static';
4400			},
4401			isCSSOn: function() {
4402				return this.$firstLink.css('display') == 'block';
4403			},
4404			isFixed: function() {
4405				var isFixed = this.$root.css('position') == 'fixed';
4406				if (!isFixed) {
4407					this.$root.parentsUntil('body').each(function() {
4408						if ($(this).css('position') == 'fixed') {
4409							isFixed = true;
4410							return false;
4411						}
4412					});
4413				}
4414				return isFixed;
4415			},
4416			isLinkInMegaMenu: function($a) {
4417				return $(this.getClosestMenu($a[0])).hasClass('mega-menu');
4418			},
4419			isTouchMode: function() {
4420				return !mouse || this.isCollapsible();
4421			},
4422			itemActivate: function($a, focus) {
4423				var $ul = $a.closest('ul'),
4424					level = $ul.dataSM('level');
4425				// if for some reason the parent item is not activated (e.g. this is an API call to activate the item), activate all parent items first
4426				if (level > 1 && (!this.activatedItems[level - 2] || this.activatedItems[level - 2][0] != $ul.dataSM('parent-a')[0])) {
4427					var self = this;
4428					$($ul.parentsUntil('[data-smartmenus-id]', 'ul').get().reverse()).add($ul).each(function() {
4429						self.itemActivate($(this).dataSM('parent-a'));
4430					});
4431				}
4432				// hide any visible deeper level sub menus
4433				if (!this.isCollapsible() || focus) {
4434					this.menuHideSubMenus(!this.activatedItems[level - 1] || this.activatedItems[level - 1][0] != $a[0] ? level - 1 : level);
4435				}
4436				// save new active item for this level
4437				this.activatedItems[level - 1] = $a;
4438				if (this.$root.triggerHandler('activate.smapi', $a[0]) === false) {
4439					return;
4440				}
4441				// show the sub menu if this item has one
4442				var $sub = $a.dataSM('sub');
4443				if ($sub && (this.isTouchMode() || (!this.opts.showOnClick || this.clickActivated))) {
4444					this.menuShow($sub);
4445				}
4446			},
4447			itemBlur: function(e) {
4448				var $a = $(e.currentTarget);
4449				if (!this.handleItemEvents($a)) {
4450					return;
4451				}
4452				this.$root.triggerHandler('blur.smapi', $a[0]);
4453			},
4454			itemClick: function(e) {
4455				if (this.isTouchScrolling) {
4456					this.isTouchScrolling = false;
4457					e.stopPropagation();
4458					return false;
4459				}
4460				var $a = $(e.currentTarget);
4461				if (!this.handleItemEvents($a)) {
4462					return;
4463				}
4464				if (this.$root.triggerHandler('click.smapi', $a[0]) === false) {
4465					return false;
4466				}
4467				// undo fix: prevent the address bar on iPhone from sliding down when expanding a sub menu
4468				if ($a.dataSM('href')) {
4469					$a.attr('href', $a.dataSM('href')).removeDataSM('href');
4470				}
4471				var subArrowClicked = $(e.target).is('span.sub-arrow'),
4472					$sub = $a.dataSM('sub');
4473				// if the sub is not visible
4474				if ($sub && !$sub.is(':visible')) {
4475					// try to activate the item and show the sub
4476					this.itemActivate($a);
4477					// if "itemActivate" showed the sub, prevent the click so that the link is not loaded
4478					// if it couldn't show it, then the sub menus are disabled with an !important declaration (e.g. via mobile styles) so let the link get loaded
4479					if ($sub.is(':visible')) {
4480						this.focusActivated = true;
4481						return false;
4482					}
4483				} else if (this.isCollapsible() && subArrowClicked) {
4484					this.itemActivate($a);
4485					this.menuHide($sub);
4486					return false;
4487				}
4488				if (this.opts.showOnClick && $sub && $sub.dataSM('level') == 2) {
4489					this.clickActivated = true;
4490					this.menuShow($sub);
4491					return false;
4492				}
4493				if ($a.hasClass('disabled')) {
4494					return false;
4495				}
4496				if (this.$root.triggerHandler('select.smapi', $a[0]) === false) {
4497					return false;
4498				}
4499			},
4500			itemDown: function(e) {
4501				var $a = $(e.currentTarget);
4502				if (!this.handleItemEvents($a)) {
4503					return;
4504				}
4505				$a.dataSM('mousedown', true);
4506			},
4507			itemEnter: function(e) {
4508				var $a = $(e.currentTarget);
4509				if (!this.handleItemEvents($a)) {
4510					return;
4511				}
4512				if (!this.isTouchMode()) {
4513					if (this.showTimeout) {
4514						clearTimeout(this.showTimeout);
4515						this.showTimeout = 0;
4516					}
4517					var self = this;
4518					this.showTimeout = setTimeout(function() { self.itemActivate($a); }, this.opts.showOnClick && $a.closest('ul').dataSM('level') == 1 ? 1 : this.opts.showTimeout);
4519				}
4520				this.$root.triggerHandler('mouseenter.smapi', $a[0]);
4521			},
4522			itemFocus: function(e) {
4523				var $a = $(e.currentTarget);
4524				if (!this.handleItemEvents($a)) {
4525					return;
4526				}
4527				// fix (the mousedown check): in some browsers a tap/click produces consecutive focus + click events so we don't need to activate the item on focus
4528				if (this.focusActivated && (!this.isTouchMode() || !$a.dataSM('mousedown')) && (!this.activatedItems.length || this.activatedItems[this.activatedItems.length - 1][0] != $a[0])) {
4529					this.itemActivate($a, true);
4530				}
4531				this.$root.triggerHandler('focus.smapi', $a[0]);
4532			},
4533			itemLeave: function(e) {
4534				var $a = $(e.currentTarget);
4535				if (!this.handleItemEvents($a)) {
4536					return;
4537				}
4538				if (!this.isTouchMode()) {
4539					if (this.showTimeout) {
4540						clearTimeout(this.showTimeout);
4541						this.showTimeout = 0;
4542					}
4543				}
4544				$a.removeDataSM('mousedown');
4545				this.$root.triggerHandler('mouseleave.smapi', $a[0]);
4546			},
4547			itemTouchEnd: function(e) {
4548				var $a = $(e.currentTarget);
4549				if (!this.handleItemEvents($a)) {
4550					return;
4551				}
4552				// prevent the address bar on iPhone from sliding down when expanding a sub menu
4553				var $sub = $a.dataSM('sub');
4554				if ($a.attr('href').charAt(0) !== '#' && $sub && !$sub.is(':visible')) {
4555					$a.dataSM('href', $a.attr('href'))
4556						.attr('href', '#');
4557				}
4558			},
4559			menuHide: function($sub) {
4560				if (this.$root.triggerHandler('beforehide.smapi', $sub[0]) === false) {
4561					return;
4562				}
4563				$sub.stop(true, true);
4564				if ($sub.css('display') != 'none') {
4565					var complete = function() {
4566						// unset z-index
4567						$sub.css('z-index', '');
4568					};
4569					// if sub is collapsible (mobile view)
4570					if (this.isCollapsible()) {
4571						if (this.opts.collapsibleHideFunction) {
4572							this.opts.collapsibleHideFunction.call(this, $sub, complete);
4573						} else {
4574							$sub.hide(this.opts.collapsibleHideDuration, complete);
4575						}
4576					} else {
4577						if (this.opts.hideFunction) {
4578							this.opts.hideFunction.call(this, $sub, complete);
4579						} else {
4580							$sub.hide(this.opts.hideDuration, complete);
4581						}
4582					}
4583					// remove IE iframe shim
4584					if ($sub.dataSM('ie-shim')) {
4585						$sub.dataSM('ie-shim').remove();
4586					}
4587					// deactivate scrolling if it is activated for this sub
4588					if ($sub.dataSM('scroll')) {
4589						this.menuScrollStop($sub);
4590						$sub.css({ 'touch-action': '', '-ms-touch-action': '' })
4591							.unbind('.smartmenus_scroll').removeDataSM('scroll').dataSM('scroll-arrows').hide();
4592					}
4593					// unhighlight parent item + accessibility
4594					$sub.dataSM('parent-a').removeClass('highlighted').attr('aria-expanded', 'false');
4595					$sub.attr({
4596						'aria-expanded': 'false',
4597						'aria-hidden': 'true'
4598					});
4599					var level = $sub.dataSM('level');
4600					this.activatedItems.splice(level - 1, 1);
4601					this.visibleSubMenus.splice($.inArray($sub, this.visibleSubMenus), 1);
4602					this.$root.triggerHandler('hide.smapi', $sub[0]);
4603				}
4604			},
4605			menuHideAll: function() {
4606				if (this.showTimeout) {
4607					clearTimeout(this.showTimeout);
4608					this.showTimeout = 0;
4609				}
4610				// hide all subs
4611				// if it's a popup, this.visibleSubMenus[0] is the root UL
4612				var level = this.opts.isPopup ? 1 : 0;
4613				for (var i = this.visibleSubMenus.length - 1; i >= level; i--) {
4614					this.menuHide(this.visibleSubMenus[i]);
4615				}
4616				// hide root if it's popup
4617				if (this.opts.isPopup) {
4618					this.$root.stop(true, true);
4619					if (this.$root.is(':visible')) {
4620						if (this.opts.hideFunction) {
4621							this.opts.hideFunction.call(this, this.$root);
4622						} else {
4623							this.$root.hide(this.opts.hideDuration);
4624						}
4625						// remove IE iframe shim
4626						if (this.$root.dataSM('ie-shim')) {
4627							this.$root.dataSM('ie-shim').remove();
4628						}
4629					}
4630				}
4631				this.activatedItems = [];
4632				this.visibleSubMenus = [];
4633				this.clickActivated = false;
4634				this.focusActivated = false;
4635				// reset z-index increment
4636				this.zIndexInc = 0;
4637			},
4638			menuHideSubMenus: function(level) {
4639				for (var i = this.activatedItems.length - 1; i >= level; i--) {
4640					var $sub = this.activatedItems[i].dataSM('sub');
4641					if ($sub) {
4642						this.menuHide($sub);
4643					}
4644				}
4645			},
4646			menuIframeShim: function($ul) {
4647				// create iframe shim for the menu
4648				if (IE && this.opts.overlapControlsInIE && !$ul.dataSM('ie-shim')) {
4649					$ul.dataSM('ie-shim', $('<iframe/>').attr({ src: 'javascript:0', tabindex: -9 })
4650						.css({ position: 'absolute', top: 'auto', left: '0', opacity: 0, border: '0' })
4651					);
4652				}
4653			},
4654			menuInit: function($ul) {
4655				if (!$ul.dataSM('in-mega')) {
4656					// mark UL's in mega drop downs (if any) so we can neglect them
4657					if ($ul.hasClass('mega-menu')) {
4658						$ul.find('ul').dataSM('in-mega', true);
4659					}
4660					// get level (much faster than, for example, using parentsUntil)
4661					var level = 2,
4662						par = $ul[0];
4663					while ((par = par.parentNode.parentNode) != this.$root[0]) {
4664						level++;
4665					}
4666					// cache stuff for quick access
4667					var $a = $ul.prevAll('a').eq(-1);
4668					// if the link is nested (e.g. in a heading)
4669					if (!$a.length) {
4670						$a = $ul.prevAll().find('a').eq(-1);
4671					}
4672					$a.addClass('has-submenu').dataSM('sub', $ul);
4673					$ul.dataSM('parent-a', $a)
4674						.dataSM('level', level)
4675						.parent().dataSM('sub', $ul);
4676					// accessibility
4677					var aId = $a.attr('id') || this.accessIdPrefix + (++this.idInc),
4678						ulId = $ul.attr('id') || this.accessIdPrefix + (++this.idInc);
4679					$a.attr({
4680						id: aId,
4681						'aria-haspopup': 'true',
4682						'aria-controls': ulId,
4683						'aria-expanded': 'false'
4684					});
4685					$ul.attr({
4686						id: ulId,
4687						'role': 'group',
4688						'aria-hidden': 'true',
4689						'aria-labelledby': aId,
4690						'aria-expanded': 'false'
4691					});
4692					// add sub indicator to parent item
4693					if (this.opts.subIndicators) {
4694						$a[this.opts.subIndicatorsPos](this.$subArrow.clone());
4695					}
4696				}
4697			},
4698			menuPosition: function($sub) {
4699				var $a = $sub.dataSM('parent-a'),
4700					$li = $a.closest('li'),
4701					$ul = $li.parent(),
4702					level = $sub.dataSM('level'),
4703					subW = this.getWidth($sub),
4704					subH = this.getHeight($sub),
4705					itemOffset = $a.offset(),
4706					itemX = itemOffset.left,
4707					itemY = itemOffset.top,
4708					itemW = this.getWidth($a),
4709					itemH = this.getHeight($a),
4710					$win = $(window),
4711					winX = $win.scrollLeft(),
4712					winY = $win.scrollTop(),
4713					winW = this.getViewportWidth(),
4714					winH = this.getViewportHeight(),
4715					horizontalParent = $ul.hasClass('sm') && !$ul.hasClass('sm-vertical'),
4716					rightToLeft = this.opts.rightToLeftSubMenus && !$li.is('[data-sm-reverse]') || !this.opts.rightToLeftSubMenus && $li.is('[data-sm-reverse]'),
4717					subOffsetX = level == 2 ? this.opts.mainMenuSubOffsetX : this.opts.subMenusSubOffsetX,
4718					subOffsetY = level == 2 ? this.opts.mainMenuSubOffsetY : this.opts.subMenusSubOffsetY,
4719					x, y;
4720				if (horizontalParent) {
4721					x = rightToLeft ? itemW - subW - subOffsetX : subOffsetX;
4722					y = this.opts.bottomToTopSubMenus ? -subH - subOffsetY : itemH + subOffsetY;
4723				} else {
4724					x = rightToLeft ? subOffsetX - subW : itemW - subOffsetX;
4725					y = this.opts.bottomToTopSubMenus ? itemH - subOffsetY - subH : subOffsetY;
4726				}
4727				if (this.opts.keepInViewport) {
4728					var absX = itemX + x,
4729						absY = itemY + y;
4730					if (rightToLeft && absX < winX) {
4731						x = horizontalParent ? winX - absX + x : itemW - subOffsetX;
4732					} else if (!rightToLeft && absX + subW > winX + winW) {
4733						x = horizontalParent ? winX + winW - subW - absX + x : subOffsetX - subW;
4734					}
4735					if (!horizontalParent) {
4736						if (subH < winH && absY + subH > winY + winH) {
4737							y += winY + winH - subH - absY;
4738						} else if (subH >= winH || absY < winY) {
4739							y += winY - absY;
4740						}
4741					}
4742					// do we need scrolling?
4743					// 0.49 used for better precision when dealing with float values
4744					if (horizontalParent && (absY + subH > winY + winH + 0.49 || absY < winY) || !horizontalParent && subH > winH + 0.49) {
4745						var self = this;
4746						if (!$sub.dataSM('scroll-arrows')) {
4747							$sub.dataSM('scroll-arrows', $([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0], $('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]])
4748								.bind({
4749									mouseenter: function() {
4750										$sub.dataSM('scroll').up = $(this).hasClass('scroll-up');
4751										self.menuScroll($sub);
4752									},
4753									mouseleave: function(e) {
4754										self.menuScrollStop($sub);
4755										self.menuScrollOut($sub, e);
4756									},
4757									'mousewheel DOMMouseScroll': function(e) { e.preventDefault(); }
4758								})
4759								.insertAfter($sub)
4760							);
4761						}
4762						// bind scroll events and save scroll data for this sub
4763						var eNS = '.smartmenus_scroll';
4764						$sub.dataSM('scroll', {
4765								step: 1,
4766								// cache stuff for faster recalcs later
4767								itemH: itemH,
4768								subH: subH,
4769								arrowDownH: this.getHeight($sub.dataSM('scroll-arrows').eq(1))
4770							})
4771							.bind(getEventsNS([
4772								['mouseover', function(e) { self.menuScrollOver($sub, e); }],
4773								['mouseout', function(e) { self.menuScrollOut($sub, e); }],
4774								['mousewheel DOMMouseScroll', function(e) { self.menuScrollMousewheel($sub, e); }]
4775							], eNS))
4776							.dataSM('scroll-arrows').css({ top: 'auto', left: '0', marginLeft: x + (parseInt($sub.css('border-left-width')) || 0), width: subW - (parseInt($sub.css('border-left-width')) || 0) - (parseInt($sub.css('border-right-width')) || 0), zIndex: $sub.css('z-index') })
4777								.eq(horizontalParent && this.opts.bottomToTopSubMenus ? 0 : 1).show();
4778						// when a menu tree is fixed positioned we allow scrolling via touch too
4779						// since there is no other way to access such long sub menus if no mouse is present
4780						if (this.isFixed()) {
4781							$sub.css({ 'touch-action': 'none', '-ms-touch-action': 'none' })
4782								.bind(getEventsNS([
4783									[touchEvents() ? 'touchstart touchmove touchend' : 'pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp', function(e) {
4784										self.menuScrollTouch($sub, e);
4785									}]
4786								], eNS));
4787						}
4788					}
4789				}
4790				$sub.css({ top: 'auto', left: '0', marginLeft: x, marginTop: y - itemH });
4791				// IE iframe shim
4792				this.menuIframeShim($sub);
4793				if ($sub.dataSM('ie-shim')) {
4794					$sub.dataSM('ie-shim').css({ zIndex: $sub.css('z-index'), width: subW, height: subH, marginLeft: x, marginTop: y - itemH });
4795				}
4796			},
4797			menuScroll: function($sub, once, step) {
4798				var data = $sub.dataSM('scroll'),
4799					$arrows = $sub.dataSM('scroll-arrows'),
4800					y = parseFloat($sub.css('margin-top')),
4801					end = data.up ? data.upEnd : data.downEnd,
4802					diff;
4803				if (!once && data.velocity) {
4804					data.velocity *= 0.9;
4805					diff = data.velocity;
4806					if (diff < 0.5) {
4807						this.menuScrollStop($sub);
4808						return;
4809					}
4810				} else {
4811					diff = step || (once || !this.opts.scrollAccelerate ? this.opts.scrollStep : Math.floor(data.step));
4812				}
4813				// hide any visible deeper level sub menus
4814				var level = $sub.dataSM('level');
4815				if (this.activatedItems[level - 1] && this.activatedItems[level - 1].dataSM('sub') && this.activatedItems[level - 1].dataSM('sub').is(':visible')) {
4816					this.menuHideSubMenus(level - 1);
4817				}
4818				var newY = data.up && end <= y || !data.up && end >= y ? y : (Math.abs(end - y) > diff ? y + (data.up ? diff : -diff) : end);
4819				$sub.add($sub.dataSM('ie-shim')).css('margin-top', newY);
4820				// show opposite arrow if appropriate
4821				if (mouse && (data.up && newY > data.downEnd || !data.up && newY < data.upEnd)) {
4822					$arrows.eq(data.up ? 1 : 0).show();
4823				}
4824				// if we've reached the end
4825				if (newY == end) {
4826					if (mouse) {
4827						$arrows.eq(data.up ? 0 : 1).hide();
4828					}
4829					this.menuScrollStop($sub);
4830				} else if (!once) {
4831					if (this.opts.scrollAccelerate && data.step < this.opts.scrollStep) {
4832						data.step += 0.5;
4833					}
4834					var self = this;
4835					this.scrollTimeout = setTimeout(function() { self.menuScroll($sub); }, this.opts.scrollInterval);
4836				}
4837			},
4838			menuScrollMousewheel: function($sub, e) {
4839				if (this.getClosestMenu(e.target) == $sub[0]) {
4840					e = e.originalEvent;
4841					var up = (e.wheelDelta || -e.detail) > 0;
4842					if ($sub.dataSM('scroll-arrows').eq(up ? 0 : 1).is(':visible')) {
4843						$sub.dataSM('scroll').up = up;
4844						this.menuScroll($sub, true);
4845					}
4846				}
4847				e.preventDefault();
4848			},
4849			menuScrollOut: function($sub, e) {
4850				if (mouse) {
4851					if (!/^scroll-(up|down)/.test((e.relatedTarget || '').className) && ($sub[0] != e.relatedTarget && !$.contains($sub[0], e.relatedTarget) || this.getClosestMenu(e.relatedTarget) != $sub[0])) {
4852						$sub.dataSM('scroll-arrows').css('visibility', 'hidden');
4853					}
4854				}
4855			},
4856			menuScrollOver: function($sub, e) {
4857				if (mouse) {
4858					if (!/^scroll-(up|down)/.test(e.target.className) && this.getClosestMenu(e.target) == $sub[0]) {
4859						this.menuScrollRefreshData($sub);
4860						var data = $sub.dataSM('scroll');
4861						$sub.dataSM('scroll-arrows').eq(0).css('margin-top', data.upEnd).end()
4862							.eq(1).css('margin-top', data.downEnd + data.subH - data.arrowDownH).end()
4863							.css('visibility', 'visible');
4864					}
4865				}
4866			},
4867			menuScrollRefreshData: function($sub) {
4868				var data = $sub.dataSM('scroll'),
4869					$win = $(window),
4870					vportY = $win.scrollTop() - $sub.dataSM('parent-a').offset().top - data.itemH;
4871				$.extend(data, {
4872					upEnd: vportY,
4873					downEnd: vportY + this.getViewportHeight() - data.subH
4874				});
4875			},
4876			menuScrollStop: function($sub) {
4877				if (this.scrollTimeout) {
4878					clearTimeout(this.scrollTimeout);
4879					this.scrollTimeout = 0;
4880					$.extend($sub.dataSM('scroll'), {
4881						step: 1,
4882						velocity: 0
4883					});
4884					return true;
4885				}
4886			},
4887			menuScrollTouch: function($sub, e) {
4888				e = e.originalEvent;
4889				if (isTouchEvent(e)) {
4890					var touchPoint = this.getTouchPoint(e);
4891					// neglect event if we touched a visible deeper level sub menu
4892					if (this.getClosestMenu(touchPoint.target) == $sub[0]) {
4893						var data = $sub.dataSM('scroll');
4894						if (/(start|down)$/i.test(e.type)) {
4895							if (this.menuScrollStop($sub)) {
4896								// if we were scrolling, just stop and don't activate any link on the first touch
4897								e.preventDefault();
4898								this.isTouchScrolling = true;
4899							} else {
4900								this.isTouchScrolling = false;
4901							}
4902							// update scroll data since the user might have zoomed, etc.
4903							this.menuScrollRefreshData($sub);
4904							// extend it with the touch properties
4905							$.extend(data, {
4906								touchY: touchPoint.pageY,
4907								touchTimestamp: e.timeStamp,
4908								velocity: 0
4909							});
4910						} else if (/move$/i.test(e.type)) {
4911							var prevY = data.touchY;
4912							if (prevY !== undefined && prevY != touchPoint.pageY) {
4913								this.isTouchScrolling = true;
4914								$.extend(data, {
4915									up: prevY < touchPoint.pageY,
4916									touchY: touchPoint.pageY,
4917									touchTimestamp: e.timeStamp,
4918									velocity: data.velocity + Math.abs(touchPoint.pageY - prevY) * 0.5
4919								});
4920								this.menuScroll($sub, true, Math.abs(data.touchY - prevY));
4921							}
4922							e.preventDefault();
4923						} else { // touchend/pointerup
4924							if (data.touchY !== undefined) {
4925								// check if we need to scroll
4926								if (e.timeStamp - data.touchTimestamp < 120 && data.velocity > 0) {
4927									data.velocity *= 0.5;
4928									this.menuScrollStop($sub);
4929									this.menuScroll($sub);
4930									e.preventDefault();
4931								}
4932								delete data.touchY;
4933							}
4934						}
4935					}
4936				}
4937			},
4938			menuShow: function($sub) {
4939				if (!$sub.dataSM('beforefirstshowfired')) {
4940					$sub.dataSM('beforefirstshowfired', true);
4941					if (this.$root.triggerHandler('beforefirstshow.smapi', $sub[0]) === false) {
4942						return;
4943					}
4944				}
4945				if (this.$root.triggerHandler('beforeshow.smapi', $sub[0]) === false) {
4946					return;
4947				}
4948				$sub.dataSM('shown-before', true)
4949					.stop(true, true);
4950				if (!$sub.is(':visible')) {
4951					// highlight parent item
4952					var $a = $sub.dataSM('parent-a');
4953					if (this.opts.keepHighlighted || this.isCollapsible()) {
4954						$a.addClass('highlighted');
4955					}
4956					if (this.isCollapsible()) {
4957						$sub.removeClass('sm-nowrap').css({ zIndex: '', width: 'auto', minWidth: '', maxWidth: '', top: '', left: '', marginLeft: '', marginTop: '' });
4958					} else {
4959						// set z-index
4960						$sub.css('z-index', this.zIndexInc = (this.zIndexInc || this.get
4960StartZIndex()) + 1);
4961						// min/max-width fix - no way to rely purely on CSS as all UL's are nested
4962						if (this.opts.subMenusMinWidth || this.opts.subMenusMaxWidth) {
4963							$sub.css({ width: 'auto', minWidth: '', maxWidth: '' }).addClass('sm-nowrap');
4964							if (this.opts.subMenusMinWidth) {
4965							 	$sub.css('min-width', this.opts.subMenusMinWidth);
4966							}
4967							if (this.opts.subMenusMaxWidth) {
4968							 	var noMaxWidth = this.getWidth($sub);
4969							 	$sub.css('max-width', this.opts.subMenusMaxWidth);
4970								if (noMaxWidth > this.getWidth($sub)) {
4971									$sub.removeClass('sm-nowrap').css('width', this.opts.subMenusMaxWidth);
4972								}
4973							}
4974						}
4975						this.menuPosition($sub);
4976						// insert IE iframe shim
4977						if ($sub.dataSM('ie-shim')) {
4978							$sub.dataSM('ie-shim').insertBefore($sub);
4979						}
4980					}
4981					var complete = function() {
4982						// fix: "overflow: hidden;" is not reset on animation complete in jQuery < 1.9.0 in Chrome when global "box-sizing: border-box;" is used
4983						$sub.css('overflow', '');
4984					};
4985					// if sub is collapsible (mobile view)
4986					if (this.isCollapsible()) {
4987						if (this.opts.collapsibleShowFunction) {
4988							this.opts.collapsibleShowFunction.call(this, $sub, complete);
4989						} else {
4990							$sub.show(this.opts.collapsibleShowDuration, complete);
4991						}
4992					} else {
4993						if (this.opts.showFunction) {
4994							this.opts.showFunction.call(this, $sub, complete);
4995						} else {
4996							$sub.show(this.opts.showDuration, complete);
4997						}
4998					}
4999					// accessibility
5000					$a.attr('aria-expanded', 'true');
5001					$sub.attr({
5002						'aria-expanded': 'true',
5003						'aria-hidden': 'false'
5004					});
5005					// store sub menu in visible array
5006					this.visibleSubMenus.push($sub);
5007					this.$root.triggerHandler('show.smapi', $sub[0]);
5008				}
5009			},
5010			popupHide: function(noHideTimeout) {
5011				if (this.hideTimeout) {
5012					clearTimeout(this.hideTimeout);
5013					this.hideTimeout = 0;
5014				}
5015				var self = this;
5016				this.hideTimeout = setTimeout(function() {
5017					self.menuHideAll();
5018				}, noHideTimeout ? 1 : this.opts.hideTimeout);
5019			},
5020			popupShow: function(left, top) {
5021				if (!this.opts.isPopup) {
5022					alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');
5023					return;
5024				}
5025				if (this.hideTimeout) {
5026					clearTimeout(this.hideTimeout);
5027					this.hideTimeout = 0;
5028				}
5029				this.$root.dataSM('shown-before', true)
5030					.stop(true, true);
5031				if (!this.$root.is(':visible')) {
5032					this.$root.css({ left: left, top: top });
5033					// IE iframe shim
5034					this.menuIframeShim(this.$root);
5035					if (this.$root.dataSM('ie-shim')) {
5036						this.$root.dataSM('ie-shim').css({ zIndex: this.$root.css('z-index'), width: this.getWidth(this.$root), height: this.getHeight(this.$root), left: left, top: top }).insertBefore(this.$root);
5037					}
5038					// show menu
5039					var self = this,
5040						complete = function() {
5041							self.$root.css('overflow', '');
5042						};
5043					if (this.opts.showFunction) {
5044						this.opts.showFunction.call(this, this.$root, complete);
5045					} else {
5046						this.$root.show(this.opts.showDuration, complete);
5047					}
5048					this.visibleSubMenus[0] = this.$root;
5049				}
5050			},
5051			refresh: function() {
5052				this.destroy(true);
5053				this.init(true);
5054			},
5055			rootKeyDown: function(e) {
5056				if (!this.handleEvents()) {
5057					return;
5058				}
5059				switch (e.keyCode) {
5060					case 27: // reset on Esc
5061						var $activeTopItem = this.activatedItems[0];
5062						if ($activeTopItem) {
5063							this.menuHideAll();
5064							$activeTopItem[0].focus();
5065							var $sub = $activeTopItem.dataSM('sub');
5066							if ($sub) {
5067								this.menuHide($sub);
5068							}
5069						}
5070						break;
5071					case 32: // activate item's sub on Space
5072						var $target = $(e.target);
5073						if ($target.is('a') && this.handleItemEvents($target)) {
5074							var $sub = $target.dataSM('sub');
5075							if ($sub && !$sub.is(':visible')) {
5076								this.itemClick({ currentTarget: e.target });
5077								e.preventDefault();
5078							}
5079						}
5080						break;
5081				}
5082			},
5083			rootOut: function(e) {
5084				if (!this.handleEvents() || this.isTouchMode() || e.target == this.$root[0]) {
5085					return;
5086				}
5087				if (this.hideTimeout) {
5088					clearTimeout(this.hideTimeout);
5089					this.hideTimeout = 0;
5090				}
5091				if (!this.opts.showOnClick || !this.opts.hideOnClick) {
5092					var self = this;
5093					this.hideTimeout = setTimeout(function() { self.menuHideAll(); }, this.opts.hideTimeout);
5094				}
5095			},
5096			rootOver: function(e) {
5097				if (!this.handleEvents() || this.isTouchMode() || e.target == this.$root[0]) {
5098					return;
5099				}
5100				if (this.hideTimeout) {
5101					clearTimeout(this.hideTimeout);
5102					this.hideTimeout = 0;
5103				}
5104			},
5105			winResize: function(e) {
5106				if (!this.handleEvents()) {
5107					// we still need to resize the disable overlay if it's visible
5108					if (this.$disableOverlay) {
5109						var pos = this.$root.offset();
5110	 					this.$disableOverlay.css({
5111							top: pos.top,
5112							left: pos.left,
5113							width: this.$root.outerWidth(),
5114							height: this.$root.outerHeight()
5115						});
5116					}
5117					return;
5118				}
5119				// hide sub menus on resize - on mobile do it only on orientation change
5120				if (!('onorientationchange' in window) || e.type == 'orientationchange') {
5121					var isCollapsible = this.isCollapsible();
5122					// if it was collapsible before resize and still is, don't do it
5123					if (!(this.wasCollapsible && isCollapsible)) { 
5124						if (this.activatedItems.length) {
5125							this.activatedItems[this.activatedItems.length - 1][0].blur();
5126						}
5127						this.menuHideAll();
5128					}
5129					this.wasCollapsible = isCollapsible;
5130				}
5131			}
5132		}
5133	});
5134
5135	$.fn.dataSM = function(key, val) {
5136		if (val) {
5137			return this.data(key + '_smartmenus', val);
5138		}
5139		return this.data(key + '_smartmenus');
5140	}
5141
5142	$.fn.removeDataSM = function(key) {
5143		return this.removeData(key + '_smartmenus');
5144	}
5145
5146	$.fn.smartmenus = function(options) {
5147		if (typeof options == 'string') {
5148			var args = arguments,
5149				method = options;
5150			Array.prototype.shift.call(args);
5151			return this.each(function() {
5152				var smartmenus = $(this).data('smartmenus');
5153				if (smartmenus && smartmenus[method]) {
5154					smartmenus[method].apply(smartmenus, args);
5155				}
5156			});
5157		}
5158		var opts = $.extend({}, $.fn.smartmenus.defaults, options);
5159		return this.each(function() {
5160			new $.SmartMenus(this, opts);
5161		});
5162	}
5163
5164	// default settings
5165	$.fn.smartmenus.defaults = {
5166		isPopup:		false,		// is this a popup menu (can be shown via the popupShow/popupHide methods) or a permanent menu bar
5167		mainMenuSubOffsetX:	0,		// pixels offset from default position
5168		mainMenuSubOffsetY:	0,		// pixels offset from default position
5169		subMenusSubOffsetX:	0,		// pixels offset from default position
5170		subMenusSubOffsetY:	0,		// pixels offset from default position
5171		subMenusMinWidth:	'10em',		// min-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored
5172		subMenusMaxWidth:	'20em',		// max-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored
5173		subIndicators: 		true,		// create sub menu indicators - creates a SPAN and inserts it in the A
5174		subIndicatorsPos: 	'prepend',	// position of the SPAN relative to the menu item content ('prepend', 'append')
5175		subIndicatorsText:	'+',		// [optionally] add text in the SPAN (e.g. '+') (you may want to check the CSS for the sub indicators too)
5176		scrollStep: 		30,		// pixels step when scrolling long sub menus that do not fit in the viewport height
5177		scrollInterval:		30,		// interval between each scrolling step
5178		scrollAccelerate:	true,		// accelerate scrolling or use a fixed step
5179		showTimeout:		250,		// timeout before showing the sub menus
5180		hideTimeout:		500,		// timeout before hiding the sub menus
5181		showDuration:		0,		// duration for show animation - set to 0 for no animation - matters only if showFunction:null
5182		showFunction:		null,		// custom function to use when showing a sub menu (the default is the jQuery 'show')
5183							// don't forget to call complete() at the end of whatever you do
5184							// e.g.: function($ul, complete) { $ul.fadeIn(250, complete); }
5185		hideDuration:		0,		// duration for hide animation - set to 0 for no animation - matters only if hideFunction:null
5186		hideFunction:		function($ul, complete) { $ul.fadeOut(200, complete); },	// custom function to use when hiding a sub menu (the default is the jQuery 'hide')
5187							// don't forget to call complete() at the end of whatever you do
5188							// e.g.: function($ul, complete) { $ul.fadeOut(250, complete); }
5189		collapsibleShowDuration:0,		// duration for show animation for collapsible sub menus - matters only if collapsibleShowFunction:null
5190		collapsibleShowFunction:function($ul, complete) { $ul.slideDown(200, complete); },	// custom function to use when showing a collapsible sub menu
5191							// (i.e. when mobile styles are used to make the sub menus collapsible)
5192		collapsibleHideDuration:0,		// duration for hide animation for collapsible sub menus - matters only if collapsibleHideFunction:null
5193		collapsibleHideFunction:function($ul, complete) { $ul.slideUp(200, complete); },	// custom function to use when hiding a collapsible sub menu
5194							// (i.e. when mobile styles are used to make the sub menus collapsible)
5195		showOnClick:		true,		// show the first-level sub menus onclick instead of onmouseover (matters only for mouse input)
5196		hideOnClick:		true,		// hide the sub menus on click/tap anywhere on the page
5197		keepInViewport:		true,		// reposition the sub menus if needed to make sure they always appear inside the viewport
5198		keepHighlighted:	true,		// keep all ancestor items of the current sub menu highlighted (adds the 'highlighted' class to the A's)
5199		markCurrentItem:	false,		// automatically add the 'current' class to the A element of the item linking to the current URL
5200		markCurrentTree:	true,		// add the 'current' class also to the A elements of all ancestor items of the current item
5201		rightToLeftSubMenus:	false,		// right to left display of the sub menus (check the CSS for the sub indicators' position)
5202		bottomToTopSubMenus:	false,		// bottom to top display of the sub menus
5203		overlapControlsInIE:	true		// make sure sub menus appear on top of special OS controls in IE (i.e. SELECT, OBJECT, EMBED, etc.)
5204	};
5205
5206})(jQuery);
5207/*!
5208 * SmartMenus jQuery Plugin Bootstrap Addon - v0.2.0 - June 1, 2015
5209 * http://www.smartmenus.org/
5210 *
5211 * Copyright 2015 Vasil Dinkov, Vadikom Web Ltd.
5212 * http://vadikom.com
5213 *
5214 * Licensed MIT
5215 */
5216
5217(function($) {
5218
5219	// init ondomready
5220	$(function() {
5221
5222		// init all navbars that don't have the "data-sm-skip" attribute set
5223		var $navbars = $('ul.smartmenus:not([data-sm-skip])');
5224		$navbars.each(function() {
5225			var $this = $(this);
5226			$this.addClass('sm').smartmenus({
5227
5228					// these are some good default options that should work for all
5229					// you can, of course, tweak these as you like
5230					subMenusSubOffsetX: 0,
5231					subMenusSubOffsetY: 0,
5232				    mainMenuSubOffsetX: 0,
5233					subIndicators: false,
5234					showOnClick: false,
5235					showTimeout: 100,
5236					collapsibleShowFunction: null,
5237					collapsibleHideFunction: null,
5238					subMenusMinWidth: '12em',
5239					subMenusMaxWidth: null,
5240					keepInViewport: false,
5241					rightToLeftSubMenus: $this.hasClass('navbar-right'),
5242					bottomToTopSubMenus: $this.closest('.navbar').hasClass('navbar-fixed-bottom')
5243				})
5244				.bind({
5245					// set/unset proper Bootstrap classes for some menu elements
5246					'show.smapi': function(e, menu) {
5247						var $menu = $(menu),
5248							$scrollArrows = $menu.dataSM('scroll-arrows');
5249						if ($scrollArrows) {
5250							// they inherit border-color from body, so we can use its background-color too
5251							$scrollArrows.css('background-color', $(document.body).css('background-color'));
5252						}
5253						$menu.parent().addClass('open');
5254					},
5255					'hide.smapi': function(e, menu) {
5256						$(menu).parent().removeClass('open');
5257					}
5258				})
5259				// set Bootstrap's "active" class to SmartMenus "current" items (should someone decide to enable markCurrentItem: true)
5260				.find('a.current').parent().addClass('active');
5261
5262			// keep Bootstrap's default behavior for parent items when the "data-sm-skip-collapsible-behavior" attribute is set to the ul.navbar-nav
5263			// i.e. use the whole item area just as a sub menu toggle and don't customize the carets
5264			var obj = $this.data('smartmenus');
5265			if ($this.is('[data-sm-skip-collapsible-behavior]')) {
5266				$this.bind({
5267					// click the parent item to toggle the sub menus (and reset deeper levels and other branches on click)
5268					'click.smapi': function(e, item) {
5269						if (obj.isCollapsible()) {
5270							var $item = $(item),
5271								$sub = $item.parent().dataSM('sub');
5272							if ($sub && $sub.dataSM('shown-before') && $sub.is(':visible')) {
5273								obj.itemActivate($item);
5274								obj.menuHide($sub);
5275								return false;
5276							}
5277						}
5278					}
5279				});
5280			}
5281
5282			var $carets = $this.find('.caret');
5283
5284			// onresize detect when the navbar becomes collapsible and add it the "sm-collapsible" class
5285			var winW;
5286			function winResize() {
5287				var newW = obj.getViewportWidth();
5288				if (newW != winW) {
5289					if (obj.isCollapsible()) {
5290						$this.addClass('sm-collapsible');
5291						// set "navbar-toggle" class to carets (so they look like a button) if the "data-sm-skip-collapsible-behavior" attribute is not set to the ul.navbar-nav
5292						if (!$this.is('[data-sm-skip-collapsible-behavior]')) {
5293							$carets.addClass('navbar-toggle sub-arrow');
5294						}
5295					} else {
5296						$this.removeClass('sm-collapsible');
5297						if (!$this.is('[data-sm-skip-collapsible-behavior]')) {
5298							$carets.removeClass('navbar-toggle sub-arrow');
5299						}
5300					}
5301					winW = newW;
5302				}
5303			};
5304			winResize();
5305			$(window).bind('resize.smartmenus' + obj.rootId, winResize);
5306		});
5307
5308	});
5309
5310	// fix collapsible menu detection for Bootstrap 3
5311	$.SmartMenus.prototype.isCollapsible = function() {
5312		return this.$firstLink.parent().css('float') != 'left';
5313	};
5314
5315})(jQuery);
5316( function( $ ) {
5317 /*** 
5318  * Run this code when the #toggle-menu link has been tapped
5319  * or clicked
5320  */
5321  
5322  function toggle() {		  
5323	  var $body = $( 'body' ),
5324		  $page = $( '#page' ),
5325		  $menu = $( '#mobilemenu' ),
5326	 
5327		  /* Cross browser support for CSS "transition end" event */
5328		  transitionEnd = 'transitionend webkitTransitionEnd otransitionend MSTransitionEnd';
5329	 
5330	 // do nothing when animating
5331	  if($body.hasClass( 'animating' ))
5332		  return;
5333		  
5334	  /* When the toggle menu link is clicked, animation starts */
5335	  $body.addClass( 'animating' );
5336	 
5337	  /***
5338	   * Determine the direction of the animation and
5339	   * add the correct direction class depending
5340	   * on whether the menu was already visible.
5341	   */
5342	  if ( $body.hasClass( 'menu-visible' ) ) {
5343	   $body.addClass( 'right' );
5344	  } else {
5345	   $body.addClass( 'left' );
5346	  }
5347	  
5348	  /***
5349	   * When the animation (technically a CSS transition)
5350	   * has finished, remove all animating classes and
5351	   * either add or remove the "menu-visible" class 
5352	   * depending whether it was visible or not previously.
5353	   */
5354	  $page.on( transitionEnd, function() {
5355	   $body
5356		.removeClass( 'animating left right' )
5357		.toggleClass( 'menu-visible' );
5358	 
5359	   $page.off( transitionEnd );
5360	  } );
5361  }
5362
5363	$( '.toggle-menu' ).on( 'touchstart click', function(e) {
5364		e.preventDefault();
5365		toggle();
5366	} );
5367
5368	$( '#mobilemenu a' ).on( 'click', function(e) {
5369		toggle();
5370	} );
5371
5372	$( '#page' ).on( 'touchstart click', function(e) {
5373		var $body = $( 'body' );
5374		if($body.hasClass('menu-visible'))
5375			toggle();
5376	} );
5377 
5378 $( '#mobilemenu .collapser' ).on('click', function(e) {
5379	 e.preventDefault();
5380	 
5381	 jLi = $(this).parent();
5382	 
5383	 if(jLi.hasClass('opened')) {
5384		 jLi.find('> ul').slideUp();
5385		 jLi.removeClass('opened');
5386	 } else {
5387		 jLi.addClass('opened');
5388		 jLi.find('> ul').slideDown();
5389	 }
5390 });
5391} )( jQuery );
5392/*!
vendor: 7,368 bytes, lines 5393-5671
5393 * fancyBox - jQuery Plugin
5394 * version: 2.1.5 (Fri, 14 Jun 2013)
5395 * @requires jQuery v1.6 or later
5396 *
5397 * Examples at http://fancyapps.com/fancybox/
5398 * License: www.fancyapps.com/fancybox/#license
5399 *
5400 * Copyright 2012 Janis Skarnelis - [email protected]
5401 *
5402 */
5403
5404(function (window, document, $, undefined) {
5405	"use strict";
5406
5407	var H = $("html"),
5408		W = $(window),
5409		D = $(document),
5410		F = $.fancybox = function () {
5411			F.open.apply( this, arguments );
5412		},
5413		IE =  navigator.userAgent.match(/msie/i),
5414		didUpdate	= null,
5415		isTouch		= document.createTouch !== undefined,
5416
5417		isQuery	= function(obj) {
5418			return obj && obj.hasOwnProperty && obj instanceof $;
5419		},
5420		isString = function(str) {
5421			return str && $.type(str) === "string";
5422		},
5423		isPercentage = function(str) {
5424			return isString(str) && str.indexOf('%') > 0;
5425		},
5426		isScrollable = function(el) {
5427			return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
5428		},
5429		getScalar = function(orig, dim) {
5430			var value = parseInt(orig, 10) || 0;
5431
5432			if (dim && isPercentage(orig)) {
5433				value = F.getViewport()[ dim ] / 100 * value;
5434			}
5435
5436			return Math.ceil(value);
5437		},
5438		getValue = function(value, dim) {
5439			return getScalar(value, dim) + 'px';
5440		};
5441
5442	$.extend(F, {
5443		// The current version of fancyBox
5444		version: '2.1.5',
5445
5446		defaults: {
5447			padding : 15,
5448			margin  : 20,
5449
5450			width     : 800,
5451			height    : 600,
5452			minWidth  : 100,
5453			minHeight : 100,
5454			maxWidth  : 9999,
5455			maxHeight : 9999,
5456			pixelRatio: 1, // Set to 2 for retina display support
5457
5458			autoSize   : true,
5459			autoHeight : false,
5460			autoWidth  : false,
5461
5462			autoResize  : true,
5463			autoCenter  : !isTouch,
5464			fitToView   : true,
5465			aspectRatio : false,
5466			topRatio    : 0.5,
5467			leftRatio   : 0.5,
5468
5469			scrolling : 'auto', // 'auto', 'yes' or 'no'
5470			wrapCSS   : '',
5471
5472			arrows     : true,
5473			closeBtn   : true,
5474			closeClick : false,
5475			nextClick  : false,
5476			mouseWheel : true,
5477			autoPlay   : false,
5478			playSpeed  : 3000,
5479			preload    : 3,
5480			modal      : false,
5481			loop       : true,
5482
5483			ajax  : {
5484				dataType : 'html',
5485				headers  : { 'X-fancyBox': true }
5486			},
5487			iframe : {
5488				scrolling : 'auto',
5489				preload   : true
5490			},
5491			swf : {
5492				wmode: 'transparent',
5493				allowfullscreen   : 'true',
5494				allowscriptaccess : 'always'
5495			},
5496
5497			keys  : {
5498				next : {
5499					13 : 'left', // enter
5500					34 : 'up',   // page down
5501					39 : 'left', // right arrow
5502					40 : 'up'    // down arrow
5503				},
5504				prev : {
5505					8  : 'right',  // backspace
5506					33 : 'down',   // page up
5507					37 : 'right',  // left arrow
5508					38 : 'down'    // up arrow
5509				},
5510				close  : [27], // escape key
5511				play   : [32], // space - start/stop slideshow
5512				toggle : [70]  // letter "f" - toggle fullscreen
5513			},
5514
5515			direction : {
5516				next : 'left',
5517				prev : 'right'
5518			},
5519
5520			scrollOutside  : true,
5521
5522			// Override some properties
5523			index   : 0,
5524			type    : null,
5525			href    : null,
5526			content : null,
5527			title   : null,
5528
5529			// HTML templates
5530			tpl: {
5531				wrap     : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
5532				image    : '<img class="fancybox-image" src="{href}" alt="" />',
5533				iframe   : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>',
5534				error    : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
5535				closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
5536				next     : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
5537				prev     : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
5538			},
5539
5540			// Properties for each animation type
5541			// Opening fancyBox
5542			openEffect  : 'fade', // 'elastic', 'fade' or 'none'
5543			openSpeed   : 250,
5544			openEasing  : 'swing',
5545			openOpacity : true,
5546			openMethod  : 'zoomIn',
5547
5548			// Closing fancyBox
5549			closeEffect  : 'fade', // 'elastic', 'fade' or 'none'
5550			closeSpeed   : 250,
5551			closeEasing  : 'swing',
5552			closeOpacity : true,
5553			closeMethod  : 'zoomOut',
5554
5555			// Changing next gallery item
5556			nextEffect : 'elastic', // 'elastic', 'fade' or 'none'
5557			nextSpeed  : 250,
5558			nextEasing : 'swing',
5559			nextMethod : 'changeIn',
5560
5561			// Changing previous gallery item
5562			prevEffect : 'elastic', // 'elastic', 'fade' or 'none'
5563			prevSpeed  : 250,
5564			prevEasing : 'swing',
5565			prevMethod : 'changeOut',
5566
5567			// Enable default helpers
5568			helpers : {
5569				overlay : true,
5570				title   : true
5571			},
5572
5573			// Callbacks
5574			onCancel     : $.noop, // If canceling
5575			beforeLoad   : $.noop, // Before loading
5576			afterLoad    : $.noop, // After loading
5577			beforeShow   : $.noop, // Before changing in current item
5578			afterShow    : $.noop, // After opening
5579			beforeChange : $.noop, // Before changing gallery item
5580			beforeClose  : $.noop, // Before closing
5581			afterClose   : $.noop  // After closing
5582		},
5583
5584		//Current state
5585		group    : {}, // Selected group
5586		opts     : {}, // Group options
5587		previous : null,  // Previous element
5588		coming   : null,  // Element being loaded
5589		current  : null,  // Currently loaded element
5590		isActive : false, // Is activated
5591		isOpen   : false, // Is currently open
5592		isOpened : false, // Have been fully opened at least once
5593
5594		wrap  : null,
5595		skin  : null,
5596		outer : null,
5597		inner : null,
5598
5599		player : {
5600			timer    : null,
5601			isActive : false
5602		},
5603
5604		// Loaders
5605		ajaxLoad   : null,
5606		imgPreload : null,
5607
5608		// Some collections
5609		transitions : {},
5610		helpers     : {},
5611
5612		/*
5613		 *	Static methods
5614		 */
5615
5616		open: function (group, opts) {
5617			if (!group) {
5618				return;
5619			}
5620
5621			if (!$.isPlainObject(opts)) {
5622				opts = {};
5623			}
5624
5625			// Close if already active
5626			if (false === F.close(true)) {
5627				return;
5628			}
5629
5630			// Normalize group
5631			if (!$.isArray(group)) {
5632				group = isQuery(group) ? $(group).get() : [group];
5633			}
5634
5635			// Recheck if the type of each element is `object` and set content type (image, ajax, etc)
5636			$.each(group, function(i, element) {
5637				var obj = {},
5638					href,
5639					title,
5640					content,
5641					type,
5642					rez,
5643					hrefParts,
5644					selector;
5645
5646				if ($.type(element) === "object") {
5647					// Check if is DOM element
5648					if (element.nodeType) {
5649						element = $(element);
5650					}
5651
5652					if (isQuery(element)) {
5653						obj = {
5654							href    : element.data('fancybox-href') || element.attr('href'),
5655							title   : element.data('fancybox-title') || element.attr('title'),
5656							isDom   : true,
5657							element : element
5658						};
5659
5660						if ($.metadata) {
5661							$.extend(true, obj, element.metadata());
5662						}
5663
5664					} else {
5665						obj = element;
5666					}
5667				}
5668
5669				href  = opts.href  || obj.href || (isString(element) ? element : null);
5670				title = opts.title !== undefined ? opts.title : obj.title || '';
5671
vendor: 35,039 bytes, lines 5672-7080
5672				content = opts.content || obj.content;
5673				type    = content ? 'html' : (opts.type  || obj.type);
5674
5675				if (!type && obj.isDom) {
5676					type = element.data('fancybox-type');
5677
5678					if (!type) {
5679						rez  = element.prop('class').match(/fancybox\.(\w+)/);
5680						type = rez ? rez[1] : null;
5681					}
5682				}
5683
5684				if (isString(href)) {
5685					// Try to guess the content type
5686					if (!type) {
5687						if (F.isImage(href)) {
5688							type = 'image';
5689
5690						} else if (F.isSWF(href)) {
5691							type = 'swf';
5692
5693						} else if (href.charAt(0) === '#') {
5694							type = 'inline';
5695
5696						} else if (isString(element)) {
5697							type    = 'html';
5698							content = element;
5699						}
5700					}
5701
5702					// Split url into two pieces with source url and content selector, e.g,
5703					// "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id"
5704					if (type === 'ajax') {
5705						hrefParts = href.split(/\s+/, 2);
5706						href      = hrefParts.shift();
5707						selector  = hrefParts.shift();
5708					}
5709				}
5710
5711				if (!content) {
5712					if (type === 'inline') {
5713						if (href) {
5714							content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7
5715
5716						} else if (obj.isDom) {
5717							content = element;
5718						}
5719
5720					} else if (type === 'html') {
5721						content = href;
5722
5723					} else if (!type && !href && obj.isDom) {
5724						type    = 'inline';
5725						content = element;
5726					}
5727				}
5728
5729				$.extend(obj, {
5730					href     : href,
5731					type     : type,
5732					content  : content,
5733					title    : title,
5734					selector : selector
5735				});
5736
5737				group[ i ] = obj;
5738			});
5739
5740			// Extend the defaults
5741			F.opts = $.extend(true, {}, F.defaults, opts);
5742
5743			// All options are merged recursive except keys
5744			if (opts.keys !== undefined) {
5745				F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
5746			}
5747
5748			F.group = group;
5749
5750			return F._start(F.opts.index);
5751		},
5752
5753		// Cancel image loading or abort ajax request
5754		cancel: function () {
5755			var coming = F.coming;
5756
5757			if (!coming || false === F.trigger('onCancel')) {
5758				return;
5759			}
5760
5761			F.hideLoading();
5762
5763			if (F.ajaxLoad) {
5764				F.ajaxLoad.abort();
5765			}
5766
5767			F.ajaxLoad = null;
5768
5769			if (F.imgPreload) {
5770				F.imgPreload.onload = F.imgPreload.onerror = null;
5771			}
5772
5773			if (coming.wrap) {
5774				coming.wrap.stop(true, true).trigger('onReset').remove();
5775			}
5776
5777			F.coming = null;
5778
5779			// If the first item has been canceled, then clear everything
5780			if (!F.current) {
5781				F._afterZoomOut( coming );
5782			}
5783		},
5784
5785		// Start closing animation if is open; remove immediately if opening/closing
5786		close: function (event) {
5787			F.cancel();
5788
5789			if (false === F.trigger('beforeClose')) {
5790				return;
5791			}
5792
5793			F.unbindEvents();
5794
5795			if (!F.isActive) {
5796				return;
5797			}
5798
5799			if (!F.isOpen || event === true) {
5800				$('.fancybox-wrap').stop(true).trigger('onReset').remove();
5801
5802				F._afterZoomOut();
5803
5804			} else {
5805				F.isOpen = F.isOpened = false;
5806				F.isClosing = true;
5807
5808				$('.fancybox-item, .fancybox-nav').remove();
5809
5810				F.wrap.stop(true, true).removeClass('fancybox-opened');
5811
5812				F.transitions[ F.current.closeMethod ]();
5813			}
5814		},
5815
5816		// Manage slideshow:
5817		//   $.fancybox.play(); - toggle slideshow
5818		//   $.fancybox.play( true ); - start
5819		//   $.fancybox.play( false ); - stop
5820		play: function ( action ) {
5821			var clear = function () {
5822					clearTimeout(F.player.timer);
5823				},
5824				set = function () {
5825					clear();
5826
5827					if (F.current && F.player.isActive) {
5828						F.player.timer = setTimeout(F.next, F.current.playSpeed);
5829					}
5830				},
5831				stop = function () {
5832					clear();
5833
5834					D.unbind('.player');
5835
5836					F.player.isActive = false;
5837
5838					F.trigger('onPlayEnd');
5839				},
5840				start = function () {
5841					if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
5842						F.player.isActive = true;
5843
5844						D.bind({
5845							'onCancel.player beforeClose.player' : stop,
5846							'onUpdate.player'   : set,
5847							'beforeLoad.player' : clear
5848						});
5849
5850						set();
5851
5852						F.trigger('onPlayStart');
5853					}
5854				};
5855
5856			if (action === true || (!F.player.isActive && action !== false)) {
5857				start();
5858			} else {
5859				stop();
5860			}
5861		},
5862
5863		// Navigate to next gallery item
5864		next: function ( direction ) {
5865			var current = F.current;
5866
5867			if (current) {
5868				if (!isString(direction)) {
5869					direction = current.direction.next;
5870				}
5871
5872				F.jumpto(current.index + 1, direction, 'next');
5873			}
5874		},
5875
5876		// Navigate to previous gallery item
5877		prev: function ( direction ) {
5878			var current = F.current;
5879
5880			if (current) {
5881				if (!isString(direction)) {
5882					direction = current.direction.prev;
5883				}
5884
5885				F.jumpto(current.index - 1, direction, 'prev');
5886			}
5887		},
5888
5889		// Navigate to gallery item by index
5890		jumpto: function ( index, direction, router ) {
5891			var current = F.current;
5892
5893			if (!current) {
5894				return;
5895			}
5896
5897			index = getScalar(index);
5898
5899			F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ];
5900			F.router    = router || 'jumpto';
5901
5902			if (current.loop) {
5903				if (index < 0) {
5904					index = current.group.length + (index % current.group.length);
5905				}
5906
5907				index = index % current.group.length;
5908			}
5909
5910			if (current.group[ index ] !== undefined) {
5911				F.cancel();
5912
5913				F._start(index);
5914			}
5915		},
5916
5917		// Center inside viewport and toggle position type to fixed or absolute if needed
5918		reposition: function (e, onlyAbsolute) {
5919			var current = F.current,
5920				wrap    = current ? current.wrap : null,
5921				pos;
5922
5923			if (wrap) {
5924				pos = F._getPosition(onlyAbsolute);
5925
5926				if (e && e.type === 'scroll') {
5927					delete pos.position;
5928
5929					wrap.stop(true, true).animate(pos, 200);
5930
5931				} else {
5932					wrap.css(pos);
5933
5934					current.pos = $.extend({}, current.dim, pos);
5935				}
5936			}
5937		},
5938
5939		update: function (e) {
5940			var type = (e && e.type),
5941				anyway = !type || type === 'orientationchange';
5942
5943			if (anyway) {
5944				clearTimeout(didUpdate);
5945
5946				didUpdate = null;
5947			}
5948
5949			if (!F.isOpen || didUpdate) {
5950				return;
5951			}
5952
5953			didUpdate = setTimeout(function() {
5954				var current = F.current;
5955
5956				if (!current || F.isClosing) {
5957					return;
5958				}
5959
5960				F.wrap.removeClass('fancybox-tmp');
5961
5962				if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) {
5963					F._setDimension();
5964				}
5965
5966				if (!(type === 'scroll' && current.canShrink)) {
5967					F.reposition(e);
5968				}
5969
5970				F.trigger('onUpdate');
5971
5972				didUpdate = null;
5973
5974			}, (anyway && !isTouch ? 0 : 300));
5975		},
5976
5977		// Shrink content to fit inside viewport or restore if resized
5978		toggle: function ( action ) {
5979			if (F.isOpen) {
5980				F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView;
5981
5982				// Help browser to restore document dimensions
5983				if (isTouch) {
5984					F.wrap.removeAttr('style').addClass('fancybox-tmp');
5985
5986					F.trigger('onUpdate');
5987				}
5988
5989				F.update();
5990			}
5991		},
5992
5993		hideLoading: function () {
5994			D.unbind('.loading');
5995
5996			$('#fancybox-loading').remove();
5997		},
5998
5999		showLoading: function () {
6000			var el, viewport;
6001
6002			F.hideLoading();
6003
6004			el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');
6005
6006			// If user will press the escape-button, the request will be canceled
6007			D.bind('keydown.loading', function(e) {
6008				if ((e.which || e.keyCode) === 27) {
6009					e.preventDefault();
6010
6011					F.cancel();
6012				}
6013			});
6014
6015			if (!F.defaults.fixed) {
6016				viewport = F.getViewport();
6017
6018				el.css({
6019					position : 'absolute',
6020					top  : (viewport.h * 0.5) + viewport.y,
6021					left : (viewport.w * 0.5) + viewport.x
6022				});
6023			}
6024		},
6025
6026		getViewport: function () {
6027			var locked = (F.current && F.current.locked) || false,
6028				rez    = {
6029					x: W.scrollLeft(),
6030					y: W.scrollTop()
6031				};
6032
6033			if (locked) {
6034				rez.w = locked[0].clientWidth;
6035				rez.h = locked[0].clientHeight;
6036
6037			} else {
6038				// See http://bugs.jquery.com/ticket/6724
6039				rez.w = isTouch && window.innerWidth  ? window.innerWidth  : W.width();
6040				rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height();
6041			}
6042
6043			return rez;
6044		},
6045
6046		// Unbind the keyboard / clicking actions
6047		unbindEvents: function () {
6048			if (F.wrap && isQuery(F.wrap)) {
6049				F.wrap.unbind('.fb');
6050			}
6051
6052			D.unbind('.fb');
6053			W.unbind('.fb');
6054		},
6055
6056		bindEvents: function () {
6057			var current = F.current,
6058				keys;
6059
6060			if (!current) {
6061				return;
6062			}
6063
6064			// Changing document height on iOS devices triggers a 'resize' event,
6065			// that can change document height... repeating infinitely
6066			W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update);
6067
6068			keys = current.keys;
6069
6070			if (keys) {
6071				D.bind('keydown.fb', function (e) {
6072					var code   = e.which || e.keyCode,
6073						target = e.target || e.srcElement;
6074
6075					// Skip esc key if loading, because showLoading will cancel preloading
6076					if (code === 27 && F.coming) {
6077						return false;
6078					}
6079
6080					// Ignore key combinations and key events within form elements
6081					if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
6082						$.each(keys, function(i, val) {
6083							if (current.group.length > 1 && val[ code ] !== undefined) {
6084								F[ i ]( val[ code ] );
6085
6086								e.preventDefault();
6087								return false;
6088							}
6089
6090							if ($.inArray(code, val) > -1) {
6091								F[ i ] ();
6092
6093								e.preventDefault();
6094								return false;
6095							}
6096						});
6097					}
6098				});
6099			}
6100
6101			if ($.fn.mousewheel && current.mouseWheel) {
6102				F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) {
6103					var target = e.target || null,
6104						parent = $(target),
6105						canScroll = false;
6106
6107					while (parent.length) {
6108						if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) {
6109							break;
6110						}
6111
6112						canScroll = isScrollable( parent[0] );
6113						parent    = $(parent).parent();
6114					}
6115
6116					if (delta !== 0 && !canScroll) {
6117						if (F.group.length > 1 && !current.canShrink) {
6118							if (deltaY > 0 || deltaX > 0) {
6119								F.prev( deltaY > 0 ? 'down' : 'left' );
6120
6121							} else if (deltaY < 0 || deltaX < 0) {
6122								F.next( deltaY < 0 ? 'up' : 'right' );
6123							}
6124
6125							e.preventDefault();
6126						}
6127					}
6128				});
6129			}
6130		},
6131
6132		trigger: function (event, o) {
6133			var ret, obj = o || F.coming || F.current;
6134
6135			if (!obj) {
6136				return;
6137			}
6138
6139			if ($.isFunction( obj[event] )) {
6140				ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
6141			}
6142
6143			if (ret === false) {
6144				return false;
6145			}
6146
6147			if (obj.helpers) {
6148				$.each(obj.helpers, function (helper, opts) {
6149					if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
6150						F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
6151					}
6152				});
6153			}
6154
6155			D.trigger(event);
6156		},
6157
6158		isImage: function (str) {
6159			return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
6160		},
6161
6162		isSWF: function (str) {
6163			return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
6164		},
6165
6166		_start: function (index) {
6167			var coming = {},
6168				obj,
6169				href,
6170				type,
6171				margin,
6172				padding;
6173
6174			index = getScalar( index );
6175			obj   = F.group[ index ] || null;
6176
6177			if (!obj) {
6178				return false;
6179			}
6180
6181			coming = $.extend(true, {}, F.opts, obj);
6182
6183			// Convert margin and padding properties to array - top, right, bottom, left
6184			margin  = coming.margin;
6185			padding = coming.padding;
6186
6187			if ($.type(margin) === 'number') {
6188				coming.margin = [margin, margin, margin, margin];
6189			}
6190
6191			if ($.type(padding) === 'number') {
6192				coming.padding = [padding, padding, padding, padding];
6193			}
6194
6195			// 'modal' propery is just a shortcut
6196			if (coming.modal) {
6197				$.extend(true, coming, {
6198					closeBtn   : false,
6199					closeClick : false,
6200					nextClick  : false,
6201					arrows     : false,
6202					mouseWheel : false,
6203					keys       : null,
6204					helpers: {
6205						overlay : {
6206							closeClick : false
6207						}
6208					}
6209				});
6210			}
6211
6212			// 'autoSize' property is a shortcut, too
6213			if (coming.autoSize) {
6214				coming.autoWidth = coming.autoHeight = true;
6215			}
6216
6217			if (coming.width === 'auto') {
6218				coming.autoWidth = true;
6219			}
6220
6221			if (coming.height === 'auto') {
6222				coming.autoHeight = true;
6223			}
6224
6225			/*
6226			 * Add reference to the group, so it`s possible to access from callbacks, example:
6227			 * afterLoad : function() {
6228			 *     this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
6229			 * }
6230			 */
6231
6232			coming.group  = F.group;
6233			coming.index  = index;
6234
6235			// Give a chance for callback or helpers to update coming item (type, title, etc)
6236			F.coming = coming;
6237
6238			if (false === F.trigger('beforeLoad')) {
6239				F.coming = null;
6240
6241				return;
6242			}
6243
6244			type = coming.type;
6245			href = coming.href;
6246
6247			if (!type) {
6248				F.coming = null;
6249
6250				//If we can not determine content type then drop silently or display next/prev item if looping through gallery
6251				if (F.current && F.router && F.router !== 'jumpto') {
6252					F.current.index = index;
6253
6254					return F[ F.router ]( F.direction );
6255				}
6256
6257				return false;
6258			}
6259
6260			F.isActive = true;
6261
6262			if (type === 'image' || type === 'swf') {
6263				coming.autoHeight = coming.autoWidth = false;
6264				coming.scrolling  = 'visible';
6265			}
6266
6267			if (type === 'image') {
6268				coming.aspectRatio = true;
6269			}
6270
6271			if (type === 'iframe' && isTouch) {
6272				coming.scrolling = 'scroll';
6273			}
6274
6275			// Build the neccessary markup
6276			coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' );
6277
6278			$.extend(coming, {
6279				skin  : $('.fancybox-skin',  coming.wrap),
6280				outer : $('.fancybox-outer', coming.wrap),
6281				inner : $('.fancybox-inner', coming.wrap)
6282			});
6283
6284			$.each(["Top", "Right", "Bottom", "Left"], function(i, v) {
6285				coming.skin.css('padding' + v, getValue(coming.padding[ i ]));
6286			});
6287
6288			F.trigger('onReady');
6289
6290			// Check before try to load; 'inline' and 'html' types need content, others - href
6291			if (type === 'inline' || type === 'html') {
6292				if (!coming.content || !coming.content.length) {
6293					return F._error( 'content' );
6294				}
6295
6296			} else if (!href) {
6297				return F._error( 'href' );
6298			}
6299
6300			if (type === 'image') {
6301				F._loadImage();
6302
6303			} else if (type === 'ajax') {
6304				F._loadAjax();
6305
6306			} else if (type === 'iframe') {
6307				F._loadIframe();
6308
6309			} else {
6310				F._afterLoad();
6311			}
6312		},
6313
6314		_error: function ( type ) {
6315			$.extend(F.coming, {
6316				type       : 'html',
6317				autoWidth  : true,
6318				autoHeight : true,
6319				minWidth   : 0,
6320				minHeight  : 0,
6321				scrolling  : 'no',
6322				hasError   : type,
6323				content    : F.coming.tpl.error
6324			});
6325
6326			F._afterLoad();
6327		},
6328
6329		_loadImage: function () {
6330			// Reset preload image so it is later possible to check "complete" property
6331			var img = F.imgPreload = new Image();
6332
6333			img.onload = function () {
6334				this.onload = this.onerror = null;
6335
6336				F.coming.width  = this.width / F.opts.pixelRatio;
6337				F.coming.height = this.height / F.opts.pixelRatio;
6338
6339				F._afterLoad();
6340			};
6341
6342			img.onerror = function () {
6343				this.onload = this.onerror = null;
6344
6345				F._error( 'image' );
6346			};
6347
6348			img.src = F.coming.href;
6349
6350			if (img.complete !== true) {
6351				F.showLoading();
6352			}
6353		},
6354
6355		_loadAjax: function () {
6356			var coming = F.coming;
6357
6358			F.showLoading();
6359
6360			F.ajaxLoad = $.ajax($.extend({}, coming.ajax, {
6361				url: coming.href,
6362				error: function (jqXHR, textStatus) {
6363					if (F.coming && textStatus !== 'abort') {
6364						F._error( 'ajax', jqXHR );
6365
6366					} else {
6367						F.hideLoading();
6368					}
6369				},
6370				success: function (data, textStatus) {
6371					if (textStatus === 'success') {
6372						coming.content = data;
6373
6374						F._afterLoad();
6375					}
6376				}
6377			}));
6378		},
6379
6380		_loadIframe: function() {
6381			var coming = F.coming,
6382				iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
6383					.attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling)
6384					.attr('src', coming.href);
6385
6386			// This helps IE
6387			$(coming.wrap).bind('onReset', function () {
6388				try {
6389					$(this).find('iframe').hide().attr('src', '//about:blank').end().empty();
6390				} catch (e) {}
6391			});
6392
6393			if (coming.iframe.preload) {
6394				F.showLoading();
6395
6396				iframe.one('load', function() {
6397					$(this).data('ready', 1);
6398
6399					// iOS will lose scrolling if we resize
6400					if (!isTouch) {
6401						$(this).bind('load.fb', F.update);
6402					}
6403
6404					// Without this trick:
6405					//   - iframe won't scroll on iOS devices
6406					//   - IE7 sometimes displays empty iframe
6407					$(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();
6408
6409					F._afterLoad();
6410				});
6411			}
6412
6413			coming.content = iframe.appendTo( coming.inner );
6414
6415			if (!coming.iframe.preload) {
6416				F._afterLoad();
6417			}
6418		},
6419
6420		_preloadImages: function() {
6421			var group   = F.group,
6422				current = F.current,
6423				len     = group.length,
6424				cnt     = current.preload ? Math.min(current.preload, len - 1) : 0,
6425				item,
6426				i;
6427
6428			for (i = 1; i <= cnt; i += 1) {
6429				item = group[ (current.index + i ) % len ];
6430
6431				if (item.type === 'image' && item.href) {
6432					new Image().src = item.href;
6433				}
6434			}
6435		},
6436
6437		_afterLoad: function () {
6438			var coming   = F.coming,
6439				previous = F.current,
6440				placeholder = 'fancybox-placeholder',
6441				current,
6442				content,
6443				type,
6444				scrolling,
6445				href,
6446				embed;
6447
6448			F.hideLoading();
6449
6450			if (!coming || F.isActive === false) {
6451				return;
6452			}
6453
6454			if (false === F.trigger('afterLoad', coming, previous)) {
6455				coming.wrap.stop(true).trigger('onReset').remove();
6456
6457				F.coming = null;
6458
6459				return;
6460			}
6461
6462			if (previous) {
6463				F.trigger('beforeChange', previous);
6464
6465				previous.wrap.stop(true).removeClass('fancybox-opened')
6466					.find('.fancybox-item, .fancybox-nav')
6467					.remove();
6468			}
6469
6470			F.unbindEvents();
6471
6472			current   = coming;
6473			content   = coming.content;
6474			type      = coming.type;
6475			scrolling = coming.scrolling;
6476
6477			$.extend(F, {
6478				wrap  : current.wrap,
6479				skin  : current.skin,
6480				outer : current.outer,
6481				inner : current.inner,
6482				current  : current,
6483				previous : previous
6484			});
6485
6486			href = current.href;
6487
6488			switch (type) {
6489				case 'inline':
6490				case 'ajax':
6491				case 'html':
6492					if (current.selector) {
6493						content = $('<div>').html(content).find(current.selector);
6494
6495					} else if (isQuery(content)) {
6496						if (!content.data(placeholder)) {
6497							content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() );
6498						}
6499
6500						content = content.show().detach();
6501
6502						current.wrap.bind('onReset', function () {
6503							if ($(this).find(content).length) {
6504								content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);
6505							}
6506						});
6507					}
6508				break;
6509
6510				case 'image':
6511					content = current.tpl.image.replace('{href}', href);
6512				break;
6513
6514				case 'swf':
6515					content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';
6516					embed   = '';
6517
6518					$.each(current.swf, function(name, val) {
6519						content += '<param name="' + name + '" value="' + val + '"></param>';
6520						embed   += ' ' + name + '="' + val + '"';
6521					});
6522
6523					content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';
6524				break;
6525			}
6526
6527			if (!(isQuery(content) && content.parent().is(current.inner))) {
6528				current.inner.append( content );
6529			}
6530
6531			// Give a chance for helpers or callbacks to update elements
6532			F.trigger('beforeShow');
6533
6534			// Set scrolling before calculating dimensions
6535			current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
6536
6537			// Set initial dimensions and start position
6538			F._setDimension();
6539
6540			F.reposition();
6541
6542			F.isOpen = false;
6543			F.coming = null;
6544
6545			F.bindEvents();
6546
6547			if (!F.isOpened) {
6548				$('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();
6549
6550			} else if (previous.prevMethod) {
6551				F.transitions[ previous.prevMethod ]();
6552			}
6553
6554			F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ]();
6555
6556			F._preloadImages();
6557		},
6558
6559		_setDimension: function () {
6560			var viewport   = F.getViewport(),
6561				steps      = 0,
6562				canShrink  = false,
6563				canExpand  = false,
6564				wrap       = F.wrap,
6565				skin       = F.skin,
6566				inner      = F.inner,
6567				current    = F.current,
6568				width      = current.width,
6569				height     = current.height,
6570				minWidth   = current.minWidth,
6571				minHeight  = current.minHeight,
6572				maxWidth   = current.maxWidth,
6573				maxHeight  = current.maxHeight,
6574				scrolling  = current.scrolling,
6575				scrollOut  = current.scrollOutside ? current.scrollbarWidth : 0,
6576				margin     = current.margin,
6577				wMargin    = getScalar(margin[1] + margin[3]),
6578				hMargin    = getScalar(margin[0] + margin[2]),
6579				wPadding,
6580				hPadding,
6581				wSpace,
6582				hSpace,
6583				origWidth,
6584				origHeight,
6585				origMaxWidth,
6586				origMaxHeight,
6587				ratio,
6588				width_,
6589				height_,
6590				maxWidth_,
6591				maxHeight_,
6592				iframe,
6593				body;
6594
6595			// Reset dimensions so we could re-check actual size
6596			wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');
6597
6598			wPadding = getScalar(skin.outerWidth(true)  - skin.width());
6599			hPadding = getScalar(skin.outerHeight(true) - skin.height());
6600
6601			// Any space between content and viewport (margin, padding, border, title)
6602			wSpace = wMargin + wPadding;
6603			hSpace = hMargin + hPadding;
6604
6605			origWidth  = isPercentage(width)  ? (viewport.w - wSpace) * getScalar(width)  / 100 : width;
6606			origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;
6607
6608			if (current.type === 'iframe') {
6609				iframe = current.content;
6610
6611				if (current.autoHeight && iframe.data('ready') === 1) {
6612					try {
6613						if (iframe[0].contentWindow.document.location) {
6614							inner.width( origWidth ).height(9999);
6615
6616							body = iframe.contents().find('body');
6617
6618							if (scrollOut) {
6619								body.css('overflow-x', 'hidden');
6620							}
6621
6622							origHeight = body.outerHeight(true);
6623						}
6624
6625					} catch (e) {}
6626				}
6627
6628			} else if (current.autoWidth || current.autoHeight) {
6629				inner.addClass( 'fancybox-tmp' );
6630
6631				// Set width or height in case we need to calculate only one dimension
6632				if (!current.autoWidth) {
6633					inner.width( origWidth );
6634				}
6635
6636				if (!current.autoHeight) {
6637					inner.height( origHeight );
6638				}
6639
6640				if (current.autoWidth) {
6641					origWidth = inner.width();
6642				}
6643
6644				if (current.autoHeight) {
6645					origHeight = inner.height();
6646				}
6647
6648				inner.removeClass( 'fancybox-tmp' );
6649			}
6650
6651			width  = getScalar( origWidth );
6652			height = getScalar( origHeight );
6653
6654			ratio  = origWidth / origHeight;
6655
6656			// Calculations for the content
6657			minWidth  = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
6658			maxWidth  = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);
6659
6660			minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
6661			maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);
6662
6663			// These will be used to determine if wrap can fit in the viewport
6664			origMaxWidth  = maxWidth;
6665			origMaxHeight = maxHeight;
6666
6667			if (current.fitToView) {
6668				maxWidth  = Math.min(viewport.w - wSpace, maxWidth);
6669				maxHeight = Math.min(viewport.h - hSpace, maxHeight);
6670			}
6671
6672			maxWidth_  = viewport.w - wMargin;
6673			maxHeight_ = viewport.h - hMargin;
6674
6675			if (current.aspectRatio) {
6676				if (width > maxWidth) {
6677					width  = maxWidth;
6678					height = getScalar(width / ratio);
6679				}
6680
6681				if (height > maxHeight) {
6682					height = maxHeight;
6683					width  = getScalar(height * ratio);
6684				}
6685
6686				if (width < minWidth) {
6687					width  = minWidth;
6688					height = getScalar(width / ratio);
6689				}
6690
6691				if (height < minHeight) {
6692					height = minHeight;
6693					width  = getScalar(height * ratio);
6694				}
6695
6696			} else {
6697				width = Math.max(minWidth, Math.min(width, maxWidth));
6698
6699				if (current.autoHeight && current.type !== 'iframe') {
6700					inner.width( width );
6701
6702					height = inner.height();
6703				}
6704
6705				height = Math.max(minHeight, Math.min(height, maxHeight));
6706			}
6707
6708			// Try to fit inside viewport (including the title)
6709			if (current.fitToView) {
6710				inner.width( width ).height( height );
6711
6712				wrap.width( width + wPadding );
6713
6714				// Real wrap dimensions
6715				width_  = wrap.width();
6716				height_ = wrap.height();
6717
6718				if (current.aspectRatio) {
6719					while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
6720						if (steps++ > 19) {
6721							break;
6722						}
6723
6724						height = Math.max(minHeight, Math.min(maxHeight, height - 10));
6725						width  = getScalar(height * ratio);
6726
6727						if (width < minWidth) {
6728							width  = minWidth;
6729							height = getScalar(width / ratio);
6730						}
6731
6732						if (width > maxWidth) {
6733							width  = maxWidth;
6734							height = getScalar(width / ratio);
6735						}
6736
6737						inner.width( width ).height( height );
6738
6739						wrap.width( width + wPadding );
6740
6741						width_  = wrap.width();
6742						height_ = wrap.height();
6743					}
6744
6745				} else {
6746					width  = Math.max(minWidth,  Math.min(width,  width  - (width_  - maxWidth_)));
6747					height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
6748				}
6749			}
6750
6751			if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
6752				width += scrollOut;
6753			}
6754
6755			inner.width( width ).height( height );
6756
6757			wrap.width( width + wPadding );
6758
6759			width_  = wrap.width();
6760			height_ = wrap.height();
6761
6762			canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
6763			canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));
6764
6765			$.extend(current, {
6766				dim : {
6767					width	: getValue( width_ ),
6768					height	: getValue( height_ )
6769				},
6770				origWidth  : origWidth,
6771				origHeight : origHeight,
6772				canShrink  : canShrink,
6773				canExpand  : canExpand,
6774				wPadding   : wPadding,
6775				hPadding   : hPadding,
6776				wrapSpace  : height_ - skin.outerHeight(true),
6777				skinSpace  : skin.height() - height
6778			});
6779
6780			if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
6781				inner.height('auto');
6782			}
6783		},
6784
6785		_getPosition: function (onlyAbsolute) {
6786			var current  = F.current,
6787				viewport = F.getViewport(),
6788				margin   = current.margin,
6789				width    = F.wrap.width()  + margin[1] + margin[3],
6790				height   = F.wrap.height() + margin[0] + margin[2],
6791				rez      = {
6792					position: 'absolute',
6793					top  : margin[0],
6794					left : margin[3]
6795				};
6796
6797			if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
6798				rez.position = 'fixed';
6799
6800			} else if (!current.locked) {
6801				rez.top  += viewport.y;
6802				rez.left += viewport.x;
6803			}
6804
6805			rez.top  = getValue(Math.max(rez.top,  rez.top  + ((viewport.h - height) * current.topRatio)));
6806			rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width)  * current.leftRatio)));
6807
6808			return rez;
6809		},
6810
6811		_afterZoomIn: function () {
6812			var current = F.current;
6813
6814			if (!current) {
6815				return;
6816			}
6817
6818			F.isOpen = F.isOpened = true;
6819
6820			F.wrap.css('overflow', 'visible').addClass('fancybox-opened');
6821
6822			F.update();
6823
6824			// Assign a click event
6825			if ( current.closeClick || (current.nextClick && F.group.length > 1) ) {
6826				F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
6827					if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
6828						e.preventDefault();
6829
6830						F[ current.closeClick ? 'close' : 'next' ]();
6831					}
6832				});
6833			}
6834
6835			// Create a close button
6836			if (current.closeBtn) {
6837				$(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) {
6838					e.preventDefault();
6839
6840					F.close();
6841				});
6842			}
6843
6844			// Create navigation arrows
6845			if (current.arrows && F.group.length > 1) {
6846				if (current.loop || current.index > 0) {
6847					$(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
6848				}
6849
6850				if (current.loop || current.index < F.group.length - 1) {
6851					$(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
6852				}
6853			}
6854
6855			F.trigger('afterShow');
6856
6857			// Stop the slideshow if this is the last item
6858			if (!current.loop && current.index === current.group.length - 1) {
6859				F.play( false );
6860
6861			} else if (F.opts.autoPlay && !F.player.isActive) {
6862				F.opts.autoPlay = false;
6863
6864				F.play();
6865			}
6866		},
6867
6868		_afterZoomOut: function ( obj ) {
6869			obj = obj || F.current;
6870
6871			$('.fancybox-wrap').trigger('onReset').remove();
6872
6873			$.extend(F, {
6874				group  : {},
6875				opts   : {},
6876				router : false,
6877				current   : null,
6878				isActive  : false,
6879				isOpened  : false,
6880				isOpen    : false,
6881				isClosing : false,
6882				wrap   : null,
6883				skin   : null,
6884				outer  : null,
6885				inner  : null
6886			});
6887
6888			F.trigger('afterClose', obj);
6889		}
6890	});
6891
6892	/*
6893	 *	Default transitions
6894	 */
6895
6896	F.transitions = {
6897		getOrigPosition: function () {
6898			var current  = F.current,
6899				element  = current.element,
6900				orig     = current.orig,
6901				pos      = {},
6902				width    = 50,
6903				height   = 50,
6904				hPadding = current.hPadding,
6905				wPadding = current.wPadding,
6906				viewport = F.getViewport();
6907
6908			if (!orig && current.isDom && element.is(':visible')) {
6909				orig = element.find('img:first');
6910
6911				if (!orig.length) {
6912					orig = element;
6913				}
6914			}
6915
6916			if (isQuery(orig)) {
6917				pos = orig.offset();
6918
6919				if (orig.is('img')) {
6920					width  = orig.outerWidth();
6921					height = orig.outerHeight();
6922				}
6923
6924			} else {
6925				pos.top  = viewport.y + (viewport.h - height) * current.topRatio;
6926				pos.left = viewport.x + (viewport.w - width)  * current.leftRatio;
6927			}
6928
6929			if (F.wrap.css('position') === 'fixed' || current.locked) {
6930				pos.top  -= viewport.y;
6931				pos.left -= viewport.x;
6932			}
6933
6934			pos = {
6935				top     : getValue(pos.top  - hPadding * current.topRatio),
6936				left    : getValue(pos.left - wPadding * current.leftRatio),
6937				width   : getValue(width  + wPadding),
6938				height  : getValue(height + hPadding)
6939			};
6940
6941			return pos;
6942		},
6943
6944		step: function (now, fx) {
6945			var ratio,
6946				padding,
6947				value,
6948				prop       = fx.prop,
6949				current    = F.current,
6950				wrapSpace  = current.wrapSpace,
6951				skinSpace  = current.skinSpace;
6952
6953			if (prop === 'width' || prop === 'height') {
6954				ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);
6955
6956				if (F.isClosing) {
6957					ratio = 1 - ratio;
6958				}
6959
6960				padding = prop === 'width' ? current.wPadding : current.hPadding;
6961				value   = now - padding;
6962
6963				F.skin[ prop ](  getScalar( prop === 'width' ?  value : value - (wrapSpace * ratio) ) );
6964				F.inner[ prop ]( getScalar( prop === 'width' ?  value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) );
6965			}
6966		},
6967
6968		zoomIn: function () {
6969			var current  = F.current,
6970				startPos = current.pos,
6971				effect   = current.openEffect,
6972				elastic  = effect === 'elastic',
6973				endPos   = $.extend({opacity : 1}, startPos);
6974
6975			// Remove "position" property that breaks older IE
6976			delete endPos.position;
6977
6978			if (elastic) {
6979				startPos = this.getOrigPosition();
6980
6981				if (current.openOpacity) {
6982					startPos.opacity = 0.1;
6983				}
6984
6985			} else if (effect === 'fade') {
6986				startPos.opacity = 0.1;
6987			}
6988
6989			F.wrap.css(startPos).animate(endPos, {
6990				duration : effect === 'none' ? 0 : current.openSpeed,
6991				easing   : current.openEasing,
6992				step     : elastic ? this.step : null,
6993				complete : F._afterZoomIn
6994			});
6995		},
6996
6997		zoomOut: function () {
6998			var current  = F.current,
6999				effect   = current.closeEffect,
7000				elastic  = effect === 'elastic',
7001				endPos   = {opacity : 0.1};
7002
7003			if (elastic) {
7004				endPos = this.getOrigPosition();
7005
7006				if (current.closeOpacity) {
7007					endPos.opacity = 0.1;
7008				}
7009			}
7010
7011			F.wrap.animate(endPos, {
7012				duration : effect === 'none' ? 0 : current.closeSpeed,
7013				easing   : current.closeEasing,
7014				step     : elastic ? this.step : null,
7015				complete : F._afterZoomOut
7016			});
7017		},
7018
7019		changeIn: function () {
7020			var current   = F.current,
7021				effect    = current.nextEffect,
7022				startPos  = current.pos,
7023				endPos    = { opacity : 1 },
7024				direction = F.direction,
7025				distance  = 200,
7026				field;
7027
7028			startPos.opacity = 0.1;
7029
7030			if (effect === 'elastic') {
7031				field = direction === 'down' || direction === 'up' ? 'top' : 'left';
7032
7033				if (direction === 'down' || direction === 'right') {
7034					startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance);
7035					endPos[ field ]   = '+=' + distance + 'px';
7036
7037				} else {
7038					startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance);
7039					endPos[ field ]   = '-=' + distance + 'px';
7040				}
7041			}
7042
7043			// Workaround for http://bugs.jquery.com/ticket/12273
7044			if (effect === 'none') {
7045				F._afterZoomIn();
7046
7047			} else {
7048				F.wrap.css(startPos).animate(endPos, {
7049					duration : current.nextSpeed,
7050					easing   : current.nextEasing,
7051					complete : F._afterZoomIn
7052				});
7053			}
7054		},
7055
7056		changeOut: function () {
7057			var previous  = F.previous,
7058				effect    = previous.prevEffect,
7059				endPos    = { opacity : 0.1 },
7060				direction = F.direction,
7061				distance  = 200;
7062
7063			if (effect === 'elastic') {
7064				endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px';
7065			}
7066
7067			previous.wrap.animate(endPos, {
7068				duration : effect === 'none' ? 0 : previous.prevSpeed,
7069				easing   : previous.prevEasing,
7070				complete : function () {
7071					$(this).trigger('onReset').remove();
7072				}
7073			});
7074		}
7075	};
7076
7077	/*
7078	 *	Overlay helper
7079	 */
7080
7081	F.helpers.overlay = {
7082		defaults : {
7083			closeClick : true,      // if true, fancyBox will be closed when user clicks on the overlay
7084			speedOut   : 200,       // duration of fadeOut animation
7085			showEarly  : true,      // indicates if should be opened immediately or wait until the content is ready
7086			css        : {},        // custom CSS properties
7087			locked     : !isTouch,  // if true, the content will be locked into overlay
7088			fixed      : true       // if false, the overlay CSS position property will not be set to "fixed"
7089		},
7090
7091		overlay : null,      // current handle
7092		fixed   : false,     // indicates if the overlay has position "fixed"
7093		el      : $('html'), // element that contains "the lock"
7094
7095		// Public methods
7096		create : function(opts) {
7097			opts = $.extend({}, this.defaults, opts);
7098
7099			if (this.overlay) {
7100				this.close();
7101			}
7102
7103			this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent );
7104			this.fixed   = false;
7105
7106			if (opts.fixed && F.defaults.fixed) {
7107				this.overlay.addClass('fancybox-overlay-fixed');
7108
7109				this.fixed = true;
7110			}
7111		},
7112
7113		open : function(opts) {
7114			var that = this;
7115
7116			opts = $.extend({}, this.defaults, opts);
7117
7118			if (this.overlay) {
7119				this.overlay.unbind('.overlay').width('auto').height('auto');
7120
7121			} else {
7122				this.create(opts);
7123			}
7124
7125			if (!this.fixed) {
7126				W.bind('resize.overlay', $.proxy( this.update, this) );
7127
7128				this.update();
7129			}
7130
7131			if (opts.closeClick) {
7132				this.overlay.bind('click.overlay', function(e) {
7133					if ($(e.target).hasClass('fancybox-overlay')) {
7134						if (F.isActive) {
7135							F.close();
7136						} else {
7137							that.close();
7138						}
7139
7140						return false;
7141					}
7142				});
7143			}
7144
7145			this.overlay.css( opts.css ).show();
7146		},
7147
7148		close : function() {
7149			var scrollV, scrollH;
7150
7151			W.unbind('resize.overlay');
7152
7153			if (this.el.hasClass('fancybox-lock')) {
7154				$('.fancybox-margin').removeClass('fancybox-margin');
7155
7156				scrollV = W.scrollTop();
7157				scrollH = W.scrollLeft();
7158
7159				this.el.removeClass('fancybox-lock');
7160
7161				W.scrollTop( scrollV ).scrollLeft( scrollH );
7162			}
7163
7164			$('.fancybox-overlay').remove().hide();
7165
7166			$.extend(this, {
7167				overlay : null,
7168				fixed   : false
7169			});
7170		},
7171
7172		// Private, callbacks
7173
7174		update : function () {
7175			var width = '100%', offsetWidth;
7176
7177			// Reset width/height so it will not mess
7178			this.overlay.width(width).height('100%');
7179
7180			// jQuery does not return reliable result for IE
7181			if (IE) {
7182				offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
7183
7184				if (D.width() > offsetWidth) {
7185					width = D.width();
7186				}
7187
7188			} else if (D.width() > W.width()) {
7189				width = D.width();
7190			}
7191
7192			this.overlay.width(width).height(D.height());
7193		},
7194
7195		// This is where we can manipulate DOM, because later it would cause iframes to reload
7196		onReady : function (opts, obj) {
7197			var overlay = this.overlay;
7198
7199			$('.fancybox-overlay').stop(true, true);
7200
7201			if (!overlay) {
7202				this.create(opts);
7203			}
7204
7205			if (opts.locked && this.fixed && obj.fixed) {
7206				if (!overlay) {
7207					this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
7208				}
7209
7210				obj.locked = this.overlay.append( obj.wrap );
7211				obj.fixed  = false;
7212			}
7213
7214			if (opts.showEarly === true) {
7215				this.beforeShow.apply(this, arguments);
7216			}
7217		},
7218
7219		beforeShow : function(opts, obj) {
7220			var scrollV, scrollH;
7221
7222			if (obj.locked) {
7223				if (this.margin !== false) {
7224					$('*').filter(function(){
7225						return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") );
7226					}).addClass('fancybox-margin');
7227
7228					this.el.addClass('fancybox-margin');
7229				}
7230
7231				scrollV = W.scrollTop();
7232				scrollH = W.scrollLeft();
7233
7234				this.el.addClass('fancybox-lock');
7235
7236				W.scrollTop( scrollV ).scrollLeft( scrollH );
7237			}
7238
7239			this.open(opts);
7240		},
7241
7242		onUpdate : function() {
7243			if (!this.fixed) {
7244				this.update();
7245			}
7246		},
7247
7248		afterClose: function (opts) {
7249			// Remove overlay if exists and fancyBox is not opening
7250			// (e.g., it is not being open using afterClose callback)
7251			//if (this.overlay && !F.isActive) {
7252			if (this.overlay && !F.coming) {
7253				this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
7254			}
7255		}
7256	};
7257
7258	/*
7259	 *	Title helper
7260	 */
7261
7262	F.helpers.title = {
7263		defaults : {
7264			type     : 'float', // 'float', 'inside', 'outside' or 'over',
7265			position : 'bottom' // 'top' or 'bottom'
7266		},
7267
7268		beforeShow: function (opts) {
7269			var current = F.current,
7270				text    = current.title,
7271				type    = opts.type,
7272				title,
7273				target;
7274
7275			if ($.isFunction(text)) {
7276				text = text.call(current.element, current);
7277			}
7278
7279			if (!isString(text) || $.trim(text) === '') {
7280				return;
7281			}
7282
7283			title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">
7283' + text + '</div>');
7284
7285			switch (type) {
7286				case 'inside':
7287					target = F.skin;
7288				break;
7289
7290				case 'outside':
7291					target = F.wrap;
7292				break;
7293
7294				case 'over':
7295					target = F.inner;
7296				break;
7297
7298				default: // 'float'
7299					target = F.skin;
7300
7301					title.appendTo('body');
7302
7303					if (IE) {
7304						title.width( title.width() );
7305					}
7306
7307					title.wrapInner('<span class="child"></span>');
7308
7309					//Increase bottom margin so this title will also fit into viewport
7310					F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) );
7311				break;
7312			}
7313
7314			title[ (opts.position === 'top' ? 'prependTo'  : 'appendTo') ](target);
7315		}
7316	};
7317
7318	// jQuery plugin initialization
7319	$.fn.fancybox = function (options) {
7320		var index,
7321			that     = $(this),
7322			selector = this.selector || '',
7323			run      = function(e) {
7324				var what = $(this).blur(), idx = index, relType, relVal;
7325
7326				if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) {
7327					relType = options.groupAttr || 'data-fancybox-group';
7328					relVal  = what.attr(relType);
7329
7330					if (!relVal) {
7331						relType = 'rel';
7332						relVal  = what.get(0)[ relType ];
7333					}
7334
7335					if (relVal && relVal !== '' && relVal !== 'nofollow') {
7336						what = selector.length ? $(selector) : that;
7337						what = what.filter('[' + relType + '="' + relVal + '"]');
7338						idx  = what.index(this);
7339					}
7340
7341					options.index = idx;
7342
7343					// Stop an event from bubbling if everything is fine
7344					if (F.open(what, options) !== false) {
7345						e.preventDefault();
7346					}
7347				}
7348			};
7349
7350		options = options || {};
7351		index   = options.index || 0;
7352
7353		if (!selector || options.live === false) {
7354			that.unbind('click.fb-start').bind('click.fb-start', run);
7355
7356		} else {
7357			D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);
7358		}
7359
7360		this.filter('[data-fancybox-start=1]').trigger('click');
7361
7362		return this;
7363	};
7364
7365	// Tests that need a body at doc ready
7366	D.ready(function() {
7367		var w1, w2;
7368
7369		if ( $.scrollbarWidth === undefined ) {
7370			// http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
7371			$.scrollbarWidth = function() {
7372				var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),
7373					child  = parent.children(),
7374					width  = child.innerWidth() - child.height( 99 ).innerWidth();
7375
7376				parent.remove();
7377
7378				return width;
7379			};
7380		}
7381
7382		if ( $.support.fixedPosition === undefined ) {
7383			$.support.fixedPosition = (function() {
7384				var elem  = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'),
7385					fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 );
7386
7387				elem.remove();
7388
7389				return fixed;
7390			}());
7391		}
7392
7393		$.extend(F.defaults, {
7394			scrollbarWidth : $.scrollbarWidth(),
7395			fixed  : $.support.fixedPosition,
7396			parent : $('body')
7397		});
7398
7399		//Get real width of page scroll-bar
7400		w1 = $(window).width();
7401
7402		H.addClass('fancybox-lock-test');
7403
7404		w2 = $(window).width();
7405
7406		H.removeClass('fancybox-lock-test');
7407
7408		$("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
7409	});
7410
7411}(window, document, jQuery));
7412/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
7413 * Licensed under the MIT License (LICENSE.txt).
7414 *
7415 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
7416 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
7417 * Thanks to: Seamus Leahy for adding deltaX and deltaY
7418 *
7419 * Version: 3.0.6
7420 * 
7421 * Requires: 1.2.2+
7422 */
7423(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=
7424d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
7425/*
7426 * jQuery FlexSlider v2.2.2
7427 * Copyright 2012 WooThemes
7428 * Contributing Author: Tyler Smith
7429 */
7430;
7431(function ($) {
7432
7433  //FlexSlider: Object Instance
7434  $.flexslider = function(el, options) {
7435    var slider = $(el);
7436
7437    // making variables public
7438    slider.vars = $.extend({}, $.flexslider.defaults, options);
7439
7440    var namespace = slider.vars.namespace,
7441        msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
7442        touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
7443        // depricating this idea, as devices are being released with both of these events
7444        //eventType = (touch) ? "touchend" : "click",
7445        eventType = "click touchend MSPointerUp keyup",
7446        watchedEvent = "",
7447        watchedEventClearTimer,
7448        vertical = slider.vars.direction === "vertical",
7449        reverse = slider.vars.reverse,
7450        carousel = (slider.vars.itemWidth > 0),
7451        fade = slider.vars.animation === "fade",
7452        asNav = slider.vars.asNavFor !== "",
7453        methods = {},
7454        focused = true;
7455
7456    // Store a reference to the slider object
7457    $.data(el, "flexslider", slider);
7458
7459    // Private slider methods
7460    methods = {
7461      init: function() {
7462        slider.animating = false;
7463        // Get current slide and make sure it is a number
7464        slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
7465        if ( isNaN( slider.currentSlide ) ) slider.currentSlide = 0;
7466        slider.animatingTo = slider.currentSlide;
7467        slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
7468        slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
7469        slider.slides = $(slider.vars.selector, slider);
7470        slider.container = $(slider.containerSelector, slider);
7471        slider.count = slider.slides.length;
7472        // SYNC:
7473        slider.syncExists = $(slider.vars.sync).length > 0;
7474        // SLIDE:
7475        if (slider.vars.animation === "slide") slider.vars.animation = "swing";
7476        slider.prop = (vertical) ? "top" : "marginLeft";
7477        slider.args = {};
7478        // SLIDESHOW:
7479        slider.manualPause = false;
7480        slider.stopped = false;
7481        //PAUSE WHEN INVISIBLE
7482        slider.started = false;
7483        slider.startTimeout = null;
7484        // TOUCH/USECSS:
7485        slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
7486          var obj = document.createElement('div'),
7487              props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
7488          for (var i in props) {
7489            if ( obj.style[ props[i] ] !== undefined ) {
7490              slider.pfx = props[i].replace('Perspective','').toLowerCase();
7491              slider.prop = "-" + slider.pfx + "-transform";
7492              return true;
7493            }
7494          }
7495          return false;
7496        }());
7497        slider.ensureAnimationEnd = '';
7498        // CONTROLSCONTAINER:
7499        if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
7500        // MANUAL:
7501        if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
7502
7503        // RANDOMIZE:
7504        if (slider.vars.randomize) {
7505          slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
7506          slider.container.empty().append(slider.slides);
7507        }
7508
7509        slider.doMath();
7510
7511        // INIT
7512        slider.setup("init");
7513
7514        // CONTROLNAV:
7515        if (slider.vars.controlNav) methods.controlNav.setup();
7516
7517        // DIRECTIONNAV:
7518        if (slider.vars.directionNav) methods.directionNav.setup();
7519
7520        // KEYBOARD:
7521        if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
7522          $(document).bind('keyup', function(event) {
7523            var keycode = event.keyCode;
7524            if (!slider.animating && (keycode === 39 || keycode === 37)) {
7525              var target = (keycode === 39) ? slider.getTarget('next') :
7526                           (keycode === 37) ? slider.getTarget('prev') : false;
7527              slider.flexAnimate(target, slider.vars.pauseOnAction);
7528            }
7529          });
7530        }
7531        // MOUSEWHEEL:
7532        if (slider.vars.mousewheel) {
7533          slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
7534            event.preventDefault();
7535            var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
7536            slider.flexAnimate(target, slider.vars.pauseOnAction);
7537          });
7538        }
7539
7540        // PAUSEPLAY
7541        if (slider.vars.pausePlay) methods.pausePlay.setup();
7542
7543        //PAUSE WHEN INVISIBLE
7544        if (slider.vars.slideshow && slider.vars.pauseInvisible) methods.pauseInvisible.init();
7545
7546        // SLIDSESHOW
7547        if (slider.vars.slideshow) {
7548          if (slider.vars.pauseOnHover) {
7549            slider.hover(function() {
7550              if (!slider.manualPlay && !slider.manualPause) slider.pause();
7551            }, function() {
7552              if (!slider.manualPause && !slider.manualPlay && !slider.stopped) slider.play();
7553            });
7554          }
7555          // initialize animation
7556          //If we're visible, or we don't use PageVisibility API
7557          if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
7558            (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
7559          }
7560        }
7561
7562        // ASNAV:
7563        if (asNav) methods.asNav.setup();
7564
7565        // TOUCH
7566        if (touch && slider.vars.touch) methods.touch();
7567
7568        // FADE&&SMOOTHHEIGHT || SLIDE:
7569        if (!fade || (fade && slider.vars.smoothHeight)) $(window).bind("resize orientationchange focus", methods.resize);
7570
7571        slider.find("img").attr("draggable", "false");
7572
7573        // API: start() Callback
7574        setTimeout(function(){
7575          slider.vars.start(slider);
7576        }, 200);
7577      },
7578      asNav: {
7579        setup: function() {
7580          slider.asNav = true;
7581          slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
7582          slider.currentItem = slider.currentSlide;
7583          slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
7584          if(!msGesture){
7585              slider.slides.on(eventType, function(e){
vendor: 43,764 bytes, lines 7586-8521
7586                e.preventDefault();
7587                var $slide = $(this),
7588                    target = $slide.index();
7589                var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
7590                if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
7591                  slider.flexAnimate(slider.getTarget("prev"), true);
7592                } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
7593                  slider.direction = (slider.currentItem < target) ? "next" : "prev";
7594                  slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
7595                }
7596              });
7597          }else{
7598              el._slider = slider;
7599              slider.slides.each(function (){
7600                  var that = this;
7601                  that._gesture = new MSGesture();
7602                  that._gesture.target = that;
7603                  that.addEventListener("MSPointerDown", function (e){
7604                      e.preventDefault();
7605                      if(e.currentTarget._gesture)
7606                          e.currentTarget._gesture.addPointer(e.pointerId);
7607                  }, false);
7608                  that.addEventListener("MSGestureTap", function (e){
7609                      e.preventDefault();
7610                      var $slide = $(this),
7611                          target = $slide.index();
7612                      if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
7613                          slider.direction = (slider.currentItem < target) ? "next" : "prev";
7614                          slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
7615                      }
7616                  });
7617              });
7618          }
7619        }
7620      },
7621      controlNav: {
7622        setup: function() {
7623          if (!slider.manualControls) {
7624            methods.controlNav.setupPaging();
7625          } else { // MANUALCONTROLS:
7626            methods.controlNav.setupManual();
7627          }
7628        },
7629        setupPaging: function() {
7630          var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
7631              j = 1,
7632              item,
7633              slide;
7634
7635          slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
7636
7637          if (slider.pagingCount > 1) {
7638            for (var i = 0; i < slider.pagingCount; i++) {
7639              slide = slider.slides.eq(i);
7640              item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>';
7641              if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
7642                var captn = slide.attr( 'data-thumbcaption' );
7643                if ( '' != captn && undefined != captn ) item += '<span class="' + namespace + 'caption">' + captn + '</span>';
7644              }
7645              slider.controlNavScaffold.append('<li>' + item + '</li>');
7646              j++;
7647            }
7648          }
7649
7650          // CONTROLSCONTAINER:
7651          (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
7652          methods.controlNav.set();
7653
7654          methods.controlNav.active();
7655
7656          slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
7657            event.preventDefault();
7658
7659            if (watchedEvent === "" || watchedEvent === event.type) {
7660              var $this = $(this),
7661                  target = slider.controlNav.index($this);
7662
7663              if (!$this.hasClass(namespace + 'active')) {
7664                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
7665                slider.flexAnimate(target, slider.vars.pauseOnAction);
7666              }
7667            }
7668
7669            // setup flags to prevent event duplication
7670            if (watchedEvent === "") {
7671              watchedEvent = event.type;
7672            }
7673            methods.setToClearWatchedEvent();
7674
7675          });
7676        },
7677        setupManual: function() {
7678          slider.controlNav = slider.manualControls;
7679          methods.controlNav.active();
7680
7681          slider.controlNav.bind(eventType, function(event) {
7682            event.preventDefault();
7683
7684            if (watchedEvent === "" || watchedEvent === event.type) {
7685              var $this = $(this),
7686                  target = slider.controlNav.index($this);
7687
7688              if (!$this.hasClass(namespace + 'active')) {
7689                (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
7690                slider.flexAnimate(target, slider.vars.pauseOnAction);
7691              }
7692            }
7693
7694            // setup flags to prevent event duplication
7695            if (watchedEvent === "") {
7696              watchedEvent = event.type;
7697            }
7698            methods.setToClearWatchedEvent();
7699          });
7700        },
7701        set: function() {
7702          var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
7703          slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
7704        },
7705        active: function() {
7706          slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
7707        },
7708        update: function(action, pos) {
7709          if (slider.pagingCount > 1 && action === "add") {
7710            slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
7711          } else if (slider.pagingCount === 1) {
7712            slider.controlNavScaffold.find('li').remove();
7713          } else {
7714            slider.controlNav.eq(pos).closest('li').remove();
7715          }
7716          methods.controlNav.set();
7717          (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
7718        }
7719      },
7720      directionNav: {
7721        setup: function() {
7722          var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
7723
7724          // CONTROLSCONTAINER:
7725          if (slider.controlsContainer) {
7726            $(slider.controlsContainer).append(directionNavScaffold);
7727            slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
7728          } else {
7729            slider.append(directionNavScaffold);
7730            slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
7731          }
7732
7733          methods.directionNav.update();
7734
7735          slider.directionNav.bind(eventType, function(event) {
7736            event.preventDefault();
7737            var target;
7738
7739            if (watchedEvent === "" || watchedEvent === event.type) {
7740              target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
7741              slider.flexAnimate(target, slider.vars.pauseOnAction);
7742            }
7743
7744            // setup flags to prevent event duplication
7745            if (watchedEvent === "") {
7746              watchedEvent = event.type;
7747            }
7748            methods.setToClearWatchedEvent();
7749          });
7750        },
7751        update: function() {
7752          var disabledClass = namespace + 'disabled';
7753          if (slider.pagingCount === 1) {
7754            slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
7755          } else if (!slider.vars.animationLoop) {
7756            if (slider.animatingTo === 0) {
7757              slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
7758            } else if (slider.animatingTo === slider.last) {
7759              slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
7760            } else {
7761              slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
7762            }
7763          } else {
7764            slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
7765          }
7766        }
7767      },
7768      pausePlay: {
7769        setup: function() {
7770          var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
7771
7772          // CONTROLSCONTAINER:
7773          if (slider.controlsContainer) {
7774            slider.controlsContainer.append(pausePlayScaffold);
7775            slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
7776          } else {
7777            slider.append(pausePlayScaffold);
7778            slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
7779          }
7780
7781          methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
7782
7783          slider.pausePlay.bind(eventType, function(event) {
7784            event.preventDefault();
7785
7786            if (watchedEvent === "" || watchedEvent === event.type) {
7787              if ($(this).hasClass(namespace + 'pause')) {
7788                slider.manualPause = true;
7789                slider.manualPlay = false;
7790                slider.pause();
7791              } else {
7792                slider.manualPause = false;
7793                slider.manualPlay = true;
7794                slider.play();
7795              }
7796            }
7797
7798            // setup flags to prevent event duplication
7799            if (watchedEvent === "") {
7800              watchedEvent = event.type;
7801            }
7802            methods.setToClearWatchedEvent();
7803          });
7804        },
7805        update: function(state) {
7806          (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
7807        }
7808      },
7809      touch: function() {
7810        var startX,
7811          startY,
7812          offset,
7813          cwidth,
7814          dx,
7815          startT,
7816          scrolling = false,
7817          localX = 0,
7818          localY = 0,
7819          accDx = 0;
7820
7821        if(!msGesture){
7822            el.addEventListener('touchstart', onTouchStart, false);
7823
7824            function onTouchStart(e) {
7825              if (slider.animating) {
7826                e.preventDefault();
7827              } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
7828                slider.pause();
7829                // CAROUSEL:
7830                cwidth = (vertical) ? slider.h : slider. w;
7831                startT = Number(new Date());
7832                // CAROUSEL:
7833
7834                // Local vars for X and Y points.
7835                localX = e.touches[0].pageX;
7836                localY = e.touches[0].pageY;
7837
7838                offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
7839                         (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
7840                         (carousel && slider.currentSlide === slider.last) ? slider.limit :
7841                         (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
7842                         (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
7843                startX = (vertical) ? localY : localX;
7844                startY = (vertical) ? localX : localY;
7845
7846                el.addEventListener('touchmove', onTouchMove, false);
7847                el.addEventListener('touchend', onTouchEnd, false);
7848              }
7849            }
7850
7851            function onTouchMove(e) {
7852              // Local vars for X and Y points.
7853
7854              localX = e.touches[0].pageX;
7855              localY = e.touches[0].pageY;
7856
7857              dx = (vertical) ? startX - localY : startX - localX;
7858              scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
7859
7860              var fxms = 500;
7861
7862              if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
7863                e.preventDefault();
7864                if (!fade && slider.transitions) {
7865                  if (!slider.vars.animationLoop) {
7866                    dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
7867                  }
7868                  slider.setProps(offset + dx, "setTouch");
7869                }
7870              }
7871            }
7872
7873            function onTouchEnd(e) {
7874              // finish the touch by undoing the touch session
7875              el.removeEventListener('touchmove', onTouchMove, false);
7876
7877              if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
7878                var updateDx = (reverse) ? -dx : dx,
7879                    target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
7880
7881                if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
7882                  slider.flexAnimate(target, slider.vars.pauseOnAction);
7883                } else {
7884                  if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
7885                }
7886              }
7887              el.removeEventListener('touchend', onTouchEnd, false);
7888
7889              startX = null;
7890              startY = null;
7891              dx = null;
7892              offset = null;
7893            }
7894        }else{
7895            el.style.msTouchAction = "none";
7896            el._gesture = new MSGesture();
7897            el._gesture.target = el;
7898            el.addEventListener("MSPointerDown", onMSPointerDown, false);
7899            el._slider = slider;
7900            el.addEventListener("MSGestureChange", onMSGestureChange, false);
7901            el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
7902
7903            function onMSPointerDown(e){
7904                e.stopPropagation();
7905                if (slider.animating) {
7906                    e.preventDefault();
7907                }else{
7908                    slider.pause();
7909                    el._gesture.addPointer(e.pointerId);
7910                    accDx = 0;
7911                    cwidth = (vertical) ? slider.h : slider. w;
7912                    startT = Number(new Date());
7913                    // CAROUSEL:
7914
7915                    offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
7916                        (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
7917                            (carousel && slider.currentSlide === slider.last) ? slider.limit :
7918                                (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
7919                                    (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
7920                }
7921            }
7922
7923            function onMSGestureChange(e) {
7924                e.stopPropagation();
7925                var slider = e.target._slider;
7926                if(!slider){
7927                    return;
7928                }
7929                var transX = -e.translationX,
7930                    transY = -e.translationY;
7931
7932                //Accumulate translations.
7933                accDx = accDx + ((vertical) ? transY : transX);
7934                dx = accDx;
7935                scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
7936
7937                if(e.detail === e.MSGESTURE_FLAG_INERTIA){
7938                    setImmediate(function (){
7939                        el._gesture.stop();
7940                    });
7941
7942                    return;
7943                }
7944
7945                if (!scrolling || Number(new Date()) - startT > 500) {
7946                    e.preventDefault();
7947                    if (!fade && slider.transitions) {
7948                        if (!slider.vars.animationLoop) {
7949                            dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
7950                        }
7951                        slider.setProps(offset + dx, "setTouch");
7952                    }
7953                }
7954            }
7955
7956            function onMSGestureEnd(e) {
7957                e.stopPropagation();
7958                var slider = e.target._slider;
7959                if(!slider){
7960                    return;
7961                }
7962                if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
7963                    var updateDx = (reverse) ? -dx : dx,
7964                        target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
7965
7966                    if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
7967                        slider.flexAnimate(target, slider.vars.pauseOnAction);
7968                    } else {
7969                        if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
7970                    }
7971                }
7972
7973                startX = null;
7974                startY = null;
7975                dx = null;
7976                offset = null;
7977                accDx = 0;
7978            }
7979        }
7980      },
7981      resize: function() {
7982        if (!slider.animating && slider.is(':visible')) {
7983          if (!carousel) slider.doMath();
7984
7985          if (fade) {
7986            // SMOOTH HEIGHT:
7987            methods.smoothHeight();
7988          } else if (carousel) { //CAROUSEL:
7989            slider.slides.width(slider.computedW);
7990            slider.update(slider.pagingCount);
7991            slider.setProps();
7992          }
7993          else if (vertical) { //VERTICAL:
7994            slider.viewport.height(slider.h);
7995            slider.setProps(slider.h, "setTotal");
7996          } else {
7997            // SMOOTH HEIGHT:
7998            if (slider.vars.smoothHeight) methods.smoothHeight();
7999            slider.newSlides.width(slider.computedW);
8000            slider.setProps(slider.computedW, "setTotal");
8001          }
8002        }
8003      },
8004      smoothHeight: function(dur) {
8005        if (!vertical || fade) {
8006          var $obj = (fade) ? slider : slider.viewport;
8007          (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
8008        }
8009      },
8010      sync: function(action) {
8011        var $obj = $(slider.vars.sync).data("flexslider"),
8012            target = slider.animatingTo;
8013
8014        switch (action) {
8015          case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
8016          case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
8017          case "pause": $obj.pause(); break;
8018        }
8019      },
8020      uniqueID: function($clone) {
8021        // Append _clone to current level and children elements with id attributes
8022        $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
8023          var $this = $(this);
8024          $this.attr( 'id', $this.attr( 'id' ) + '_clone' );
8025        });
8026        return $clone;
8027      },
8028      pauseInvisible: {
8029        visProp: null,
8030        init: function() {
8031          var prefixes = ['webkit','moz','ms','o'];
8032
8033          if ('hidden' in document) return 'hidden';
8034          for (var i = 0; i < prefixes.length; i++) {
8035            if ((prefixes[i] + 'Hidden') in document)
8036            methods.pauseInvisible.visProp = prefixes[i] + 'Hidden';
8037          }
8038          if (methods.pauseInvisible.visProp) {
8039            var evtname = methods.pauseInvisible.visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
8040            document.addEventListener(evtname, function() {
8041              if (methods.pauseInvisible.isHidden()) {
8042                if(slider.startTimeout) clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
8043                else slider.pause(); //Or just pause
8044              }
8045              else {
8046                if(slider.started) slider.play(); //Initiated before, just play
8047                else (slider.vars.initDelay > 0) ? setTimeout(slider.play, slider.vars.initDelay) : slider.play(); //Didn't init before: simply init or wait for it
8048              }
8049            });
8050          }
8051        },
8052        isHidden: function() {
8053          return document[methods.pauseInvisible.visProp] || false;
8054        }
8055      },
8056      setToClearWatchedEvent: function() {
8057        clearTimeout(watchedEventClearTimer);
8058        watchedEventClearTimer = setTimeout(function() {
8059          watchedEvent = "";
8060        }, 3000);
8061      }
8062    };
8063
8064    // public methods
8065    slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
8066      if (!slider.vars.animationLoop && target !== slider.currentSlide) {
8067        slider.direction = (target > slider.currentSlide) ? "next" : "prev";
8068      }
8069
8070      if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
8071
8072      if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
8073        if (asNav && withSync) {
8074          var master = $(slider.vars.asNavFor).data('flexslider');
8075          slider.atEnd = target === 0 || target === slider.count - 1;
8076          master.flexAnimate(target, true, false, true, fromNav);
8077          slider.direction = (slider.currentItem < target) ? "next" : "prev";
8078          master.direction = slider.direction;
8079
8080          if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
8081            slider.currentItem = target;
8082            slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
8083            target = Math.floor(target/slider.visible);
8084          } else {
8085            slider.currentItem = target;
8086            slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
8087            return false;
8088          }
8089        }
8090
8091        slider.animating = true;
8092        slider.animatingTo = target;
8093
8094        // SLIDESHOW:
8095        if (pause) slider.pause();
8096
8097        // API: before() animation Callback
8098        slider.vars.before(slider);
8099
8100        // SYNC:
8101        if (slider.syncExists && !fromNav) methods.sync("animate");
8102
8103        // CONTROLNAV
8104        if (slider.vars.controlNav) methods.controlNav.active();
8105
8106        // !CAROUSEL:
8107        // CANDIDATE: slide active class (for add/remove slide)
8108        if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
8109
8110        // INFINITE LOOP:
8111        // CANDIDATE: atEnd
8112        slider.atEnd = target === 0 || target === slider.last;
8113
8114        // DIRECTIONNAV:
8115        if (slider.vars.directionNav) methods.directionNav.update();
8116
8117        if (target === slider.last) {
8118          // API: end() of cycle Callback
8119          slider.vars.end(slider);
8120          // SLIDESHOW && !INFINITE LOOP:
8121          if (!slider.vars.animationLoop) slider.pause();
8122        }
8123
8124        // SLIDE:
8125        if (!fade) {
8126          var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
8127              margin, slideString, calcNext;
8128
8129          // INFINITE LOOP / REVERSE:
8130          if (carousel) {
8131            //margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin;
8132            margin = slider.vars.itemMargin;
8133            calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
8134            slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
8135          } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
8136            slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
8137          } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
8138            slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
8139          } else {
8140            slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
8141          }
8142          slider.setProps(slideString, "", slider.vars.animationSpeed);
8143          if (slider.transitions) {
8144            if (!slider.vars.animationLoop || !slider.atEnd) {
8145              slider.animating = false;
8146              slider.currentSlide = slider.animatingTo;
8147            }
8148            
8149            // Unbind previous transitionEnd events and re-bind new transitionEnd event
8150            slider.container.unbind("webkitTransitionEnd transitionend");
8151            slider.container.bind("webkitTransitionEnd transitionend", function() {
8152              clearTimeout(slider.ensureAnimationEnd);
8153              slider.wrapup(dimension);
8154            });
8155
8156            // Insurance for the ever-so-fickle transitionEnd event
8157            clearTimeout(slider.ensureAnimationEnd);
8158            slider.ensureAnimationEnd = setTimeout(function() {
8159              slider.wrapup(dimension);
8160            }, slider.vars.animationSpeed + 100);
8161
8162          } else {
8163            slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
8164              slider.wrapup(dimension);
8165            });
8166          }
8167        } else { // FADE:
8168          if (!touch) {
8169            //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
8170            //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
8171
8172            slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
8173            slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
8174
8175          } else {
8176            slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
8177            slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
8178            slider.wrapup(dimension);
8179          }
8180        }
8181        // SMOOTH HEIGHT:
8182        if (slider.vars.smoothHeight) methods.smoothHeight(slider.vars.animationSpeed);
8183      }
8184    };
8185    slider.wrapup = function(dimension) {
8186      // SLIDE:
8187      if (!fade && !carousel) {
8188        if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
8189          slider.setProps(dimension, "jumpEnd");
8190        } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
8191          slider.setProps(dimension, "jumpStart");
8192        }
8193      }
8194      slider.animating = false;
8195      slider.currentSlide = slider.animatingTo;
8196      // API: after() animation Callback
8197      slider.vars.after(slider);
8198    };
8199
8200    // SLIDESHOW:
8201    slider.animateSlides = function() {
8202      if (!slider.animating && focused ) slider.flexAnimate(slider.getTarget("next"));
8203    };
8204    // SLIDESHOW:
8205    slider.pause = function() {
8206      clearInterval(slider.animatedSlides);
8207      slider.animatedSlides = null;
8208      slider.playing = false;
8209      // PAUSEPLAY:
8210      if (slider.vars.pausePlay) methods.pausePlay.update("play");
8211      // SYNC:
8212      if (slider.syncExists) methods.sync("pause");
8213    };
8214    // SLIDESHOW:
8215    slider.play = function() {
8216      if (slider.playing) clearInterval(slider.animatedSlides);
8217      slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
8218      slider.started = slider.playing = true;
8219      // PAUSEPLAY:
8220      if (slider.vars.pausePlay) methods.pausePlay.update("pause");
8221      // SYNC:
8222      if (slider.syncExists) methods.sync("play");
8223    };
8224    // STOP:
8225    slider.stop = function () {
8226      slider.pause();
8227      slider.stopped = true;
8228    };
8229    slider.canAdvance = function(target, fromNav) {
8230      // ASNAV:
8231      var last = (asNav) ? slider.pagingCount - 1 : slider.last;
8232      return (fromNav) ? true :
8233             (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
8234             (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
8235             (target === slider.currentSlide && !asNav) ? false :
8236             (slider.vars.animationLoop) ? true :
8237             (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
8238             (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
8239             true;
8240    };
8241    slider.getTarget = function(dir) {
8242      slider.direction = dir;
8243      if (dir === "next") {
8244        return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
8245      } else {
8246        return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
8247      }
8248    };
8249
8250    // SLIDE:
8251    slider.setProps = function(pos, special, dur) {
8252      var target = (function() {
8253        var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
8254            posCalc = (function() {
8255              if (carousel) {
8256                return (special === "setTouch") ? pos :
8257                       (reverse && slider.animatingTo === slider.last) ? 0 :
8258                       (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
8259                       (slider.animatingTo === slider.last) ? slider.limit : posCheck;
8260              } else {
8261                switch (special) {
8262                  case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
8263                  case "setTouch": return (reverse) ? pos : pos;
8264                  case "jumpEnd": return (reverse) ? pos : slider.count * pos;
8265                  case "jumpStart": return (reverse) ? slider.count * pos : pos;
8266                  default: return pos;
8267                }
8268              }
8269            }());
8270
8271            return (posCalc * -1) + "px";
8272          }());
8273
8274      if (slider.transitions) {
8275        target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
8276        dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
8277        slider.container.css("-" + slider.pfx + "-transition-duration", dur);
8278         slider.container.css("transition-duration", dur);
8279      }
8280
8281      slider.args[slider.prop] = target;
8282      if (slider.transitions || dur === undefined) slider.container.css(slider.args);
8283
8284      slider.container.css('transform',target);
8285    };
8286
8287    slider.setup = function(type) {
8288      // SLIDE:
8289      if (!fade) {
8290        var sliderOffset, arr;
8291
8292        if (type === "init") {
8293          slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
8294          // INFINITE LOOP:
8295          slider.cloneCount = 0;
8296          slider.cloneOffset = 0;
8297          // REVERSE:
8298          if (reverse) {
8299            arr = $.makeArray(slider.slides).reverse();
8300            slider.slides = $(arr);
8301            slider.container.empty().append(slider.slides);
8302          }
8303        }
8304        // INFINITE LOOP && !CAROUSEL:
8305        if (slider.vars.animationLoop && !carousel) {
8306          slider.cloneCount = 2;
8307          slider.cloneOffset = 1;
8308          // clear out old clones
8309          if (type !== "init") slider.container.find('.clone').remove();
8310          slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
8311                          .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
8312        }
8313        slider.newSlides = $(slider.vars.selector, slider);
8314
8315        sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
8316        // VERTICAL:
8317        if (vertical && !carousel) {
8318          slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
8319          setTimeout(function(){
8320            slider.newSlides.css({"display": "block"});
8321            slider.doMath();
8322            slider.viewport.height(slider.h);
8323            slider.setProps(sliderOffset * slider.h, "init");
8324          }, (type === "init") ? 100 : 0);
8325        } else {
8326          slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
8327          slider.setProps(sliderOffset * slider.computedW, "init");
8328          setTimeout(function(){
8329            slider.doMath();
8330            slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
8331            // SMOOTH HEIGHT:
8332            if (slider.vars.smoothHeight) methods.smoothHeight();
8333          }, (type === "init") ? 100 : 0);
8334        }
8335      } else { // FADE:
8336        slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
8337        if (type === "init") {
8338          if (!touch) {
8339            //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
8340            if (slider.vars.fadeFirstSlide == false) {
8341              slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
8342            } else {
8343              slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
8344            }
8345          } else {
8346            slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
8347          }
8348        }
8349        // SMOOTH HEIGHT:
8350        if (slider.vars.smoothHeight) methods.smoothHeight();
8351      }
8352      // !CAROUSEL:
8353      // CANDIDATE: active slide
8354      if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
8355
8356      //FlexSlider: init() Callback
8357      slider.vars.init(slider);
8358    };
8359
8360    slider.doMath = function() {
8361      var slide = slider.slides.first(),
8362          slideMargin = slider.vars.itemMargin,
8363          minItems = slider.vars.minItems,
8364          maxItems = slider.vars.maxItems;
8365
8366      slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
8367      slider.h = slide.height();
8368      slider.boxPadding = slide.outerWidth() - slide.width();
8369
8370      // CAROUSEL:
8371      if (carousel) {
8372        slider.itemT = slider.vars.itemWidth + slideMargin;
8373        slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
8374        slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
8375        slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
8376                       (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
8377                       (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
8378
8379        slider.visible = Math.floor(slider.w/(slider.itemW));
8380        slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
8381        slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
8382        slider.last =  slider.pagingCount - 1;
8383        slider.limit = (slider.pagingCount === 1) ? 0 :
8384                       (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
8385      } else {
8386        slider.itemW = slider.w;
8387        slider.pagingCount = slider.count;
8388        slider.last = slider.count - 1;
8389      }
8390      slider.computedW = slider.itemW - slider.boxPadding;
8391    };
8392
8393    slider.update = function(pos, action) {
8394      slider.doMath();
8395
8396      // update currentSlide and slider.animatingTo if necessary
8397      if (!carousel) {
8398        if (pos < slider.currentSlide) {
8399          slider.currentSlide += 1;
8400        } else if (pos <= slider.currentSlide && pos !== 0) {
8401          slider.currentSlide -= 1;
8402        }
8403        slider.animatingTo = slider.currentSlide;
8404      }
8405
8406      // update controlNav
8407      if (slider.vars.controlNav && !slider.manualControls) {
8408        if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
8409          methods.controlNav.update("add");
8410        } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
8411          if (carousel && slider.currentSlide > slider.last) {
8412            slider.currentSlide -= 1;
8413            slider.animatingTo -= 1;
8414          }
8415          methods.controlNav.update("remove", slider.last);
8416        }
8417      }
8418      // update directionNav
8419      if (slider.vars.directionNav) methods.directionNav.update();
8420
8421    };
8422
8423    slider.addSlide = function(obj, pos) {
8424      var $obj = $(obj);
8425
8426      slider.count += 1;
8427      slider.last = slider.count - 1;
8428
8429      // append new slide
8430      if (vertical && reverse) {
8431        (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
8432      } else {
8433        (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
8434      }
8435
8436      // update currentSlide, animatingTo, controlNav, and directionNav
8437      slider.update(pos, "add");
8438
8439      // update slider.slides
8440      slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
8441      // re-setup the slider to accomdate new slide
8442      slider.setup();
8443
8444      //FlexSlider: added() Callback
8445      slider.vars.added(slider);
8446    };
8447    slider.removeSlide = function(obj) {
8448      var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
8449
8450      // update count
8451      slider.count -= 1;
8452      slider.last = slider.count - 1;
8453
8454      // remove slide
8455      if (isNaN(obj)) {
8456        $(obj, slider.slides).remove();
8457      } else {
8458        (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
8459      }
8460
8461      // update currentSlide, animatingTo, controlNav, and directionNav
8462      slider.doMath();
8463      slider.update(pos, "remove");
8464
8465      // update slider.slides
8466      slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
8467      // re-setup the slider to accomdate new slide
8468      slider.setup();
8469
8470      // FlexSlider: removed() Callback
8471      slider.vars.removed(slider);
8472    };
8473
8474    //FlexSlider: Initialize
8475    methods.init();
8476  };
8477
8478  // Ensure the slider isn't focussed if the window loses focus.
8479  $( window ).blur( function ( e ) {
8480    focused = false;
8481  }).focus( function ( e ) {
8482    focused = true;
8483  });
8484
8485  //FlexSlider: Default Settings
8486  $.flexslider.defaults = {
8487    namespace: "flex-",             //{NEW} String: Prefix string attached to the class of every element generated by the plugin
8488    selector: ".slides > li",       //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
8489    animation: "fade",              //String: Select your animation type, "fade" or "slide"
8490    easing: "swing",                //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
8491    direction: "horizontal",        //String: Select the sliding direction, "horizontal" or "vertical"
8492    reverse: false,                 //{NEW} Boolean: Reverse the animation direction
8493    animationLoop: true,            //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
8494    smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
8495    startAt: 0,                     //Integer: The slide that the slider should start on. Array notation (0 = first slide)
8496    slideshow: true,                //Boolean: Animate slider automatically
8497    slideshowSpeed: 7000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
8498    animationSpeed: 600,            //Integer: Set the speed of animations, in milliseconds
8499    initDelay: 0,                   //{NEW} Integer: Set an initialization delay, in milliseconds
8500    randomize: false,               //Boolean: Randomize slide order
8501    fadeFirstSlide: true,           //Boolean: Fade in the first slide when animation type is "fade"
8502    thumbCaptions: false,           //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
8503
8504    // Usability features
8505    pauseOnAction: true,            //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
8506    pauseOnHover: false,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
8507    pauseInvisible: true,   		//{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
8508    useCSS: true,                   //{NEW} Boolean: Slider will use CSS3 transitions if available
8509    touch: true,                    //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
8510    video: false,                   //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
8511
8512    // Primary Controls
8513    controlNav: true,               //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
8514    directionNav: true,             //Boolean: Create navigation for previous/next navigation? (true/false)
8515    prevText: "Previous",           //String: Set the text for the "previous" directionNav item
8516    nextText: "Next",               //String: Set the text for the "next" directionNav item
8517
8518    // Secondary Navigation
8519    keyboard: true,                 //Boolean: Allow slider navigating via keyboard left/right keys
8520    multipleKeyboard: false,        //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
8521    mousewheel: false,              //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
8522    pausePlay: false,               //Boolean: Create pause/play dynamic element
8523    pauseText: "Pause",             //String: Set the text for the "pause" pausePlay item
8524    playText: "Play",               //String: Set the text for the "play" pausePlay item
8525
8526    // Special properties
8527    controlsContainer: "",          //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
8528    manualControls: "",             //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
8529    sync: "",                       //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
8530    asNavFor: "",                   //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
8531
8532    // Carousel Options
8533    itemWidth: 0,                   //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
8534    itemMargin: 0,                  //{NEW} Integer: Margin between carousel items.
8535    minItems: 1,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
8536    maxItems: 0,                    //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
8537    move: 0,                        //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
8538    allowOneSlide: true,           //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
8539
8540    // Callback API
8541    start: function(){},            //Callback: function(slider) - Fires when the slider loads the first slide
8542    before: function(){},           //Callback: function(slider) - Fires asynchronously with each slider animation
8543    after: function(){},            //Callback: function(slider) - Fires after each slider animation completes
8544    end: function(){},              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
8545    added: function(){},            //{NEW} Callback: function(slider) - Fires after a slide is added
8546    removed: function(){},           //{NEW} Callback: function(slider) - Fires after a slide is removed
8547    init: function() {}             //{NEW} Callback: function(slider) - Fires after the slider is initially setup
8548  };
8549
8550  //FlexSlider: Plugin Function
8551  $.fn.flexslider = function(options) {
8552    if (options === undefined) options = {};
8553
8554    if (typeof options === "object") {
8555      return this.each(function() {
8556        var $this = $(this),
8557            selector = (options.selector) ? options.selector : ".slides > li",
8558            $slides = $this.find(selector);
8559
8560      if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
8561          $slides.fadeIn(400);
8562          if (options.start) options.start($this);
8563        } else if ($this.data('flexslider') === undefined) {
8564          new $.flexslider(this, options);
8565        }
8566      });
8567    } else {
8568      // Helper strings to quickly perform functions on the slider
8569      var $slider = $(this).data('flexslider');
8570      switch (options) {
8571        case "play": $slider.play(); break;
8572        case "pause": $slider.pause(); break;
8573        case "stop": $slider.stop(); break;
8574        case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
8575        case "prev":
8576        case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
8577        default: if (typeof options === "number") $slider.flexAnimate(options, true);
8578      }
8579    }
8580  };
8581})(jQuery);
8582
8583
8584/*! picturefill - v3.0.2 - 2016-02-12
8585 * https://scottjehl.github.io/picturefill/
8586 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
8587 */�
vendor: 11,621 bytes, lines 8587-8588
8587
8588!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||"	"===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")},j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);
8588
8589 
8590
8591function obscureAddMid() {
8592	document.write('&#64;');
8593}
8594function obscureAddEnd() {
8595	document.write('&#46;');
8596}
8597
8598/**
8599 * UserCentrics Overlays
8600 * @author Kai Vier
8601 */
8602var UCOverlays = {
8603	
8604	defaults: {
8605		selector: {
8606			container: '.uc-overlay',
8607		},
8608		label: {
8609			title: 'Wir benötigen Ihre Zustimmung, um den Service zu laden!',
8610			no_service: 'Dieser Inhalt kann nicht freigegeben werden, da der Betreiber dieser Webseite die CMP-Konfiguration für diese Technologie nicht abgeschlossen hat.',
8611			btn_info: 'Mehr Informationen',
8612			btn_accept: 'Akzeptieren',
8613			powered_by: '<span>Powered by <a target="_blank" class="uc-embedding-powered-by" href="https://usercentrics.com/">Usercentrics Consent Management Platform</a></span>'
8614		},
8615		// Services that are in use
8616		service: [],
8617		className: {
8618			blocked: 'uc-blocked'
8619		}
8620	},
8621	opts: {},
8622	
8623	/**
8624	 * Initialize with event listeners
8625	 **/
8626	init: function(opts) {	
8627		this.opts = this.defaults;
8628		$.extend(true, this.opts, opts); // deep copy
8629		this.updateOverlays();
8630	},
8631	
8632	updateOverlays: function() {
8633		var _this = this;
8634		jQuery(this.opts.selector.container).each(function() {
8635			var _this2 = this;
8636			var s = {};
8637			s.id = jQuery(this).attr('data-uc-service-id');
8638			
8639			_this.getService(s.id).then(function(service) {
8640				if(service.consent.given == false) {
8641					_this.setTemplate(_this2, s.id, s, _this.opts.label);
8642				} else {
8643					_this.hide(s.id);
8644				}
8645			}, function(error) {
8646				_this.setTemplate(this2, s.id, s, _this.opts.label);
8647			});
8648			
8649		});
8650	},
8651
8652	// Get template
8653	setTemplate: function(el, id, service, labels) {
8654		jQuery(el).append(jQuery(this.getTemplate(id, service, labels)));
8655	},
8656
8657	// Get template
8658	getTemplate: function(id, service, labels) {
8659		return `
8660		<div class="uc-embedding-wrapper">
8661			<h3>`+labels.title+`</h3>
8662			<div class="uc-embedding-buttons">
8663				<button type="button" class="uc-embedding-more-info" onclick="UCOverlays.moreInfo('`+id+`')">`+labels.btn_info+`</button>
8664				<button type="button" class="uc-embedding-accept" onclick="UCOverlays.acceptService('`+id+`')">`+labels.btn_accept+`</button> 
8665			</div>`+labels.powered_by+`
8666		</div>`;
8667	},
8668	
8669	getService: async function(id) {
8670		return (await __ucCmp.getConsentDetails(id)).services[id];
8671		//__ucCmp.showServiceDetails(id);
8672	},
8673	
8674	acceptService: async function(id) {
8675		await __ucCmp.updateServicesConsents([{id:id,consent:true}]);
8676		await __ucCmp.saveConsents();
8677		UCOverlays.hide(id);
8678	},
8679	
8680	moreInfo: function(id) {
8681		__ucCmp.showServiceDetails(id);
8682	},
8683	
8684	hide: function(id) {
8685		jQuery(this.opts.selector.container+'[data-uc-service-id="'+id+'"]').each(function() {
8686			jQuery(this).addClass('hidden');
8687		});
8688	}
8689};
8690
8691window.addEventListener("load",() => { 
8692	UCOverlays.init(); 
8693});
8694
8695window.addEventListener("load", function() {
8696  jQuery('a.zl-url').click(function(e) {
8697    if(jQuery(this).find('.uc-embedding-wrapper').length) e.preventDefault();
8698  });
8699});
8700/**
8701 * Initialize Auto Popup
8702 *
8703 * lib = fancybox | magnific | ...
8704 */
8705function initPopupAuto(lib) {
8706	console.log("Cookie Popup: Init ("+lib+")");	
8707	
8708	if(typeof lib == "undefined" || lib == "") {
8709		console.error("Cookie Popup: Popup library not defined!");
8710		return;
8711	}
8712	
8713	jQuery('.popup-content.popup-auto').each(function() {
8714
8715		var id = jQuery(this).attr('id');
8716		if(typeof id != "undefined" && id != "") {
8717			// return, if the cookie of this popup is already set (popup should not be displayed)
8718			var dataCookie = jQuery(this).attr('data-popup-cookie');
8719			if(typeof dataCookie != "undefined" && dataCookie != "" && ipGetCookie(dataCookie))
8720				return;
8721
8722			console.log("Cookie Popup: Open ("+jQuery(this).attr('id')+")");
8723			
8724			// Create popup
8725			if(lib == 'fancybox')
8726				createPopupFancybox(id, jQuery(this));
8727			else if(lib == 'magnific')
8728				createPopupMagnific(id, jQuery(this));
8729			else if(lib == 'simplemodal')
8730				createPopupSimpleModal(id, jQuery(this));
8731			else if(lib == 'bootstrapmodal')
8732				createPopupBootstrapModal(id, jQuery(this));
8733			
8734			// Set cookie
8735			if(typeof dataCookie != "undefined" && dataCookie != "")
8736				ipSetCookie(dataCookie,1);
8737		}
8738	});
8739}
8740function createPopupFancybox(id, jThis) {
8741	var dataStyle = jThis.attr('data-popup-style');
8742	var baseClass = (typeof dataStyle != "undefined" && dataStyle != "") ? dataStyle : '';
8743
8744	jQuery.fancybox.open({
8745		src  : '#'+id,
8746		type : 'inline',
8747		baseClass : baseClass
8748	});
8749}
8750function createPopupMagnific(id, jThis) {
8751	$.magnificPopup.open({
8752		items: {
8753			src: '#'+id 
8754		},
8755		type: 'inline'
8756	}, 0);
8757}
8758function createPopupSimpleModal(id, jThis) {
8759	$("#"+id).modal();	
8760}
8761function createPopupBootstrapModal(id, jThis) {
8762	var jMd = jQuery('#popup-'+id).length ? jQuery('#popup-'+id) : jQuery('#'+id);
8763	if(jMd.length) {
8764		jMd.modal('show');
8765	}
8766}
8767function ipSetCookie(name,value,days) {
8768    var expires = "";
8769    if (days) {
8770        var date = new Date();
8771        date.setTime(date.getTime() + (days*24*60*60*1000));
8772        expires = "; expires=" + date.toUTCString();
8773    }
8774    document.cookie = name + "=" + (value || "")  + expires + "; path=/";
8775}
8776function ipGetCookie(name) {
8777    var nameEQ = name + "=";
8778    var ca = document.cookie.split(';');
8779    for(var i=0;i < ca.length;i++) {
8780        var c = ca[i];
8781        while (c.charAt(0)==' ') c = c.substring(1,c.length);
8782        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
8783    }
8784    return null;
8785}
8786
8787
8788const modalTemplate = '<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content">'
8789+ '<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Schließen"><span aria-hidden="true">&times;</span></button><h3 class="modal-title">Modal Title</h3></div>'
8790+ '<div class="modal-body"></div>'
8791+ '<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button></div>'
8792+ '</div></div></div>';
8793
8794function initPopupContent(jpc) {
8795	var jM = jQuery(modalTemplate).clone(true,true);
8796	
8797	if(jpc.attr('id') == "")
8798		return;
8799	
8800	jM.attr('id', 'popup-'+jpc.attr('id'));
8801	
8802	var jTitle = jpc.find('> h1, > h2, > h3, > p');
8803	jM.find('.modal-title').html(jTitle.html());
8804	var jBody = jpc.find('.ce-bodytext').html();
8805	jM.find('.modal-body').html(jBody);
8806	
8807	jQuery('body').append(jM);
8808}
8809
8810jQuery(document).ready(function() {
8811	
8812	// Popups
8813	jQuery('.popup-content').each(function() {
8814		var jpc = jQuery(this);
8815		initPopupContent(jpc);		
8816	});
8817	
8818	jQuery('body').on('click', 'a.popup', function(e) {
8819		e.preventDefault();
8820		
8821		var href = jQuery(this).attr('href'),
8822			hash = href.substring(href.indexOf('#'));
8823		
8824		var jMd = jQuery(hash);
8825		if(jMd.length) {
8826			jMd.modal('show');
8827		}
8828		
8829	});
8830		
8831	/**
8832	 * Init auto popups / cookie
8833	 **/
8834	initPopupAuto('bootstrapmodal');
8835
8836});
8837
8838var modalContent = '<div class="modal fade" id="myModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content">'
8839+ '<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Schließen"><span aria-hidden="true">&times;</span></button><h3 class="modal-title">Modal Title</h3></div>'
8840+ '<div class="modal-body"></div>'
8841+ '<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Schließen</button></div>'
8842+ '</div></div></div>';
8843
8844var jM = null;
8845	
8846jQuery(document).ready(function() {
8847	
8848	// Modal
8849	jM = jQuery(modalContent);
8850	jM.attr('id', 'callPopupModal');
8851	var jTitle = jQuery('#call-popup > h1, #call-popup > h2, #call-popup > h3, #call-popup > p');
8852	jM.find('.modal-title').html(jTitle.html());
8853	//var jBody = jQuery('#call-popup .ce-bodytext').html();
8854	//jM.find('.modal-body').html(jBody);
8855	var bodyHtml = "";
8856	jQuery('#call-popup .ce-bodytext').each(function() { bodyHtml += jQuery(this).html(); });
8857	jM.find('.modal-body').html(bodyHtml);
8858	jQuery('body').append(jM);
8859	
8860	
8861	
8862	// Panel collapse scroll to if hidden
8863	jQuery(".collapse").on('shown.bs.collapse', function(){
8864		var ot = jQuery(this).offset().top,
8865			wt = jQuery(window).scrollTop();
8866			
8867			if(ot < wt)
8868				osScrollTo(jQuery(this).parent().offset().top);
8869	});
8870});
8871	
8872/*
8873 * tel-Link action for Desktop
8874 */
8875jQuery('body').on('click', 'a[href^=tel]', function(e){
8876	if(jQuery(window).width() >= 768) {
8877		e.preventDefault();
8878		jM.modal('show');
8879	}
8880});
8881
8882/*
8883 * Overwrite target for internal links (t3 rte bugfix)
8884 */
8885jQuery('a.internal-link').attr('target', '_top');
8886	
8887/* Anchor link slider */
8888jQuery('body').on('click', 'a[href*="#"]', function(e){
8889	if(jQuery(this).hasClass('btn-accordion'))
8890		return;
8891	
8892	if(jQuery(this).hasClass('popup'))
8893		return;
8894	
8895	var href = jQuery(this).attr('href'),
8896		hash = href.substring(href.indexOf('#'));
8897		
8898		// If external Url do nothing
8899		if(href.indexOf('http') >= 0 && href.indexOf(location.host) < 0)
8900			return;
8901		
8902		// If is carousel control do nothing
8903		if(jQuery(this).hasClass('carousel-control'))
8904			return;
8905		
8906		// Slide to element
8907		var jE = jQuery(hash);
8908		if(jE.length) {
8909			e.preventDefault();
8910			
8911			var top = jE.offset().top;
8912			osScrollTo(top);
8913		}
8914		
8915		// Open panel if necessary
8916		if(jE.hasClass('panel') && !jE.find('.panel-collapse').hasClass('in')) {
8917			jE.find('.panel-heading .btn').click();	//jE.collapse('show');
8918		}
8919});
8920
8921/* DrFlex Popup Listener */
8922jQuery('body').on('click', '.toggleDrFlexAppointments', function(e){
8923	e.preventDefault();
8924	toggleDrFlexAppointments();
8925});
8926
8927function osScrollTo(top) {
8928	// Add little offset space
8929	// Navbar Toggle always shown, so substract it from scroll position
8930	var offset = 15,
8931		navbarToggleHeight = getNavbarToggleHeight();
8932	jQuery('html,body').animate({scrollTop:top-navbarToggleHeight-offset}, '500', 'swing');
8933}
8934
8935function getNavbarToggleHeight() {
8936	// Assuming single NavbarToggle in page
8937	var $n = $('.navbar-toggle');
8938	var h = 0;
8939	if($n.hasClass('open')) {
8940		h = $n.outerHeight() + $n.position().top;
8941	} else {
8942		$n.show();
8943		h = $n.outerHeight() + $n.position().top; // height + top (top = -200)
8944		$n.hide();
8945	}
8946	return h;
8947}
8948
8949
8950/**
8951 * Enable gaOptout links by rel-Attribute: gaOptout
8952 */
8953window.onload = function() {
8954	var matches = document.querySelectorAll('.gaOptout');
8955	matches.forEach(function(item) {
8956		item.onclick = function() {
8957			gaOptout();
8958			if(item.className.indexOf('en')>=0) 
8959				alert('You have been excluded from Google Analytics recording successfully');
8960			else 
8961				alert('Sie haben sich erfolgreich von der Google Analytics Messung ausgeschlossen');
8962		};
8963	});
8964};
8965
8966jQuery(window).load(function() {
8967	jQuery('body').on('click', 'a[rel=gaOptout]', function(e) {
8968		e.preventDefault();
8969		gaOptout();
8970		if($(this).hasClass('en'))
8971			alert('You have been excluded from Google Analytics recording successfully');
8972		else
8973			alert('Sie haben sich erfolgreich von der Google Analytics Messung ausgeschlossen');
8974		
8975		return false;
8976	});
8977});
8978
8979
8980/**
8981 * Initial scroll if marker
8982 */
8983jQuery(window).load(function() {
8984	if(location.href.indexOf('#') > 0) {
8985		var hash = location.href.substring(location.href.indexOf('#'));
8986		
8987		if(jQuery(hash).length)
8988			window.setTimeout(function() {
8989				osScrollTo(jQuery(hash).offset().top);
8990			}, 500);
8991	}
8992});
8993
8994
8995/**
8996 * Index Menu
8997 */
8998jQuery(document).ready(function() {
8999	
9000	var menu = jQuery("#indexmenu");
9001	var btns = jQuery(".btn-indexmenu");
9002	
9003	if(menu.length > 0) {
9004		var mobilemenu = jQuery('<div id="mobile-indexmenu" style="display:none;"></div>');
9005		mobilemenu.append(menu.find('ul').clone(true,true));
9006		if(jQuery('.btn-indexmenu').parent().hasClass('align-right') || jQuery('.btn-indexmenu').parent().parent().hasClass('align-right'))
9007			mobilemenu.addClass('right');
9008		jQuery('#afterpage').append(mobilemenu);
9009		
9010		btns.on("click", function(e) {
9011			e.preventDefault();
9012//			showMobileIndexmenu(mobilemenu, jQuery(this));
9013			if(mobilemenu.hasClass('active'))
9014				hideMobileIndexmenu(mobilemenu, jQuery(this));
9015			else
9016				showMobileIndexmenu(mobilemenu, btns);
9017				
9018			/*
9019			var offset = jQuery(this).offset();
9020			var b = jQuery(this).height() + 25 + 25;
9021			mobilemenu.css('bottom', b+'px');
9022			mobilemenu.fadeIn();*/
9023			
9024		});
9025		
9026		mobilemenu.on('click', function(e) {
9027			hideMobileIndexmenu(mobilemenu, btns);
9028		});
9029		
9030	} else {
9031		btns.css("display","none");
9032	}
9033	
9034});
9035
9036function showMobileIndexmenu(jMenu, jBtn) {
9037	var b = jBtn.height() + 25 + 25;
9038	jBtn.addClass('active');
9039	jMenu.css('bottom', b+'px');
9040	jMenu.addClass('active');
9041	jMenu.fadeIn();
9042}
9043function hideMobileIndexmenu(jMenu, jBtns) {
9044	jBtns.removeClass('active');
9045	jMenu.removeClass('active');
9046	jMenu.fadeOut();
9047}
9048
9049
9050/**
9051 * UserCentrics Overlays
9052 */
9053jQuery(window).on('load', function(e) {
9054	if(typeof UCOverlays != 'undefined' && typeof UC_OVERLAYS_OPTS != 'undefined') {
9055		UCOverlays.init(UC_OVERLAYS_OPTS);
9056	}
9057});
9058function getFullYear() {return new Date().getFullYear()}
9059function getMonthFullYear() {
9060  const months = ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];
9061  return months[(new Date()).getMonth()] + " " + new Date().getFullYear();
9062}
9063function printAutoDates() {
9064  var els = document.getElementsByClassName('print-current-year');
9065  for(var i=0; i<els.length;i++) {els[i].innerHTML = getFullYear()};
9066  els = document.getElementsByClassName('print-current-month-year');
9067  for(var i=0; i<els.length;i++) {els[i].innerHTML = getMonthFullYear()};
9068}
9069window.addEventListener('load', printAutoDates);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.