text: /*! jQuery v1.12.3 | (c) jQuery Foundation | jquery.org/license */
  !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},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}function 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)},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;
  }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);if(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){
  return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{marginLeft: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]];else 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)};if(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;
  })}),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});
  
  /*!
    * Bootstrap v4.0.0 (https://getbootstrap.com)
    * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
    */
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var o,a,l,h,c,u,f,d,_,g,p,m,v,E,T,y,C,I,A,b,D,S,w,N,O,k,P=function(t){var e=!1;function n(e){var n=this,s=!1;return t(this).one(i.TRANSITION_END,function(){s=!0}),setTimeout(function(){s||i.triggerTransitionEnd(n)},e),this}var i={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n,i=e.getAttribute("data-target");i&&"#"!==i||(i=e.getAttribute("href")||""),"#"===i.charAt(0)&&(n=i,i=n="function"==typeof t.escapeSelector?t.escapeSelector(n).substr(1):n.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1"));try{return t(document).find(i).length>0?i:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(e.end)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var r=n[s],o=e[s],a=o&&i.isElement(o)?"element":(l=o,{}.toString.call(l).match(/\s([a-zA-Z]+)/)[1].toLowerCase());if(!new RegExp(r).test(a))throw new Error(t.toUpperCase()+': Option "'+s+'" provided type "'+a+'" but expected type "'+r+'".')}var l}};return e=("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"},t.fn.emulateTransitionEnd=n,i.supportsTransitionEnd()&&(t.event.special[i.TRANSITION_END]={bindType:e.end,delegateType:e.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}),i}(e),L=(a="alert",h="."+(l="bs.alert"),c=(o=e).fn[a],u={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+".data-api"},f="alert",d="fade",_="show",g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.removeData(this._element,l),this._element=null},e._getRootElement=function(t){var e=P.getSelectorFromElement(t),n=!1;return e&&(n=o(e)[0]),n||(n=o(t).closest("."+f)[0]),n},e._triggerCloseEvent=function(t){var e=o.Event(u.CLOSE);return o(t).trigger(e),e},e._removeElement=function(t){var e=this;o(t).removeClass(_),P.supportsTransitionEnd()&&o(t).hasClass(d)?o(t).one(P.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(150):this._destroyElement(t)},e._destroyElement=function(t){o(t).detach().trigger(u.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var n=o(this),i=n.data(l);i||(i=new t(this),n.data(l,i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),o(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',g._handleDismiss(new g)),o.fn[a]=g._jQueryInterface,o.fn[a].Constructor=g,o.fn[a].noConflict=function(){return o.fn[a]=c,g._jQueryInterface},g),R=(m="button",E="."+(v="bs.button"),T=".data-api",y=(p=e).fn[m],C="active",I="btn",A="focus",b='[data-toggle^="button"]',D='[data-toggle="buttons"]',S="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+E+T,FOCUS_BLUR_DATA_API:"focus"+E+T+" blur"+E+T},k=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=p(this._element).closest(D)[0];if(n){var i=p(this._element).find(S)[0];if(i){if("radio"===i.type)if(i.checked&&p(this._element).hasClass(C))t=!1;else{var s=p(n).find(w)[0];s&&p(s).removeClass(C)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!p(this._element).hasClass(C),p(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!p(this._element).hasClass(C)),t&&p(this._element).toggleClass(C)},e.dispose=function(){p.removeData(this._element,v),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var n=p(this).data(v);n||(n=new t(this),p(this).data(v,n)),"toggle"===e&&n[e]()})},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),p(document).on(O.CLICK_DATA_API,b,function(t){t.preventDefault();var e=t.target;p(e).hasClass(I)||(e=p(e).closest(N)),k._jQueryInterface.call(p(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,b,function(t){var e=p(t.target).closest(N)[0];p(e).toggleClass(A,/^focus(in)?$/.test(t.type))}),p.fn[m]=k._jQueryInterface,p.fn[m].Constructor=k,p.fn[m].noConflict=function(){return p.fn[m]=y,k._jQueryInterface},k),j=function(t){var e="carousel",n="bs.carousel",i="."+n,o=t.fn[e],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},h="next",c="prev",u="left",f="right",d={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load"+i+".data-api",CLICK_DATA_API:"click"+i+".data-api"},_="carousel",g="active",p="slide",m="carousel-item-right",v="carousel-item-left",E="carousel-item-next",T="carousel-item-prev",y={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},C=function(){function o(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(y.INDICATORS)[0],this._addEventListeners()}var C=o.prototype;return C.next=function(){this._isSliding||this._slide(h)},C.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},C.prev=function(){this._isSliding||this._slide(c)},C.pause=function(e){e||(this._isPaused=!0),t(this._element).find(y.NEXT_PREV)[0]&&P.supportsTransitionEnd()&&(P.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},C.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},C.to=function(e){var n=this;this._activeElement=t(this._element).find(y.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var s=e>i?h:c;this._slide(s,this._items[e])}},C.dispose=function(){t(this._element).off(i),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},C._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},C._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},C._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},C._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(y.ITEM)),this._items.indexOf(e)},C._getItemByDirection=function(t,e){var n=t===h,i=t===c,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===c?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},C._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),s=this._getItemIndex(t(this._element).find(y.ACTIVE_ITEM)[0]),r=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:s,to:i});return t(this._element).trigger(r),r},C._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(y.ACTIVE).removeClass(g);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(g)}},C._slide=function(e,n){var i,s,r,o=this,a=t(this._element).find(y.ACTIVE_ITEM)[0],l=this._getItemIndex(a),c=n||a&&this._getItemByDirection(e,a),_=this._getItemIndex(c),C=Boolean(this._interval);if(e===h?(i=v,s=E,r=u):(i=m,s=T,r=f),c&&t(c).hasClass(g))this._isSliding=!1;else if(!this._triggerSlideEvent(c,r).isDefaultPrevented()&&a&&c){this._isSliding=!0,C&&this.pause(),this._setActiveIndicatorElement(c);var I=t.Event(d.SLID,{relatedTarget:c,direction:r,from:l,to:_});P.supportsTransitionEnd()&&t(this._element).hasClass(p)?(t(c).addClass(s),P.reflow(c),t(a).addClass(i),t(c).addClass(i),t(a).one(P.TRANSITION_END,function(){t(c).removeClass(i+" "+s).addClass(g),t(a).removeClass(g+" "+s+" "+i),o._isSliding=!1,setTimeout(function(){return t(o._element).trigger(I)},0)}).emulateTransitionEnd(600)):(t(a).removeClass(g),t(c).addClass(g),this._isSliding=!1,t(this._element).trigger(I)),C&&this.cycle()}},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s=r({},a,t(this).data());"object"==typeof e&&(s=r({},s,e));var l="string"==typeof e?e:s.slide;if(i||(i=new o(this,s),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof l){if("undefined"==typeof i[l])throw new TypeError('No method named "'+l+'"');i[l]()}else s.interval&&(i.pause(),i.cycle())})},o._dataApiClickHandler=function(e){var i=P.getSelectorFromElement(this);if(i){var s=t(i)[0];if(s&&t(s).hasClass(_)){var a=r({},t(s).data(),t(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),o._jQueryInterface.call(t(s),a),l&&t(s).data(n).to(l),e.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(d.CLICK_DATA_API,y.DATA_SLIDE,C._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(y.DATA_RIDE).each(function(){var e=t(this);C._jQueryInterface.call(e,e.data())})}),t.fn[e]=C._jQueryInterface,t.fn[e].Constructor=C,t.fn[e].noConflict=function(){return t.fn[e]=o,C._jQueryInterface},C}(e),H=function(t){var e="collapse",n="bs.collapse",i="."+n,o=t.fn[e],a={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},h={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+".data-api"},c="show",u="collapse",f="collapsing",d="collapsed",_="width",g="height",p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function i(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=t(p.DATA_TOGGLE),s=0;s<i.length;s++){var r=i[s],o=P.getSelectorFromElement(r);null!==o&&t(o).filter(e).length>0&&(this._selector=o,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var o=i.prototype;return o.toggle=function(){t(this._element).hasClass(c)?this.hide():this.show()},o.show=function(){var e,s,r=this;if(!this._isTransitioning&&!t(this._element).hasClass(c)&&(this._parent&&0===(e=t.makeArray(t(this._parent).find(p.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),!(e&&(s=t(e).not(this._selector).data(n))&&s._isTransitioning))){var o=t.Event(h.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){e&&(i._jQueryInterface.call(t(e).not(this._selector),"hide"),s||t(e).data(n,null));var a=this._getDimension();t(this._element).removeClass(u).addClass(f),this._element.style[a]=0,this._triggerArray.length>0&&t(this._triggerArray).removeClass(d).attr("aria-expanded",!0),this.setTransitioning(!0);var l=function(){t(r._element).removeClass(f).addClass(u).addClass(c),r._element.style[a]="",r.setTransitioning(!1),t(r._element).trigger(h.SHOWN)};if(P.supportsTransitionEnd()){var _="scroll"+(a[0].toUpperCase()+a.slice(1));t(this._element).one(P.TRANSITION_END,l).emulateTransitionEnd(600),this._element.style[a]=this._element[_]+"px"}else l()}}},o.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(c)){var n=t.Event(h.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",P.reflow(this._element),t(this._element).addClass(f).removeClass(u).removeClass(c),this._triggerArray.length>0)for(var s=0;s<this._triggerArray.length;s++){var r=this._triggerArray[s],o=P.getSelectorFromElement(r);if(null!==o)t(o).hasClass(c)||t(r).addClass(d).attr("aria-expanded",!1)}this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(f).addClass(u).trigger(h.HIDDEN)};this._element.style[i]="",P.supportsTransitionEnd()?t(this._element).one(P.TRANSITION_END,a).emulateTransitionEnd(600):a()}}},o.setTransitioning=function(t){this._isTransitioning=t},o.dispose=function(){t.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},o._getConfig=function(t){return(t=r({},a,t)).toggle=Boolean(t.toggle),P.typeCheckConfig(e,t,l),t},o._getDimension=function(){return t(this._element).hasClass(_)?_:g},o._getParent=function(){var e=this,n=null;P.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=t(this._config.parent)[0];var s='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(s).each(function(t,n){e._addAriaAndCollapsedClass(i._getTargetFromElement(n),[n])}),n},o._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(c);n.length>0&&t(n).toggleClass(d,!i).attr("aria-expanded",i)}},i._getTargetFromElement=function(e){var n=P.getSelectorFromElement(e);return n?t(n)[0]:null},i._jQueryInterface=function(e){return this.each(function(){var s=t(this),o=s.data(n),l=r({},a,s.data(),"object"==typeof e&&e);if(!o&&l.toggle&&/show|hide/.test(e)&&(l.toggle=!1),o||(o=new i(this,l),s.data(n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),i}();return t(document).on(h.CLICK_DATA_API,p.DATA_TOGGLE,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),s=P.getSelectorFromElement(this);t(s).each(function(){var e=t(this),s=e.data(n)?"toggle":i.data();m._jQueryInterface.call(e,s)})}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=o,m._jQueryInterface},m}(e),W=function(t){var e="dropdown",i="bs.dropdown",o="."+i,a=".data-api",l=t.fn[e],h=new RegExp("38|40|27"),c={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK:"click"+o,CLICK_DATA_API:"click"+o+a,KEYDOWN_DATA_API:"keydown"+o+a,KEYUP_DATA_API:"keyup"+o+a},u="disabled",f="show",d="dropup",_="dropright",g="dropleft",p="dropdown-menu-right",m="dropdown-menu-left",v="position-static",E='[data-toggle="dropdown"]',T=".dropdown form",y=".dropdown-menu",C=".navbar-nav",I=".dropdown-menu .dropdown-item:not(.disabled)",A="top-start",b="top-end",D="bottom-start",S="bottom-end",w="right-start",N="left-start",O={offset:0,flip:!0,boundary:"scrollParent"},k={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},L=function(){function a(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var l=a.prototype;return l.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(u)){var e=a._getParentFromElement(this._element),i=t(this._menu).hasClass(f);if(a._clearMenus(),!i){var s={relatedTarget:this._element},r=t.Event(c.SHOW,s);if(t(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof n)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var o=this._element;t(e).hasClass(d)&&(t(this._menu).hasClass(m)||t(this._menu).hasClass(p))&&(o=e),"scrollParent"!==this._config.boundary&&t(e).addClass(v),this._popper=new n(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(e).closest(C).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(f),t(e).toggleClass(f).trigger(t.Event(c.SHOWN,s))}}}},l.dispose=function(){t.removeData(this._element,i),t(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},l.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l._addEventListeners=function(){var e=this;t(this._element).on(c.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l._getConfig=function(n){return n=r({},this.constructor.Default,t(this._element).data(),n),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},l._getMenuElement=function(){if(!this._menu){var e=a._getParentFromElement(this._element);this._menu=t(e).find(y)[0]}return this._menu},l._getPlacement=function(){var e=t(this._element).parent(),n=D;return e.hasClass(d)?(n=A,t(this._menu).hasClass(p)&&(n=b)):e.hasClass(_)?n=w:e.hasClass(g)?n=N:t(this._menu).hasClass(p)&&(n=S),n},l._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i);if(n||(n=new a(this,"object"==typeof e?e:null),t(this).data(i,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},a._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(E)),s=0;s<n.length;s++){var r=a._getParentFromElement(n[s]),o=t(n[s]).data(i),l={relatedTarget:n[s]};if(o){var h=o._menu;if(t(r).hasClass(f)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(r,e.target))){var u=t.Event(c.HIDE,l);t(r).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),n[s].setAttribute("aria-expanded","false"),t(h).removeClass(f),t(r).removeClass(f).trigger(t.Event(c.HIDDEN,l)))}}}},a._getParentFromElement=function(e){var n,i=P.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},a._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||t(e.target).closest(y).length)):h.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!t(this).hasClass(u))){var n=a._getParentFromElement(this),i=t(n).hasClass(f);if((i||27===e.which&&32===e.which)&&(!i||27!==e.which&&32!==e.which)){var s=t(n).find(I).get();if(0!==s.length){var r=s.indexOf(e.target);38===e.which&&r>0&&r--,40===e.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}else{if(27===e.which){var o=t(n).find(E)[0];t(o).trigger("focus")}t(this).trigger("click")}}},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return O}},{key:"DefaultType",get:function(){return k}}]),a}();return t(document).on(c.KEYDOWN_DATA_API,E,L._dataApiKeydownHandler).on(c.KEYDOWN_DATA_API,y,L._dataApiKeydownHandler).on(c.CLICK_DATA_API+" "+c.KEYUP_DATA_API,L._clearMenus).on(c.CLICK_DATA_API,E,function(e){e.preventDefault(),e.stopPropagation(),L._jQueryInterface.call(t(this),"toggle")}).on(c.CLICK_DATA_API,T,function(t){t.stopPropagation()}),t.fn[e]=L._jQueryInterface,t.fn[e].Constructor=L,t.fn[e].noConflict=function(){return t.fn[e]=l,L._jQueryInterface},L}(e),M=function(t){var e="modal",n="bs.modal",i="."+n,o=t.fn.modal,a={backdrop:!0,keyboard:!0,focus:!0,show:!0},l={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},h={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,FOCUSIN:"focusin"+i,RESIZE:"resize"+i,CLICK_DISMISS:"click.dismiss"+i,KEYDOWN_DISMISS:"keydown.dismiss"+i,MOUSEUP_DISMISS:"mouseup.dismiss"+i,MOUSEDOWN_DISMISS:"mousedown.dismiss"+i,CLICK_DATA_API:"click"+i+".data-api"},c="modal-scrollbar-measure",u="modal-backdrop",f="modal-open",d="fade",_="show",g={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},p=function(){function o(e,n){this._config=this._getConfig(n),this._element=e,this._dialog=t(e).find(g.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var p=o.prototype;return p.toggle=function(t){return this._isShown?this.hide():this.show(t)},p.show=function(e){var n=this;if(!this._isTransitioning&&!this._isShown){P.supportsTransitionEnd()&&t(this._element).hasClass(d)&&(this._isTransitioning=!0);var i=t.Event(h.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),t(document.body).addClass(f),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(h.CLICK_DISMISS,g.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(h.MOUSEDOWN_DISMISS,function(){t(n._element).one(h.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},p.hide=function(e){var n=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var i=t.Event(h.HIDE);if(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var s=P.supportsTransitionEnd()&&t(this._element).hasClass(d);s&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(h.FOCUSIN),t(this._element).removeClass(_),t(this._element).off(h.CLICK_DISMISS),t(this._dialog).off(h.MOUSEDOWN_DISMISS),s?t(this._element).one(P.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal()}}},p.dispose=function(){t.removeData(this._element,n),t(window,document,this._element,this._backdrop).off(i),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},p.handleUpdate=function(){this._adjustDialog()},p._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},p._showElement=function(e){var n=this,i=P.supportsTransitionEnd()&&t(this._element).hasClass(d);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&P.reflow(this._element),t(this._element).addClass(_),this._config.focus&&this._enforceFocus();var s=t.Event(h.SHOWN,{relatedTarget:e}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(s)};i?t(this._dialog).one(P.TRANSITION_END,r).emulateTransitionEnd(300):r()},p._enforceFocus=function(){var e=this;t(document).off(h.FOCUSIN).on(h.FOCUSIN,function(n){document!==n.target&&e._element!==n.target&&0===t(e._element).has(n.target).length&&e._element.focus()})},p._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(h.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(h.KEYDOWN_DISMISS)},p._setResizeEvent=function(){var e=this;this._isShown?t(window).on(h.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(h.RESIZE)},p._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(f),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(h.HIDDEN)})},p._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},p._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(d)?d:"";if(this._isShown&&this._config.backdrop){var s=P.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=u,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(h.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),s&&P.reflow(this._backdrop),t(this._backdrop).addClass(_),!e)return;if(!s)return void e();t(this._backdrop).one(P.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(_);var r=function(){n._removeBackdrop(),e&&e()};P.supportsTransitionEnd()&&t(this._element).hasClass(d)?t(this._backdrop).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r()}else e&&e()},p._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},p._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},p._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},p._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(g.FIXED_CONTENT).each(function(n,i){var s=t(i)[0].style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",s).css("padding-right",parseFloat(r)+e._scrollbarWidth+"px")}),t(g.STICKY_CONTENT).each(function(n,i){var s=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",s).css("margin-right",parseFloat(r)-e._scrollbarWidth+"px")}),t(g.NAVBAR_TOGGLER).each(function(n,i){var s=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",s).css("margin-right",parseFloat(r)+e._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=t("body").css("padding-right");t("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},p._resetScrollbar=function(){t(g.FIXED_CONTENT).each(function(e,n){var i=t(n).data("padding-right");"undefined"!=typeof i&&t(n).css("padding-right",i).removeData("padding-right")}),t(g.STICKY_CONTENT+", "+g.NAVBAR_TOGGLER).each(function(e,n){var i=t(n).data("margin-right");"undefined"!=typeof i&&t(n).css("margin-right",i).removeData("margin-right")});var e=t("body").data("padding-right");"undefined"!=typeof e&&t("body").css("padding-right",e).removeData("padding-right")},p._getScrollbarWidth=function(){var t=document.createElement("div");t.className=c,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(e,i){return this.each(function(){var s=t(this).data(n),a=r({},o.Default,t(this).data(),"object"==typeof e&&e);if(s||(s=new o(this,a),t(this).data(n,s)),"string"==typeof e){if("undefined"==typeof s[e])throw new TypeError('No method named "'+e+'"');s[e](i)}else a.show&&s.show(i)})},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(h.CLICK_DATA_API,g.DATA_TOGGLE,function(e){var i,s=this,o=P.getSelectorFromElement(this);o&&(i=t(o)[0]);var a=t(i).data(n)?"toggle":r({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var l=t(i).one(h.SHOW,function(e){e.isDefaultPrevented()||l.one(h.HIDDEN,function(){t(s).is(":visible")&&s.focus()})});p._jQueryInterface.call(t(i),a,this)}),t.fn.modal=p._jQueryInterface,t.fn.modal.Constructor=p,t.fn.modal.noConflict=function(){return t.fn.modal=o,p._jQueryInterface},p}(e),U=function(t){var e="tooltip",i="bs.tooltip",o="."+i,a=t.fn[e],l=new RegExp("(^|\\s)bs-tooltip\\S+","g"),h={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},c={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",d="out",_={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g="fade",p="show",m=".tooltip-inner",v=".arrow",E="hover",T="focus",y="click",C="manual",I=function(){function a(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var I=a.prototype;return I.enable=function(){this._isEnabled=!0},I.disable=function(){this._isEnabled=!1},I.toggleEnabled=function(){this._isEnabled=!this._isEnabled},I.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p))return void this._leave(null,this);this._enter(null,this)}},I.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},I.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var s=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),o=P.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(g);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(p),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d&&e._leave(null,e)};P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(this.tip).one(P.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},I.hide=function(e){var n=this,i=this.getTipElement(),s=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(s),s.isDefaultPrevented()||(t(i).removeClass(p),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[T]=!1,this._activeTrigger[E]=!1,P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(i).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},I.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},I.isWithContent=function(){return Boolean(this.getTitle())},I.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},I.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},I.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(g+" "+p)},I.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},I.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},I._getAttachment=function(t){return c[t.toUpperCase()]},I._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==C){var i=n===E?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,s=n===E?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(s,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},I._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},I._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T:E]=!0),t(n.getTipElement()).hasClass(p)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},I._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T:E]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d&&n.hide()},n.config.delay.hide):n.hide())},I._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},I._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},I._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},I._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},I._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},I._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(g),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),s="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,s),t(this).data(i,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=a,I._jQueryInterface},I}(e),x=function(t){var e="popover",n="bs.popover",i="."+n,o=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},U.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),h=r({},U.DefaultType,{content:"(string|element|function)"}),c="fade",u="show",f=".popover-header",d=".popover-body",_={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},g=function(r){var o,g;function p(){return r.apply(this,arguments)||this}g=r,(o=p).prototype=Object.create(g.prototype),o.prototype.constructor=o,o.__proto__=g;var m=p.prototype;return m.isWithContent=function(){return this.getTitle()||this._getContent()},m.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},m.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},m.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(f),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(c+" "+u)},m._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},m._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},p._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new p(this,s),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(p,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return h}}]),p}(U);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),K=function(t){var e="scrollspy",n="bs.scrollspy",i="."+n,o=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+".data-api"},c="dropdown-item",u="active",f={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",_="position",g=function(){function o(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+f.NAV_LINKS+","+this._config.target+" "+f.LIST_ITEMS+","+this._config.target+" "+f.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=o.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:_,i="auto"===this._config.method?n:this._config.method,s=i===_?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,r=P.getSelectorFromElement(e);if(r&&(n=t(r)[0]),n){var o=n.getBoundingClientRect();if(o.width||o.height)return[t(n)[i]().top+s,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=P.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return P.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t<this._offsets[s+1])&&this._activate(this._targets[s])}}},g._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(c)?(i.closest(f.DROPDOWN).find(f.DROPDOWN_TOGGLE).addClass(u),i.addClass(u)):(i.addClass(u),i.parents(f.NAV_LIST_GROUP).prev(f.NAV_LINKS+", "+f.LIST_ITEMS).addClass(u),i.parents(f.NAV_LIST_GROUP).prev(f.NAV_ITEMS).children(f.NAV_LINKS).addClass(u)),t(this._scrollElement).trigger(h.ACTIVATE,{relatedTarget:e})},g._clear=function(){t(this._selector).filter(f.ACTIVE).removeClass(u)},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n);if(i||(i=new o(this,"object"==typeof e&&e),t(this).data(n,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(window).on(h.LOAD_DATA_API,function(){for(var e=t.makeArray(t(f.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);g._jQueryInterface.call(i,i.data())}}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),V=function(t){var e="bs.tab",n="."+e,i=t.fn.tab,r={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,CLICK_DATA_API:"click.bs.tab.data-api"},o="dropdown-menu",a="active",l="disabled",h="fade",c="show",u=".dropdown",f=".nav, .list-group",d=".active",_="> li > .active",g='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',p=".dropdown-toggle",m="> .dropdown-menu .active",v=function(){function n(t){this._element=t}var i=n.prototype;return i.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(a)||t(this._element).hasClass(l))){var n,i,s=t(this._element).closest(f)[0],o=P.getSelectorFromElement(this._element);if(s){var h="UL"===s.nodeName?_:d;i=(i=t.makeArray(t(s).find(h)))[i.length-1]}var c=t.Event(r.HIDE,{relatedTarget:this._element}),u=t.Event(r.SHOW,{relatedTarget:i});if(i&&t(i).trigger(c),t(this._element).trigger(u),!u.isDefaultPrevented()&&!c.isDefaultPrevented()){o&&(n=t(o)[0]),this._activate(this._element,s);var g=function(){var n=t.Event(r.HIDDEN,{relatedTarget:e._element}),s=t.Event(r.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(s)};n?this._activate(n,n.parentNode,g):g()}}},i.dispose=function(){t.removeData(this._element,e),this._element=null},i._activate=function(e,n,i){var s=this,r=("UL"===n.nodeName?t(n).find(_):t(n).children(d))[0],o=i&&P.supportsTransitionEnd()&&r&&t(r).hasClass(h),a=function(){return s._transitionComplete(e,r,i)};r&&o?t(r).one(P.TRANSITION_END,a).emulateTransitionEnd(150):a()},i._transitionComplete=function(e,n,i){if(n){t(n).removeClass(c+" "+a);var s=t(n.parentNode).find(m)[0];s&&t(s).removeClass(a),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass(a),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),P.reflow(e),t(e).addClass(c),e.parentNode&&t(e.parentNode).hasClass(o)){var r=t(e).closest(u)[0];r&&t(r).find(p).addClass(a),e.setAttribute("aria-expanded",!0)}i&&i()},n._jQueryInterface=function(i){return this.each(function(){var s=t(this),r=s.data(e);if(r||(r=new n(this),s.data(e,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),n}();return t(document).on(r.CLICK_DATA_API,g,function(e){e.preventDefault(),v._jQueryInterface.call(t(this),"show")}),t.fn.tab=v._jQueryInterface,t.fn.tab.Constructor=v,t.fn.tab.noConflict=function(){return t.fn.tab=i,v._jQueryInterface},v}(e);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=P,t.Alert=L,t.Button=R,t.Carousel=j,t.Collapse=H,t.Dropdown=W,t.Modal=M,t.Popover=x,t.Scrollspy=K,t.Tab=V,t.Tooltip=U,Object.defineProperty(t,"__esModule",{value:!0})});
  //# sourceMappingURL=bootstrap.min.js.map
  /*
   * jQuery mmenu v5.5.3
   * @requires jQuery 1.7.0 or later
   *
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   * www.frebsite.nl
   *
   * Licensed under the MIT license:
   * http://en.wikipedia.org/wiki/MIT_License
   */
  !function(e){function n(){e[t].glbl||(l={$wndw:e(window),$html:e("html"),$body:e("body")},a={},i={},r={},e.each([a,i,r],function(e,n){n.add=function(e){e=e.split(" ");for(var t=0,s=e.length;s>t;t++)n[e[t]]=n.mm(e[t])}}),a.mm=function(e){return"mm-"+e},a.add("wrapper menu panels panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen"),a.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},i.mm=function(e){return"mm-"+e},i.add("parent sub"),r.mm=function(e){return e+".mm"},r.add("transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend click keydown"),e[t]._c=a,e[t]._d=i,e[t]._e=r,e[t].glbl=l)}var t="mmenu",s="5.5.3";if(!(e[t]&&e[t].version>s)){e[t]=function(e,n,t){this.$menu=e,this._api=["bind","init","update","setSelected","getInstance","openPanel","closePanel","closeAllPanels"],this.opts=n,this.conf=t,this.vars={},this.cbck={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$pnls.children();return this._initAddons(),this.init(s),"function"==typeof this.___debug&&this.___debug(),this},e[t].version=s,e[t].addons={},e[t].uniqueId=0,e[t].defaults={extensions:[],navbar:{add:!0,title:"Menu",titleLink:"panel"},onClick:{setSelected:!0},slidingSubmenus:!0},e[t].configuration={classNames:{divider:"Divider",inset:"Inset",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[t].prototype={init:function(e){e=e.not("."+a.nopanel),e=this._initPanels(e),this.trigger("init",e),this.trigger("update")},update:function(){this.trigger("update")},setSelected:function(e){this.$menu.find("."+a.listview).children().removeClass(a.selected),e.addClass(a.selected),this.trigger("setSelected",e)},openPanel:function(n){var s=n.parent();if(s.hasClass(a.vertical)){var i=s.parents("."+a.subopened);if(i.length)return this.openPanel(i.first());s.addClass(a.opened)}else{if(n.hasClass(a.current))return;var r=this.$pnls.children("."+a.panel),l=r.filter("."+a.current);r.removeClass(a.highest).removeClass(a.current).not(n).not(l).not("."+a.vertical).addClass(a.hidden),e[t].support.csstransitions||l.addClass(a.hidden),n.hasClass(a.opened)?n.nextAll("."+a.opened).addClass(a.highest).removeClass(a.opened).removeClass(a.subopened):(n.addClass(a.highest),l.addClass(a.subopened)),n.removeClass(a.hidden).addClass(a.current),setTimeout(function(){n.removeClass(a.subopened).addClass(a.opened)},this.conf.openingInterval)}this.trigger("openPanel",n)},closePanel:function(e){var n=e.parent();n.hasClass(a.vertical)&&(n.removeClass(a.opened),this.trigger("closePanel",e))},closeAllPanels:function(){this.$menu.find("."+a.listview).children().removeClass(a.selected).filter("."+a.vertical).removeClass(a.opened);var e=this.$pnls.children("."+a.panel),n=e.first();this.$pnls.children("."+a.panel).not(n).removeClass(a.subopened).removeClass(a.opened).removeClass(a.current).removeClass(a.highest).addClass(a.hidden),this.openPanel(n)},togglePanel:function(e){var n=e.parent();n.hasClass(a.vertical)&&this[n.hasClass(a.opened)?"closePanel":"openPanel"](e)},getInstance:function(){return this},bind:function(e,n){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(n)},trigger:function(){var e=this,n=Array.prototype.slice.call(arguments),t=n.shift();if(this.cbck[t])for(var s=0,a=this.cbck[t].length;a>s;s++)this.cbck[t][s].apply(e,n)},_initMenu:function(){this.opts.offCanvas&&this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",a.mm(e(this).attr("id")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$pnls=e('<div class="'+a.panels+'" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.parent().addClass(a.wrapper);var n=[a.menu];this.opts.slidingSubmenus||n.push(a.vertical),this.opts.extensions=this.opts.extensions.length?"mm-"+this.opts.extensions.join(" mm-"):"",this.opts.extensions&&n.push(this.opts.extensions),this.$menu.addClass(n.join(" "))},_initPanels:function(n){var t=this,s=this.__findAddBack(n,"ul, ol");this.__refactorClass(s,this.conf.classNames.inset,"inset").addClass(a.nolistview+" "+a.nopanel),s.not("."+a.nolistview).addClass(a.listview);var r=this.__findAddBack(n,"."+a.listview).children();this.__refactorClass(r,this.conf.classNames.selected,"selected"),this.__refactorClass(r,this.conf.classNames.divider,"divider"),this.__refactorClass(r,this.conf.classNames.spacer,"spacer"),this.__refactorClass(this.__findAddBack(n,"."+this.conf.classNames.panel),this.conf.classNames.panel,"panel");var l=e(),d=n.add(n.find("."+a.panel)).add(this.__findAddBack(n,"."+a.listview).children().children(this.conf.panelNodetype)).not("."+a.nopanel);this.__refactorClass(d,this.conf.classNames.vertical,"vertical"),this.opts.slidingSubmenus||d.addClass(a.vertical),d.each(function(){var n=e(this),s=n;n.is("ul, ol")?(n.wrap('<div class="'+a.panel+'" />'),s=n.parent()):s.addClass(a.panel);var i=n.attr("id");n.removeAttr("id"),s.attr("id",i||t.__getUniqueId()),n.hasClass(a.vertical)&&(n.removeClass(t.conf.classNames.vertical),s.add(s.parent()).addClass(a.vertical)),l=l.add(s)});var o=e("."+a.panel,this.$menu);l.each(function(){var n=e(this),s=n.parent(),r=s.children("a, span").first();if(s.is("."+a.panels)||(s.data(i.sub,n),n.data(i.parent,s)),!s.children("."+a.next).length&&s.parent().is("."+a.listview)){var l=n.attr("id"),d=e('<a class="'+a.next+'" href="#'+l+'" data-target="#'+l+'" />').insertBefore(r);r.is("span")&&d.addClass(a.fullsubopen)}if(!n.children("."+a.navbar).length&&!s.hasClass(a.vertical)){if(s.parent().is("."+a.listview))var s=s.closest("."+a.panel);else var r=s.closest("."+a.panel).find('a[href="#'+n.attr("id")+'"]').first(),s=r.closest("."+a.panel);var o=e('<div class="'+a.navbar+'" />');if(s.length){var l=s.attr("id");switch(t.opts.navbar.titleLink){case"anchor":_url=r.attr("href");break;case"panel":case"parent":_url="#"+l;break;case"none":default:_url=!1}o.append('<a class="'+a.btn+" "+a.prev+'" href="#'+l+'" data-target="#'+l+'" />').append(e('<a class="'+a.title+'"'+(_url?' href="'+_url+'"':"")+" />").text(r.text())).prependTo(n),t.opts.navbar.add&&n.addClass(a.hasnavbar)}else t.opts.navbar.title&&(o.append('<a class="'+a.title+'">'+t.opts.navbar.title+"</a>").prependTo(n),t.opts.navbar.add&&n.addClass(a.hasnavbar))}});var c=this.__findAddBack(n,"."+a.listview).children("."+a.selected).removeClass(a.selected).last().addClass(a.selected);c.add(c.parentsUntil("."+a.menu,"li")).filter("."+a.vertical).addClass(a.opened).end().not("."+a.vertical).each(function(){e(this).parentsUntil("."+a.menu,"."+a.panel).not("."+a.vertical).first().addClass(a.opened).parentsUntil("."+a.menu,"."+a.panel).not("."+a.vertical).first().addClass(a.opened).addClass(a.subopened)}),c.children("."+a.panel).not("."+a.vertical).addClass(a.opened).parentsUntil("."+a.menu,"."+a.panel).not("."+a.vertical).first().addClass(a.opened).addClass(a.subopened);var h=o.filter("."+a.opened);return h.length||(h=l.first()),h.addClass(a.opened).last().addClass(a.current),l.not("."+a.vertical).not(h.last()).addClass(a.hidden).end().appendTo(this.$pnls),l},_initAnchors:function(){var n=this;l.$body.on(r.click+"-oncanvas","a[href]",function(s){var i=e(this),r=!1,l=n.$menu.find(i).length;for(var d in e[t].addons)if(r=e[t].addons[d].clickAnchor.call(n,i,l))break;if(!r&&l){var o=i.attr("href");if(o.length>1&&"#"==o.slice(0,1))try{var c=e(o,n.$menu);c.is("."+a.panel)&&(r=!0,n[i.parent().hasClass(a.vertical)?"togglePanel":"openPanel"](c))}catch(h){}}if(r&&s.preventDefault(),!r&&l&&i.is("."+a.listview+" > li > a")&&!i.is('[rel="external"]')&&!i.is('[target="_blank"]')){n.__valueOrFn(n.opts.onClick.setSelected,i)&&n.setSelected(e(s.target).parent());var p=n.__valueOrFn(n.opts.onClick.preventDefault,i,"#"==o.slice(0,1));p&&s.preventDefault(),n.__valueOrFn(n.opts.onClick.close,i,p)&&n.close()}})},_initAddons:function(){for(var n in e[t].addons)e[t].addons[n].add.call(this),e[t].addons[n].add=function(){};for(var n in e[t].addons)e[t].addons[n].setup.call(this)},__api:function(){var n=this,t={};return e.each(this._api,function(){var e=this;t[e]=function(){var s=n[e].apply(n,arguments);return"undefined"==typeof s?t:s}}),t},__valueOrFn:function(e,n,t){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof t?t:e},__refactorClass:function(e,n,t){return e.filter("."+n).removeClass(n).addClass(a[t])},__findAddBack:function(e,n){return e.find(n).add(e.filter(n))},__filterListItems:function(e){return e.not("."+a.divider).not("."+a.hidden)},__transitionend:function(e,n,t){var s=!1,a=function(){s||n.call(e[0]),s=!0};e.one(r.transitionend,a),e.one(r.webkitTransitionEnd,a),setTimeout(a,1.1*t)},__getUniqueId:function(){return a.mm(e[t].uniqueId++)}},e.fn[t]=function(s,a){return n(),s=e.extend(!0,{},e[t].defaults,s),a=e.extend(!0,{},e[t].configuration,a),this.each(function(){var n=e(this);if(!n.data(t)){var i=new e[t](n,s,a);n.data(t,i.__api())}})},e[t].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints,csstransitions:function(){if("undefined"!=typeof Modernizr&&"undefined"!=typeof Modernizr.csstransitions)return Modernizr.csstransitions;var e=document.body||document.documentElement,n=e.style,t="transition";if("string"==typeof n[t])return!0;var s=["Moz","webkit","Webkit","Khtml","O","ms"];t=t.charAt(0).toUpperCase()+t.substr(1);for(var a=0;a<s.length;a++)if("string"==typeof n[s[a]+t])return!0;return!1}()};var a,i,r,l}}(jQuery);
  /*
   * jQuery mmenu offCanvas addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(e){var t="mmenu",o="offCanvas";e[t].addons[o]={setup:function(){if(this.opts[o]){var s=this.opts[o],i=this.conf[o];a=e[t].glbl,this._api=e.merge(this._api,["open","close","setPage"]),("top"==s.position||"bottom"==s.position)&&(s.zposition="front"),"string"!=typeof i.pageSelector&&(i.pageSelector="> "+i.pageNodetype),a.$allMenus=(a.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[n.offcanvas];"left"!=s.position&&r.push(n.mm(s.position)),"back"!=s.zposition&&r.push(n.mm(s.zposition)),this.$menu.addClass(r.join(" ")).parent().removeClass(n.wrapper),this.setPage(a.$page),this._initBlocker(),this["_initWindow_"+o](),this.$menu[i.menuInjectMethod+"To"](i.menuWrapperSelector)}},add:function(){n=e[t]._c,s=e[t]._d,i=e[t]._e,n.add("offcanvas slideout blocking modal background opening blocker page"),s.add("style"),i.add("resize")},clickAnchor:function(e){if(!this.opts[o])return!1;var t=this.$menu.attr("id");if(t&&t.length&&(this.conf.clone&&(t=n.umm(t)),e.is('[href="#'+t+'"]')))return this.open(),!0;if(a.$page){var t=a.$page.first().attr("id");return t&&t.length&&e.is('[href="#'+t+'"]')?(this.close(),!0):!1}}},e[t].defaults[o]={position:"left",zposition:"back",blockUI:!0,moveBackground:!0},e[t].configuration[o]={pageNodetype:"div",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuWrapperSelector:"body",menuInjectMethod:"prepend"},e[t].prototype.open=function(){if(!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger("open")}},e[t].prototype._openSetup=function(){var t=this,r=this.opts[o];this.closeAllOthers(),a.$page.each(function(){e(this).data(s.style,e(this).attr("style")||"")}),a.$wndw.trigger(i.resize+"-"+o,[!0]);var p=[n.opened];r.blockUI&&p.push(n.blocking),"modal"==r.blockUI&&p.push(n.modal),r.moveBackground&&p.push(n.background),"left"!=r.position&&p.push(n.mm(this.opts[o].position)),"back"!=r.zposition&&p.push(n.mm(this.opts[o].zposition)),this.opts.extensions&&p.push(this.opts.extensions),a.$html.addClass(p.join(" ")),setTimeout(function(){t.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(n.current+" "+n.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(a.$page.first(),function(){e.trigger("opened")},this.conf.transitionDuration),a.$html.addClass(n.opening),this.trigger("opening")},e[t].prototype.close=function(){if(this.vars.opened){var t=this;this.__transitionend(a.$page.first(),function(){t.$menu.removeClass(n.current).removeClass(n.opened),a.$html.removeClass(n.opened).removeClass(n.blocking).removeClass(n.modal).removeClass(n.background).removeClass(n.mm(t.opts[o].position)).removeClass(n.mm(t.opts[o].zposition)),t.opts.extensions&&a.$html.removeClass(t.opts.extensions),a.$page.each(function(){e(this).attr("style",e(this).data(s.style))}),t.vars.opened=!1,t.trigger("closed")},this.conf.transitionDuration),a.$html.removeClass(n.opening),this.trigger("close"),this.trigger("closing")}},e[t].prototype.closeAllOthers=function(){a.$allMenus.not(this.$menu).each(function(){var o=e(this).data(t);o&&o.close&&o.close()})},e[t].prototype.setPage=function(t){var s=this,i=this.conf[o];t&&t.length||(t=a.$body.find(i.pageSelector),i.noPageSelector.length&&(t=t.not(i.noPageSelector.join(", "))),t.length>1&&i.wrapPageIfNeeded&&(t=t.wrapAll("<"+this.conf[o].pageNodetype+" />").parent())),t.each(function(){e(this).attr("id",e(this).attr("id")||s.__getUniqueId())}),t.addClass(n.page+" "+n.slideout),a.$page=t,this.trigger("setPage",t)},e[t].prototype["_initWindow_"+o]=function(){a.$wndw.off(i.keydown+"-"+o).on(i.keydown+"-"+o,function(e){return a.$html.hasClass(n.opened)&&9==e.keyCode?(e.preventDefault(),!1):void 0});var e=0;a.$wndw.off(i.resize+"-"+o).on(i.resize+"-"+o,function(t,o){if(1==a.$page.length&&(o||a.$html.hasClass(n.opened))){var s=a.$wndw.height();(o||s!=e)&&(e=s,a.$page.css("minHeight",s))}})},e[t].prototype._initBlocker=function(){var t=this;this.opts[o].blockUI&&(a.$blck||(a.$blck=e('<div id="'+n.blocker+'" class="'+n.slideout+'" />')),a.$blck.appendTo(a.$body).off(i.touchstart+"-"+o+" "+i.touchmove+"-"+o).on(i.touchstart+"-"+o+" "+i.touchmove+"-"+o,function(e){e.preventDefault(),e.stopPropagation(),a.$blck.trigger(i.mousedown+"-"+o)}).off(i.mousedown+"-"+o).on(i.mousedown+"-"+o,function(e){e.preventDefault(),a.$html.hasClass(n.modal)||(t.closeAllOthers(),t.close())}))};var n,s,i,a}(jQuery);
  /*
   * jQuery mmenu autoHeight addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(t){var e="mmenu",s="autoHeight";t[e].addons[s]={setup:function(){if(this.opts.offCanvas){switch(this.opts.offCanvas.position){case"left":case"right":return}var n=this,o=this.opts[s];if(this.conf[s],h=t[e].glbl,"boolean"==typeof o&&o&&(o={height:"auto"}),"object"!=typeof o&&(o={}),o=this.opts[s]=t.extend(!0,{},t[e].defaults[s],o),"auto"==o.height){this.$menu.addClass(i.autoheight);var u=function(t){var e=parseInt(this.$pnls.css("top"),10)||0;_bot=parseInt(this.$pnls.css("bottom"),10)||0,this.$menu.addClass(i.measureheight),t=t||this.$pnls.children("."+i.current),t.is("."+i.vertical)&&(t=t.parents("."+i.panel).not("."+i.vertical).first()),this.$menu.height(t.outerHeight()+e+_bot).removeClass(i.measureheight)};this.bind("update",u),this.bind("openPanel",u),this.bind("closePanel",u),this.bind("open",u),h.$wndw.off(a.resize+"-autoheight").on(a.resize+"-autoheight",function(){u.call(n)})}}},add:function(){i=t[e]._c,n=t[e]._d,a=t[e]._e,i.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(){}},t[e].defaults[s]={height:"default"};var i,n,a,h}(jQuery);
  /*
   * jQuery mmenu backButton addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(o){var t="mmenu",n="backButton";o[t].addons[n]={setup:function(){if(this.opts.offCanvas){var i=this,e=this.opts[n];if(this.conf[n],a=o[t].glbl,"boolean"==typeof e&&(e={close:e}),"object"!=typeof e&&(e={}),e=o.extend(!0,{},o[t].defaults[n],e),e.close){var c="#"+i.$menu.attr("id");this.bind("opened",function(){location.hash!=c&&history.pushState(null,document.title,c)}),o(window).on("popstate",function(o){a.$html.hasClass(s.opened)?(o.stopPropagation(),i.close()):location.hash==c&&(o.stopPropagation(),i.open())})}}},add:function(){return window.history&&window.history.pushState?(s=o[t]._c,i=o[t]._d,void(e=o[t]._e)):void(o[t].addons[n].setup=function(){})},clickAnchor:function(){}},o[t].defaults[n]={close:!1};var s,i,e,a}(jQuery);
  /*
   * jQuery mmenu counters addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(t){var n="mmenu",e="counters";t[n].addons[e]={setup:function(){var s=this,o=this.opts[e];this.conf[e],c=t[n].glbl,"boolean"==typeof o&&(o={add:o,update:o}),"object"!=typeof o&&(o={}),o=this.opts[e]=t.extend(!0,{},t[n].defaults[e],o),this.bind("init",function(n){this.__refactorClass(t("em",n),this.conf.classNames[e].counter,"counter")}),o.add&&this.bind("init",function(n){n.each(function(){var n=t(this).data(a.parent);n&&(n.children("em."+i.counter).length||n.prepend(t('<em class="'+i.counter+'" />')))})}),o.update&&this.bind("update",function(){this.$pnls.find("."+i.panel).each(function(){var n=t(this),e=n.data(a.parent);if(e){var c=e.children("em."+i.counter);c.length&&(n=n.children("."+i.listview),n.length&&c.html(s.__filterListItems(n.children()).length))}})})},add:function(){i=t[n]._c,a=t[n]._d,s=t[n]._e,i.add("counter search noresultsmsg")},clickAnchor:function(){}},t[n].defaults[e]={add:!1,update:!1},t[n].configuration.classNames[e]={counter:"Counter"};var i,a,s,c}(jQuery);
  /*
   * jQuery mmenu dividers addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(i){var e="mmenu",s="dividers";i[e].addons[s]={setup:function(){var n=this,a=this.opts[s];if(this.conf[s],l=i[e].glbl,"boolean"==typeof a&&(a={add:a,fixed:a}),"object"!=typeof a&&(a={}),a=this.opts[s]=i.extend(!0,{},i[e].defaults[s],a),this.bind("init",function(){this.__refactorClass(i("li",this.$menu),this.conf.classNames[s].collapsed,"collapsed")}),a.add&&this.bind("init",function(e){switch(a.addTo){case"panels":var s=e;break;default:var s=i(a.addTo,this.$pnls).filter("."+d.panel)}i("."+d.divider,s).remove(),s.find("."+d.listview).not("."+d.vertical).each(function(){var e="";n.__filterListItems(i(this).children()).each(function(){var s=i.trim(i(this).children("a, span").text()).slice(0,1).toLowerCase();s!=e&&s.length&&(e=s,i('<li class="'+d.divider+'">'+s+"</li>").insertBefore(this))})})}),a.collapse&&this.bind("init",function(e){i("."+d.divider,e).each(function(){var e=i(this),s=e.nextUntil("."+d.divider,"."+d.collapsed);s.length&&(e.children("."+d.subopen).length||(e.wrapInner("<span />"),e.prepend('<a href="#" class="'+d.subopen+" "+d.fullsubopen+'" />')))})}),a.fixed){var o=function(e){e=e||this.$pnls.children("."+d.current);var s=e.find("."+d.divider).not("."+d.hidden);if(s.length){this.$menu.addClass(d.hasdividers);var n=e.scrollTop()||0,t="";e.is(":visible")&&e.find("."+d.divider).not("."+d.hidden).each(function(){i(this).position().top+n<n+1&&(t=i(this).text())}),this.$fixeddivider.text(t)}else this.$menu.removeClass(d.hasdividers)};this.$fixeddivider=i('<ul class="'+d.listview+" "+d.fixeddivider+'"><li class="'+d.divider+'"></li></ul>').prependTo(this.$pnls).children(),this.bind("openPanel",o),this.bind("init",function(e){e.off(t.scroll+"-dividers "+t.touchmove+"-dividers").on(t.scroll+"-dividers "+t.touchmove+"-dividers",function(){o.call(n,i(this))})})}},add:function(){d=i[e]._c,n=i[e]._d,t=i[e]._e,d.add("collapsed uncollapsed fixeddivider hasdividers"),t.add("scroll")},clickAnchor:function(i,e){if(this.opts[s].collapse&&e){var n=i.parent();if(n.is("."+d.divider)){var t=n.nextUntil("."+d.divider,"."+d.collapsed);return n.toggleClass(d.opened),t[n.hasClass(d.opened)?"addClass":"removeClass"](d.uncollapsed),!0}}return!1}},i[e].defaults[s]={add:!1,addTo:"panels",fixed:!1,collapse:!1},i[e].configuration.classNames[s]={collapsed:"Collapsed"};var d,n,t,l}(jQuery);
  /*
   * jQuery mmenu dragOpen addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(e){function t(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}var n="mmenu",o="dragOpen";e[n].addons[o]={setup:function(){if(this.opts.offCanvas){var i=this,a=this.opts[o],p=this.conf[o];if(r=e[n].glbl,"boolean"==typeof a&&(a={open:a}),"object"!=typeof a&&(a={}),a=this.opts[o]=e.extend(!0,{},e[n].defaults[o],a),a.open){var d,f,c,u,h,l={},m=0,g=!1,v=!1,w=0,_=0;switch(this.opts.offCanvas.position){case"left":case"right":l.events="panleft panright",l.typeLower="x",l.typeUpper="X",v="width";break;case"top":case"bottom":l.events="panup pandown",l.typeLower="y",l.typeUpper="Y",v="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":l.negative=!0,u=function(e){e>=r.$wndw[v]()-a.maxStartPos&&(m=1)};break;default:l.negative=!1,u=function(e){e<=a.maxStartPos&&(m=1)}}switch(this.opts.offCanvas.position){case"left":l.open_dir="right",l.close_dir="left";break;case"right":l.open_dir="left",l.close_dir="right";break;case"top":l.open_dir="down",l.close_dir="up";break;case"bottom":l.open_dir="up",l.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":h=function(){return this.$menu};break;default:h=function(){return e("."+s.slideout)}}var b=this.__valueOrFn(a.pageNode,this.$menu,r.$page);"string"==typeof b&&(b=e(b));var y=new Hammer(b[0],a.vendors.hammer);y.on("panstart",function(e){u(e.center[l.typeLower]),r.$slideOutNodes=h(),g=l.open_dir}).on(l.events+" panend",function(e){m>0&&e.preventDefault()}).on(l.events,function(e){if(d=e["delta"+l.typeUpper],l.negative&&(d=-d),d!=w&&(g=d>=w?l.open_dir:l.close_dir),w=d,w>a.threshold&&1==m){if(r.$html.hasClass(s.opened))return;m=2,i._openSetup(),i.trigger("opening"),r.$html.addClass(s.dragging),_=t(r.$wndw[v]()*p[v].perc,p[v].min,p[v].max)}2==m&&(f=t(w,10,_)-("front"==i.opts.offCanvas.zposition?_:0),l.negative&&(f=-f),c="translate"+l.typeUpper+"("+f+"px )",r.$slideOutNodes.css({"-webkit-transform":"-webkit-"+c,transform:c}))}).on("panend",function(){2==m&&(r.$html.removeClass(s.dragging),r.$slideOutNodes.css("transform",""),i[g==l.open_dir?"_openFinish":"close"]()),m=0})}}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?void(e[n].addons[o].setup=function(){}):(s=e[n]._c,i=e[n]._d,a=e[n]._e,void s.add("dragging"))},clickAnchor:function(){}},e[n].defaults[o]={open:!1,maxStartPos:100,threshold:50,vendors:{hammer:{}}},e[n].configuration[o]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}};var s,i,a,r}(jQuery);
  /*
   * jQuery mmenu fixedElements addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(s){var i="mmenu",t="fixedElements";s[i].addons[t]={setup:function(){if(this.opts.offCanvas){var n=this.opts[t];this.conf[t],d=s[i].glbl,n=this.opts[t]=s.extend(!0,{},s[i].defaults[t],n);var a=function(s){var i=this.conf.classNames[t].fixed;this.__refactorClass(s.find("."+i),i,"slideout").appendTo(d.$body)};a.call(this,d.$page),this.bind("setPage",a)}},add:function(){n=s[i]._c,a=s[i]._d,e=s[i]._e,n.add("fixed")},clickAnchor:function(){}},s[i].configuration.classNames[t]={fixed:"Fixed"};var n,a,e,d}(jQuery);
  /*
   * jQuery mmenu iconPanels addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(e){var n="mmenu",i="iconPanels";e[n].addons[i]={setup:function(){var a=this,l=this.opts[i];if(this.conf[i],d=e[n].glbl,"boolean"==typeof l&&(l={add:l}),"number"==typeof l&&(l={add:!0,visible:l}),"object"!=typeof l&&(l={}),l=this.opts[i]=e.extend(!0,{},e[n].defaults[i],l),l.visible++,l.add){this.$menu.addClass(s.iconpanel);for(var t=[],o=0;o<=l.visible;o++)t.push(s.iconpanel+"-"+o);t=t.join(" ");var c=function(n){var i=a.$pnls.children("."+s.panel).removeClass(t),d=i.filter("."+s.subopened);d.removeClass(s.hidden).add(n).slice(-l.visible).each(function(n){e(this).addClass(s.iconpanel+"-"+n)})};this.bind("openPanel",c),this.bind("init",function(n){c.call(a,a.$pnls.children("."+s.current)),l.hideNavbars&&n.removeClass(s.hasnavbar),n.each(function(){e(this).children("."+s.subblocker).length||e(this).prepend('<a href="#'+e(this).closest("."+s.panel).attr("id")+'" class="'+s.subblocker+'" />')})})}},add:function(){s=e[n]._c,a=e[n]._d,l=e[n]._e,s.add("iconpanel subblocker")},clickAnchor:function(){}},e[n].defaults[i]={add:!1,visible:3,hideNavbars:!1};var s,a,l,d}(jQuery);
  /*
   * jQuery mmenu navbar addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(n){var a="mmenu",t="navbars";n[a].addons[t]={setup:function(){var r=this,s=this.opts[t],c=this.conf[t];if(i=n[a].glbl,"undefined"!=typeof s){s instanceof Array||(s=[s]);var d={};n.each(s,function(i){var o=s[i];"boolean"==typeof o&&o&&(o={}),"object"!=typeof o&&(o={}),"undefined"==typeof o.content&&(o.content=["prev","title"]),o.content instanceof Array||(o.content=[o.content]),o=n.extend(!0,{},r.opts.navbar,o);var l=o.position,h=o.height;"number"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),"bottom"!=l&&(l="top"),d[l]||(d[l]=0),d[l]++;var f=n("<div />").addClass(e.navbar+" "+e.navbar+"-"+l+" "+e.navbar+"-"+l+"-"+d[l]+" "+e.navbar+"-size-"+h);d[l]+=h-1;for(var v=0,p=o.content.length;p>v;v++){var u=n[a].addons[t][o.content[v]]||!1;u?u.call(r,f,o,c):(u=o.content[v],u instanceof n||(u=n(o.content[v])),u.each(function(){f.append(n(this))}))}var b=Math.ceil(f.children().not("."+e.btn).length/h);b>1&&f.addClass(e.navbar+"-content-"+b),f.children("."+e.btn).length&&f.addClass(e.hasbtns),f.prependTo(r.$menu)});for(var o in d)r.$menu.addClass(e.hasnavbar+"-"+o+"-"+d[o])}},add:function(){e=n[a]._c,r=n[a]._d,s=n[a]._e,e.add("close hasbtns")},clickAnchor:function(){}},n[a].configuration[t]={breadcrumbSeparator:"/"},n[a].configuration.classNames[t]={panelTitle:"Title",panelNext:"Next",panelPrev:"Prev"};var e,r,s,i}(jQuery),/*
   * jQuery mmenu navbar addon breadcrumbs content
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  function(n){var a="mmenu",t="navbars",e="breadcrumbs";n[a].addons[t][e]=function(t,e,r){var s=n[a]._c,i=n[a]._d;s.add("breadcrumbs separator"),t.append('<span class="'+s.breadcrumbs+'"></span>'),this.bind("init",function(a){a.removeClass(s.hasnavbar).each(function(){for(var a=[],t=n(this),e=n('<span class="'+s.breadcrumbs+'"></span>'),c=n(this).children().first(),d=!0;c&&c.length;){c.is("."+s.panel)||(c=c.closest("."+s.panel));var o=c.children("."+s.navbar).children("."+s.title).text();a.unshift(d?"<span>"+o+"</span>":'<a href="#'+c.attr("id")+'">'+o+"</a>"),d=!1,c=c.data(i.parent)}e.append(a.join('<span class="'+s.separator+'">'+r.breadcrumbSeparator+"</span>")).appendTo(t.children("."+s.navbar))})});var c=function(){var n=this.$pnls.children("."+s.current),a=t.find("."+s.breadcrumbs),e=n.children("."+s.navbar).children("."+s.breadcrumbs);a.html(e.html())};this.bind("openPanel",c),this.bind("init",c)}}(jQuery),/*
   * jQuery mmenu navbar addon close content
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  function(n){var a="mmenu",t="navbars",e="close";n[a].addons[t][e]=function(t){var e=n[a]._c,r=n[a].glbl;t.append('<a class="'+e.close+" "+e.btn+'" href="#"></a>');var s=function(n){t.find("."+e.close).attr("href","#"+n.attr("id"))};s.call(this,r.$page),this.bind("setPage",s)}}(jQuery),/*
   * jQuery mmenu navbar addon next content
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  function(n){var a="mmenu",t="navbars",e="next";n[a].addons[t][e]=function(e){var r=n[a]._c;e.append('<a class="'+r.next+" "+r.btn+'" href="#"></a>');var s=function(n){n=n||this.$pnls.children("."+r.current);var a=e.find("."+r.next),s=n.find("."+this.conf.classNames[t].panelNext),i=s.attr("href"),c=s.html();a[i?"attr":"removeAttr"]("href",i),a[i||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",s),this.bind("init",function(){s.call(this)})}}(jQuery),/*
   * jQuery mmenu navbar addon prev content
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  function(n){var a="mmenu",t="navbars",e="prev";n[a].addons[t][e]=function(e){var r=n[a]._c;e.append('<a class="'+r.prev+" "+r.btn+'" href="#"></a>'),this.bind("init",function(n){n.removeClass(r.hasnavbar)});var s=function(){var n=this.$pnls.children("."+r.current),a=e.find("."+r.prev),s=n.find("."+this.conf.classNames[t].panelPrev);s.length||(s=n.children("."+r.navbar).children("."+r.prev));var i=s.attr("href"),c=s.html();a[i?"attr":"removeAttr"]("href",i),a[i||c?"removeClass":"addClass"](r.hidden),a.html(c)};this.bind("openPanel",s),this.bind("init",s)}}(jQuery),/*
   * jQuery mmenu navbar addon searchfield content
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  function(n){var a="mmenu",t="navbars",e="searchfield";n[a].addons[t][e]=function(t){var e=n[a]._c,r=n('<div class="'+e.search+'" />').appendTo(t);"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=r}}(jQuery),/*
   * jQuery mmenu navbar addon title content
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  function(n){var a="mmenu",t="navbars",e="title";n[a].addons[t][e]=function(e,r){var s=n[a]._c;e.append('<a class="'+s.title+'"></a>');var i=function(n){n=n||this.$pnls.children("."+s.current);var a=e.find("."+s.title),i=n.find("."+this.conf.classNames[t].panelTitle);i.length||(i=n.children("."+s.navbar).children("."+s.title));var c=i.attr("href"),d=i.html()||r.title;a[c?"attr":"removeAttr"]("href",c),a[c||d?"removeClass":"addClass"](s.hidden),a.html(d)};this.bind("openPanel",i),this.bind("init",function(){i.call(this)})}}(jQuery);
  /*
   * jQuery mmenu searchfield addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",a="searchfield";e[n].addons[a]={setup:function(){var o=this,d=this.opts[a],c=this.conf[a];r=e[n].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[a]=e.extend(!0,{},e[n].defaults[a],d),this.bind("close",function(){this.$menu.find("."+l.search).find("input").blur()}),this.bind("init",function(n){if(d.add){switch(d.addTo){case"panels":var a=n;break;default:var a=e(d.addTo,this.$menu)}a.each(function(){var s=e(this);if(!s.is("."+l.panel)||!s.is("."+l.vertical)){if(!s.children("."+l.search).length){var n=c.form?"form":"div",a=e("<"+n+' class="'+l.search+'" />');if(c.form&&"object"==typeof c.form)for(var t in c.form)a.attr(t,c.form[t]);a.append('<input placeholder="'+d.placeholder+'" type="text" autocomplete="off" />'),s.hasClass(l.search)?s.replaceWith(a):s.prepend(a).addClass(l.hassearch)}if(d.noResults){var i=s.closest("."+l.panel).length;if(i||(s=o.$pnls.children("."+l.panel).first()),!s.children("."+l.noresultsmsg).length){var r=s.children("."+l.listview).first();e('<div class="'+l.noresultsmsg+'" />').append(d.noResults)[r.length?"insertAfter":"prependTo"](r.length?r:s)}}}}),d.search&&e("."+l.search,this.$menu).each(function(){var n=e(this),a=n.closest("."+l.panel).length;if(a)var r=n.closest("."+l.panel),c=r;else var r=e("."+l.panel,o.$menu),c=o.$menu;var h=n.children("input"),u=o.__findAddBack(r,"."+l.listview).children("li"),f=u.filter("."+l.divider),p=o.__filterListItems(u),v="> a",m=v+", > span",b=function(){var s=h.val().toLowerCase();r.scrollTop(0),p.add(f).addClass(l.hidden).find("."+l.fullsubopensearch).removeClass(l.fullsubopen).removeClass(l.fullsubopensearch),p.each(function(){var n=e(this),a=v;(d.showTextItems||d.showSubPanels&&n.find("."+l.next))&&(a=m),e(a,n).text().toLowerCase().indexOf(s)>-1&&n.add(n.prevAll("."+l.divider).first()).removeClass(l.hidden)}),d.showSubPanels&&r.each(function(){var s=e(this);o.__filterListItems(s.find("."+l.listview).children()).each(function(){var s=e(this),n=s.data(t.sub);s.removeClass(l.nosubresults),n&&n.find("."+l.listview).children().removeClass(l.hidden)})}),e(r.get().reverse()).each(function(s){var n=e(this),i=n.data(t.parent);i&&(o.__filterListItems(n.find("."+l.listview).children()).length?(i.hasClass(l.hidden)&&i.children("."+l.next).not("."+l.fullsubopen).addClass(l.fullsubopen).addClass(l.fullsubopensearch),i.removeClass(l.hidden).removeClass(l.nosubresults).prevAll("."+l.divider).first().removeClass(l.hidden)):a||(n.hasClass(l.opened)&&setTimeout(function(){o.openPanel(i.closest("."+l.panel))},1.5*(s+1)*o.conf.openingInterval),i.addClass(l.nosubresults)))}),c[p.not("."+l.hidden).length?"removeClass":"addClass"](l.noresults),this.update()};h.off(i.keyup+"-searchfield "+i.change+"-searchfield").on(i.keyup+"-searchfield",function(e){s(e.keyCode)||b.call(o)}).on(i.change+"-searchfield",function(){b.call(o)})})}})},add:function(){l=e[n]._c,t=e[n]._d,i=e[n]._e,l.add("search hassearch noresultsmsg noresults nosubresults fullsubopensearch"),i.add("change keyup")},clickAnchor:function(){}},e[n].defaults[a]={add:!1,addTo:"panels",search:!0,placeholder:"Search",noResults:"No results found.",showTextItems:!1,showSubPanels:!0},e[n].configuration[a]={form:!1};var l,t,i,r}(jQuery);
  /*
   * jQuery mmenu sectionIndexer addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(e){var a="mmenu",r="sectionIndexer";e[a].addons[r]={setup:function(){var i=this,d=this.opts[r];this.conf[r],t=e[a].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),d=this.opts[r]=e.extend(!0,{},e[a].defaults[r],d),this.bind("init",function(a){if(d.add){switch(d.addTo){case"panels":var r=a;break;default:var r=e(d.addTo,this.$menu).filter("."+n.panel)}r.find("."+n.divider).closest("."+n.panel).addClass(n.hasindexer)}if(!this.$indexer&&this.$pnls.children("."+n.hasindexer).length){this.$indexer=e('<div class="'+n.indexer+'" />').prependTo(this.$pnls).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(s.mouseover+"-sectionindexer "+n.touchstart+"-sectionindexer",function(){var a=e(this).attr("href").slice(1),r=i.$pnls.children("."+n.current),s=r.find("."+n.listview),t=!1,d=r.scrollTop(),h=s.position().top+parseInt(s.css("margin-top"),10)+parseInt(s.css("padding-top"),10)+d;r.scrollTop(0),s.children("."+n.divider).not("."+n.hidden).each(function(){t===!1&&a==e(this).text().slice(0,1).toLowerCase()&&(t=e(this).position().top+h)}),r.scrollTop(t!==!1?t:d)});var t=function(e){i.$menu[(e.hasClass(n.hasindexer)?"add":"remove")+"Class"](n.hasindexer)};this.bind("openPanel",t),t.call(this,this.$pnls.children("."+n.current))}})},add:function(){n=e[a]._c,i=e[a]._d,s=e[a]._e,n.add("indexer hasindexer"),s.add("mouseover touchstart")},clickAnchor:function(e){return e.parent().is("."+n.indexer)?!0:void 0}},e[a].defaults[r]={add:!1,addTo:"panels"};var n,i,s,t}(jQuery);
  /*	
   * jQuery mmenu toggles addon
   * mmenu.frebsite.nl
   *
   * Copyright (c) Fred Heusschen
   */
  !function(t){var e="mmenu",c="toggles";t[e].addons[c]={setup:function(){var n=this;this.opts[c],this.conf[c],l=t[e].glbl,this.bind("init",function(e){this.__refactorClass(t("input",e),this.conf.classNames[c].toggle,"toggle"),this.__refactorClass(t("input",e),this.conf.classNames[c].check,"check"),t("input."+s.toggle+", input."+s.check,e).each(function(){var e=t(this),c=e.closest("li"),i=e.hasClass(s.toggle)?"toggle":"check",l=e.attr("id")||n.__getUniqueId();c.children('label[for="'+l+'"]').length||(e.attr("id",l),c.prepend(e),t('<label for="'+l+'" class="'+s[i]+'"></label>').insertBefore(c.children("a, span").last()))})})},add:function(){s=t[e]._c,n=t[e]._d,i=t[e]._e,s.add("toggle check")},clickAnchor:function(){}},t[e].configuration.classNames[c]={toggle:"Toggle",check:"Check"};var s,n,i,l}(jQuery);
  /*global jQuery */
  /*jshint browser:true */
  /*!
   * FitVids 1.1
   *
   * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
   * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
   * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
   *
   */
  
  (function($) {
  
  	"use strict";
  
  	$.fn.fitVids = function(options) {
  		var settings = {
  			customSelector: null,
  			ignore        : null
  		};
  
  		if (!document.getElementById('fit-vids-style')) {
  			// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
  			var head = document.head || document.getElementsByTagName('head')[0];
  			var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
  			var div = document.createElement('div');
  			div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
  			head.appendChild(div.childNodes[1]);
  		}
  
  		if (options) {
  			$.extend(settings, options);
  		}
  
  		return this.each(function() {
  			var selectors = [
  				"iframe[src*='player.vimeo.com/']",
  				"iframe[src*='youtube.com/']",
  				"iframe[src*='youtu.be/']",
  				"iframe[src*='youtube-nocookie.com']",
  				"iframe[src*='kickstarter.com'][src*='video.html']",
  				"iframe[src*='blip.tv/']", // Problematic, empty space below video
  				"iframe[src*='dailymotion.com/']",
  				"iframe[src*='dai.ly/']",
  				"iframe[src*='flickr.com/']",
  				"iframe[src*='flic.kr/']",
  				"iframe[src*='smugmug.com/']",
  				"iframe[src*='hulu.com/']",
  				"iframe[src*='viddler.com/']",
  				"iframe[src*='revision3.com/']",
  				"iframe[src*='wordpress.tv/']",
  				"iframe[src*='funnyordie.com/']",
  				"iframe[src*='slideshare.net/']",
  				"iframe[src*='instagram.com/p/']",
  				"iframe[src*='instagr.am/p/']",
  				"iframe[src*='scribd.com/']",
  				"object",
  				"embed"
  			];
  
  			if (settings.customSelector) {
  				selectors.push(settings.customSelector);
  			}
  
  			var ignoreList = '.fitvidsignore';
  
  			if (settings.ignore) {
  				ignoreList = ignoreList + ', ' + settings.ignore;
  			}
  
  			var $allVideos = $(this).find(selectors.join(','));
  			$allVideos = $allVideos.not("object object"); // SwfObj conflict patch
  			$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
  
  			$allVideos.each(function() {
  				var $this = $(this);
  				if ($this.parents(ignoreList).length > 0) {
  					return; // Disable FitVids on this video.
  				}
  				if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) {
  					return;
  				}
  				if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) {
  					$this.attr('height', 9);
  					$this.attr('width', 16);
  				}
  				var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
  					width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
  					aspectRatio = height / width;
  				if (!$this.attr('id')) {
  					var videoID = 'fitvid' + Math.floor(Math.random() * 999999);
  					$this.attr('id', videoID);
  				}
  				$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100) + "%");
  				$this.removeAttr('height').removeAttr('width');
  			});
  		});
  	};
  // Works with either jQuery or Zepto
  })(window.jQuery || window.Zepto);
  /*! Magnific Popup - v1.0.0 - 2014-12-12
  * http://dimsemenov.com/plugins/magnific-popup/
  * Copyright (c) 2014 Dmitry Semenov; */
  ;(function (factory) { 
  if (typeof define === 'function' && define.amd) { 
   // AMD. Register as an anonymous module. 
   define(['jquery'], factory); 
   } else if (typeof exports === 'object') { 
   // Node/CommonJS 
   factory(require('jquery')); 
   } else { 
   // Browser globals 
   factory(window.jQuery || window.Zepto); 
   } 
   }(function($) { 
  
  /*>>core*/
  /**
   * 
   * Magnific Popup Core JS file
   * 
   */
  
  
  /**
   * Private static constants
   */
  var CLOSE_EVENT = 'Close',
  	BEFORE_CLOSE_EVENT = 'BeforeClose',
  	AFTER_CLOSE_EVENT = 'AfterClose',
  	BEFORE_APPEND_EVENT = 'BeforeAppend',
  	MARKUP_PARSE_EVENT = 'MarkupParse',
  	OPEN_EVENT = 'Open',
  	CHANGE_EVENT = 'Change',
  	NS = 'mfp',
  	EVENT_NS = '.' + NS,
  	READY_CLASS = 'mfp-ready',
  	REMOVING_CLASS = 'mfp-removing',
  	PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
  
  
  /**
   * Private vars 
   */
  var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
  	MagnificPopup = function(){},
  	_isJQ = !!(window.jQuery),
  	_prevStatus,
  	_window = $(window),
  	_body,
  	_document,
  	_prevContentType,
  	_wrapClasses,
  	_currPopupType;
  
  
  /**
   * Private functions
   */
  var _mfpOn = function(name, f) {
  		mfp.ev.on(NS + name + EVENT_NS, f);
  	},
  	_getEl = function(className, appendTo, html, raw) {
  		var el = document.createElement('div');
  		el.className = 'mfp-'+className;
  		if(html) {
  			el.innerHTML = html;
  		}
  		if(!raw) {
  			el = $(el);
  			if(appendTo) {
  				el.appendTo(appendTo);
  			}
  		} else if(appendTo) {
  			appendTo.appendChild(el);
  		}
  		return el;
  	},
  	_mfpTrigger = function(e, data) {
  		mfp.ev.triggerHandler(NS + e, data);
  
  		if(mfp.st.callbacks) {
  			// converts "mfpEventName" to "eventName" callback and triggers it if it's present
  			e = e.charAt(0).toLowerCase() + e.slice(1);
  			if(mfp.st.callbacks[e]) {
  				mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
  			}
  		}
  	},
  	_getCloseBtn = function(type) {
  		if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
  			mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
  			_currPopupType = type;
  		}
  		return mfp.currTemplate.closeBtn;
  	},
  	// Initialize Magnific Popup only when called at least once
  	_checkInstance = function() {
  		if(!$.magnificPopup.instance) {
  			mfp = new MagnificPopup();
  			mfp.init();
  			$.magnificPopup.instance = mfp;
  		}
  	},
  	// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
  	supportsTransitions = function() {
  		var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
  			v = ['ms','O','Moz','Webkit']; // 'v' for vendor
  
  		if( s['transition'] !== undefined ) {
  			return true; 
  		}
  			
  		while( v.length ) {
  			if( v.pop() + 'Transition' in s ) {
  				return true;
  			}
  		}
  				
  		return false;
  	};
  
  
  
  /**
   * Public functions
   */
  MagnificPopup.prototype = {
  
  	constructor: MagnificPopup,
  
  	/**
  	 * Initializes Magnific Popup plugin. 
  	 * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
  	 */
  	init: function() {
  		var appVersion = navigator.appVersion;
  		mfp.isIE7 = appVersion.indexOf("MSIE 7.") !== -1; 
  		mfp.isIE8 = appVersion.indexOf("MSIE 8.") !== -1;
  		mfp.isLowIE = mfp.isIE7 || mfp.isIE8;
  		mfp.isAndroid = (/android/gi).test(appVersion);
  		mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
  		mfp.supportsTransition = supportsTransitions();
  
  		// We disable fixed positioned lightbox on devices that don't handle it nicely.
  		// If you know a better way of detecting this - let me know.
  		mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
  		_document = $(document);
  
  		mfp.popupsCache = {};
  	},
  
  	/**
  	 * Opens popup
  	 * @param  data [description]
  	 */
  	open: function(data) {
  
  		if(!_body) {
  			_body = $(document.body);
  		}
  
  		var i;
  
  		if(data.isObj === false) { 
  			// convert jQuery collection to array to avoid conflicts later
  			mfp.items = data.items.toArray();
  
  			mfp.index = 0;
  			var items = data.items,
  				item;
  			for(i = 0; i < items.length; i++) {
  				item = items[i];
  				if(item.parsed) {
  					item = item.el[0];
  				}
  				if(item === data.el[0]) {
  					mfp.index = i;
  					break;
  				}
  			}
  		} else {
  			mfp.items = $.isArray(data.items) ? data.items : [data.items];
  			mfp.index = data.index || 0;
  		}
  
  		// if popup is already opened - we just update the content
  		if(mfp.isOpen) {
  			mfp.updateItemHTML();
  			return;
  		}
  		
  		mfp.types = []; 
  		_wrapClasses = '';
  		if(data.mainEl && data.mainEl.length) {
  			mfp.ev = data.mainEl.eq(0);
  		} else {
  			mfp.ev = _document;
  		}
  
  		if(data.key) {
  			if(!mfp.popupsCache[data.key]) {
  				mfp.popupsCache[data.key] = {};
  			}
  			mfp.currTemplate = mfp.popupsCache[data.key];
  		} else {
  			mfp.currTemplate = {};
  		}
  
  
  
  		mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); 
  		mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
  
  		if(mfp.st.modal) {
  			mfp.st.closeOnContentClick = false;
  			mfp.st.closeOnBgClick = false;
  			mfp.st.showCloseBtn = false;
  			mfp.st.enableEscapeKey = false;
  		}
  		
  
  		// Building markup
  		// main containers are created only once
  		if(!mfp.bgOverlay) {
  
  			// Dark overlay
  			mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
  				mfp.close();
  			});
  
  			mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
  				if(mfp._checkIfClose(e.target)) {
  					mfp.close();
  				}
  			});
  
  			mfp.container = _getEl('container', mfp.wrap);
  		}
  
  		mfp.contentContainer = _getEl('content');
  		if(mfp.st.preloader) {
  			mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
  		}
  
  
  		// Initializing modules
  		var modules = $.magnificPopup.modules;
  		for(i = 0; i < modules.length; i++) {
  			var n = modules[i];
  			n = n.charAt(0).toUpperCase() + n.slice(1);
  			mfp['init'+n].call(mfp);
  		}
  		_mfpTrigger('BeforeOpen');
  
  
  		if(mfp.st.showCloseBtn) {
  			// Close button
  			if(!mfp.st.closeBtnInside) {
  				mfp.wrap.append( _getCloseBtn() );
  			} else {
  				_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
  					values.close_replaceWith = _getCloseBtn(item.type);
  				});
  				_wrapClasses += ' mfp-close-btn-in';
  			}
  		}
  
  		if(mfp.st.alignTop) {
  			_wrapClasses += ' mfp-align-top';
  		}
  
  	
  
  		if(mfp.fixedContentPos) {
  			mfp.wrap.css({
  				overflow: mfp.st.overflowY,
  				overflowX: 'hidden',
  				overflowY: mfp.st.overflowY
  			});
  		} else {
  			mfp.wrap.css({ 
  				top: _window.scrollTop(),
  				position: 'absolute'
  			});
  		}
  		if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
  			mfp.bgOverlay.css({
  				height: _document.height(),
  				position: 'absolute'
  			});
  		}
  
  		
  
  		if(mfp.st.enableEscapeKey) {
  			// Close on ESC key
  			_document.on('keyup' + EVENT_NS, function(e) {
  				if(e.keyCode === 27) {
  					mfp.close();
  				}
  			});
  		}
  
  		_window.on('resize' + EVENT_NS, function() {
  			mfp.updateSize();
  		});
  
  
  		if(!mfp.st.closeOnContentClick) {
  			_wrapClasses += ' mfp-auto-cursor';
  		}
  		
  		if(_wrapClasses)
  			mfp.wrap.addClass(_wrapClasses);
  
  
  		// this triggers recalculation of layout, so we get it once to not to trigger twice
  		var windowHeight = mfp.wH = _window.height();
  
  		
  		var windowStyles = {};
  
  		if( mfp.fixedContentPos ) {
              if(mfp._hasScrollBar(windowHeight)){
                  var s = mfp._getScrollbarSize();
                  if(s) {
                      windowStyles.marginRight = s;
                  }
              }
          }
  
  		if(mfp.fixedContentPos) {
  			if(!mfp.isIE7) {
  				windowStyles.overflow = 'hidden';
  			} else {
  				// ie7 double-scroll bug
  				$('body, html').css('overflow', 'hidden');
  			}
  		}
  
  		
  		
  		var classesToadd = mfp.st.mainClass;
  		if(mfp.isIE7) {
  			classesToadd += ' mfp-ie7';
  		}
  		if(classesToadd) {
  			mfp._addClassToMFP( classesToadd );
  		}
  
  		// add content
  		mfp.updateItemHTML();
  
  		_mfpTrigger('BuildControls');
  
  		// remove scrollbar, add margin e.t.c
  		$('html').css(windowStyles);
  		
  		// add everything to DOM
  		mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || _body );
  
  		// Save last focused element
  		mfp._lastFocusedEl = document.activeElement;
  		
  		// Wait for next cycle to allow CSS transition
  		setTimeout(function() {
  			
  			if(mfp.content) {
  				mfp._addClassToMFP(READY_CLASS);
  				mfp._setFocus();
  			} else {
  				// if content is not defined (not loaded e.t.c) we add class only for BG
  				mfp.bgOverlay.addClass(READY_CLASS);
  			}
  			
  			// Trap the focus in popup
  			_document.on('focusin' + EVENT_NS, mfp._onFocusIn);
  
  		}, 16);
  
  		mfp.isOpen = true;
  		mfp.updateSize(windowHeight);
  		_mfpTrigger(OPEN_EVENT);
  
  		return data;
  	},
  
  	/**
  	 * Closes the popup
  	 */
  	close: function() {
  		if(!mfp.isOpen) return;
  		_mfpTrigger(BEFORE_CLOSE_EVENT);
  
  		mfp.isOpen = false;
  		// for CSS3 animation
  		if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition )  {
  			mfp._addClassToMFP(REMOVING_CLASS);
  			setTimeout(function() {
  				mfp._close();
  			}, mfp.st.removalDelay);
  		} else {
  			mfp._close();
  		}
  	},
  
  	/**
  	 * Helper for close() function
  	 */
  	_close: function() {
  		_mfpTrigger(CLOSE_EVENT);
  
  		var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
  
  		mfp.bgOverlay.detach();
  		mfp.wrap.detach();
  		mfp.container.empty();
  
  		if(mfp.st.mainClass) {
  			classesToRemove += mfp.st.mainClass + ' ';
  		}
  
  		mfp._removeClassFromMFP(classesToRemove);
  
  		if(mfp.fixedContentPos) {
  			var windowStyles = {marginRight: ''};
  			if(mfp.isIE7) {
  				$('body, html').css('overflow', '');
  			} else {
  				windowStyles.overflow = '';
  			}
  			$('html').css(windowStyles);
  		}
  		
  		_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
  		mfp.ev.off(EVENT_NS);
  
  		// clean up DOM elements that aren't removed
  		mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
  		mfp.bgOverlay.attr('class', 'mfp-bg');
  		mfp.container.attr('class', 'mfp-container');
  
  		// remove close button from target element
  		if(mfp.st.showCloseBtn &&
  		(!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
  			if(mfp.currTemplate.closeBtn)
  				mfp.currTemplate.closeBtn.detach();
  		}
  
  
  		if(mfp._lastFocusedEl) {
  			$(mfp._lastFocusedEl).focus(); // put tab focus back
  		}
  		mfp.currItem = null;	
  		mfp.content = null;
  		mfp.currTemplate = null;
  		mfp.prevHeight = 0;
  
  		_mfpTrigger(AFTER_CLOSE_EVENT);
  	},
  	
  	updateSize: function(winHeight) {
  
  		if(mfp.isIOS) {
  			// fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
  			var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
  			var height = window.innerHeight * zoomLevel;
  			mfp.wrap.css('height', height);
  			mfp.wH = height;
  		} else {
  			mfp.wH = winHeight || _window.height();
  		}
  		// Fixes #84: popup incorrectly positioned with position:relative on body
  		if(!mfp.fixedContentPos) {
  			mfp.wrap.css('height', mfp.wH);
  		}
  
  		_mfpTrigger('Resize');
  
  	},
  
  	/**
  	 * Set content of popup based on current index
  	 */
  	updateItemHTML: function() {
  		var item = mfp.items[mfp.index];
  
  		// Detach and perform modifications
  		mfp.contentContainer.detach();
  
  		if(mfp.content)
  			mfp.content.detach();
  
  		if(!item.parsed) {
  			item = mfp.parseEl( mfp.index );
  		}
  
  		var type = item.type;	
  
  		_mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
  		// BeforeChange event works like so:
  		// _mfpOn('BeforeChange', function(e, prevType, newType) { });
  		
  		mfp.currItem = item;
  
  		
  
  		
  
  		if(!mfp.currTemplate[type]) {
  			var markup = mfp.st[type] ? mfp.st[type].markup : false;
  
  			// allows to modify markup
  			_mfpTrigger('FirstMarkupParse', markup);
  
  			if(markup) {
  				mfp.currTemplate[type] = $(markup);
  			} else {
  				// if there is no markup found we just define that template is parsed
  				mfp.currTemplate[type] = true;
  			}
  		}
  
  		if(_prevContentType && _prevContentType !== item.type) {
  			mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
  		}
  		
  		var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
  		mfp.appendContent(newContent, type);
  
  		item.preloaded = true;
  
  		_mfpTrigger(CHANGE_EVENT, item);
  		_prevContentType = item.type;
  		
  		// Append container back after its content changed
  		mfp.container.prepend(mfp.contentContainer);
  
  		_mfpTrigger('AfterChange');
  	},
  
  
  	/**
  	 * Set HTML content of popup
  	 */
  	appendContent: function(newContent, type) {
  		mfp.content = newContent;
  		
  		if(newContent) {
  			if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
  				mfp.currTemplate[type] === true) {
  				// if there is no markup, we just append close button element inside
  				if(!mfp.content.find('.mfp-close').length) {
  					mfp.content.append(_getCloseBtn());
  				}
  			} else {
  				mfp.content = newContent;
  			}
  		} else {
  			mfp.content = '';
  		}
  
  		_mfpTrigger(BEFORE_APPEND_EVENT);
  		mfp.container.addClass('mfp-'+type+'-holder');
  
  		mfp.contentContainer.append(mfp.content);
  	},
  
  
  
  	
  	/**
  	 * Creates Magnific Popup data object based on given data
  	 * @param  {int} index Index of item to parse
  	 */
  	parseEl: function(index) {
  		var item = mfp.items[index],
  			type;
  
  		if(item.tagName) {
  			item = { el: $(item) };
  		} else {
  			type = item.type;
  			item = { data: item, src: item.src };
  		}
  
  		if(item.el) {
  			var types = mfp.types;
  
  			// check for 'mfp-TYPE' class
  			for(var i = 0; i < types.length; i++) {
  				if( item.el.hasClass('mfp-'+types[i]) ) {
  					type = types[i];
  					break;
  				}
  			}
  
  			item.src = item.el.attr('data-mfp-src');
  			if(!item.src) {
  				item.src = item.el.attr('href');
  			}
  		}
  
  		item.type = type || mfp.st.type || 'inline';
  		item.index = index;
  		item.parsed = true;
  		mfp.items[index] = item;
  		_mfpTrigger('ElementParse', item);
  
  		return mfp.items[index];
  	},
  
  
  	/**
  	 * Initializes single popup or a group of popups
  	 */
  	addGroup: function(el, options) {
  		var eHandler = function(e) {
  			e.mfpEl = this;
  			mfp._openClick(e, el, options);
  		};
  
  		if(!options) {
  			options = {};
  		} 
  
  		var eName = 'click.magnificPopup';
  		options.mainEl = el;
  		
  		if(options.items) {
  			options.isObj = true;
  			el.off(eName).on(eName, eHandler);
  		} else {
  			options.isObj = false;
  			if(options.delegate) {
  				el.off(eName).on(eName, options.delegate , eHandler);
  			} else {
  				options.items = el;
  				el.off(eName).on(eName, eHandler);
  			}
  		}
  	},
  	_openClick: function(e, el, options) {
  		var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
  
  
  		if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey ) ) {
  			return;
  		}
  
  		var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
  
  		if(disableOn) {
  			if($.isFunction(disableOn)) {
  				if( !disableOn.call(mfp) ) {
  					return true;
  				}
  			} else { // else it's number
  				if( _window.width() < disableOn ) {
  					return true;
  				}
  			}
  		}
  		
  		if(e.type) {
  			e.preventDefault();
  
  			// This will prevent popup from closing if element is inside and popup is already opened
  			if(mfp.isOpen) {
  				e.stopPropagation();
  			}
  		}
  			
  
  		options.el = $(e.mfpEl);
  		if(options.delegate) {
  			options.items = el.find(options.delegate);
  		}
  		mfp.open(options);
  	},
  
  
  	/**
  	 * Updates text on preloader
  	 */
  	updateStatus: function(status, text) {
  
  		if(mfp.preloader) {
  			if(_prevStatus !== status) {
  				mfp.container.removeClass('mfp-s-'+_prevStatus);
  			}
  
  			if(!text && status === 'loading') {
  				text = mfp.st.tLoading;
  			}
  
  			var data = {
  				status: status,
  				text: text
  			};
  			// allows to modify status
  			_mfpTrigger('UpdateStatus', data);
  
  			status = data.status;
  			text = data.text;
  
  			mfp.preloader.html(text);
  
  			mfp.preloader.find('a').on('click', function(e) {
  				e.stopImmediatePropagation();
  			});
  
  			mfp.container.addClass('mfp-s-'+status);
  			_prevStatus = status;
  		}
  	},
  
  
  	/*
  		"Private" helpers that aren't private at all
  	 */
  	// Check to close popup or not
  	// "target" is an element that was clicked
  	_checkIfClose: function(target) {
  
  		if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
  			return;
  		}
  
  		var closeOnContent = mfp.st.closeOnContentClick;
  		var closeOnBg = mfp.st.closeOnBgClick;
  
  		if(closeOnContent && closeOnBg) {
  			return true;
  		} else {
  
  			// We close the popup if click is on close button or on preloader. Or if there is no content.
  			if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
  				return true;
  			}
  
  			// if click is outside the content
  			if(  (target !== mfp.content[0] && !$.contains(mfp.content[0], target))  ) {
  				if(closeOnBg) {
  					// last check, if the clicked element is in DOM, (in case it's removed onclick)
  					if( $.contains(document, target) ) {
  						return true;
  					}
  				}
  			} else if(closeOnContent) {
  				return true;
  			}
  
  		}
  		return false;
  	},
  	_addClassToMFP: function(cName) {
  		mfp.bgOverlay.addClass(cName);
  		mfp.wrap.addClass(cName);
  	},
  	_removeClassFromMFP: function(cName) {
  		this.bgOverlay.removeClass(cName);
  		mfp.wrap.removeClass(cName);
  	},
  	_hasScrollBar: function(winHeight) {
  		return (  (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
  	},
  	_setFocus: function() {
  		(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
  	},
  	_onFocusIn: function(e) {
  		if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
  			mfp._setFocus();
  			return false;
  		}
  	},
  	_parseMarkup: function(template, values, item) {
  		var arr;
  		if(item.data) {
  			values = $.extend(item.data, values);
  		}
  		_mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
  
  		$.each(values, function(key, value) {
  			if(value === undefined || value === false) {
  				return true;
  			}
  			arr = key.split('_');
  			if(arr.length > 1) {
  				var el = template.find(EVENT_NS + '-'+arr[0]);
  
  				if(el.length > 0) {
  					var attr = arr[1];
  					if(attr === 'replaceWith') {
  						if(el[0] !== value[0]) {
  							el.replaceWith(value);
  						}
  					} else if(attr === 'img') {
  						if(el.is('img')) {
  							el.attr('src', value);
  						} else {
  							el.replaceWith( '<img src="'+value+'" class="' + el.attr('class') + '" />' );
  						}
  					} else {
  						el.attr(arr[1], value);
  					}
  				}
  
  			} else {
  				template.find(EVENT_NS + '-'+key).html(value);
  			}
  		});
  	},
  
  	_getScrollbarSize: function() {
  		// thx David
  		if(mfp.scrollbarSize === undefined) {
  			var scrollDiv = document.createElement("div");
  			scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
  			document.body.appendChild(scrollDiv);
  			mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
  			document.body.removeChild(scrollDiv);
  		}
  		return mfp.scrollbarSize;
  	}
  
  }; /* MagnificPopup core prototype end */
  
  
  
  
  /**
   * Public static functions
   */
  $.magnificPopup = {
  	instance: null,
  	proto: MagnificPopup.prototype,
  	modules: [],
  
  	open: function(options, index) {
  		_checkInstance();	
  
  		if(!options) {
  			options = {};
  		} else {
  			options = $.extend(true, {}, options);
  		}
  			
  
  		options.isObj = true;
  		options.index = index || 0;
  		return this.instance.open(options);
  	},
  
  	close: function() {
  		return $.magnificPopup.instance && $.magnificPopup.instance.close();
  	},
  
  	registerModule: function(name, module) {
  		if(module.options) {
  			$.magnificPopup.defaults[name] = module.options;
  		}
  		$.extend(this.proto, module.proto);			
  		this.modules.push(name);
  	},
  
  	defaults: {   
  
  		// Info about options is in docs:
  		// http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
  		
  		disableOn: 0,	
  
  		key: null,
  
  		midClick: false,
  
  		mainClass: '',
  
  		preloader: true,
  
  		focus: '', // CSS selector of input to focus after popup is opened
  		
  		closeOnContentClick: false,
  
  		closeOnBgClick: true,
  
  		closeBtnInside: true, 
  
  		showCloseBtn: true,
  
  		enableEscapeKey: true,
  
  		modal: false,
  
  		alignTop: false,
  	
  		removalDelay: 0,
  
  		prependTo: null,
  		
  		fixedContentPos: 'auto', 
  	
  		fixedBgPos: 'auto',
  
  		overflowY: 'auto',
  
  		closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
  
  		tClose: 'Close (Esc)',
  
  		tLoading: 'Loading...'
  
  	}
  };
  
  
  
  $.fn.magnificPopup = function(options) {
  	_checkInstance();
  
  	var jqEl = $(this);
  
  	// We call some API method of first param is a string
  	if (typeof options === "string" ) {
  
  		if(options === 'open') {
  			var items,
  				itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
  				index = parseInt(arguments[1], 10) || 0;
  
  			if(itemOpts.items) {
  				items = itemOpts.items[index];
  			} else {
  				items = jqEl;
  				if(itemOpts.delegate) {
  					items = items.find(itemOpts.delegate);
  				}
  				items = items.eq( index );
  			}
  			mfp._openClick({mfpEl:items}, jqEl, itemOpts);
  		} else {
  			if(mfp.isOpen)
  				mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
  		}
  
  	} else {
  		// clone options obj
  		options = $.extend(true, {}, options);
  		
  		/*
  		 * As Zepto doesn't support .data() method for objects 
  		 * and it works only in normal browsers
  		 * we assign "options" object directly to the DOM element. FTW!
  		 */
  		if(_isJQ) {
  			jqEl.data('magnificPopup', options);
  		} else {
  			jqEl[0].magnificPopup = options;
  		}
  
  		mfp.addGroup(jqEl, options);
  
  	}
  	return jqEl;
  };
  
  
  //Quick benchmark
  /*
  var start = performance.now(),
  	i,
  	rounds = 1000;
  
  for(i = 0; i < rounds; i++) {
  
  }
  console.log('Test #1:', performance.now() - start);
  
  start = performance.now();
  for(i = 0; i < rounds; i++) {
  
  }
  console.log('Test #2:', performance.now() - start);
  */
  
  
  /*>>core*/
  
  /*>>inline*/
  
  var INLINE_NS = 'inline',
  	_hiddenClass,
  	_inlinePlaceholder, 
  	_lastInlineElement,
  	_putInlineElementsBack = function() {
  		if(_lastInlineElement) {
  			_inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
  			_lastInlineElement = null;
  		}
  	};
  
  $.magnificPopup.registerModule(INLINE_NS, {
  	options: {
  		hiddenClass: 'hide', // will be appended with `mfp-` prefix
  		markup: '',
  		tNotFound: 'Content not found'
  	},
  	proto: {
  
  		initInline: function() {
  			mfp.types.push(INLINE_NS);
  
  			_mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
  				_putInlineElementsBack();
  			});
  		},
  
  		getInline: function(item, template) {
  
  			_putInlineElementsBack();
  
  			if(item.src) {
  				var inlineSt = mfp.st.inline,
  					el = $(item.src);
  
  				if(el.length) {
  
  					// If target element has parent - we replace it with placeholder and put it back after popup is closed
  					var parent = el[0].parentNode;
  					if(parent && parent.tagName) {
  						if(!_inlinePlaceholder) {
  							_hiddenClass = inlineSt.hiddenClass;
  							_inlinePlaceholder = _getEl(_hiddenClass);
  							_hiddenClass = 'mfp-'+_hiddenClass;
  						}
  						// replace target inline element with placeholder
  						_lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
  					}
  
  					mfp.updateStatus('ready');
  				} else {
  					mfp.updateStatus('error', inlineSt.tNotFound);
  					el = $('<div>');
  				}
  
  				item.inlineElement = el;
  				return el;
  			}
  
  			mfp.updateStatus('ready');
  			mfp._parseMarkup(template, {}, item);
  			return template;
  		}
  	}
  });
  
  /*>>inline*/
  
  /*>>ajax*/
  var AJAX_NS = 'ajax',
  	_ajaxCur,
  	_removeAjaxCursor = function() {
  		if(_ajaxCur) {
  			_body.removeClass(_ajaxCur);
  		}
  	},
  	_destroyAjaxRequest = function() {
  		_removeAjaxCursor();
  		if(mfp.req) {
  			mfp.req.abort();
  		}
  	};
  
  $.magnificPopup.registerModule(AJAX_NS, {
  
  	options: {
  		settings: null,
  		cursor: 'mfp-ajax-cur',
  		tError: '<a href="%url%">The content</a> could not be loaded.'
  	},
  
  	proto: {
  		initAjax: function() {
  			mfp.types.push(AJAX_NS);
  			_ajaxCur = mfp.st.ajax.cursor;
  
  			_mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
  			_mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
  		},
  		getAjax: function(item) {
  
  			if(_ajaxCur)
  				_body.addClass(_ajaxCur);
  
  			mfp.updateStatus('loading');
  
  			var opts = $.extend({
  				url: item.src,
  				success: function(data, textStatus, jqXHR) {
  					var temp = {
  						data:data,
  						xhr:jqXHR
  					};
  
  					_mfpTrigger('ParseAjax', temp);
  
  					mfp.appendContent( $(temp.data), AJAX_NS );
  
  					item.finished = true;
  
  					_removeAjaxCursor();
  
  					mfp._setFocus();
  
  					setTimeout(function() {
  						mfp.wrap.addClass(READY_CLASS);
  					}, 16);
  
  					mfp.updateStatus('ready');
  
  					_mfpTrigger('AjaxContentAdded');
  				},
  				error: function() {
  					_removeAjaxCursor();
  					item.finished = item.loadError = true;
  					mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
  				}
  			}, mfp.st.ajax.settings);
  
  			mfp.req = $.ajax(opts);
  
  			return '';
  		}
  	}
  });
  
  
  
  
  
  	
  
  /*>>ajax*/
  
  /*>>image*/
  var _imgInterval,
  	_getTitle = function(item) {
  		if(item.data && item.data.title !== undefined) 
  			return item.data.title;
  
  		var src = mfp.st.image.titleSrc;
  
  		if(src) {
  			if($.isFunction(src)) {
  				return src.call(mfp, item);
  			} else if(item.el) {
  				return item.el.attr(src) || '';
  			}
  		}
  		return '';
  	};
  
  $.magnificPopup.registerModule('image', {
  
  	options: {
  		markup: '<div class="mfp-figure">'+
  					'<div class="mfp-close"></div>'+
  					'<figure>'+
  						'<div class="mfp-img"></div>'+
  						'<figcaption>'+
  							'<div class="mfp-bottom-bar">'+
  								'<div class="mfp-title"></div>'+
  								'<div class="mfp-counter"></div>'+
  							'</div>'+
  						'</figcaption>'+
  					'</figure>'+
  				'</div>',
  		cursor: 'mfp-zoom-out-cur',
  		titleSrc: 'title', 
  		verticalFit: true,
  		tError: '<a href="%url%">The image</a> could not be loaded.'
  	},
  
  	proto: {
  		initImage: function() {
  			var imgSt = mfp.st.image,
  				ns = '.image';
  
  			mfp.types.push('image');
  
  			_mfpOn(OPEN_EVENT+ns, function() {
  				if(mfp.currItem.type === 'image' && imgSt.cursor) {
  					_body.addClass(imgSt.cursor);
  				}
  			});
  
  			_mfpOn(CLOSE_EVENT+ns, function() {
  				if(imgSt.cursor) {
  					_body.removeClass(imgSt.cursor);
  				}
  				_window.off('resize' + EVENT_NS);
  			});
  
  			_mfpOn('Resize'+ns, mfp.resizeImage);
  			if(mfp.isLowIE) {
  				_mfpOn('AfterChange', mfp.resizeImage);
  			}
  		},
  		resizeImage: function() {
  			var item = mfp.currItem;
  			if(!item || !item.img) return;
  
  			if(mfp.st.image.verticalFit) {
  				var decr = 0;
  				// fix box-sizing in ie7/8
  				if(mfp.isLowIE) {
  					decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
  				}
  				item.img.css('max-height', mfp.wH-decr);
  			}
  		},
  		_onImageHasSize: function(item) {
  			if(item.img) {
  				
  				item.hasSize = true;
  
  				if(_imgInterval) {
  					clearInterval(_imgInterval);
  				}
  				
  				item.isCheckingImgSize = false;
  
  				_mfpTrigger('ImageHasSize', item);
  
  				if(item.imgHidden) {
  					if(mfp.content)
  						mfp.content.removeClass('mfp-loading');
  					
  					item.imgHidden = false;
  				}
  
  			}
  		},
  
  		/**
  		 * Function that loops until the image has size to display elements that rely on it asap
  		 */
  		findImageSize: function(item) {
  
  			var counter = 0,
  				img = item.img[0],
  				mfpSetInterval = function(delay) {
  
  					if(_imgInterval) {
  						clearInterval(_imgInterval);
  					}
  					// decelerating interval that checks for size of an image
  					_imgInterval = setInterval(function() {
  						if(img.naturalWidth > 0) {
  							mfp._onImageHasSize(item);
  							return;
  						}
  
  						if(counter > 200) {
  							clearInterval(_imgInterval);
  						}
  
  						counter++;
  						if(counter === 3) {
  							mfpSetInterval(10);
  						} else if(counter === 40) {
  							mfpSetInterval(50);
  						} else if(counter === 100) {
  							mfpSetInterval(500);
  						}
  					}, delay);
  				};
  
  			mfpSetInterval(1);
  		},
  
  		getImage: function(item, template) {
  
  			var guard = 0,
  
  				// image load complete handler
  				onLoadComplete = function() {
  					if(item) {
  						if (item.img[0].complete) {
  							item.img.off('.mfploader');
  							
  							if(item === mfp.currItem){
  								mfp._onImageHasSize(item);
  
  								mfp.updateStatus('ready');
  							}
  
  							item.hasSize = true;
  							item.loaded = true;
  
  							_mfpTrigger('ImageLoadComplete');
  							
  						}
  						else {
  							// if image complete check fails 200 times (20 sec), we assume that there was an error.
  							guard++;
  							if(guard < 200) {
  								setTimeout(onLoadComplete,100);
  							} else {
  								onLoadError();
  							}
  						}
  					}
  				},
  
  				// image error handler
  				onLoadError = function() {
  					if(item) {
  						item.img.off('.mfploader');
  						if(item === mfp.currItem){
  							mfp._onImageHasSize(item);
  							mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
  						}
  
  						item.hasSize = true;
  						item.loaded = true;
  						item.loadError = true;
  					}
  				},
  				imgSt = mfp.st.image;
  
  
  			var el = template.find('.mfp-img');
  			if(el.length) {
  				var img = document.createElement('img');
  				img.className = 'mfp-img';
  				if(item.el && item.el.find('img').length) {
  					img.alt = item.el.find('img').attr('alt');
  				}
  				item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
  				img.src = item.src;
  
  				// without clone() "error" event is not firing when IMG is replaced by new IMG
  				// TODO: find a way to avoid such cloning
  				if(el.is('img')) {
  					item.img = item.img.clone();
  				}
  
  				img = item.img[0];
  				if(img.naturalWidth > 0) {
  					item.hasSize = true;
  				} else if(!img.width) {										
  					item.hasSize = false;
  				}
  			}
  
  			mfp._parseMarkup(template, {
  				title: _getTitle(item),
  				img_replaceWith: item.img
  			}, item);
  
  			mfp.resizeImage();
  
  			if(item.hasSize) {
  				if(_imgInterval) clearInterval(_imgInterval);
  
  				if(item.loadError) {
  					template.addClass('mfp-loading');
  					mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
  				} else {
  					template.removeClass('mfp-loading');
  					mfp.updateStatus('ready');
  				}
  				return template;
  			}
  
  			mfp.updateStatus('loading');
  			item.loading = true;
  
  			if(!item.hasSize) {
  				item.imgHidden = true;
  				template.addClass('mfp-loading');
  				mfp.findImageSize(item);
  			} 
  
  			return template;
  		}
  	}
  });
  
  
  
  /*>>image*/
  
  /*>>zoom*/
  var hasMozTransform,
  	getHasMozTransform = function() {
  		if(hasMozTransform === undefined) {
  			hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
  		}
  		return hasMozTransform;		
  	};
  
  $.magnificPopup.registerModule('zoom', {
  
  	options: {
  		enabled: false,
  		easing: 'ease-in-out',
  		duration: 300,
  		opener: function(element) {
  			return element.is('img') ? element : element.find('img');
  		}
  	},
  
  	proto: {
  
  		initZoom: function() {
  			var zoomSt = mfp.st.zoom,
  				ns = '.zoom',
  				image;
  				
  			if(!zoomSt.enabled || !mfp.supportsTransition) {
  				return;
  			}
  
  			var duration = zoomSt.duration,
  				getElToAnimate = function(image) {
  					var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
  						transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
  						cssObj = {
  							position: 'fixed',
  							zIndex: 9999,
  							left: 0,
  							top: 0,
  							'-webkit-backface-visibility': 'hidden'
  						},
  						t = 'transition';
  
  					cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
  
  					newImg.css(cssObj);
  					return newImg;
  				},
  				showMainContent = function() {
  					mfp.content.css('visibility', 'visible');
  				},
  				openTimeout,
  				animatedImg;
  
  			_mfpOn('BuildControls'+ns, function() {
  				if(mfp._allowZoom()) {
  
  					clearTimeout(openTimeout);
  					mfp.content.css('visibility', 'hidden');
  
  					// Basically, all code below does is clones existing image, puts in on top of the current one and animated it
  					
  					image = mfp._getItemToZoom();
  
  					if(!image) {
  						showMainContent();
  						return;
  					}
  
  					animatedImg = getElToAnimate(image); 
  					
  					animatedImg.css( mfp._getOffset() );
  
  					mfp.wrap.append(animatedImg);
  
  					openTimeout = setTimeout(function() {
  						animatedImg.css( mfp._getOffset( true ) );
  						openTimeout = setTimeout(function() {
  
  							showMainContent();
  
  							setTimeout(function() {
  								animatedImg.remove();
  								image = animatedImg = null;
  								_mfpTrigger('ZoomAnimationEnded');
  							}, 16); // avoid blink when switching images 
  
  						}, duration); // this timeout equals animation duration
  
  					}, 16); // by adding this timeout we avoid short glitch at the beginning of animation
  
  
  					// Lots of timeouts...
  				}
  			});
  			_mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
  				if(mfp._allowZoom()) {
  
  					clearTimeout(openTimeout);
  
  					mfp.st.removalDelay = duration;
  
  					if(!image) {
  						image = mfp._getItemToZoom();
  						if(!image) {
  							return;
  						}
  						animatedImg = getElToAnimate(image);
  					}
  					
  					
  					animatedImg.css( mfp._getOffset(true) );
  					mfp.wrap.append(animatedImg);
  					mfp.content.css('visibility', 'hidden');
  					
  					setTimeout(function() {
  						animatedImg.css( mfp._getOffset() );
  					}, 16);
  				}
  
  			});
  
  			_mfpOn(CLOSE_EVENT+ns, function() {
  				if(mfp._allowZoom()) {
  					showMainContent();
  					if(animatedImg) {
  						animatedImg.remove();
  					}
  					image = null;
  				}	
  			});
  		},
  
  		_allowZoom: function() {
  			return mfp.currItem.type === 'image';
  		},
  
  		_getItemToZoom: function() {
  			if(mfp.currItem.hasSize) {
  				return mfp.currItem.img;
  			} else {
  				return false;
  			}
  		},
  
  		// Get element postion relative to viewport
  		_getOffset: function(isLarge) {
  			var el;
  			if(isLarge) {
  				el = mfp.currItem.img;
  			} else {
  				el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
  			}
  
  			var offset = el.offset();
  			var paddingTop = parseInt(el.css('padding-top'),10);
  			var paddingBottom = parseInt(el.css('padding-bottom'),10);
  			offset.top -= ( $(window).scrollTop() - paddingTop );
  
  
  			/*
  			
  			Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
  
  			 */
  			var obj = {
  				width: el.width(),
  				// fix Zepto height+padding issue
  				height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
  			};
  
  			// I hate to do this, but there is no another option
  			if( getHasMozTransform() ) {
  				obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
  			} else {
  				obj.left = offset.left;
  				obj.top = offset.top;
  			}
  			return obj;
  		}
  
  	}
  });
  
  
  
  /*>>zoom*/
  
  /*>>iframe*/
  
  var IFRAME_NS = 'iframe',
  	_emptyPage = '//about:blank',
  	
  	_fixIframeBugs = function(isShowing) {
  		if(mfp.currTemplate[IFRAME_NS]) {
  			var el = mfp.currTemplate[IFRAME_NS].find('iframe');
  			if(el.length) { 
  				// reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
  				if(!isShowing) {
  					el[0].src = _emptyPage;
  				}
  
  				// IE8 black screen bug fix
  				if(mfp.isIE8) {
  					el.css('display', isShowing ? 'block' : 'none');
  				}
  			}
  		}
  	};
  
  $.magnificPopup.registerModule(IFRAME_NS, {
  
  	options: {
  		markup: '<div class="mfp-iframe-scaler">'+
  					'<div class="mfp-close"></div>'+
  					'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
  				'</div>',
  
  		srcAction: 'iframe_src',
  
  		// we don't care and support only one default type of URL by default
  		patterns: {
  			youtube: {
  				index: 'youtube.com', 
  				id: 'v=', 
  				src: '//www.youtube.com/embed/%id%?autoplay=1'
  			},
  			vimeo: {
  				index: 'vimeo.com/',
  				id: '/',
  				src: '//player.vimeo.com/video/%id%?autoplay=1'
  			},
  			gmaps: {
  				index: '//maps.google.',
  				src: '%id%&output=embed'
  			}
  		}
  	},
  
  	proto: {
  		initIframe: function() {
  			mfp.types.push(IFRAME_NS);
  
  			_mfpOn('BeforeChange', function(e, prevType, newType) {
  				if(prevType !== newType) {
  					if(prevType === IFRAME_NS) {
  						_fixIframeBugs(); // iframe if removed
  					} else if(newType === IFRAME_NS) {
  						_fixIframeBugs(true); // iframe is showing
  					} 
  				}// else {
  					// iframe source is switched, don't do anything
  				//}
  			});
  
  			_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
  				_fixIframeBugs();
  			});
  		},
  
  		getIframe: function(item, template) {
  			var embedSrc = item.src;
  			var iframeSt = mfp.st.iframe;
  				
  			$.each(iframeSt.patterns, function() {
  				if(embedSrc.indexOf( this.index ) > -1) {
  					if(this.id) {
  						if(typeof this.id === 'string') {
  							embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
  						} else {
  							embedSrc = this.id.call( this, embedSrc );
  						}
  					}
  					embedSrc = this.src.replace('%id%', embedSrc );
  					return false; // break;
  				}
  			});
  			
  			var dataObj = {};
  			if(iframeSt.srcAction) {
  				dataObj[iframeSt.srcAction] = embedSrc;
  			}
  			mfp._parseMarkup(template, dataObj, item);
  
  			mfp.updateStatus('ready');
  
  			return template;
  		}
  	}
  });
  
  
  
  /*>>iframe*/
  
  /*>>gallery*/
  /**
   * Get looped index depending on number of slides
   */
  var _getLoopedId = function(index) {
  		var numSlides = mfp.items.length;
  		if(index > numSlides - 1) {
  			return index - numSlides;
  		} else  if(index < 0) {
  			return numSlides + index;
  		}
  		return index;
  	},
  	_replaceCurrTotal = function(text, curr, total) {
  		return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
  	};
  
  $.magnificPopup.registerModule('gallery', {
  
  	options: {
  		enabled: false,
  		arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
  		preload: [0,2],
  		navigateByImgClick: true,
  		arrows: true,
  
  		tPrev: 'Previous (Left arrow key)',
  		tNext: 'Next (Right arrow key)',
  		tCounter: '%curr% of %total%'
  	},
  
  	proto: {
  		initGallery: function() {
  
  			var gSt = mfp.st.gallery,
  				ns = '.mfp-gallery',
  				supportsFastClick = Boolean($.fn.mfpFastClick);
  
  			mfp.direction = true; // true - next, false - prev
  			
  			if(!gSt || !gSt.enabled ) return false;
  
  			_wrapClasses += ' mfp-gallery';
  
  			_mfpOn(OPEN_EVENT+ns, function() {
  
  				if(gSt.navigateByImgClick) {
  					mfp.wrap.on('click'+ns, '.mfp-img', function() {
  						if(mfp.items.length > 1) {
  							mfp.next();
  							return false;
  						}
  					});
  				}
  
  				_document.on('keydown'+ns, function(e) {
  					if (e.keyCode === 37) {
  						mfp.prev();
  					} else if (e.keyCode === 39) {
  						mfp.next();
  					}
  				});
  			});
  
  			_mfpOn('UpdateStatus'+ns, function(e, data) {
  				if(data.text) {
  					data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
  				}
  			});
  
  			_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
  				var l = mfp.items.length;
  				values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
  			});
  
  			_mfpOn('BuildControls' + ns, function() {
  				if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
  					var markup = gSt.arrowMarkup,
  						arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),			
  						arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
  
  					var eName = supportsFastClick ? 'mfpFastClick' : 'click';
  					arrowLeft[eName](function() {
  						mfp.prev();
  					});			
  					arrowRight[eName](function() {
  						mfp.next();
  					});	
  
  					// Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)
  					if(mfp.isIE7) {
  						_getEl('b', arrowLeft[0], false, true);
  						_getEl('a', arrowLeft[0], false, true);
  						_getEl('b', arrowRight[0], false, true);
  						_getEl('a', arrowRight[0], false, true);
  					}
  
  					mfp.container.append(arrowLeft.add(arrowRight));
  				}
  			});
  
  			_mfpOn(CHANGE_EVENT+ns, function() {
  				if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
  
  				mfp._preloadTimeout = setTimeout(function() {
  					mfp.preloadNearbyImages();
  					mfp._preloadTimeout = null;
  				}, 16);		
  			});
  
  
  			_mfpOn(CLOSE_EVENT+ns, function() {
  				_document.off(ns);
  				mfp.wrap.off('click'+ns);
  			
  				if(mfp.arrowLeft && supportsFastClick) {
  					mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
  				}
  				mfp.arrowRight = mfp.arrowLeft = null;
  			});
  
  		}, 
  		next: function() {
  			mfp.direction = true;
  			mfp.index = _getLoopedId(mfp.index + 1);
  			mfp.updateItemHTML();
  		},
  		prev: function() {
  			mfp.direction = false;
  			mfp.index = _getLoopedId(mfp.index - 1);
  			mfp.updateItemHTML();
  		},
  		goTo: function(newIndex) {
  			mfp.direction = (newIndex >= mfp.index);
  			mfp.index = newIndex;
  			mfp.updateItemHTML();
  		},
  		preloadNearbyImages: function() {
  			var p = mfp.st.gallery.preload,
  				preloadBefore = Math.min(p[0], mfp.items.length),
  				preloadAfter = Math.min(p[1], mfp.items.length),
  				i;
  
  			for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
  				mfp._preloadItem(mfp.index+i);
  			}
  			for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
  				mfp._preloadItem(mfp.index-i);
  			}
  		},
  		_preloadItem: function(index) {
  			index = _getLoopedId(index);
  
  			if(mfp.items[index].preloaded) {
  				return;
  			}
  
  			var item = mfp.items[index];
  			if(!item.parsed) {
  				item = mfp.parseEl( index );
  			}
  
  			_mfpTrigger('LazyLoad', item);
  
  			if(item.type === 'image') {
  				item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
  					item.hasSize = true;
  				}).on('error.mfploader', function() {
  					item.hasSize = true;
  					item.loadError = true;
  					_mfpTrigger('LazyLoadError', item);
  				}).attr('src', item.src);
  			}
  
  
  			item.preloaded = true;
  		}
  	}
  });
  
  /*
  Touch Support that might be implemented some day
  
  addSwipeGesture: function() {
  	var startX,
  		moved,
  		multipleTouches;
  
  		return;
  
  	var namespace = '.mfp',
  		addEventNames = function(pref, down, move, up, cancel) {
  			mfp._tStart = pref + down + namespace;
  			mfp._tMove = pref + move + namespace;
  			mfp._tEnd = pref + up + namespace;
  			mfp._tCancel = pref + cancel + namespace;
  		};
  
  	if(window.navigator.msPointerEnabled) {
  		addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
  	} else if('ontouchstart' in window) {
  		addEventNames('touch', 'start', 'move', 'end', 'cancel');
  	} else {
  		return;
  	}
  	_window.on(mfp._tStart, function(e) {
  		var oE = e.originalEvent;
  		multipleTouches = moved = false;
  		startX = oE.pageX || oE.changedTouches[0].pageX;
  	}).on(mfp._tMove, function(e) {
  		if(e.originalEvent.touches.length > 1) {
  			multipleTouches = e.originalEvent.touches.length;
  		} else {
  			//e.preventDefault();
  			moved = true;
  		}
  	}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {
  		if(moved && !multipleTouches) {
  			var oE = e.originalEvent,
  				diff = startX - (oE.pageX || oE.changedTouches[0].pageX);
  
  			if(diff > 20) {
  				mfp.next();
  			} else if(diff < -20) {
  				mfp.prev();
  			}
  		}
  	});
  },
  */
  
  
  /*>>gallery*/
  
  /*>>retina*/
  
  var RETINA_NS = 'retina';
  
  $.magnificPopup.registerModule(RETINA_NS, {
  	options: {
  		replaceSrc: function(item) {
  			return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
  		},
  		ratio: 1 // Function or number.  Set to 1 to disable.
  	},
  	proto: {
  		initRetina: function() {
  			if(window.devicePixelRatio > 1) {
  
  				var st = mfp.st.retina,
  					ratio = st.ratio;
  
  				ratio = !isNaN(ratio) ? ratio : ratio();
  
  				if(ratio > 1) {
  					_mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
  						item.img.css({
  							'max-width': item.img[0].naturalWidth / ratio,
  							'width': '100%'
  						});
  					});
  					_mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
  						item.src = st.replaceSrc(item, ratio);
  					});
  				}
  			}
  
  		}
  	}
  });
  
  /*>>retina*/
  
  /*>>fastclick*/
  /**
   * FastClick event implementation. (removes 300ms delay on touch devices)
   * Based on https://developers.google.com/mobile/articles/fast_buttons
   *
   * You may use it outside the Magnific Popup by calling just:
   *
   * $('.your-el').mfpFastClick(function() {
   *     console.log('Clicked!');
   * });
   *
   * To unbind:
   * $('.your-el').destroyMfpFastClick();
   * 
   * 
   * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
   * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick
   * 
   */
  
  (function() {
  	var ghostClickDelay = 1000,
  		supportsTouch = 'ontouchstart' in window,
  		unbindTouchMove = function() {
  			_window.off('touchmove'+ns+' touchend'+ns);
  		},
  		eName = 'mfpFastClick',
  		ns = '.'+eName;
  
  
  	// As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way
  	$.fn.mfpFastClick = function(callback) {
  
  		return $(this).each(function() {
  
  			var elem = $(this),
  				lock;
  
  			if( supportsTouch ) {
  
  				var timeout,
  					startX,
  					startY,
  					pointerMoved,
  					point,
  					numPointers;
  
  				elem.on('touchstart' + ns, function(e) {
  					pointerMoved = false;
  					numPointers = 1;
  
  					point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];
  					startX = point.clientX;
  					startY = point.clientY;
  
  					_window.on('touchmove'+ns, function(e) {
  						point = e.originalEvent ? e.originalEvent.touches : e.touches;
  						numPointers = point.length;
  						point = point[0];
  						if (Math.abs(point.clientX - startX) > 10 ||
  							Math.abs(point.clientY - startY) > 10) {
  							pointerMoved = true;
  							unbindTouchMove();
  						}
  					}).on('touchend'+ns, function(e) {
  						unbindTouchMove();
  						if(pointerMoved || numPointers > 1) {
  							return;
  						}
  						lock = true;
  						e.preventDefault();
  						clearTimeout(timeout);
  						timeout = setTimeout(function() {
  							lock = false;
  						}, ghostClickDelay);
  						callback();
  					});
  				});
  
  			}
  
  			elem.on('click' + ns, function() {
  				if(!lock) {
  					callback();
  				}
  			});
  		});
  	};
  
  	$.fn.destroyMfpFastClick = function() {
  		$(this).off('touchstart' + ns + ' click' + ns);
  		if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);
  	};
  })();
  
  /*>>fastclick*/
   _checkInstance(); }));
  /*
       _ _      _       _
   ___| (_) ___| | __  (_)___
  / __| | |/ __| |/ /  | / __|
  \__ \ | | (__|   < _ | \__ \
  |___/_|_|\___|_|\_(_)/ |___/
                     |__/
  
   Version: 1.6.0
    Author: Ken Wheeler
   Website: http://kenwheeler.github.io
      Docs: http://kenwheeler.github.io/slick
      Repo: http://github.com/kenwheeler/slick
    Issues: http://github.com/kenwheeler/slick/issues
  
   */
  /* global window, document, define, jQuery, setInterval, clearInterval */
  (function(factory) {
      'use strict';
      if (typeof define === 'function' && define.amd) {
          define(['jquery'], factory);
      } else if (typeof exports !== 'undefined') {
          module.exports = factory(require('jquery'));
      } else {
          factory(jQuery);
      }
  
  }(function($) {
      'use strict';
      var Slick = window.Slick || {};
  
      Slick = (function() {
  
          var instanceUid = 0;
  
          function Slick(element, settings) {
  
              var _ = this, dataSettings;
  
              _.defaults = {
                  accessibility: true,
                  adaptiveHeight: false,
                  appendArrows: $(element),
                  appendDots: $(element),
                  arrows: true,
                  asNavFor: null,
                  prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
                  nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
                  autoplay: false,
                  autoplaySpeed: 3000,
                  centerMode: false,
                  centerPadding: '50px',
                  cssEase: 'ease',
                  customPaging: function(slider, i) {
                      return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
                  },
                  dots: false,
                  dotsClass: 'slick-dots',
                  draggable: true,
                  easing: 'linear',
                  edgeFriction: 0.35,
                  fade: false,
                  focusOnSelect: false,
                  infinite: true,
                  initialSlide: 0,
                  lazyLoad: 'ondemand',
                  mobileFirst: false,
                  pauseOnHover: true,
                  pauseOnFocus: true,
                  pauseOnDotsHover: false,
                  respondTo: 'window',
                  responsive: null,
                  rows: 1,
                  rtl: false,
                  slide: '',
                  slidesPerRow: 1,
                  slidesToShow: 1,
                  slidesToScroll: 1,
                  speed: 500,
                  swipe: true,
                  swipeToSlide: false,
                  touchMove: true,
                  touchThreshold: 5,
                  useCSS: true,
                  useTransform: true,
                  variableWidth: false,
                  vertical: false,
                  verticalSwiping: false,
                  waitForAnimate: true,
                  zIndex: 1000
              };
  
              _.initials = {
                  animating: false,
                  dragging: false,
                  autoPlayTimer: null,
                  currentDirection: 0,
                  currentLeft: null,
                  currentSlide: 0,
                  direction: 1,
                  $dots: null,
                  listWidth: null,
                  listHeight: null,
                  loadIndex: 0,
                  $nextArrow: null,
                  $prevArrow: null,
                  slideCount: null,
                  slideWidth: null,
                  $slideTrack: null,
                  $slides: null,
                  sliding: false,
                  slideOffset: 0,
                  swipeLeft: null,
                  $list: null,
                  touchObject: {},
                  transformsEnabled: false,
                  unslicked: false
              };
  
              $.extend(_, _.initials);
  
              _.activeBreakpoint = null;
              _.animType = null;
              _.animProp = null;
              _.breakpoints = [];
              _.breakpointSettings = [];
              _.cssTransitions = false;
              _.focussed = false;
              _.interrupted = false;
              _.hidden = 'hidden';
              _.paused = true;
              _.positionProp = null;
              _.respondTo = null;
              _.rowCount = 1;
              _.shouldClick = true;
              _.$slider = $(element);
              _.$slidesCache = null;
              _.transformType = null;
              _.transitionType = null;
              _.visibilityChange = 'visibilitychange';
              _.windowWidth = 0;
              _.windowTimer = null;
  
              dataSettings = $(element).data('slick') || {};
  
              _.options = $.extend({}, _.defaults, settings, dataSettings);
  
              _.currentSlide = _.options.initialSlide;
  
              _.originalSettings = _.options;
  
              if (typeof document.mozHidden !== 'undefined') {
                  _.hidden = 'mozHidden';
                  _.visibilityChange = 'mozvisibilitychange';
              } else if (typeof document.webkitHidden !== 'undefined') {
                  _.hidden = 'webkitHidden';
                  _.visibilityChange = 'webkitvisibilitychange';
              }
  
              _.autoPlay = $.proxy(_.autoPlay, _);
              _.autoPlayClear = $.proxy(_.autoPlayClear, _);
              _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
              _.changeSlide = $.proxy(_.changeSlide, _);
              _.clickHandler = $.proxy(_.clickHandler, _);
              _.selectHandler = $.proxy(_.selectHandler, _);
              _.setPosition = $.proxy(_.setPosition, _);
              _.swipeHandler = $.proxy(_.swipeHandler, _);
              _.dragHandler = $.proxy(_.dragHandler, _);
              _.keyHandler = $.proxy(_.keyHandler, _);
  
              _.instanceUid = instanceUid++;
  
              // A simple way to check for HTML strings
              // Strict HTML recognition (must start with <)
              // Extracted from jQuery v1.11 source
              _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
  
  
              _.registerBreakpoints();
              _.init(true);
  
          }
  
          return Slick;
  
      }());
  
      Slick.prototype.activateADA = function() {
          var _ = this;
  
          _.$slideTrack.find('.slick-active').attr({
              'aria-hidden': 'false'
          }).find('a, input, button, select').attr({
              'tabindex': '0'
          });
  
      };
  
      Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
  
          var _ = this;
  
          if (typeof(index) === 'boolean') {
              addBefore = index;
              index = null;
          } else if (index < 0 || (index >= _.slideCount)) {
              return false;
          }
  
          _.unload();
  
          if (typeof(index) === 'number') {
              if (index === 0 && _.$slides.length === 0) {
                  $(markup).appendTo(_.$slideTrack);
              } else if (addBefore) {
                  $(markup).insertBefore(_.$slides.eq(index));
              } else {
                  $(markup).insertAfter(_.$slides.eq(index));
              }
          } else {
              if (addBefore === true) {
                  $(markup).prependTo(_.$slideTrack);
              } else {
                  $(markup).appendTo(_.$slideTrack);
              }
          }
  
          _.$slides = _.$slideTrack.children(this.options.slide);
  
          _.$slideTrack.children(this.options.slide).detach();
  
          _.$slideTrack.append(_.$slides);
  
          _.$slides.each(function(index, element) {
              $(element).attr('data-slick-index', index);
          });
  
          _.$slidesCache = _.$slides;
  
          _.reinit();
  
      };
  
      Slick.prototype.animateHeight = function() {
          var _ = this;
          if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
              var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
              _.$list.animate({
                  height: targetHeight
              }, _.options.speed);
          }
      };
  
      Slick.prototype.animateSlide = function(targetLeft, callback) {
  
          var animProps = {},
              _ = this;
  
          _.animateHeight();
  
          if (_.options.rtl === true && _.options.vertical === false) {
              targetLeft = -targetLeft;
          }
          if (_.transformsEnabled === false) {
              if (_.options.vertical === false) {
                  _.$slideTrack.animate({
                      left: targetLeft
                  }, _.options.speed, _.options.easing, callback);
              } else {
                  _.$slideTrack.animate({
                      top: targetLeft
                  }, _.options.speed, _.options.easing, callback);
              }
  
          } else {
  
              if (_.cssTransitions === false) {
                  if (_.options.rtl === true) {
                      _.currentLeft = -(_.currentLeft);
                  }
                  $({
                      animStart: _.currentLeft
                  }).animate({
                      animStart: targetLeft
                  }, {
                      duration: _.options.speed,
                      easing: _.options.easing,
                      step: function(now) {
                          now = Math.ceil(now);
                          if (_.options.vertical === false) {
                              animProps[_.animType] = 'translate(' +
                                  now + 'px, 0px)';
                              _.$slideTrack.css(animProps);
                          } else {
                              animProps[_.animType] = 'translate(0px,' +
                                  now + 'px)';
                              _.$slideTrack.css(animProps);
                          }
                      },
                      complete: function() {
                          if (callback) {
                              callback.call();
                          }
                      }
                  });
  
              } else {
  
                  _.applyTransition();
                  targetLeft = Math.ceil(targetLeft);
  
                  if (_.options.vertical === false) {
                      animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
                  } else {
                      animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
                  }
                  _.$slideTrack.css(animProps);
  
                  if (callback) {
                      setTimeout(function() {
  
                          _.disableTransition();
  
                          callback.call();
                      }, _.options.speed);
                  }
  
              }
  
          }
  
      };
  
      Slick.prototype.getNavTarget = function() {
  
          var _ = this,
              asNavFor = _.options.asNavFor;
  
          if ( asNavFor && asNavFor !== null ) {
              asNavFor = $(asNavFor).not(_.$slider);
          }
  
          return asNavFor;
  
      };
  
      Slick.prototype.asNavFor = function(index) {
  
          var _ = this,
              asNavFor = _.getNavTarget();
  
          if ( asNavFor !== null && typeof asNavFor === 'object' ) {
              asNavFor.each(function() {
                  var target = $(this).slick('getSlick');
                  if(!target.unslicked) {
                      target.slideHandler(index, true);
                  }
              });
          }
  
      };
  
      Slick.prototype.applyTransition = function(slide) {
  
          var _ = this,
              transition = {};
  
          if (_.options.fade === false) {
              transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
          } else {
              transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
          }
  
          if (_.options.fade === false) {
              _.$slideTrack.css(transition);
          } else {
              _.$slides.eq(slide).css(transition);
          }
  
      };
  
      Slick.prototype.autoPlay = function() {
  
          var _ = this;
  
          _.autoPlayClear();
  
          if ( _.slideCount > _.options.slidesToShow ) {
              _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
          }
  
      };
  
      Slick.prototype.autoPlayClear = function() {
  
          var _ = this;
  
          if (_.autoPlayTimer) {
              clearInterval(_.autoPlayTimer);
          }
  
      };
  
      Slick.prototype.autoPlayIterator = function() {
  
          var _ = this,
              slideTo = _.currentSlide + _.options.slidesToScroll;
  
          if ( !_.paused && !_.interrupted && !_.focussed ) {
  
              if ( _.options.infinite === false ) {
  
                  if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
                      _.direction = 0;
                  }
  
                  else if ( _.direction === 0 ) {
  
                      slideTo = _.currentSlide - _.options.slidesToScroll;
  
                      if ( _.currentSlide - 1 === 0 ) {
                          _.direction = 1;
                      }
  
                  }
  
              }
  
              _.slideHandler( slideTo );
  
          }
  
      };
  
      Slick.prototype.buildArrows = function() {
  
          var _ = this;
  
          if (_.options.arrows === true ) {
  
              _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
              _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
  
              if( _.slideCount > _.options.slidesToShow ) {
  
                  _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
                  _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
  
                  if (_.htmlExpr.test(_.options.prevArrow)) {
                      _.$prevArrow.prependTo(_.options.appendArrows);
                  }
  
                  if (_.htmlExpr.test(_.options.nextArrow)) {
                      _.$nextArrow.appendTo(_.options.appendArrows);
                  }
  
                  if (_.options.infinite !== true) {
                      _.$prevArrow
                          .addClass('slick-disabled')
                          .attr('aria-disabled', 'true');
                  }
  
              } else {
  
                  _.$prevArrow.add( _.$nextArrow )
  
                      .addClass('slick-hidden')
                      .attr({
                          'aria-disabled': 'true',
                          'tabindex': '-1'
                      });
  
              }
  
          }
  
      };
  
      Slick.prototype.buildDots = function() {
  
          var _ = this,
              i, dot;
  
          if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
  
              _.$slider.addClass('slick-dotted');
  
              dot = $('<ul />').addClass(_.options.dotsClass);
  
              for (i = 0; i <= _.getDotCount(); i += 1) {
                  dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
              }
  
              _.$dots = dot.appendTo(_.options.appendDots);
  
              _.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');
  
          }
  
      };
  
      Slick.prototype.buildOut = function() {
  
          var _ = this;
  
          _.$slides =
              _.$slider
                  .children( _.options.slide + ':not(.slick-cloned)')
                  .addClass('slick-slide');
  
          _.slideCount = _.$slides.length;
  
          _.$slides.each(function(index, element) {
              $(element)
                  .attr('data-slick-index', index)
                  .data('originalStyling', $(element).attr('style') || '');
          });
  
          _.$slider.addClass('slick-slider');
  
          _.$slideTrack = (_.slideCount === 0) ?
              $('<div class="slick-track"/>').appendTo(_.$slider) :
              _.$slides.wrapAll('<div class="slick-track"/>').parent();
  
          _.$list = _.$slideTrack.wrap(
              '<div aria-live="polite" class="slick-list"/>').parent();
          _.$slideTrack.css('opacity', 0);
  
          if (_.options.centerMode === true || _.options.swipeToSlide === true) {
              _.options.slidesToScroll = 1;
          }
  
          $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
  
          _.setupInfinite();
  
          _.buildArrows();
  
          _.buildDots();
  
          _.updateDots();
  
  
          _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
  
          if (_.options.draggable === true) {
              _.$list.addClass('draggable');
          }
  
      };
  
      Slick.prototype.buildRows = function() {
  
          var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
  
          newSlides = document.createDocumentFragment();
          originalSlides = _.$slider.children();
  
          if(_.options.rows > 1) {
  
              slidesPerSection = _.options.slidesPerRow * _.options.rows;
              numOfSlides = Math.ceil(
                  originalSlides.length / slidesPerSection
              );
  
              for(a = 0; a < numOfSlides; a++){
                  var slide = document.createElement('div');
                  for(b = 0; b < _.options.rows; b++) {
                      var row = document.createElement('div');
                      for(c = 0; c < _.options.slidesPerRow; c++) {
                          var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
                          if (originalSlides.get(target)) {
                              row.appendChild(originalSlides.get(target));
                          }
                      }
                      slide.appendChild(row);
                  }
                  newSlides.appendChild(slide);
              }
  
              _.$slider.empty().append(newSlides);
              _.$slider.children().children().children()
                  .css({
                      'width':(100 / _.options.slidesPerRow) + '%',
                      'display': 'inline-block'
                  });
  
          }
  
      };
  
      Slick.prototype.checkResponsive = function(initial, forceUpdate) {
  
          var _ = this,
              breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
          var sliderWidth = _.$slider.width();
          var windowWidth = window.innerWidth || $(window).width();
  
          if (_.respondTo === 'window') {
              respondToWidth = windowWidth;
          } else if (_.respondTo === 'slider') {
              respondToWidth = sliderWidth;
          } else if (_.respondTo === 'min') {
              respondToWidth = Math.min(windowWidth, sliderWidth);
          }
  
          if ( _.options.responsive &&
              _.options.responsive.length &&
              _.options.responsive !== null) {
  
              targetBreakpoint = null;
  
              for (breakpoint in _.breakpoints) {
                  if (_.breakpoints.hasOwnProperty(breakpoint)) {
                      if (_.originalSettings.mobileFirst === false) {
                          if (respondToWidth < _.breakpoints[breakpoint]) {
                              targetBreakpoint = _.breakpoints[breakpoint];
                          }
                      } else {
                          if (respondToWidth > _.breakpoints[breakpoint]) {
                              targetBreakpoint = _.breakpoints[breakpoint];
                          }
                      }
                  }
              }
  
              if (targetBreakpoint !== null) {
                  if (_.activeBreakpoint !== null) {
                      if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
                          _.activeBreakpoint =
                              targetBreakpoint;
                          if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
                              _.unslick(targetBreakpoint);
                          } else {
                              _.options = $.extend({}, _.originalSettings,
                                  _.breakpointSettings[
                                      targetBreakpoint]);
                              if (initial === true) {
                                  _.currentSlide = _.options.initialSlide;
                              }
                              _.refresh(initial);
                          }
                          triggerBreakpoint = targetBreakpoint;
                      }
                  } else {
                      _.activeBreakpoint = targetBreakpoint;
                      if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
                          _.unslick(targetBreakpoint);
                      } else {
                          _.options = $.extend({}, _.originalSettings,
                              _.breakpointSettings[
                                  targetBreakpoint]);
                          if (initial === true) {
                              _.currentSlide = _.options.initialSlide;
                          }
                          _.refresh(initial);
                      }
                      triggerBreakpoint = targetBreakpoint;
                  }
              } else {
                  if (_.activeBreakpoint !== null) {
                      _.activeBreakpoint = null;
                      _.options = _.originalSettings;
                      if (initial === true) {
                          _.currentSlide = _.options.initialSlide;
                      }
                      _.refresh(initial);
                      triggerBreakpoint = targetBreakpoint;
                  }
              }
  
              // only trigger breakpoints during an actual break. not on initialize.
              if( !initial && triggerBreakpoint !== false ) {
                  _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
              }
          }
  
      };
  
      Slick.prototype.changeSlide = function(event, dontAnimate) {
  
          var _ = this,
              $target = $(event.currentTarget),
              indexOffset, slideOffset, unevenOffset;
  
          // If target is a link, prevent default action.
          if($target.is('a')) {
              event.preventDefault();
          }
  
          // If target is not the <li> element (ie: a child), find the <li>.
          if(!$target.is('li')) {
              $target = $target.closest('li');
          }
  
          unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
          indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
  
          switch (event.data.message) {
  
              case 'previous':
                  slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
                  if (_.slideCount > _.options.slidesToShow) {
                      _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
                  }
                  break;
  
              case 'next':
                  slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
                  if (_.slideCount > _.options.slidesToShow) {
                      _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
                  }
                  break;
  
              case 'index':
                  var index = event.data.index === 0 ? 0 :
                      event.data.index || $target.index() * _.options.slidesToScroll;
  
                  _.slideHandler(_.checkNavigable(index), false, dontAnimate);
                  $target.children().trigger('focus');
                  break;
  
              default:
                  return;
          }
  
      };
  
      Slick.prototype.checkNavigable = function(index) {
  
          var _ = this,
              navigables, prevNavigable;
  
          navigables = _.getNavigableIndexes();
          prevNavigable = 0;
          if (index > navigables[navigables.length - 1]) {
              index = navigables[navigables.length - 1];
          } else {
              for (var n in navigables) {
                  if (index < navigables[n]) {
                      index = prevNavigable;
                      break;
                  }
                  prevNavigable = navigables[n];
              }
          }
  
          return index;
      };
  
      Slick.prototype.cleanUpEvents = function() {
  
          var _ = this;
  
          if (_.options.dots && _.$dots !== null) {
  
              $('li', _.$dots)
                  .off('click.slick', _.changeSlide)
                  .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
                  .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
  
          }
  
          _.$slider.off('focus.slick blur.slick');
  
          if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
              _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
              _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
          }
  
          _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
          _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
          _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
          _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
  
          _.$list.off('click.slick', _.clickHandler);
  
          $(document).off(_.visibilityChange, _.visibility);
  
          _.cleanUpSlideEvents();
  
          if (_.options.accessibility === true) {
              _.$list.off('keydown.slick', _.keyHandler);
          }
  
          if (_.options.focusOnSelect === true) {
              $(_.$slideTrack).children().off('click.slick', _.selectHandler);
          }
  
          $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
  
          $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
  
          $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
  
          $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
          $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
  
      };
  
      Slick.prototype.cleanUpSlideEvents = function() {
  
          var _ = this;
  
          _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
          _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
  
      };
  
      Slick.prototype.cleanUpRows = function() {
  
          var _ = this, originalSlides;
  
          if(_.options.rows > 1) {
              originalSlides = _.$slides.children().children();
              originalSlides.removeAttr('style');
              _.$slider.empty().append(originalSlides);
          }
  
      };
  
      Slick.prototype.clickHandler = function(event) {
  
          var _ = this;
  
          if (_.shouldClick === false) {
              event.stopImmediatePropagation();
              event.stopPropagation();
              event.preventDefault();
          }
  
      };
  
      Slick.prototype.destroy = function(refresh) {
  
          var _ = this;
  
          _.autoPlayClear();
  
          _.touchObject = {};
  
          _.cleanUpEvents();
  
          $('.slick-cloned', _.$slider).detach();
  
          if (_.$dots) {
              _.$dots.remove();
          }
  
  
          if ( _.$prevArrow && _.$prevArrow.length ) {
  
              _.$prevArrow
                  .removeClass('slick-disabled slick-arrow slick-hidden')
                  .removeAttr('aria-hidden aria-disabled tabindex')
                  .css('display','');
  
              if ( _.htmlExpr.test( _.options.prevArrow )) {
                  _.$prevArrow.remove();
              }
          }
  
          if ( _.$nextArrow && _.$nextArrow.length ) {
  
              _.$nextArrow
                  .removeClass('slick-disabled slick-arrow slick-hidden')
                  .removeAttr('aria-hidden aria-disabled tabindex')
                  .css('display','');
  
              if ( _.htmlExpr.test( _.options.nextArrow )) {
                  _.$nextArrow.remove();
              }
  
          }
  
  
          if (_.$slides) {
  
              _.$slides
                  .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
                  .removeAttr('aria-hidden')
                  .removeAttr('data-slick-index')
                  .each(function(){
                      $(this).attr('style', $(this).data('originalStyling'));
                  });
  
              _.$slideTrack.children(this.options.slide).detach();
  
              _.$slideTrack.detach();
  
              _.$list.detach();
  
              _.$slider.append(_.$slides);
          }
  
          _.cleanUpRows();
  
          _.$slider.removeClass('slick-slider');
          _.$slider.removeClass('slick-initialized');
          _.$slider.removeClass('slick-dotted');
  
          _.unslicked = true;
  
          if(!refresh) {
              _.$slider.trigger('destroy', [_]);
          }
  
      };
  
      Slick.prototype.disableTransition = function(slide) {
  
          var _ = this,
              transition = {};
  
          transition[_.transitionType] = '';
  
          if (_.options.fade === false) {
              _.$slideTrack.css(transition);
          } else {
              _.$slides.eq(slide).css(transition);
          }
  
      };
  
      Slick.prototype.fadeSlide = function(slideIndex, callback) {
  
          var _ = this;
  
          if (_.cssTransitions === false) {
  
              _.$slides.eq(slideIndex).css({
                  zIndex: _.options.zIndex
              });
  
              _.$slides.eq(slideIndex).animate({
                  opacity: 1
              }, _.options.speed, _.options.easing, callback);
  
          } else {
  
              _.applyTransition(slideIndex);
  
              _.$slides.eq(slideIndex).css({
                  opacity: 1,
                  zIndex: _.options.zIndex
              });
  
              if (callback) {
                  setTimeout(function() {
  
                      _.disableTransition(slideIndex);
  
                      callback.call();
                  }, _.options.speed);
              }
  
          }
  
      };
  
      Slick.prototype.fadeSlideOut = function(slideIndex) {
  
          var _ = this;
  
          if (_.cssTransitions === false) {
  
              _.$slides.eq(slideIndex).animate({
                  opacity: 0,
                  zIndex: _.options.zIndex - 2
              }, _.options.speed, _.options.easing);
  
          } else {
  
              _.applyTransition(slideIndex);
  
              _.$slides.eq(slideIndex).css({
                  opacity: 0,
                  zIndex: _.options.zIndex - 2
              });
  
          }
  
      };
  
      Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
  
          var _ = this;
  
          if (filter !== null) {
  
              _.$slidesCache = _.$slides;
  
              _.unload();
  
              _.$slideTrack.children(this.options.slide).detach();
  
              _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
  
              _.reinit();
  
          }
  
      };
  
      Slick.prototype.focusHandler = function() {
  
          var _ = this;
  
          _.$slider
              .off('focus.slick blur.slick')
              .on('focus.slick blur.slick',
                  '*:not(.slick-arrow)', function(event) {
  
              event.stopImmediatePropagation();
              var $sf = $(this);
  
              setTimeout(function() {
  
                  if( _.options.pauseOnFocus ) {
                      _.focussed = $sf.is(':focus');
                      _.autoPlay();
                  }
  
              }, 0);
  
          });
      };
  
      Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
  
          var _ = this;
          return _.currentSlide;
  
      };
  
      Slick.prototype.getDotCount = function() {
  
          var _ = this;
  
          var breakPoint = 0;
          var counter = 0;
          var pagerQty = 0;
  
          if (_.options.infinite === true) {
              while (breakPoint < _.slideCount) {
                  ++pagerQty;
                  breakPoint = counter + _.options.slidesToScroll;
                  counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
              }
          } else if (_.options.centerMode === true) {
              pagerQty = _.slideCount;
          } else if(!_.options.asNavFor) {
              pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
          }else {
              while (breakPoint < _.slideCount) {
                  ++pagerQty;
                  breakPoint = counter + _.options.slidesToScroll;
                  counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
              }
          }
  
          return pagerQty - 1;
  
      };
  
      Slick.prototype.getLeft = function(slideIndex) {
  
          var _ = this,
              targetLeft,
              verticalHeight,
              verticalOffset = 0,
              targetSlide;
  
          _.slideOffset = 0;
          verticalHeight = _.$slides.first().outerHeight(true);
  
          if (_.options.infinite === true) {
              if (_.slideCount > _.options.slidesToShow) {
                  _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
                  verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
              }
              if (_.slideCount % _.options.slidesToScroll !== 0) {
                  if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
                      if (slideIndex > _.slideCount) {
                          _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
                          verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
                      } else {
                          _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
                          verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
                      }
                  }
              }
          } else {
              if (slideIndex + _.options.slidesToShow > _.slideCount) {
                  _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
                  verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
              }
          }
  
          if (_.slideCount <= _.options.slidesToShow) {
              _.slideOffset = 0;
              verticalOffset = 0;
          }
  
          if (_.options.centerMode === true && _.options.infinite === true) {
              _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
          } else if (_.options.centerMode === true) {
              _.slideOffset = 0;
              _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
          }
  
          if (_.options.vertical === false) {
              targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
          } else {
              targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
          }
  
          if (_.options.variableWidth === true) {
  
              if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
                  targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
              } else {
                  targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
              }
  
              if (_.options.rtl === true) {
                  if (targetSlide[0]) {
                      targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
                  } else {
                      targetLeft =  0;
                  }
              } else {
                  targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
              }
  
              if (_.options.centerMode === true) {
                  if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
                      targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
                  } else {
                      targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
                  }
  
                  if (_.options.rtl === true) {
                      if (targetSlide[0]) {
                          targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
                      } else {
                          targetLeft =  0;
                      }
                  } else {
                      targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
                  }
  
                  targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
              }
          }
  
          return targetLeft;
  
      };
  
      Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
  
          var _ = this;
  
          return _.options[option];
  
      };
  
      Slick.prototype.getNavigableIndexes = function() {
  
          var _ = this,
              breakPoint = 0,
              counter = 0,
              indexes = [],
              max;
  
          if (_.options.infinite === false) {
              max = _.slideCount;
          } else {
              breakPoint = _.options.slidesToScroll * -1;
              counter = _.options.slidesToScroll * -1;
              max = _.slideCount * 2;
          }
  
          while (breakPoint < max) {
              indexes.push(breakPoint);
              breakPoint = counter + _.options.slidesToScroll;
              counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
          }
  
          return indexes;
  
      };
  
      Slick.prototype.getSlick = function() {
  
          return this;
  
      };
  
      Slick.prototype.getSlideCount = function() {
  
          var _ = this,
              slidesTraversed, swipedSlide, centerOffset;
  
          centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
  
          if (_.options.swipeToSlide === true) {
              _.$slideTrack.find('.slick-slide').each(function(index, slide) {
                  if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
                      swipedSlide = slide;
                      return false;
                  }
              });
  
              slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
  
              return slidesTraversed;
  
          } else {
              return _.options.slidesToScroll;
          }
  
      };
  
      Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
  
          var _ = this;
  
          _.changeSlide({
              data: {
                  message: 'index',
                  index: parseInt(slide)
              }
          }, dontAnimate);
  
      };
  
      Slick.prototype.init = function(creation) {
  
          var _ = this;
  
          if (!$(_.$slider).hasClass('slick-initialized')) {
  
              $(_.$slider).addClass('slick-initialized');
  
              _.buildRows();
              _.buildOut();
              _.setProps();
              _.startLoad();
              _.loadSlider();
              _.initializeEvents();
              _.updateArrows();
              _.updateDots();
              _.checkResponsive(true);
              _.focusHandler();
  
          }
  
          if (creation) {
              _.$slider.trigger('init', [_]);
          }
  
          if (_.options.accessibility === true) {
              _.initADA();
          }
  
          if ( _.options.autoplay ) {
  
              _.paused = false;
              _.autoPlay();
  
          }
  
      };
  
      Slick.prototype.initADA = function() {
          var _ = this;
          _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
              'aria-hidden': 'true',
              'tabindex': '-1'
          }).find('a, input, button, select').attr({
              'tabindex': '-1'
          });
  
          _.$slideTrack.attr('role', 'listbox');
  
          _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
              $(this).attr({
                  'role': 'option',
                  'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
              });
          });
  
          if (_.$dots !== null) {
              _.$dots.attr('role', 'tablist').find('li').each(function(i) {
                  $(this).attr({
                      'role': 'presentation',
                      'aria-selected': 'false',
                      'aria-controls': 'navigation' + _.instanceUid + i + '',
                      'id': 'slick-slide' + _.instanceUid + i + ''
                  });
              })
                  .first().attr('aria-selected', 'true').end()
                  .find('button').attr('role', 'button').end()
                  .closest('div').attr('role', 'toolbar');
          }
          _.activateADA();
  
      };
  
      Slick.prototype.initArrowEvents = function() {
  
          var _ = this;
  
          if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
              _.$prevArrow
                 .off('click.slick')
                 .on('click.slick', {
                      message: 'previous'
                 }, _.changeSlide);
              _.$nextArrow
                 .off('click.slick')
                 .on('click.slick', {
                      message: 'next'
                 }, _.changeSlide);
          }
  
      };
  
      Slick.prototype.initDotEvents = function() {
  
          var _ = this;
  
          if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
              $('li', _.$dots).on('click.slick', {
                  message: 'index'
              }, _.changeSlide);
          }
  
          if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {
  
              $('li', _.$dots)
                  .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
                  .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
  
          }
  
      };
  
      Slick.prototype.initSlideEvents = function() {
  
          var _ = this;
  
          if ( _.options.pauseOnHover ) {
  
              _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
              _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
  
          }
  
      };
  
      Slick.prototype.initializeEvents = function() {
  
          var _ = this;
  
          _.initArrowEvents();
  
          _.initDotEvents();
          _.initSlideEvents();
  
          _.$list.on('touchstart.slick mousedown.slick', {
              action: 'start'
          }, _.swipeHandler);
          _.$list.on('touchmove.slick mousemove.slick', {
              action: 'move'
          }, _.swipeHandler);
          _.$list.on('touchend.slick mouseup.slick', {
              action: 'end'
          }, _.swipeHandler);
          _.$list.on('touchcancel.slick mouseleave.slick', {
              action: 'end'
          }, _.swipeHandler);
  
          _.$list.on('click.slick', _.clickHandler);
  
          $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
  
          if (_.options.accessibility === true) {
              _.$list.on('keydown.slick', _.keyHandler);
          }
  
          if (_.options.focusOnSelect === true) {
              $(_.$slideTrack).children().on('click.slick', _.selectHandler);
          }
  
          $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
  
          $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
  
          $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
  
          $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
          $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
  
      };
  
      Slick.prototype.initUI = function() {
  
          var _ = this;
  
          if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
  
              _.$prevArrow.show();
              _.$nextArrow.show();
  
          }
  
          if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
  
              _.$dots.show();
  
          }
  
      };
  
      Slick.prototype.keyHandler = function(event) {
  
          var _ = this;
           //Dont slide if the cursor is inside the form fields and arrow keys are pressed
          if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
              if (event.keyCode === 37 && _.options.accessibility === true) {
                  _.changeSlide({
                      data: {
                          message: _.options.rtl === true ? 'next' :  'previous'
                      }
                  });
              } else if (event.keyCode === 39 && _.options.accessibility === true) {
                  _.changeSlide({
                      data: {
                          message: _.options.rtl === true ? 'previous' : 'next'
                      }
                  });
              }
          }
  
      };
  
      Slick.prototype.lazyLoad = function() {
  
          var _ = this,
              loadRange, cloneRange, rangeStart, rangeEnd;
  
          function loadImages(imagesScope) {
  
              $('img[data-lazy]', imagesScope).each(function() {
  
                  var image = $(this),
                      imageSource = $(this).attr('data-lazy'),
                      imageToLoad = document.createElement('img');
  
                  imageToLoad.onload = function() {
  
                      image
                          .animate({ opacity: 0 }, 100, function() {
                              image
                                  .attr('src', imageSource)
                                  .animate({ opacity: 1 }, 200, function() {
                                      image
                                          .removeAttr('data-lazy')
                                          .removeClass('slick-loading');
                                  });
                              _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
                          });
  
                  };
  
                  imageToLoad.onerror = function() {
  
                      image
                          .removeAttr( 'data-lazy' )
                          .removeClass( 'slick-loading' )
                          .addClass( 'slick-lazyload-error' );
  
                      _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
  
                  };
  
                  imageToLoad.src = imageSource;
  
              });
  
          }
  
          if (_.options.centerMode === true) {
              if (_.options.infinite === true) {
                  rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
                  rangeEnd = rangeStart + _.options.slidesToShow + 2;
              } else {
                  rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
                  rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
              }
          } else {
              rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
              rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
              if (_.options.fade === true) {
                  if (rangeStart > 0) rangeStart--;
                  if (rangeEnd <= _.slideCount) rangeEnd++;
              }
          }
  
          loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
          loadImages(loadRange);
  
          if (_.slideCount <= _.options.slidesToShow) {
              cloneRange = _.$slider.find('.slick-slide');
              loadImages(cloneRange);
          } else
          if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
              cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
              loadImages(cloneRange);
          } else if (_.currentSlide === 0) {
              cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
              loadImages(cloneRange);
          }
  
      };
  
      Slick.prototype.loadSlider = function() {
  
          var _ = this;
  
          _.setPosition();
  
          _.$slideTrack.css({
              opacity: 1
          });
  
          _.$slider.removeClass('slick-loading');
  
          _.initUI();
  
          if (_.options.lazyLoad === 'progressive') {
              _.progressiveLazyLoad();
          }
  
      };
  
      Slick.prototype.next = Slick.prototype.slickNext = function() {
  
          var _ = this;
  
          _.changeSlide({
              data: {
                  message: 'next'
              }
          });
  
      };
  
      Slick.prototype.orientationChange = function() {
  
          var _ = this;
  
          _.checkResponsive();
          _.setPosition();
  
      };
  
      Slick.prototype.pause = Slick.prototype.slickPause = function() {
  
          var _ = this;
  
          _.autoPlayClear();
          _.paused = true;
  
      };
  
      Slick.prototype.play = Slick.prototype.slickPlay = function() {
  
          var _ = this;
  
          _.autoPlay();
          _.options.autoplay = true;
          _.paused = false;
          _.focussed = false;
          _.interrupted = false;
  
      };
  
      Slick.prototype.postSlide = function(index) {
  
          var _ = this;
  
          if( !_.unslicked ) {
  
              _.$slider.trigger('afterChange', [_, index]);
  
              _.animating = false;
  
              _.setPosition();
  
              _.swipeLeft = null;
  
              if ( _.options.autoplay ) {
                  _.autoPlay();
              }
  
              if (_.options.accessibility === true) {
                  _.initADA();
              }
  
          }
  
      };
  
      Slick.prototype.prev = Slick.prototype.slickPrev = function() {
  
          var _ = this;
  
          _.changeSlide({
              data: {
                  message: 'previous'
              }
          });
  
      };
  
      Slick.prototype.preventDefault = function(event) {
  
          event.preventDefault();
  
      };
  
      Slick.prototype.progressiveLazyLoad = function( tryCount ) {
  
          tryCount = tryCount || 1;
  
          var _ = this,
              $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
              image,
              imageSource,
              imageToLoad;
  
          if ( $imgsToLoad.length ) {
  
              image = $imgsToLoad.first();
              imageSource = image.attr('data-lazy');
              imageToLoad = document.createElement('img');
  
              imageToLoad.onload = function() {
  
                  image
                      .attr( 'src', imageSource )
                      .removeAttr('data-lazy')
                      .removeClass('slick-loading');
  
                  if ( _.options.adaptiveHeight === true ) {
                      _.setPosition();
                  }
  
                  _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
                  _.progressiveLazyLoad();
  
              };
  
              imageToLoad.onerror = function() {
  
                  if ( tryCount < 3 ) {
  
                      /**
                       * try to load the image 3 times,
                       * leave a slight delay so we don't get
                       * servers blocking the request.
                       */
                      setTimeout( function() {
                          _.progressiveLazyLoad( tryCount + 1 );
                      }, 500 );
  
                  } else {
  
                      image
                          .removeAttr( 'data-lazy' )
                          .removeClass( 'slick-loading' )
                          .addClass( 'slick-lazyload-error' );
  
                      _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
  
                      _.progressiveLazyLoad();
  
                  }
  
              };
  
              imageToLoad.src = imageSource;
  
          } else {
  
              _.$slider.trigger('allImagesLoaded', [ _ ]);
  
          }
  
      };
  
      Slick.prototype.refresh = function( initializing ) {
  
          var _ = this, currentSlide, lastVisibleIndex;
  
          lastVisibleIndex = _.slideCount - _.options.slidesToShow;
  
          // in non-infinite sliders, we don't want to go past the
          // last visible index.
          if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
              _.currentSlide = lastVisibleIndex;
          }
  
          // if less slides than to show, go to start.
          if ( _.slideCount <= _.options.slidesToShow ) {
              _.currentSlide = 0;
  
          }
  
          currentSlide = _.currentSlide;
  
          _.destroy(true);
  
          $.extend(_, _.initials, { currentSlide: currentSlide });
  
          _.init();
  
          if( !initializing ) {
  
              _.changeSlide({
                  data: {
                      message: 'index',
                      index: currentSlide
                  }
              }, false);
  
          }
  
      };
  
      Slick.prototype.registerBreakpoints = function() {
  
          var _ = this, breakpoint, currentBreakpoint, l,
              responsiveSettings = _.options.responsive || null;
  
          if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
  
              _.respondTo = _.options.respondTo || 'window';
  
              for ( breakpoint in responsiveSettings ) {
  
                  l = _.breakpoints.length-1;
                  currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
  
                  if (responsiveSettings.hasOwnProperty(breakpoint)) {
  
                      // loop through the breakpoints and cut out any existing
                      // ones with the same breakpoint number, we don't want dupes.
                      while( l >= 0 ) {
                          if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
                              _.breakpoints.splice(l,1);
                          }
                          l--;
                      }
  
                      _.breakpoints.push(currentBreakpoint);
                      _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
  
                  }
  
              }
  
              _.breakpoints.sort(function(a, b) {
                  return ( _.options.mobileFirst ) ? a-b : b-a;
              });
  
          }
  
      };
  
      Slick.prototype.reinit = function() {
  
          var _ = this;
  
          _.$slides =
              _.$slideTrack
                  .children(_.options.slide)
                  .addClass('slick-slide');
  
          _.slideCount = _.$slides.length;
  
          if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
              _.currentSlide = _.currentSlide - _.options.slidesToScroll;
          }
  
          if (_.slideCount <= _.options.slidesToShow) {
              _.currentSlide = 0;
          }
  
          _.registerBreakpoints();
  
          _.setProps();
          _.setupInfinite();
          _.buildArrows();
          _.updateArrows();
          _.initArrowEvents();
          _.buildDots();
          _.updateDots();
          _.initDotEvents();
          _.cleanUpSlideEvents();
          _.initSlideEvents();
  
          _.checkResponsive(false, true);
  
          if (_.options.focusOnSelect === true) {
              $(_.$slideTrack).children().on('click.slick', _.selectHandler);
          }
  
          _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
  
          _.setPosition();
          _.focusHandler();
  
          _.paused = !_.options.autoplay;
          _.autoPlay();
  
          _.$slider.trigger('reInit', [_]);
  
      };
  
      Slick.prototype.resize = function() {
  
          var _ = this;
  
          if ($(window).width() !== _.windowWidth) {
              clearTimeout(_.windowDelay);
              _.windowDelay = window.setTimeout(function() {
                  _.windowWidth = $(window).width();
                  _.checkResponsive();
                  if( !_.unslicked ) { _.setPosition(); }
              }, 50);
          }
      };
  
      Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
  
          var _ = this;
  
          if (typeof(index) === 'boolean') {
              removeBefore = index;
              index = removeBefore === true ? 0 : _.slideCount - 1;
          } else {
              index = removeBefore === true ? --index : index;
          }
  
          if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
              return false;
          }
  
          _.unload();
  
          if (removeAll === true) {
              _.$slideTrack.children().remove();
          } else {
              _.$slideTrack.children(this.options.slide).eq(index).remove();
          }
  
          _.$slides = _.$slideTrack.children(this.options.slide);
  
          _.$slideTrack.children(this.options.slide).detach();
  
          _.$slideTrack.append(_.$slides);
  
          _.$slidesCache = _.$slides;
  
          _.reinit();
  
      };
  
      Slick.prototype.setCSS = function(position) {
  
          var _ = this,
              positionProps = {},
              x, y;
  
          if (_.options.rtl === true) {
              position = -position;
          }
          x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
          y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
  
          positionProps[_.positionProp] = position;
  
          if (_.transformsEnabled === false) {
              _.$slideTrack.css(positionProps);
          } else {
              positionProps = {};
              if (_.cssTransitions === false) {
                  positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
                  _.$slideTrack.css(positionProps);
              } else {
                  positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
                  _.$slideTrack.css(positionProps);
              }
          }
  
      };
  
      Slick.prototype.setDimensions = function() {
  
          var _ = this;
  
          if (_.options.vertical === false) {
              if (_.options.centerMode === true) {
                  _.$list.css({
                      padding: ('0px ' + _.options.centerPadding)
                  });
              }
          } else {
              _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
              if (_.options.centerMode === true) {
                  _.$list.css({
                      padding: (_.options.centerPadding + ' 0px')
                  });
              }
          }
  
          _.listWidth = _.$list.width();
          _.listHeight = _.$list.height();
  
  
          if (_.options.vertical === false && _.options.variableWidth === false) {
              _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
              _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
  
          } else if (_.options.variableWidth === true) {
              _.$slideTrack.width(5000 * _.slideCount);
          } else {
              _.slideWidth = Math.ceil(_.listWidth);
              _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
          }
  
          var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
          if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
  
      };
  
      Slick.prototype.setFade = function() {
  
          var _ = this,
              targetLeft;
  
          _.$slides.each(function(index, element) {
              targetLeft = (_.slideWidth * index) * -1;
              if (_.options.rtl === true) {
                  $(element).css({
                      position: 'relative',
                      right: targetLeft,
                      top: 0,
                      zIndex: _.options.zIndex - 2,
                      opacity: 0
                  });
              } else {
                  $(element).css({
                      position: 'relative',
                      left: targetLeft,
                      top: 0,
                      zIndex: _.options.zIndex - 2,
                      opacity: 0
                  });
              }
          });
  
          _.$slides.eq(_.currentSlide).css({
              zIndex: _.options.zIndex - 1,
              opacity: 1
          });
  
      };
  
      Slick.prototype.setHeight = function() {
  
          var _ = this;
  
          if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
              var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
              _.$list.css('height', targetHeight);
          }
  
      };
  
      Slick.prototype.setOption =
      Slick.prototype.slickSetOption = function() {
  
          /**
           * accepts arguments in format of:
           *
           *  - for changing a single option's value:
           *     .slick("setOption", option, value, refresh )
           *
           *  - for changing a set of responsive options:
           *     .slick("setOption", 'responsive', [{}, ...], refresh )
           *
           *  - for updating multiple values at once (not responsive)
           *     .slick("setOption", { 'option': value, ... }, refresh )
           */
  
          var _ = this, l, item, option, value, refresh = false, type;
  
          if( $.type( arguments[0] ) === 'object' ) {
  
              option =  arguments[0];
              refresh = arguments[1];
              type = 'multiple';
  
          } else if ( $.type( arguments[0] ) === 'string' ) {
  
              option =  arguments[0];
              value = arguments[1];
              refresh = arguments[2];
  
              if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
  
                  type = 'responsive';
  
              } else if ( typeof arguments[1] !== 'undefined' ) {
  
                  type = 'single';
  
              }
  
          }
  
          if ( type === 'single' ) {
  
              _.options[option] = value;
  
  
          } else if ( type === 'multiple' ) {
  
              $.each( option , function( opt, val ) {
  
                  _.options[opt] = val;
  
              });
  
  
          } else if ( type === 'responsive' ) {
  
              for ( item in value ) {
  
                  if( $.type( _.options.responsive ) !== 'array' ) {
  
                      _.options.responsive = [ value[item] ];
  
                  } else {
  
                      l = _.options.responsive.length-1;
  
                      // loop through the responsive object and splice out duplicates.
                      while( l >= 0 ) {
  
                          if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
  
                              _.options.responsive.splice(l,1);
  
                          }
  
                          l--;
  
                      }
  
                      _.options.responsive.push( value[item] );
  
                  }
  
              }
  
          }
  
          if ( refresh ) {
  
              _.unload();
              _.reinit();
  
          }
  
      };
  
      Slick.prototype.setPosition = function() {
  
          var _ = this;
  
          _.setDimensions();
  
          _.setHeight();
  
          if (_.options.fade === false) {
              _.setCSS(_.getLeft(_.currentSlide));
          } else {
              _.setFade();
          }
  
          _.$slider.trigger('setPosition', [_]);
  
      };
  
      Slick.prototype.setProps = function() {
  
          var _ = this,
              bodyStyle = document.body.style;
  
          _.positionProp = _.options.vertical === true ? 'top' : 'left';
  
          if (_.positionProp === 'top') {
              _.$slider.addClass('slick-vertical');
          } else {
              _.$slider.removeClass('slick-vertical');
          }
  
          if (bodyStyle.WebkitTransition !== undefined ||
              bodyStyle.MozTransition !== undefined ||
              bodyStyle.msTransition !== undefined) {
              if (_.options.useCSS === true) {
                  _.cssTransitions = true;
              }
          }
  
          if ( _.options.fade ) {
              if ( typeof _.options.zIndex === 'number' ) {
                  if( _.options.zIndex < 3 ) {
                      _.options.zIndex = 3;
                  }
              } else {
                  _.options.zIndex = _.defaults.zIndex;
              }
          }
  
          if (bodyStyle.OTransform !== undefined) {
              _.animType = 'OTransform';
              _.transformType = '-o-transform';
              _.transitionType = 'OTransition';
              if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
          }
          if (bodyStyle.MozTransform !== undefined) {
              _.animType = 'MozTransform';
              _.transformType = '-moz-transform';
              _.transitionType = 'MozTransition';
              if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
          }
          if (bodyStyle.webkitTransform !== undefined) {
              _.animType = 'webkitTransform';
              _.transformType = '-webkit-transform';
              _.transitionType = 'webkitTransition';
              if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
          }
          if (bodyStyle.msTransform !== undefined) {
              _.animType = 'msTransform';
              _.transformType = '-ms-transform';
              _.transitionType = 'msTransition';
              if (bodyStyle.msTransform === undefined) _.animType = false;
          }
          if (bodyStyle.transform !== undefined && _.animType !== false) {
              _.animType = 'transform';
              _.transformType = 'transform';
              _.transitionType = 'transition';
          }
          _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
      };
  
  
      Slick.prototype.setSlideClasses = function(index) {
  
          var _ = this,
              centerOffset, allSlides, indexOffset, remainder;
  
          allSlides = _.$slider
              .find('.slick-slide')
              .removeClass('slick-active slick-center slick-current')
              .attr('aria-hidden', 'true');
  
          _.$slides
              .eq(index)
              .addClass('slick-current');
  
          if (_.options.centerMode === true) {
  
              centerOffset = Math.floor(_.options.slidesToShow / 2);
  
              if (_.options.infinite === true) {
  
                  if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
  
                      _.$slides
                          .slice(index - centerOffset, index + centerOffset + 1)
                          .addClass('slick-active')
                          .attr('aria-hidden', 'false');
  
                  } else {
  
                      indexOffset = _.options.slidesToShow + index;
                      allSlides
                          .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
                          .addClass('slick-active')
                          .attr('aria-hidden', 'false');
  
                  }
  
                  if (index === 0) {
  
                      allSlides
                          .eq(allSlides.length - 1 - _.options.slidesToShow)
                          .addClass('slick-center');
  
                  } else if (index === _.slideCount - 1) {
  
                      allSlides
                          .eq(_.options.slidesToShow)
                          .addClass('slick-center');
  
                  }
  
              }
  
              _.$slides
                  .eq(index)
                  .addClass('slick-center');
  
          } else {
  
              if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
  
                  _.$slides
                      .slice(index, index + _.options.slidesToShow)
                      .addClass('slick-active')
                      .attr('aria-hidden', 'false');
  
              } else if (allSlides.length <= _.options.slidesToShow) {
  
                  allSlides
                      .addClass('slick-active')
                      .attr('aria-hidden', 'false');
  
              } else {
  
                  remainder = _.slideCount % _.options.slidesToShow;
                  indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
  
                  if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
  
                      allSlides
                          .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
                          .addClass('slick-active')
                          .attr('aria-hidden', 'false');
  
                  } else {
  
                      allSlides
                          .slice(indexOffset, indexOffset + _.options.slidesToShow)
                          .addClass('slick-active')
                          .attr('aria-hidden', 'false');
  
                  }
  
              }
  
          }
  
          if (_.options.lazyLoad === 'ondemand') {
              _.lazyLoad();
          }
  
      };
  
      Slick.prototype.setupInfinite = function() {
  
          var _ = this,
              i, slideIndex, infiniteCount;
  
          if (_.options.fade === true) {
              _.options.centerMode = false;
          }
  
          if (_.options.infinite === true && _.options.fade === false) {
  
              slideIndex = null;
  
              if (_.slideCount > _.options.slidesToShow) {
  
                  if (_.options.centerMode === true) {
                      infiniteCount = _.options.slidesToShow + 1;
                  } else {
                      infiniteCount = _.options.slidesToShow;
                  }
  
                  for (i = _.slideCount; i > (_.slideCount -
                          infiniteCount); i -= 1) {
                      slideIndex = i - 1;
                      $(_.$slides[slideIndex]).clone(true).attr('id', '')
                          .attr('data-slick-index', slideIndex - _.slideCount)
                          .prependTo(_.$slideTrack).addClass('slick-cloned');
                  }
                  for (i = 0; i < infiniteCount; i += 1) {
                      slideIndex = i;
                      $(_.$slides[slideIndex]).clone(true).attr('id', '')
                          .attr('data-slick-index', slideIndex + _.slideCount)
                          .appendTo(_.$slideTrack).addClass('slick-cloned');
                  }
                  _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
                      $(this).attr('id', '');
                  });
  
              }
  
          }
  
      };
  
      Slick.prototype.interrupt = function( toggle ) {
  
          var _ = this;
  
          if( !toggle ) {
              _.autoPlay();
          }
          _.interrupted = toggle;
  
      };
  
      Slick.prototype.selectHandler = function(event) {
  
          var _ = this;
  
          var targetElement =
              $(event.target).is('.slick-slide') ?
                  $(event.target) :
                  $(event.target).parents('.slick-slide');
  
          var index = parseInt(targetElement.attr('data-slick-index'));
  
          if (!index) index = 0;
  
          if (_.slideCount <= _.options.slidesToShow) {
  
              _.setSlideClasses(index);
              _.asNavFor(index);
              return;
  
          }
  
          _.slideHandler(index);
  
      };
  
      Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
  
          var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
              _ = this, navTarget;
  
          sync = sync || false;
  
          if (_.animating === true && _.options.waitForAnimate === true) {
              return;
          }
  
          if (_.options.fade === true && _.currentSlide === index) {
              return;
          }
  
          if (_.slideCount <= _.options.slidesToShow) {
              return;
          }
  
          if (sync === false) {
              _.asNavFor(index);
          }
  
          targetSlide = index;
          targetLeft = _.getLeft(targetSlide);
          slideLeft = _.getLeft(_.currentSlide);
  
          _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
  
          if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
              if (_.options.fade === false) {
                  targetSlide = _.currentSlide;
                  if (dontAnimate !== true) {
                      _.animateSlide(slideLeft, function() {
                          _.postSlide(targetSlide);
                      });
                  } else {
                      _.postSlide(targetSlide);
                  }
              }
              return;
          } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
              if (_.options.fade === false) {
                  targetSlide = _.currentSlide;
                  if (dontAnimate !== true) {
                      _.animateSlide(slideLeft, function() {
                          _.postSlide(targetSlide);
                      });
                  } else {
                      _.postSlide(targetSlide);
                  }
              }
              return;
          }
  
          if ( _.options.autoplay ) {
              clearInterval(_.autoPlayTimer);
          }
  
          if (targetSlide < 0) {
              if (_.slideCount % _.options.slidesToScroll !== 0) {
                  animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
              } else {
                  animSlide = _.slideCount + targetSlide;
              }
          } else if (targetSlide >= _.slideCount) {
              if (_.slideCount % _.options.slidesToScroll !== 0) {
                  animSlide = 0;
              } else {
                  animSlide = targetSlide - _.slideCount;
              }
          } else {
              animSlide = targetSlide;
          }
  
          _.animating = true;
  
          _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
  
          oldSlide = _.currentSlide;
          _.currentSlide = animSlide;
  
          _.setSlideClasses(_.currentSlide);
  
          if ( _.options.asNavFor ) {
  
              navTarget = _.getNavTarget();
              navTarget = navTarget.slick('getSlick');
  
              if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
                  navTarget.setSlideClasses(_.currentSlide);
              }
  
          }
  
          _.updateDots();
          _.updateArrows();
  
          if (_.options.fade === true) {
              if (dontAnimate !== true) {
  
                  _.fadeSlideOut(oldSlide);
  
                  _.fadeSlide(animSlide, function() {
                      _.postSlide(animSlide);
                  });
  
              } else {
                  _.postSlide(animSlide);
              }
              _.animateHeight();
              return;
          }
  
          if (dontAnimate !== true) {
              _.animateSlide(targetLeft, function() {
                  _.postSlide(animSlide);
              });
          } else {
              _.postSlide(animSlide);
          }
  
      };
  
      Slick.prototype.startLoad = function() {
  
          var _ = this;
  
          if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
  
              _.$prevArrow.hide();
              _.$nextArrow.hide();
  
          }
  
          if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
  
              _.$dots.hide();
  
          }
  
          _.$slider.addClass('slick-loading');
  
      };
  
      Slick.prototype.swipeDirection = function() {
  
          var xDist, yDist, r, swipeAngle, _ = this;
  
          xDist = _.touchObject.startX - _.touchObject.curX;
          yDist = _.touchObject.startY - _.touchObject.curY;
          r = Math.atan2(yDist, xDist);
  
          swipeAngle = Math.round(r * 180 / Math.PI);
          if (swipeAngle < 0) {
              swipeAngle = 360 - Math.abs(swipeAngle);
          }
  
          if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
              return (_.options.rtl === false ? 'left' : 'right');
          }
          if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
              return (_.options.rtl === false ? 'left' : 'right');
          }
          if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
              return (_.options.rtl === false ? 'right' : 'left');
          }
          if (_.options.verticalSwiping === true) {
              if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
                  return 'down';
              } else {
                  return 'up';
              }
          }
  
          return 'vertical';
  
      };
  
      Slick.prototype.swipeEnd = function(event) {
  
          var _ = this,
              slideCount,
              direction;
  
          _.dragging = false;
          _.interrupted = false;
          _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
  
          if ( _.touchObject.curX === undefined ) {
              return false;
          }
  
          if ( _.touchObject.edgeHit === true ) {
              _.$slider.trigger('edge', [_, _.swipeDirection() ]);
          }
  
          if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
  
              direction = _.swipeDirection();
  
              switch ( direction ) {
  
                  case 'left':
                  case 'down':
  
                      slideCount =
                          _.options.swipeToSlide ?
                              _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
                              _.currentSlide + _.getSlideCount();
  
                      _.currentDirection = 0;
  
                      break;
  
                  case 'right':
                  case 'up':
  
                      slideCount =
                          _.options.swipeToSlide ?
                              _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
                              _.currentSlide - _.getSlideCount();
  
                      _.currentDirection = 1;
  
                      break;
  
                  default:
  
  
              }
  
              if( direction != 'vertical' ) {
  
                  _.slideHandler( slideCount );
                  _.touchObject = {};
                  _.$slider.trigger('swipe', [_, direction ]);
  
              }
  
          } else {
  
              if ( _.touchObject.startX !== _.touchObject.curX ) {
  
                  _.slideHandler( _.currentSlide );
                  _.touchObject = {};
  
              }
  
          }
  
      };
  
      Slick.prototype.swipeHandler = function(event) {
  
          var _ = this;
  
          if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
              return;
          } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
              return;
          }
  
          _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
              event.originalEvent.touches.length : 1;
  
          _.touchObject.minSwipe = _.listWidth / _.options
              .touchThreshold;
  
          if (_.options.verticalSwiping === true) {
              _.touchObject.minSwipe = _.listHeight / _.options
                  .touchThreshold;
          }
  
          switch (event.data.action) {
  
              case 'start':
                  _.swipeStart(event);
                  break;
  
              case 'move':
                  _.swipeMove(event);
                  break;
  
              case 'end':
                  _.swipeEnd(event);
                  break;
  
          }
  
      };
  
      Slick.prototype.swipeMove = function(event) {
  
          var _ = this,
              edgeWasHit = false,
              curLeft, swipeDirection, swipeLength, positionOffset, touches;
  
          touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
  
          if (!_.dragging || touches && touches.length !== 1) {
              return false;
          }
  
          curLeft = _.getLeft(_.currentSlide);
  
          _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
          _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
  
          _.touchObject.swipeLength = Math.round(Math.sqrt(
              Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
  
          if (_.options.verticalSwiping === true) {
              _.touchObject.swipeLength = Math.round(Math.sqrt(
                  Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
          }
  
          swipeDirection = _.swipeDirection();
  
          if (swipeDirection === 'vertical') {
              return;
          }
  
          if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
              event.preventDefault();
          }
  
          positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
          if (_.options.verticalSwiping === true) {
              positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
          }
  
  
          swipeLength = _.touchObject.swipeLength;
  
          _.touchObject.edgeHit = false;
  
          if (_.options.infinite === false) {
              if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
                  swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
                  _.touchObject.edgeHit = true;
              }
          }
  
          if (_.options.vertical === false) {
              _.swipeLeft = curLeft + swipeLength * positionOffset;
          } else {
              _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
          }
          if (_.options.verticalSwiping === true) {
              _.swipeLeft = curLeft + swipeLength * positionOffset;
          }
  
          if (_.options.fade === true || _.options.touchMove === false) {
              return false;
          }
  
          if (_.animating === true) {
              _.swipeLeft = null;
              return false;
          }
  
          _.setCSS(_.swipeLeft);
  
      };
  
      Slick.prototype.swipeStart = function(event) {
  
          var _ = this,
              touches;
  
          _.interrupted = true;
  
          if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
              _.touchObject = {};
              return false;
          }
  
          if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
              touches = event.originalEvent.touches[0];
          }
  
          _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
          _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
  
          _.dragging = true;
  
      };
  
      Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
  
          var _ = this;
  
          if (_.$slidesCache !== null) {
  
              _.unload();
  
              _.$slideTrack.children(this.options.slide).detach();
  
              _.$slidesCache.appendTo(_.$slideTrack);
  
              _.reinit();
  
          }
  
      };
  
      Slick.prototype.unload = function() {
  
          var _ = this;
  
          $('.slick-cloned', _.$slider).remove();
  
          if (_.$dots) {
              _.$dots.remove();
          }
  
          if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
              _.$prevArrow.remove();
          }
  
          if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
              _.$nextArrow.remove();
          }
  
          _.$slides
              .removeClass('slick-slide slick-active slick-visible slick-current')
              .attr('aria-hidden', 'true')
              .css('width', '');
  
      };
  
      Slick.prototype.unslick = function(fromBreakpoint) {
  
          var _ = this;
          _.$slider.trigger('unslick', [_, fromBreakpoint]);
          _.destroy();
  
      };
  
      Slick.prototype.updateArrows = function() {
  
          var _ = this,
              centerOffset;
  
          centerOffset = Math.floor(_.options.slidesToShow / 2);
  
          if ( _.options.arrows === true &&
              _.slideCount > _.options.slidesToShow &&
              !_.options.infinite ) {
  
              _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
              _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
  
              if (_.currentSlide === 0) {
  
                  _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                  _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
  
              } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
  
                  _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                  _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
  
              } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
  
                  _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
                  _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
  
              }
  
          }
  
      };
  
      Slick.prototype.updateDots = function() {
  
          var _ = this;
  
          if (_.$dots !== null) {
  
              _.$dots
                  .find('li')
                  .removeClass('slick-active')
                  .attr('aria-hidden', 'true');
  
              _.$dots
                  .find('li')
                  .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
                  .addClass('slick-active')
                  .attr('aria-hidden', 'false');
  
          }
  
      };
  
      Slick.prototype.visibility = function() {
  
          var _ = this;
  
          if ( _.options.autoplay ) {
  
              if ( document[_.hidden] ) {
  
                  _.interrupted = true;
  
              } else {
  
                  _.interrupted = false;
  
              }
  
          }
  
      };
  
      $.fn.slick = function() {
          var _ = this,
              opt = arguments[0],
              args = Array.prototype.slice.call(arguments, 1),
              l = _.length,
              i,
              ret;
          for (i = 0; i < l; i++) {
              if (typeof opt == 'object' || typeof opt == 'undefined')
                  _[i].slick = new Slick(_[i], opt);
              else
                  ret = _[i].slick[opt].apply(_[i].slick, args);
              if (typeof ret != 'undefined') return ret;
          }
          return _;
      };
  
  }));
  
  /**
  @license Sticky-kit v1.1.4 | MIT | Leaf Corcoran 2015 | http://leafo.net
   @edited Edited by the CSSIgniter Team
  */
  "use strict";var $,doc,win;$=window.jQuery,win=$(window),doc=$(document),$.fn.stick_in_parent=function(){var p=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},a,b,c,d,e,f,g,h,j,k,l,m,n,o;for(n=p.sticky_class,e=p.inner_scrolling,l=p.recalc_every,k=p.parent,h=p.offset_top,g=p.spacer,c=p.bottoming,o=win.height(),a=doc.height(),null==h&&(h=0),null==k&&(k=void 0),null==e&&(e=!0),null==n&&(n="is_stuck"),null==c&&(c=!0),j=function outer_width(q){var r,s,t;return window.getComputedStyle?(r=q[0],s=window.getComputedStyle(q[0]),t=parseFloat(s.getPropertyValue("width"))+parseFloat(s.getPropertyValue("margin-left"))+parseFloat(s.getPropertyValue("margin-right")),"border-box"!==s.getPropertyValue("box-sizing")&&(t+=parseFloat(s.getPropertyValue("border-left-width"))+parseFloat(s.getPropertyValue("border-right-width"))+parseFloat(s.getPropertyValue("padding-left"))+parseFloat(s.getPropertyValue("padding-right"))),t):q.outerWidth(!0)},m=this,(d=0,f=m.length);d<f;d++)b=m[d],function(q,r,s,t,u,v,x,y){var z,K,A,B,C,D,E,F,G,H,I,J;if(!q.data("sticky_kit")){if(q.data("sticky_kit",!0),C=a,E=q.parent(),null!=k&&(E=E.closest(k)),!E.length)throw"failed to find stick parent";return(A=!1,z=!1,I=null==g?$("<div />",{class:"stuck"}):g&&q.closest(g),I&&I.css("position",q.css("position")),F=function recalc(){var L,M,N;if(!y&&(o=win.height(),a=doc.height(),C=a,L=parseInt(E.css("border-top-width"),10),M=parseInt(E.css("padding-top"),10),r=parseInt(E.css("padding-bottom"),10),s=E.offset().top+L+M,t=E.height(),A&&(A=!1,z=!1,null==g&&(q.insertAfter(I),I.detach()),q.css({position:"",top:"",width:"",bottom:""}).removeClass(n),N=!0),u=q.offset().top-(parseInt(q.css("margin-top"),10)||0)-h,v=q.outerHeight(!0),x=q.css("float"),I&&I.css({width:j(q),height:v,display:q.css("display"),"vertical-align":q.css("vertical-align"),float:x}),N))return J()},F(),v!==t)?(B=void 0,D=h,H=l,J=function tick(){var L,M,N,O,P;if(!y)return(N=!1,null!=H&&(H-=1,0>=H&&(H=l,F(),N=!0)),N||a===C||(F(),N=!0),O=win.scrollTop(),null!=B&&(M=O-B),B=O,A?(c&&(P=O+v+D>t+s,z&&!P&&(z=!1,q.css({position:"fixed",bottom:"",top:D}).trigger("sticky_kit:unbottom"))),O<u&&(A=!1,D=h,null==g&&(("left"===x||"right"===x)&&q.insertAfter(I),I.detach()),L={position:"",width:"",top:""},q.css(L).removeClass(n).trigger("sticky_kit:unstick")),e&&v+h>o&&!z&&(D-=M,D=Math.max(o-v,D),D=Math.min(h,D),A&&q.css({top:D+"px"}))):O>u&&(A=!0,L={position:"fixed",top:D},L.width="border-box"===q.css("box-sizing")?q.outerWidth()+"px":q.width()+"px",q.css(L).addClass(n),null==g&&(q.after(I),("left"===x||"right"===x)&&I.append(q)),q.trigger("sticky_kit:stick")),A&&c&&(null==P&&(P=O+v+D>t+s),!z&&P))?(z=!0,"static"===E.css("position")&&E.css({position:"relative"}),q.css({position:"absolute",bottom:r,top:"auto"}).trigger("sticky_kit:bottom")):void 0},G=function recalc_and_tick(){return F(),J()},K=function detach(){if(y=!0,win.off("touchmove",J),win.off("scroll",J),win.off("resize",G),$(document.body).off("sticky_kit:recalc",G),q.off("sticky_kit:detach",K),q.removeData("sticky_kit"),q.css({position:"",bottom:"",top:"",width:""}),E.position("position",""),A)return null==g&&(("left"===x||"right"===x)&&q.insertAfter(I),I.remove()),q.removeClass(n)},win.on("touchmove",J),win.on("scroll",J),win.on("resize",G),$(document.body).on("sticky_kit:recalc",G),q.on("sticky_kit:detach",K),setTimeout(J,0)):void 0}}($(b));return this};
  
  /*!
   * imagesLoaded PACKAGED v4.1.3
   * JavaScript is all like "You images are done yet or what?"
   * MIT License
   */
  
  !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=0,o=i[n];t=t||[];for(var r=this._onceEvents&&this._onceEvents[e];o;){var s=r&&r[o];s&&(this.off(e,o),delete r[o]),o.apply(this,t),n+=s?0:1,o=i[n]}return this}},t.allOff=t.removeAllListeners=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){var t=[];if(Array.isArray(e))t=e;else if("number"==typeof e.length)for(var i=0;i<e.length;i++)t.push(e[i]);else t.push(e);return t}function o(e,t,r){return this instanceof o?("string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=n(e),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(e,t,r)}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&d[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var d={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
  /**
   * anim-on-scroll.js v1.0.1
   * http://www.codrops.com
   * Modified by the CSSIgniter team
   *
   * Licensed under the MIT license.
   * http://www.opensource.org/licenses/mit-license.php
   *
   * Copyright 2013, Codrops
   * http://www.codrops.com
   *
   * Copyright 2017, CSSIgniter
   * https://www.cssigniter.com
   */
  ;(function (window) {
  
  	'use strict';
  
  	var docElem = window.document.documentElement;
  
  	function getViewportH() {
  		var client = docElem['clientHeight'],
  			inner = window['innerHeight'];
  
  		if (client < inner)
  			return inner;
  		else
  			return client;
  	}
  
  	function scrollY() {
  		return window.pageYOffset || docElem.scrollTop;
  	}
  
  	// http://stackoverflow.com/a/5598797/989439
  	function getOffset(el) {
  		var offsetTop = 0, offsetLeft = 0;
  		do {
  			if (! isNaN(el.offsetTop)) {
  				offsetTop += el.offsetTop;
  			}
  			if (! isNaN(el.offsetLeft)) {
  				offsetLeft += el.offsetLeft;
  			}
  		} while (el = el.offsetParent);
  
  		return {
  			top: offsetTop,
  			left: offsetLeft
  		}
  	}
  
  	function inViewport(el, h) {
  		var elH = el.offsetHeight,
  			scrolled = scrollY(),
  			viewed = scrolled + getViewportH(),
  			elTop = getOffset(el).top,
  			elBottom = elTop + elH,
  			// if 0, the element is considered in the viewport as soon as it enters.
  			// if 1, the element is considered in the viewport only when it's fully inside
  			// value in percentage (1 >= h >= 0)
  			h = h || 0;
  
  		return (elTop + elH * h) <= viewed && (elBottom - elH * h) >= scrolled;
  	}
  
  	function extend(a, b) {
  		for (var key in b) {
  			if (b.hasOwnProperty(key)) {
  				a[key] = b[key];
  			}
  		}
  		return a;
  	}
  
  	function AnimOnScroll(el, options) {
  		if (imagesLoaded == null) {
  			return console.warn('AnimOnScroll not initialized: `imagesLoaded` plugin was not found.')
  		}
  
  		this.el = el;
  		this.options = extend(this.defaults, options);
  		this._init();
  	}
  
  	AnimOnScroll.prototype = {
  		defaults: {
  			// Minimum and a maximum duration of the animation (random value is chosen)
  			minDuration: 0,
  			maxDuration: 0,
  			// The viewportFactor defines how much of the appearing item has to be visible in order to trigger the animation
  			// if we'd use a value of 0, this would mean that it would add the animation class as soon as the item is in the viewport.
  			// If we were to use the value of 1, the animation would only be triggered when we see all of the item in the viewport (100% of it)
  			viewportFactor: 0,
  			loadedClass: 'row-images-loaded' // Class to add on container when images are loaded
  		},
  		_init: function () {
  			var self = this;
  
  			this.items = Array.prototype.slice.call(this.el.children);
  			this.itemsCount = this.items.length;
  			this.itemsRenderedCount = 0;
  			this.didScroll = false;
  
  			imagesLoaded(this.el, function () {
  				self.el.classList.add(self.options.loadedClass);
  
  				// Animate the items already displayed
  				self.items.forEach(function (el, i) {
  					if (inViewport(el)) {
  						self._checkTotalRendered();
  						setTimeout(function () {
  							el.classList.add('ci-grid-animate');
  						}, Math.random() * (500 - 25) + 25);
  					}
  				});
  
  				// animate on scroll the items inside the viewport
  				window.addEventListener('scroll', function () {
  					self._onScrollFn();
  				}, false);
  
  				window.addEventListener('resize', function () {
  					self._resizeHandler();
  				}, false);
  			});
  		},
  		_onScrollFn: function () {
  			var self = this;
  			if (!this.didScroll) {
  				this.didScroll = true;
  				setTimeout(function () {
  					self._scrollPage();
  				}, 60);
  			}
  		},
  		_scrollPage: function () {
  			var self = this;
  			this.items.forEach(function (el, i) {
  				if (el.className.indexOf('ci-grid-shown') === -1 && el.className.indexOf('ci-grid-animate') === -1 && inViewport(el, self.options.viewportFactor)) {
  					setTimeout(function () {
  						var perspY = scrollY() + getViewportH() / 2;
  						self.el.style.WebkitPerspectiveOrigin = '50% ' + perspY + 'px';
  						self.el.style.MozPerspectiveOrigin = '50% ' + perspY + 'px';
  						self.el.style.perspectiveOrigin = '50% ' + perspY + 'px';
  
  						self._checkTotalRendered();
  
  						if (self.options.minDuration && self.options.maxDuration) {
  							var randDuration = ( Math.random() * ( self.options.maxDuration - self.options.minDuration ) + self.options.minDuration ) + 's';
  							el.style.WebkitAnimationDuration = randDuration;
  							el.style.MozAnimationDuration = randDuration;
  							el.style.animationDuration = randDuration;
  						}
  
  						el.classList.add('ci-grid-animate');
  					}, Math.random() * (320 - 25) + 25);
  				}
  			});
  			this.didScroll = false;
  		},
  		_resizeHandler: function () {
  			var self = this;
  
  			function delayed() {
  				self._scrollPage();
  				self.resizeTimeout = null;
  			}
  
  			if (this.resizeTimeout) {
  				clearTimeout(this.resizeTimeout);
  			}
  			this.resizeTimeout = setTimeout(delayed, 1000);
  		},
  		_checkTotalRendered: function () {
  			++ this.itemsRenderedCount;
  			if (this.itemsRenderedCount === this.itemsCount) {
  				window.removeEventListener('scroll', this._onScrollFn);
  			}
  		},
  		_destroy: function () {
  			this.items.forEach(function (item) {
  				item.classList.remove('ci-grid-animate');
  			});
  			this.el.classList.remove('row-effect');
  		}
  	};
  
  	// add to global namespace
  	window.AnimOnScroll = AnimOnScroll;
  })(window);
  /*!
  Chosen, a Select Box Enhancer for jQuery and Prototype
  by Patrick Filler for Harvest, http://getharvest.com
  
  Version 1.8.7
  Full source at https://github.com/harvesthq/chosen
  Copyright (c) 2011-2018 Harvest http://getharvest.com
  
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
  This file is generated by `grunt build`, do not edit it by hand.
  */
  
  (function() {
    var $, AbstractChosen, Chosen, SelectParser,
      bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
      extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
      hasProp = {}.hasOwnProperty;
  
    SelectParser = (function() {
      function SelectParser() {
        this.options_index = 0;
        this.parsed = [];
      }
  
      SelectParser.prototype.add_node = function(child) {
        if (child.nodeName.toUpperCase() === "OPTGROUP") {
          return this.add_group(child);
        } else {
          return this.add_option(child);
        }
      };
  
      SelectParser.prototype.add_group = function(group) {
        var group_position, i, len, option, ref, results1;
        group_position = this.parsed.length;
        this.parsed.push({
          array_index: group_position,
          group: true,
          label: group.label,
          title: group.title ? group.title : void 0,
          children: 0,
          disabled: group.disabled,
          classes: group.className
        });
        ref = group.childNodes;
        results1 = [];
        for (i = 0, len = ref.length; i < len; i++) {
          option = ref[i];
          results1.push(this.add_option(option, group_position, group.disabled));
        }
        return results1;
      };
  
      SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
        if (option.nodeName.toUpperCase() === "OPTION") {
          if (option.text !== "") {
            if (group_position != null) {
              this.parsed[group_position].children += 1;
            }
            this.parsed.push({
              array_index: this.parsed.length,
              options_index: this.options_index,
              value: option.value,
              text: option.text,
              html: option.innerHTML,
              title: option.title ? option.title : void 0,
              selected: option.selected,
              disabled: group_disabled === true ? group_disabled : option.disabled,
              group_array_index: group_position,
              group_label: group_position != null ? this.parsed[group_position].label : null,
              classes: option.className,
              style: option.style.cssText
            });
          } else {
            this.parsed.push({
              array_index: this.parsed.length,
              options_index: this.options_index,
              empty: true
            });
          }
          return this.options_index += 1;
        }
      };
  
      return SelectParser;
  
    })();
  
    SelectParser.select_to_array = function(select) {
      var child, i, len, parser, ref;
      parser = new SelectParser();
      ref = select.childNodes;
      for (i = 0, len = ref.length; i < len; i++) {
        child = ref[i];
        parser.add_node(child);
      }
      return parser.parsed;
    };
  
    AbstractChosen = (function() {
      function AbstractChosen(form_field, options1) {
        this.form_field = form_field;
        this.options = options1 != null ? options1 : {};
        this.label_click_handler = bind(this.label_click_handler, this);
        if (!AbstractChosen.browser_is_supported()) {
          return;
        }
        this.is_multiple = this.form_field.multiple;
        this.set_default_text();
        this.set_default_values();
        this.setup();
        this.set_up_html();
        this.register_observers();
        this.on_ready();
      }
  
      AbstractChosen.prototype.set_default_values = function() {
        this.click_test_action = (function(_this) {
          return function(evt) {
            return _this.test_active_click(evt);
          };
        })(this);
        this.activate_action = (function(_this) {
          return function(evt) {
            return _this.activate_field(evt);
          };
        })(this);
        this.active_field = false;
        this.mouse_on_container = false;
        this.results_showing = false;
        this.result_highlighted = null;
        this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
        this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
        this.disable_search_threshold = this.options.disable_search_threshold || 0;
        this.disable_search = this.options.disable_search || false;
        this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
        this.group_search = this.options.group_search != null ? this.options.group_search : true;
        this.search_contains = this.options.search_contains || false;
        this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
        this.max_selected_options = this.options.max_selected_options || Infinity;
        this.inherit_select_classes = this.options.inherit_select_classes || false;
        this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
        this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
        this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
        this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
        this.case_sensitive_search = this.options.case_sensitive_search || false;
        return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
      };
  
      AbstractChosen.prototype.set_default_text = function() {
        if (this.form_field.getAttribute("data-placeholder")) {
          this.default_text = this.form_field.getAttribute("data-placeholder");
        } else if (this.is_multiple) {
          this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
        } else {
          this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
        }
        this.default_text = this.escape_html(this.default_text);
        return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
      };
  
      AbstractChosen.prototype.choice_label = function(item) {
        if (this.include_group_label_in_selected && (item.group_label != null)) {
          return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
        } else {
          return item.html;
        }
      };
  
      AbstractChosen.prototype.mouse_enter = function() {
        return this.mouse_on_container = true;
      };
  
      AbstractChosen.prototype.mouse_leave = function() {
        return this.mouse_on_container = false;
      };
  
      AbstractChosen.prototype.input_focus = function(evt) {
        if (this.is_multiple) {
          if (!this.active_field) {
            return setTimeout(((function(_this) {
              return function() {
                return _this.container_mousedown();
              };
            })(this)), 50);
          }
        } else {
          if (!this.active_field) {
            return this.activate_field();
          }
        }
      };
  
      AbstractChosen.prototype.input_blur = function(evt) {
        if (!this.mouse_on_container) {
          this.active_field = false;
          return setTimeout(((function(_this) {
            return function() {
              return _this.blur_test();
            };
          })(this)), 100);
        }
      };
  
      AbstractChosen.prototype.label_click_handler = function(evt) {
        if (this.is_multiple) {
          return this.container_mousedown(evt);
        } else {
          return this.activate_field();
        }
      };
  
      AbstractChosen.prototype.results_option_build = function(options) {
        var content, data, data_content, i, len, ref, shown_results;
        content = '';
        shown_results = 0;
        ref = this.results_data;
        for (i = 0, len = ref.length; i < len; i++) {
          data = ref[i];
          data_content = '';
          if (data.group) {
            data_content = this.result_add_group(data);
          } else {
            data_content = this.result_add_option(data);
          }
          if (data_content !== '') {
            shown_results++;
            content += data_content;
          }
          if (options != null ? options.first : void 0) {
            if (data.selected && this.is_multiple) {
              this.choice_build(data);
            } else if (data.selected && !this.is_multiple) {
              this.single_set_selected_text(this.choice_label(data));
            }
          }
          if (shown_results >= this.max_shown_results) {
            break;
          }
        }
        return content;
      };
  
      AbstractChosen.prototype.result_add_option = function(option) {
        var classes, option_el;
        if (!option.search_match) {
          return '';
        }
        if (!this.include_option_in_results(option)) {
          return '';
        }
        classes = [];
        if (!option.disabled && !(option.selected && this.is_multiple)) {
          classes.push("active-result");
        }
        if (option.disabled && !(option.selected && this.is_multiple)) {
          classes.push("disabled-result");
        }
        if (option.selected) {
          classes.push("result-selected");
        }
        if (option.group_array_index != null) {
          classes.push("group-option");
        }
        if (option.classes !== "") {
          classes.push(option.classes);
        }
        option_el = document.createElement("li");
        option_el.className = classes.join(" ");
        if (option.style) {
          option_el.style.cssText = option.style;
        }
        option_el.setAttribute("data-option-array-index", option.array_index);
        option_el.innerHTML = option.highlighted_html || option.html;
        if (option.title) {
          option_el.title = option.title;
        }
        return this.outerHTML(option_el);
      };
  
      AbstractChosen.prototype.result_add_group = function(group) {
        var classes, group_el;
        if (!(group.search_match || group.group_match)) {
          return '';
        }
        if (!(group.active_options > 0)) {
          return '';
        }
        classes = [];
        classes.push("group-result");
        if (group.classes) {
          classes.push(group.classes);
        }
        group_el = document.createElement("li");
        group_el.className = classes.join(" ");
        group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
        if (group.title) {
          group_el.title = group.title;
        }
        return this.outerHTML(group_el);
      };
  
      AbstractChosen.prototype.results_update_field = function() {
        this.set_default_text();
        if (!this.is_multiple) {
          this.results_reset_cleanup();
        }
        this.result_clear_highlight();
        this.results_build();
        if (this.results_showing) {
          return this.winnow_results();
        }
      };
  
      AbstractChosen.prototype.reset_single_select_options = function() {
        var i, len, ref, result, results1;
        ref = this.results_data;
        results1 = [];
        for (i = 0, len = ref.length; i < len; i++) {
          result = ref[i];
          if (result.selected) {
            results1.push(result.selected = false);
          } else {
            results1.push(void 0);
          }
        }
        return results1;
      };
  
      AbstractChosen.prototype.results_toggle = function() {
        if (this.results_showing) {
          return this.results_hide();
        } else {
          return this.results_show();
        }
      };
  
      AbstractChosen.prototype.results_search = function(evt) {
        if (this.results_showing) {
          return this.winnow_results();
        } else {
          return this.results_show();
        }
      };
  
      AbstractChosen.prototype.winnow_results = function(options) {
        var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
        this.no_results_clear();
        results = 0;
        query = this.get_search_text();
        escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
        regex = this.get_search_regex(escapedQuery);
        ref = this.results_data;
        for (i = 0, len = ref.length; i < len; i++) {
          option = ref[i];
          option.search_match = false;
          results_group = null;
          search_match = null;
          option.highlighted_html = '';
          if (this.include_option_in_results(option)) {
            if (option.group) {
              option.group_match = false;
              option.active_options = 0;
            }
            if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
              results_group = this.results_data[option.group_array_index];
              if (results_group.active_options === 0 && results_group.search_match) {
                results += 1;
              }
              results_group.active_options += 1;
            }
            text = option.group ? option.label : option.text;
            if (!(option.group && !this.group_search)) {
              search_match = this.search_string_match(text, regex);
              option.search_match = search_match != null;
              if (option.search_match && !option.group) {
                results += 1;
              }
              if (option.search_match) {
                if (query.length) {
                  startpos = search_match.index;
                  prefix = text.slice(0, startpos);
                  fix = text.slice(startpos, startpos + query.length);
                  suffix = text.slice(startpos + query.length);
                  option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
                }
                if (results_group != null) {
                  results_group.group_match = true;
                }
              } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
                option.search_match = true;
              }
            }
          }
        }
        this.result_clear_highlight();
        if (results < 1 && query.length) {
          this.update_results_content("");
          return this.no_results(query);
        } else {
          this.update_results_content(this.results_option_build());
          if (!(options != null ? options.skip_highlight : void 0)) {
            return this.winnow_results_set_highlight();
          }
        }
      };
  
      AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
        var regex_flag, regex_string;
        regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
        if (!(this.enable_split_word_search || this.search_contains)) {
          regex_string = "^" + regex_string;
        }
        regex_flag = this.case_sensitive_search ? "" : "i";
        return new RegExp(regex_string, regex_flag);
      };
  
      AbstractChosen.prototype.search_string_match = function(search_string, regex) {
        var match;
        match = regex.exec(search_string);
        if (!this.search_contains && (match != null ? match[1] : void 0)) {
          match.index += 1;
        }
        return match;
      };
  
      AbstractChosen.prototype.choices_count = function() {
        var i, len, option, ref;
        if (this.selected_option_count != null) {
          return this.selected_option_count;
        }
        this.selected_option_count = 0;
        ref = this.form_field.options;
        for (i = 0, len = ref.length; i < len; i++) {
          option = ref[i];
          if (option.selected) {
            this.selected_option_count += 1;
          }
        }
        return this.selected_option_count;
      };
  
      AbstractChosen.prototype.choices_click = function(evt) {
        evt.preventDefault();
        this.activate_field();
        if (!(this.results_showing || this.is_disabled)) {
          return this.results_show();
        }
      };
  
      AbstractChosen.prototype.keydown_checker = function(evt) {
        var ref, stroke;
        stroke = (ref = evt.which) != null ? ref : evt.keyCode;
        this.search_field_scale();
        if (stroke !== 8 && this.pending_backstroke) {
          this.clear_backstroke();
        }
        switch (stroke) {
          case 8:
            this.backstroke_length = this.get_search_field_value().length;
            break;
          case 9:
            if (this.results_showing && !this.is_multiple) {
              this.result_select(evt);
            }
            this.mouse_on_container = false;
            break;
          case 13:
            if (this.results_showing) {
              evt.preventDefault();
            }
            break;
          case 27:
            if (this.results_showing) {
              evt.preventDefault();
            }
            break;
          case 32:
            if (this.disable_search) {
              evt.preventDefault();
            }
            break;
          case 38:
            evt.preventDefault();
            this.keyup_arrow();
            break;
          case 40:
            evt.preventDefault();
            this.keydown_arrow();
            break;
        }
      };
  
      AbstractChosen.prototype.keyup_checker = function(evt) {
        var ref, stroke;
        stroke = (ref = evt.which) != null ? ref : evt.keyCode;
        this.search_field_scale();
        switch (stroke) {
          case 8:
            if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
              this.keydown_backstroke();
            } else if (!this.pending_backstroke) {
              this.result_clear_highlight();
              this.results_search();
            }
            break;
          case 13:
            evt.preventDefault();
            if (this.results_showing) {
              this.result_select(evt);
            }
            break;
          case 27:
            if (this.results_showing) {
              this.results_hide();
            }
            break;
          case 9:
          case 16:
          case 17:
          case 18:
          case 38:
          case 40:
          case 91:
            break;
          default:
            this.results_search();
            break;
        }
      };
  
      AbstractChosen.prototype.clipboard_event_checker = function(evt) {
        if (this.is_disabled) {
          return;
        }
        return setTimeout(((function(_this) {
          return function() {
            return _this.results_search();
          };
        })(this)), 50);
      };
  
      AbstractChosen.prototype.container_width = function() {
        if (this.options.width != null) {
          return this.options.width;
        } else {
          return this.form_field.offsetWidth + "px";
        }
      };
  
      AbstractChosen.prototype.include_option_in_results = function(option) {
        if (this.is_multiple && (!this.display_selected_options && option.selected)) {
          return false;
        }
        if (!this.display_disabled_options && option.disabled) {
          return false;
        }
        if (option.empty) {
          return false;
        }
        return true;
      };
  
      AbstractChosen.prototype.search_results_touchstart = function(evt) {
        this.touch_started = true;
        return this.search_results_mouseover(evt);
      };
  
      AbstractChosen.prototype.search_results_touchmove = function(evt) {
        this.touch_started = false;
        return this.search_results_mouseout(evt);
      };
  
      AbstractChosen.prototype.search_results_touchend = function(evt) {
        if (this.touch_started) {
          return this.search_results_mouseup(evt);
        }
      };
  
      AbstractChosen.prototype.outerHTML = function(element) {
        var tmp;
        if (element.outerHTML) {
          return element.outerHTML;
        }
        tmp = document.createElement("div");
        tmp.appendChild(element);
        return tmp.innerHTML;
      };
  
      AbstractChosen.prototype.get_single_html = function() {
        return "<a class=\"chosen-single chosen-default\">\n  <span>" + this.default_text + "</span>\n  <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n  <div class=\"chosen-search\">\n    <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n  </div>\n  <ul class=\"chosen-results\"></ul>\n</div>";
      };
  
      AbstractChosen.prototype.get_multi_html = function() {
        return "<ul class=\"chosen-choices\">\n  <li class=\"search-field\">\n    <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n  </li>\n</ul>\n<div class=\"chosen-drop\">\n  <ul class=\"chosen-results\"></ul>\n</div>";
      };
  
      AbstractChosen.prototype.get_no_results_html = function(terms) {
        return "<li class=\"no-results\">\n  " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
      };
  
      AbstractChosen.browser_is_supported = function() {
        if ("Microsoft Internet Explorer" === window.navigator.appName) {
          return document.documentMode >= 8;
        }
        if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
          return false;
        }
        return true;
      };
  
      AbstractChosen.default_multiple_text = "Select Some Options";
  
      AbstractChosen.default_single_text = "Select an Option";
  
      AbstractChosen.default_no_result_text = "No results match";
  
      return AbstractChosen;
  
    })();
  
    $ = jQuery;
  
    $.fn.extend({
      chosen: function(options) {
        if (!AbstractChosen.browser_is_supported()) {
          return this;
        }
        return this.each(function(input_field) {
          var $this, chosen;
          $this = $(this);
          chosen = $this.data('chosen');
          if (options === 'destroy') {
            if (chosen instanceof Chosen) {
              chosen.destroy();
            }
            return;
          }
          if (!(chosen instanceof Chosen)) {
            $this.data('chosen', new Chosen(this, options));
          }
        });
      }
    });
  
    Chosen = (function(superClass) {
      extend(Chosen, superClass);
  
      function Chosen() {
        return Chosen.__super__.constructor.apply(this, arguments);
      }
  
      Chosen.prototype.setup = function() {
        this.form_field_jq = $(this.form_field);
        return this.current_selectedIndex = this.form_field.selectedIndex;
      };
  
      Chosen.prototype.set_up_html = function() {
        var container_classes, container_props;
        container_classes = ["chosen-container"];
        container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
        if (this.inherit_select_classes && this.form_field.className) {
          container_classes.push(this.form_field.className);
        }
        if (this.is_rtl) {
          container_classes.push("chosen-rtl");
        }
        container_props = {
          'class': container_classes.join(' '),
          'title': this.form_field.title
        };
        if (this.form_field.id.length) {
          container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
        }
        this.container = $("<div />", container_props);
        this.container.width(this.container_width());
        if (this.is_multiple) {
          this.container.html(this.get_multi_html());
        } else {
          this.container.html(this.get_single_html());
        }
        this.form_field_jq.hide().after(this.container);
        this.dropdown = this.container.find('div.chosen-drop').first();
        this.search_field = this.container.find('input').first();
        this.search_results = this.container.find('ul.chosen-results').first();
        this.search_field_scale();
        this.search_no_results = this.container.find('li.no-results').first();
        if (this.is_multiple) {
          this.search_choices = this.container.find('ul.chosen-choices').first();
          this.search_container = this.container.find('li.search-field').first();
        } else {
          this.search_container = this.container.find('div.chosen-search').first();
          this.selected_item = this.container.find('.chosen-single').first();
        }
        this.results_build();
        this.set_tab_index();
        return this.set_label_behavior();
      };
  
      Chosen.prototype.on_ready = function() {
        return this.form_field_jq.trigger("chosen:ready", {
          chosen: this
        });
      };
  
      Chosen.prototype.register_observers = function() {
        this.container.on('touchstart.chosen', (function(_this) {
          return function(evt) {
            _this.container_mousedown(evt);
          };
        })(this));
        this.container.on('touchend.chosen', (function(_this) {
          return function(evt) {
            _this.container_mouseup(evt);
          };
        })(this));
        this.container.on('mousedown.chosen', (function(_this) {
          return function(evt) {
            _this.container_mousedown(evt);
          };
        })(this));
        this.container.on('mouseup.chosen', (function(_this) {
          return function(evt) {
            _this.container_mouseup(evt);
          };
        })(this));
        this.container.on('mouseenter.chosen', (function(_this) {
          return function(evt) {
            _this.mouse_enter(evt);
          };
        })(this));
        this.container.on('mouseleave.chosen', (function(_this) {
          return function(evt) {
            _this.mouse_leave(evt);
          };
        })(this));
        this.search_results.on('mouseup.chosen', (function(_this) {
          return function(evt) {
            _this.search_results_mouseup(evt);
          };
        })(this));
        this.search_results.on('mouseover.chosen', (function(_this) {
          return function(evt) {
            _this.search_results_mouseover(evt);
          };
        })(this));
        this.search_results.on('mouseout.chosen', (function(_this) {
          return function(evt) {
            _this.search_results_mouseout(evt);
          };
        })(this));
        this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
          return function(evt) {
            _this.search_results_mousewheel(evt);
          };
        })(this));
        this.search_results.on('touchstart.chosen', (function(_this) {
          return function(evt) {
            _this.search_results_touchstart(evt);
          };
        })(this));
        this.search_results.on('touchmove.chosen', (function(_this) {
          return function(evt) {
            _this.search_results_touchmove(evt);
          };
        })(this));
        this.search_results.on('touchend.chosen', (function(_this) {
          return function(evt) {
            _this.search_results_touchend(evt);
          };
        })(this));
        this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
          return function(evt) {
            _this.results_update_field(evt);
          };
        })(this));
        this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
          return function(evt) {
            _this.activate_field(evt);
          };
        })(this));
        this.form_field_jq.on("chosen:open.chosen", (function(_this) {
          return function(evt) {
            _this.container_mousedown(evt);
          };
        })(this));
        this.form_field_jq.on("chosen:close.chosen", (function(_this) {
          return function(evt) {
            _this.close_field(evt);
          };
        })(this));
        this.search_field.on('blur.chosen', (function(_this) {
          return function(evt) {
            _this.input_blur(evt);
          };
        })(this));
        this.search_field.on('keyup.chosen', (function(_this) {
          return function(evt) {
            _this.keyup_checker(evt);
          };
        })(this));
        this.search_field.on('keydown.chosen', (function(_this) {
          return function(evt) {
            _this.keydown_checker(evt);
          };
        })(this));
        this.search_field.on('focus.chosen', (function(_this) {
          return function(evt) {
            _this.input_focus(evt);
          };
        })(this));
        this.search_field.on('cut.chosen', (function(_this) {
          return function(evt) {
            _this.clipboard_event_checker(evt);
          };
        })(this));
        this.search_field.on('paste.chosen', (function(_this) {
          return function(evt) {
            _this.clipboard_event_checker(evt);
          };
        })(this));
        if (this.is_multiple) {
          return this.search_choices.on('click.chosen', (function(_this) {
            return function(evt) {
              _this.choices_click(evt);
            };
          })(this));
        } else {
          return this.container.on('click.chosen', function(evt) {
            evt.preventDefault();
          });
        }
      };
  
      Chosen.prototype.destroy = function() {
        $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);
        if (this.form_field_label.length > 0) {
          this.form_field_label.off('click.chosen');
        }
        if (this.search_field[0].tabIndex) {
          this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
        }
        this.container.remove();
        this.form_field_jq.removeData('chosen');
        return this.form_field_jq.show();
      };
  
      Chosen.prototype.search_field_disabled = function() {
        this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');
        this.container.toggleClass('chosen-disabled', this.is_disabled);
        this.search_field[0].disabled = this.is_disabled;
        if (!this.is_multiple) {
          this.selected_item.off('focus.chosen', this.activate_field);
        }
        if (this.is_disabled) {
          return this.close_field();
        } else if (!this.is_multiple) {
          return this.selected_item.on('focus.chosen', this.activate_field);
        }
      };
  
      Chosen.prototype.container_mousedown = function(evt) {
        var ref;
        if (this.is_disabled) {
          return;
        }
        if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
          evt.preventDefault();
        }
        if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
          if (!this.active_field) {
            if (this.is_multiple) {
              this.search_field.val("");
            }
            $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);
            this.results_show();
          } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
            evt.preventDefault();
            this.results_toggle();
          }
          return this.activate_field();
        }
      };
  
      Chosen.prototype.container_mouseup = function(evt) {
        if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
          return this.results_reset(evt);
        }
      };
  
      Chosen.prototype.search_results_mousewheel = function(evt) {
        var delta;
        if (evt.originalEvent) {
          delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
        }
        if (delta != null) {
          evt.preventDefault();
          if (evt.type === 'DOMMouseScroll') {
            delta = delta * 40;
          }
          return this.search_results.scrollTop(delta + this.search_results.scrollTop());
        }
      };
  
      Chosen.prototype.blur_test = function(evt) {
        if (!this.active_field && this.container.hasClass("chosen-container-active")) {
          return this.close_field();
        }
      };
  
      Chosen.prototype.close_field = function() {
        $(this.container[0].ownerDocument).off("click.chosen", this.click_test_action);
        this.active_field = false;
        this.results_hide();
        this.container.removeClass("chosen-container-active");
        this.clear_backstroke();
        this.show_search_field_default();
        this.search_field_scale();
        return this.search_field.blur();
      };
  
      Chosen.prototype.activate_field = function() {
        if (this.is_disabled) {
          return;
        }
        this.container.addClass("chosen-container-active");
        this.active_field = true;
        this.search_field.val(this.search_field.val());
        return this.search_field.focus();
      };
  
      Chosen.prototype.test_active_click = function(evt) {
        var active_container;
        active_container = $(evt.target).closest('.chosen-container');
        if (active_container.length && this.container[0] === active_container[0]) {
          return this.active_field = true;
        } else {
          return this.close_field();
        }
      };
  
      Chosen.prototype.results_build = function() {
        this.parsing = true;
        this.selected_option_count = null;
        this.results_data = SelectParser.select_to_array(this.form_field);
        if (this.is_multiple) {
          this.search_choices.find("li.search-choice").remove();
        } else {
          this.single_set_selected_text();
          if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
            this.search_field[0].readOnly = true;
            this.container.addClass("chosen-container-single-nosearch");
          } else {
            this.search_field[0].readOnly = false;
            this.container.removeClass("chosen-container-single-nosearch");
          }
        }
        this.update_results_content(this.results_option_build({
          first: true
        }));
        this.search_field_disabled();
        this.show_search_field_default();
        this.search_field_scale();
        return this.parsing = false;
      };
  
      Chosen.prototype.result_do_highlight = function(el) {
        var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
        if (el.length) {
          this.result_clear_highlight();
          this.result_highlight = el;
          this.result_highlight.addClass("highlighted");
          maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
          visible_top = this.search_results.scrollTop();
          visible_bottom = maxHeight + visible_top;
          high_top = this.result_highlight.position().top + this.search_results.scrollTop();
          high_bottom = high_top + this.result_highlight.outerHeight();
          if (high_bottom >= visible_bottom) {
            return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
          } else if (high_top < visible_top) {
            return this.search_results.scrollTop(high_top);
          }
        }
      };
  
      Chosen.prototype.result_clear_highlight = function() {
        if (this.result_highlight) {
          this.result_highlight.removeClass("highlighted");
        }
        return this.result_highlight = null;
      };
  
      Chosen.prototype.results_show = function() {
        if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
          this.form_field_jq.trigger("chosen:maxselected", {
            chosen: this
          });
          return false;
        }
        this.container.addClass("chosen-with-drop");
        this.results_showing = true;
        this.search_field.focus();
        this.search_field.val(this.get_search_field_value());
        this.winnow_results();
        return this.form_field_jq.trigger("chosen:showing_dropdown", {
          chosen: this
        });
      };
  
      Chosen.prototype.update_results_content = function(content) {
        return this.search_results.html(content);
      };
  
      Chosen.prototype.results_hide = function() {
        if (this.results_showing) {
          this.result_clear_highlight();
          this.container.removeClass("chosen-with-drop");
          this.form_field_jq.trigger("chosen:hiding_dropdown", {
            chosen: this
          });
        }
        return this.results_showing = false;
      };
  
      Chosen.prototype.set_tab_index = function(el) {
        var ti;
        if (this.form_field.tabIndex) {
          ti = this.form_field.tabIndex;
          this.form_field.tabIndex = -1;
          return this.search_field[0].tabIndex = ti;
        }
      };
  
      Chosen.prototype.set_label_behavior = function() {
        this.form_field_label = this.form_field_jq.parents("label");
        if (!this.form_field_label.length && this.form_field.id.length) {
          this.form_field_label = $("label[for='" + this.form_field.id + "']");
        }
        if (this.form_field_label.length > 0) {
          return this.form_field_label.on('click.chosen', this.label_click_handler);
        }
      };
  
      Chosen.prototype.show_search_field_default = function() {
        if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
          this.search_field.val(this.default_text);
          return this.search_field.addClass("default");
        } else {
          this.search_field.val("");
          return this.search_field.removeClass("default");
        }
      };
  
      Chosen.prototype.search_results_mouseup = function(evt) {
        var target;
        target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
        if (target.length) {
          this.result_highlight = target;
          this.result_select(evt);
          return this.search_field.focus();
        }
      };
  
      Chosen.prototype.search_results_mouseover = function(evt) {
        var target;
        target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
        if (target) {
          return this.result_do_highlight(target);
        }
      };
  
      Chosen.prototype.search_results_mouseout = function(evt) {
        if ($(evt.target).hasClass("active-result") || $(evt.target).parents('.active-result').first()) {
          return this.result_clear_highlight();
        }
      };
  
      Chosen.prototype.choice_build = function(item) {
        var choice, close_link;
        choice = $('<li />', {
          "class": "search-choice"
        }).html("<span>" + (this.choice_label(item)) + "</span>");
        if (item.disabled) {
          choice.addClass('search-choice-disabled');
        } else {
          close_link = $('<a />', {
            "class": 'search-choice-close',
            'data-option-array-index': item.array_index
          });
          close_link.on('click.chosen', (function(_this) {
            return function(evt) {
              return _this.choice_destroy_link_click(evt);
            };
          })(this));
          choice.append(close_link);
        }
        return this.search_container.before(choice);
      };
  
      Chosen.prototype.choice_destroy_link_click = function(evt) {
        evt.preventDefault();
        evt.stopPropagation();
        if (!this.is_disabled) {
          return this.choice_destroy($(evt.target));
        }
      };
  
      Chosen.prototype.choice_destroy = function(link) {
        if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
          if (this.active_field) {
            this.search_field.focus();
          } else {
            this.show_search_field_default();
          }
          if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
            this.results_hide();
          }
          link.parents('li').first().remove();
          return this.search_field_scale();
        }
      };
  
      Chosen.prototype.results_reset = function() {
        this.reset_single_select_options();
        this.form_field.options[0].selected = true;
        this.single_set_selected_text();
        this.show_search_field_default();
        this.results_reset_cleanup();
        this.trigger_form_field_change();
        if (this.active_field) {
          return this.results_hide();
        }
      };
  
      Chosen.prototype.results_reset_cleanup = function() {
        this.current_selectedIndex = this.form_field.selectedIndex;
        return this.selected_item.find("abbr").remove();
      };
  
      Chosen.prototype.result_select = function(evt) {
        var high, item;
        if (this.result_highlight) {
          high = this.result_highlight;
          this.result_clear_highlight();
          if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
            this.form_field_jq.trigger("chosen:maxselected", {
              chosen: this
            });
            return false;
          }
          if (this.is_multiple) {
            high.removeClass("active-result");
          } else {
            this.reset_single_select_options();
          }
          high.addClass("result-selected");
          item = this.results_data[high[0].getAttribute("data-option-array-index")];
          item.selected = true;
          this.form_field.options[item.options_index].selected = true;
          this.selected_option_count = null;
          if (this.is_multiple) {
            this.choice_build(item);
          } else {
            this.single_set_selected_text(this.choice_label(item));
          }
          if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
            if (evt.metaKey || evt.ctrlKey) {
              this.winnow_results({
                skip_highlight: true
              });
            } else {
              this.search_field.val("");
              this.winnow_results();
            }
          } else {
            this.results_hide();
            this.show_search_field_default();
          }
          if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
            this.trigger_form_field_change({
              selected: this.form_field.options[item.options_index].value
            });
          }
          this.current_selectedIndex = this.form_field.selectedIndex;
          evt.preventDefault();
          return this.search_field_scale();
        }
      };
  
      Chosen.prototype.single_set_selected_text = function(text) {
        if (text == null) {
          text = this.default_text;
        }
        if (text === this.default_text) {
          this.selected_item.addClass("chosen-default");
        } else {
          this.single_deselect_control_build();
          this.selected_item.removeClass("chosen-default");
        }
        return this.selected_item.find("span").html(text);
      };
  
      Chosen.prototype.result_deselect = function(pos) {
        var result_data;
        result_data = this.results_data[pos];
        if (!this.form_field.options[result_data.options_index].disabled) {
          result_data.selected = false;
          this.form_field.options[result_data.options_index].selected = false;
          this.selected_option_count = null;
          this.result_clear_highlight();
          if (this.results_showing) {
            this.winnow_results();
          }
          this.trigger_form_field_change({
            deselected: this.form_field.options[result_data.options_index].value
          });
          this.search_field_scale();
          return true;
        } else {
          return false;
        }
      };
  
      Chosen.prototype.single_deselect_control_build = function() {
        if (!this.allow_single_deselect) {
          return;
        }
        if (!this.selected_item.find("abbr").length) {
          this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
        }
        return this.selected_item.addClass("chosen-single-with-deselect");
      };
  
      Chosen.prototype.get_search_field_value = function() {
        return this.search_field.val();
      };
  
      Chosen.prototype.get_search_text = function() {
        return $.trim(this.get_search_field_value());
      };
  
      Chosen.prototype.escape_html = function(text) {
        return $('<div/>').text(text).html();
      };
  
      Chosen.prototype.winnow_results_set_highlight = function() {
        var do_high, selected_results;
        selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
        do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
        if (do_high != null) {
          return this.result_do_highlight(do_high);
        }
      };
  
      Chosen.prototype.no_results = function(terms) {
        var no_results_html;
        no_results_html = this.get_no_results_html(terms);
        this.search_results.append(no_results_html);
        return this.form_field_jq.trigger("chosen:no_results", {
          chosen: this
        });
      };
  
      Chosen.prototype.no_results_clear = function() {
        return this.search_results.find(".no-results").remove();
      };
  
      Chosen.prototype.keydown_arrow = function() {
        var next_sib;
        if (this.results_showing && this.result_highlight) {
          next_sib = this.result_highlight.nextAll("li.active-result").first();
          if (next_sib) {
            return this.result_do_highlight(next_sib);
          }
        } else {
          return this.results_show();
        }
      };
  
      Chosen.prototype.keyup_arrow = function() {
        var prev_sibs;
        if (!this.results_showing && !this.is_multiple) {
          return this.results_show();
        } else if (this.result_highlight) {
          prev_sibs = this.result_highlight.prevAll("li.active-result");
          if (prev_sibs.length) {
            return this.result_do_highlight(prev_sibs.first());
          } else {
            if (this.choices_count() > 0) {
              this.results_hide();
            }
            return this.result_clear_highlight();
          }
        }
      };
  
      Chosen.prototype.keydown_backstroke = function() {
        var next_available_destroy;
        if (this.pending_backstroke) {
          this.choice_destroy(this.pending_backstroke.find("a").first());
          return this.clear_backstroke();
        } else {
          next_available_destroy = this.search_container.siblings("li.search-choice").last();
          if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
            this.pending_backstroke = next_available_destroy;
            if (this.single_backstroke_delete) {
              return this.keydown_backstroke();
            } else {
              return this.pending_backstroke.addClass("search-choice-focus");
            }
          }
        }
      };
  
      Chosen.prototype.clear_backstroke = function() {
        if (this.pending_backstroke) {
          this.pending_backstroke.removeClass("search-choice-focus");
        }
        return this.pending_backstroke = null;
      };
  
      Chosen.prototype.search_field_scale = function() {
        var div, i, len, style, style_block, styles, width;
        if (!this.is_multiple) {
          return;
        }
        style_block = {
          position: 'absolute',
          left: '-1000px',
          top: '-1000px',
          display: 'none',
          whiteSpace: 'pre'
        };
        styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
        for (i = 0, len = styles.length; i < len; i++) {
          style = styles[i];
          style_block[style] = this.search_field.css(style);
        }
        div = $('<div />').css(style_block);
        div.text(this.get_search_field_value());
        $('body').append(div);
        width = div.width() + 25;
        div.remove();
        if (this.container.is(':visible')) {
          width = Math.min(this.container.outerWidth() - 10, width);
        }
        return this.search_field.width(width);
      };
  
      Chosen.prototype.trigger_form_field_change = function(extra) {
        this.form_field_jq.trigger("input", extra);
        return this.form_field_jq.trigger("change", extra);
      };
  
      return Chosen;
  
    })(AbstractChosen);
  
  }).call(this);
  
  /*! nouislider - 11.1.0 - 2018-04-02 11:18:13 */
  
  (function (factory) {
  
      if ( typeof define === 'function' && define.amd ) {
  
          // AMD. Register as an anonymous module.
          define([], factory);
  
      } else if ( typeof exports === 'object' ) {
  
          // Node/CommonJS
          module.exports = factory();
  
      } else {
  
          // Browser globals
          window.noUiSlider = factory();
      }
  
  }(function( ){
  
  	'use strict';
  
  	var VERSION = '11.1.0';
  
  
  	function isValidFormatter ( entry ) {
  		return typeof entry === 'object' && typeof entry.to === 'function' && typeof entry.from === 'function';
  	}
  
  	function removeElement ( el ) {
  		el.parentElement.removeChild(el);
  	}
  
  	function isSet ( value ) {
  		return value !== null && value !== undefined;
  	}
  
  	// Bindable version
  	function preventDefault ( e ) {
  		e.preventDefault();
  	}
  
  	// Removes duplicates from an array.
  	function unique ( array ) {
  		return array.filter(function(a){
  			return !this[a] ? this[a] = true : false;
  		}, {});
  	}
  
  	// Round a value to the closest 'to'.
  	function closest ( value, to ) {
  		return Math.round(value / to) * to;
  	}
  
  	// Current position of an element relative to the document.
  	function offset ( elem, orientation ) {
  
  		var rect = elem.getBoundingClientRect();
  		var doc = elem.ownerDocument;
  		var docElem = doc.documentElement;
  		var pageOffset = getPageOffset(doc);
  
  		// getBoundingClientRect contains left scroll in Chrome on Android.
  		// I haven't found a feature detection that proves this. Worst case
  		// scenario on mis-match: the 'tap' feature on horizontal sliders breaks.
  		if ( /webkit.*Chrome.*Mobile/i.test(navigator.userAgent) ) {
  			pageOffset.x = 0;
  		}
  
  		return orientation ? (rect.top + pageOffset.y - docElem.clientTop) : (rect.left + pageOffset.x - docElem.clientLeft);
  	}
  
  	// Checks whether a value is numerical.
  	function isNumeric ( a ) {
  		return typeof a === 'number' && !isNaN( a ) && isFinite( a );
  	}
  
  	// Sets a class and removes it after [duration] ms.
  	function addClassFor ( element, className, duration ) {
  		if (duration > 0) {
  		addClass(element, className);
  			setTimeout(function(){
  				removeClass(element, className);
  			}, duration);
  		}
  	}
  
  	// Limits a value to 0 - 100
  	function limit ( a ) {
  		return Math.max(Math.min(a, 100), 0);
  	}
  
  	// Wraps a variable as an array, if it isn't one yet.
  	// Note that an input array is returned by reference!
  	function asArray ( a ) {
  		return Array.isArray(a) ? a : [a];
  	}
  
  	// Counts decimals
  	function countDecimals ( numStr ) {
  		numStr = String(numStr);
  		var pieces = numStr.split(".");
  		return pieces.length > 1 ? pieces[1].length : 0;
  	}
  
  	// http://youmightnotneedjquery.com/#add_class
  	function addClass ( el, className ) {
  		if ( el.classList ) {
  			el.classList.add(className);
  		} else {
  			el.className += ' ' + className;
  		}
  	}
  
  	// http://youmightnotneedjquery.com/#remove_class
  	function removeClass ( el, className ) {
  		if ( el.classList ) {
  			el.classList.remove(className);
  		} else {
  			el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
  		}
  	}
  
  	// https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/
  	function hasClass ( el, className ) {
  		return el.classList ? el.classList.contains(className) : new RegExp('\\b' + className + '\\b').test(el.className);
  	}
  
  	// https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes
  	function getPageOffset ( doc ) {
  
  		var supportPageOffset = window.pageXOffset !== undefined;
  		var isCSS1Compat = ((doc.compatMode || "") === "CSS1Compat");
  		var x = supportPageOffset ? window.pageXOffset : isCSS1Compat ? doc.documentElement.scrollLeft : doc.body.scrollLeft;
  		var y = supportPageOffset ? window.pageYOffset : isCSS1Compat ? doc.documentElement.scrollTop : doc.body.scrollTop;
  
  		return {
  			x: x,
  			y: y
  		};
  	}
  
  	// we provide a function to compute constants instead
  	// of accessing window.* as soon as the module needs it
  	// so that we do not compute anything if not needed
  	function getActions ( ) {
  
  		// Determine the events to bind. IE11 implements pointerEvents without
  		// a prefix, which breaks compatibility with the IE10 implementation.
  		return window.navigator.pointerEnabled ? {
  			start: 'pointerdown',
  			move: 'pointermove',
  			end: 'pointerup'
  		} : window.navigator.msPointerEnabled ? {
  			start: 'MSPointerDown',
  			move: 'MSPointerMove',
  			end: 'MSPointerUp'
  		} : {
  			start: 'mousedown touchstart',
  			move: 'mousemove touchmove',
  			end: 'mouseup touchend'
  		};
  	}
  
  	// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
  	// Issue #785
  	function getSupportsPassive ( ) {
  
  		var supportsPassive = false;
  
  		try {
  
  			var opts = Object.defineProperty({}, 'passive', {
  				get: function() {
  					supportsPassive = true;
  				}
  			});
  
  			window.addEventListener('test', null, opts);
  
  		} catch (e) {}
  
  		return supportsPassive;
  	}
  
  	function getSupportsTouchActionNone ( ) {
  		return window.CSS && CSS.supports && CSS.supports('touch-action', 'none');
  	}
  
  
  // Value calculation
  
  	// Determine the size of a sub-range in relation to a full range.
  	function subRangeRatio ( pa, pb ) {
  		return (100 / (pb - pa));
  	}
  
  	// (percentage) How many percent is this value of this range?
  	function fromPercentage ( range, value ) {
  		return (value * 100) / ( range[1] - range[0] );
  	}
  
  	// (percentage) Where is this value on this range?
  	function toPercentage ( range, value ) {
  		return fromPercentage( range, range[0] < 0 ?
  			value + Math.abs(range[0]) :
  				value - range[0] );
  	}
  
  	// (value) How much is this percentage on this range?
  	function isPercentage ( range, value ) {
  		return ((value * ( range[1] - range[0] )) / 100) + range[0];
  	}
  
  
  // Range conversion
  
  	function getJ ( value, arr ) {
  
  		var j = 1;
  
  		while ( value >= arr[j] ){
  			j += 1;
  		}
  
  		return j;
  	}
  
  	// (percentage) Input a value, find where, on a scale of 0-100, it applies.
  	function toStepping ( xVal, xPct, value ) {
  
  		if ( value >= xVal.slice(-1)[0] ){
  			return 100;
  		}
  
  		var j = getJ( value, xVal );
  		var va = xVal[j-1];
  		var vb = xVal[j];
  		var pa = xPct[j-1];
  		var pb = xPct[j];
  
  		return pa + (toPercentage([va, vb], value) / subRangeRatio (pa, pb));
  	}
  
  	// (value) Input a percentage, find where it is on the specified range.
  	function fromStepping ( xVal, xPct, value ) {
  
  		// There is no range group that fits 100
  		if ( value >= 100 ){
  			return xVal.slice(-1)[0];
  		}
  
  		var j = getJ( value, xPct );
  		var va = xVal[j-1];
  		var vb = xVal[j];
  		var pa = xPct[j-1];
  		var pb = xPct[j];
  
  		return isPercentage([va, vb], (value - pa) * subRangeRatio (pa, pb));
  	}
  
  	// (percentage) Get the step that applies at a certain value.
  	function getStep ( xPct, xSteps, snap, value ) {
  
  		if ( value === 100 ) {
  			return value;
  		}
  
  		var j = getJ( value, xPct );
  		var a = xPct[j-1];
  		var b = xPct[j];
  
  		// If 'snap' is set, steps are used as fixed points on the slider.
  		if ( snap ) {
  
  			// Find the closest position, a or b.
  			if ((value - a) > ((b-a)/2)){
  				return b;
  			}
  
  			return a;
  		}
  
  		if ( !xSteps[j-1] ){
  			return value;
  		}
  
  		return xPct[j-1] + closest(
  			value - xPct[j-1],
  			xSteps[j-1]
  		);
  	}
  
  
  // Entry parsing
  
  	function handleEntryPoint ( index, value, that ) {
  
  		var percentage;
  
  		// Wrap numerical input in an array.
  		if ( typeof value === "number" ) {
  			value = [value];
  		}
  
  		// Reject any invalid input, by testing whether value is an array.
  		if ( !Array.isArray(value) ){
  			throw new Error("noUiSlider (" + VERSION + "): 'range' contains invalid value.");
  		}
  
  		// Covert min/max syntax to 0 and 100.
  		if ( index === 'min' ) {
  			percentage = 0;
  		} else if ( index === 'max' ) {
  			percentage = 100;
  		} else {
  			percentage = parseFloat( index );
  		}
  
  		// Check for correct input.
  		if ( !isNumeric( percentage ) || !isNumeric( value[0] ) ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'range' value isn't numeric.");
  		}
  
  		// Store values.
  		that.xPct.push( percentage );
  		that.xVal.push( value[0] );
  
  		// NaN will evaluate to false too, but to keep
  		// logging clear, set step explicitly. Make sure
  		// not to override the 'step' setting with false.
  		if ( !percentage ) {
  			if ( !isNaN( value[1] ) ) {
  				that.xSteps[0] = value[1];
  			}
  		} else {
  			that.xSteps.push( isNaN(value[1]) ? false : value[1] );
  		}
  
  		that.xHighestCompleteStep.push(0);
  	}
  
  	function handleStepPoint ( i, n, that ) {
  
  		// Ignore 'false' stepping.
  		if ( !n ) {
  			return true;
  		}
  
  		// Factor to range ratio
  		that.xSteps[i] = fromPercentage([that.xVal[i], that.xVal[i+1]], n) / subRangeRatio(that.xPct[i], that.xPct[i+1]);
  
  		var totalSteps = (that.xVal[i+1] - that.xVal[i]) / that.xNumSteps[i];
  		var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);
  		var step = that.xVal[i] + (that.xNumSteps[i] * highestStep);
  
  		that.xHighestCompleteStep[i] = step;
  	}
  
  
  // Interface
  
  	function Spectrum ( entry, snap, singleStep ) {
  
  		this.xPct = [];
  		this.xVal = [];
  		this.xSteps = [ singleStep || false ];
  		this.xNumSteps = [ false ];
  		this.xHighestCompleteStep = [];
  
  		this.snap = snap;
  
  		var index;
  		var ordered = []; // [0, 'min'], [1, '50%'], [2, 'max']
  
  		// Map the object keys to an array.
  		for ( index in entry ) {
  			if ( entry.hasOwnProperty(index) ) {
  				ordered.push([entry[index], index]);
  			}
  		}
  
  		// Sort all entries by value (numeric sort).
  		if ( ordered.length && typeof ordered[0][0] === "object" ) {
  			ordered.sort(function(a, b) { return a[0][0] - b[0][0]; });
  		} else {
  			ordered.sort(function(a, b) { return a[0] - b[0]; });
  		}
  
  
  		// Convert all entries to subranges.
  		for ( index = 0; index < ordered.length; index++ ) {
  			handleEntryPoint(ordered[index][1], ordered[index][0], this);
  		}
  
  		// Store the actual step values.
  		// xSteps is sorted in the same order as xPct and xVal.
  		this.xNumSteps = this.xSteps.slice(0);
  
  		// Convert all numeric steps to the percentage of the subrange they represent.
  		for ( index = 0; index < this.xNumSteps.length; index++ ) {
  			handleStepPoint(index, this.xNumSteps[index], this);
  		}
  	}
  
  	Spectrum.prototype.getMargin = function ( value ) {
  
  		var step = this.xNumSteps[0];
  
  		if ( step && ((value / step) % 1) !== 0 ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'limit', 'margin' and 'padding' must be divisible by step.");
  		}
  
  		return this.xPct.length === 2 ? fromPercentage(this.xVal, value) : false;
  	};
  
  	Spectrum.prototype.toStepping = function ( value ) {
  
  		value = toStepping( this.xVal, this.xPct, value );
  
  		return value;
  	};
  
  	Spectrum.prototype.fromStepping = function ( value ) {
  
  		return fromStepping( this.xVal, this.xPct, value );
  	};
  
  	Spectrum.prototype.getStep = function ( value ) {
  
  		value = getStep(this.xPct, this.xSteps, this.snap, value );
  
  		return value;
  	};
  
  	Spectrum.prototype.getNearbySteps = function ( value ) {
  
  		var j = getJ(value, this.xPct);
  
  		return {
  			stepBefore: { startValue: this.xVal[j-2], step: this.xNumSteps[j-2], highestStep: this.xHighestCompleteStep[j-2] },
  			thisStep: { startValue: this.xVal[j-1], step: this.xNumSteps[j-1], highestStep: this.xHighestCompleteStep[j-1] },
  			stepAfter: { startValue: this.xVal[j-0], step: this.xNumSteps[j-0], highestStep: this.xHighestCompleteStep[j-0] }
  		};
  	};
  
  	Spectrum.prototype.countStepDecimals = function () {
  		var stepDecimals = this.xNumSteps.map(countDecimals);
  		return Math.max.apply(null, stepDecimals);
  	};
  
  	// Outside testing
  	Spectrum.prototype.convert = function ( value ) {
  		return this.getStep(this.toStepping(value));
  	};
  
  /*	Every input option is tested and parsed. This'll prevent
  	endless validation in internal methods. These tests are
  	structured with an item for every option available. An
  	option can be marked as required by setting the 'r' flag.
  	The testing function is provided with three arguments:
  		- The provided value for the option;
  		- A reference to the options object;
  		- The name for the option;
  
  	The testing function returns false when an error is detected,
  	or true when everything is OK. It can also modify the option
  	object, to make sure all values can be correctly looped elsewhere. */
  
  	var defaultFormatter = { 'to': function( value ){
  		return value !== undefined && value.toFixed(2);
  	}, 'from': Number };
  
  	function validateFormat ( entry ) {
  
  		// Any object with a to and from method is supported.
  		if ( isValidFormatter(entry) ) {
  			return true;
  		}
  
  		throw new Error("noUiSlider (" + VERSION + "): 'format' requires 'to' and 'from' methods.");
  	}
  
  	function testStep ( parsed, entry ) {
  
  		if ( !isNumeric( entry ) ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'step' is not numeric.");
  		}
  
  		// The step option can still be used to set stepping
  		// for linear sliders. Overwritten if set in 'range'.
  		parsed.singleStep = entry;
  	}
  
  	function testRange ( parsed, entry ) {
  
  		// Filter incorrect input.
  		if ( typeof entry !== 'object' || Array.isArray(entry) ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'range' is not an object.");
  		}
  
  		// Catch missing start or end.
  		if ( entry.min === undefined || entry.max === undefined ) {
  			throw new Error("noUiSlider (" + VERSION + "): Missing 'min' or 'max' in 'range'.");
  		}
  
  		// Catch equal start or end.
  		if ( entry.min === entry.max ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'range' 'min' and 'max' cannot be equal.");
  		}
  
  		parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.singleStep);
  	}
  
  	function testStart ( parsed, entry ) {
  
  		entry = asArray(entry);
  
  		// Validate input. Values aren't tested, as the public .val method
  		// will always provide a valid location.
  		if ( !Array.isArray( entry ) || !entry.length ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'start' option is incorrect.");
  		}
  
  		// Store the number of handles.
  		parsed.handles = entry.length;
  
  		// When the slider is initialized, the .val method will
  		// be called with the start options.
  		parsed.start = entry;
  	}
  
  	function testSnap ( parsed, entry ) {
  
  		// Enforce 100% stepping within subranges.
  		parsed.snap = entry;
  
  		if ( typeof entry !== 'boolean' ){
  			throw new Error("noUiSlider (" + VERSION + "): 'snap' option must be a boolean.");
  		}
  	}
  
  	function testAnimate ( parsed, entry ) {
  
  		// Enforce 100% stepping within subranges.
  		parsed.animate = entry;
  
  		if ( typeof entry !== 'boolean' ){
  			throw new Error("noUiSlider (" + VERSION + "): 'animate' option must be a boolean.");
  		}
  	}
  
  	function testAnimationDuration ( parsed, entry ) {
  
  		parsed.animationDuration = entry;
  
  		if ( typeof entry !== 'number' ){
  			throw new Error("noUiSlider (" + VERSION + "): 'animationDuration' option must be a number.");
  		}
  	}
  
  	function testConnect ( parsed, entry ) {
  
  		var connect = [false];
  		var i;
  
  		// Map legacy options
  		if ( entry === 'lower' ) {
  			entry = [true, false];
  		}
  
  		else if ( entry === 'upper' ) {
  			entry = [false, true];
  		}
  
  		// Handle boolean options
  		if ( entry === true || entry === false ) {
  
  			for ( i = 1; i < parsed.handles; i++ ) {
  				connect.push(entry);
  			}
  
  			connect.push(false);
  		}
  
  		// Reject invalid input
  		else if ( !Array.isArray( entry ) || !entry.length || entry.length !== parsed.handles + 1 ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'connect' option doesn't match handle count.");
  		}
  
  		else {
  			connect = entry;
  		}
  
  		parsed.connect = connect;
  	}
  
  	function testOrientation ( parsed, entry ) {
  
  		// Set orientation to an a numerical value for easy
  		// array selection.
  		switch ( entry ){
  			case 'horizontal':
  				parsed.ort = 0;
  				break;
  			case 'vertical':
  				parsed.ort = 1;
  				break;
  			default:
  				throw new Error("noUiSlider (" + VERSION + "): 'orientation' option is invalid.");
  		}
  	}
  
  	function testMargin ( parsed, entry ) {
  
  		if ( !isNumeric(entry) ){
  			throw new Error("noUiSlider (" + VERSION + "): 'margin' option must be numeric.");
  		}
  
  		// Issue #582
  		if ( entry === 0 ) {
  			return;
  		}
  
  		parsed.margin = parsed.spectrum.getMargin(entry);
  
  		if ( !parsed.margin ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'margin' option is only supported on linear sliders.");
  		}
  	}
  
  	function testLimit ( parsed, entry ) {
  
  		if ( !isNumeric(entry) ){
  			throw new Error("noUiSlider (" + VERSION + "): 'limit' option must be numeric.");
  		}
  
  		parsed.limit = parsed.spectrum.getMargin(entry);
  
  		if ( !parsed.limit || parsed.handles < 2 ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'limit' option is only supported on linear sliders with 2 or more handles.");
  		}
  	}
  
  	function testPadding ( parsed, entry ) {
  
  		if ( !isNumeric(entry) && !Array.isArray(entry) ){
  			throw new Error("noUiSlider (" + VERSION + "): 'padding' option must be numeric or array of exactly 2 numbers.");
  		}
  
  		if ( Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1])) ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'padding' option must be numeric or array of exactly 2 numbers.");
  		}
  
  		if ( entry === 0 ) {
  			return;
  		}
  
  		if ( !Array.isArray(entry) ) {
  			entry = [entry, entry];
  		}
  
  		// 'getMargin' returns false for invalid values.
  		parsed.padding = [parsed.spectrum.getMargin(entry[0]), parsed.spectrum.getMargin(entry[1])];
  
  		if ( parsed.padding[0] === false || parsed.padding[1] === false ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'padding' option is only supported on linear sliders.");
  		}
  
  		if ( parsed.padding[0] < 0 || parsed.padding[1] < 0 ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'padding' option must be a positive number(s).");
  		}
  
  		if ( parsed.padding[0] + parsed.padding[1] >= 100 ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'padding' option must not exceed 100% of the range.");
  		}
  	}
  
  	function testDirection ( parsed, entry ) {
  
  		// Set direction as a numerical value for easy parsing.
  		// Invert connection for RTL sliders, so that the proper
  		// handles get the connect/background classes.
  		switch ( entry ) {
  			case 'ltr':
  				parsed.dir = 0;
  				break;
  			case 'rtl':
  				parsed.dir = 1;
  				break;
  			default:
  				throw new Error("noUiSlider (" + VERSION + "): 'direction' option was not recognized.");
  		}
  	}
  
  	function testBehaviour ( parsed, entry ) {
  
  		// Make sure the input is a string.
  		if ( typeof entry !== 'string' ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'behaviour' must be a string containing options.");
  		}
  
  		// Check if the string contains any keywords.
  		// None are required.
  		var tap = entry.indexOf('tap') >= 0;
  		var drag = entry.indexOf('drag') >= 0;
  		var fixed = entry.indexOf('fixed') >= 0;
  		var snap = entry.indexOf('snap') >= 0;
  		var hover = entry.indexOf('hover') >= 0;
  
  		if ( fixed ) {
  
  			if ( parsed.handles !== 2 ) {
  				throw new Error("noUiSlider (" + VERSION + "): 'fixed' behaviour must be used with 2 handles");
  			}
  
  			// Use margin to enforce fixed state
  			testMargin(parsed, parsed.start[1] - parsed.start[0]);
  		}
  
  		parsed.events = {
  			tap: tap || snap,
  			drag: drag,
  			fixed: fixed,
  			snap: snap,
  			hover: hover
  		};
  	}
  
  	function testTooltips ( parsed, entry ) {
  
  		if ( entry === false ) {
  			return;
  		}
  
  		else if ( entry === true ) {
  
  			parsed.tooltips = [];
  
  			for ( var i = 0; i < parsed.handles; i++ ) {
  				parsed.tooltips.push(true);
  			}
  		}
  
  		else {
  
  			parsed.tooltips = asArray(entry);
  
  			if ( parsed.tooltips.length !== parsed.handles ) {
  				throw new Error("noUiSlider (" + VERSION + "): must pass a formatter for all handles.");
  			}
  
  			parsed.tooltips.forEach(function(formatter){
  				if ( typeof formatter !== 'boolean' && (typeof formatter !== 'object' || typeof formatter.to !== 'function') ) {
  					throw new Error("noUiSlider (" + VERSION + "): 'tooltips' must be passed a formatter or 'false'.");
  				}
  			});
  		}
  	}
  
  	function testAriaFormat ( parsed, entry ) {
  		parsed.ariaFormat = entry;
  		validateFormat(entry);
  	}
  
  	function testFormat ( parsed, entry ) {
  		parsed.format = entry;
  		validateFormat(entry);
  	}
  
  	function testCssPrefix ( parsed, entry ) {
  
  		if ( typeof entry !== 'string' && entry !== false ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'cssPrefix' must be a string or `false`.");
  		}
  
  		parsed.cssPrefix = entry;
  	}
  
  	function testCssClasses ( parsed, entry ) {
  
  		if ( typeof entry !== 'object' ) {
  			throw new Error("noUiSlider (" + VERSION + "): 'cssClasses' must be an object.");
  		}
  
  		if ( typeof parsed.cssPrefix === 'string' ) {
  			parsed.cssClasses = {};
  
  			for ( var key in entry ) {
  				if ( !entry.hasOwnProperty(key) ) { continue; }
  
  				parsed.cssClasses[key] = parsed.cssPrefix + entry[key];
  			}
  		} else {
  			parsed.cssClasses = entry;
  		}
  	}
  
  	// Test all developer settings and parse to assumption-safe values.
  	function testOptions ( options ) {
  
  		// To prove a fix for #537, freeze options here.
  		// If the object is modified, an error will be thrown.
  		// Object.freeze(options);
  
  		var parsed = {
  			margin: 0,
  			limit: 0,
  			padding: 0,
  			animate: true,
  			animationDuration: 300,
  			ariaFormat: defaultFormatter,
  			format: defaultFormatter
  		};
  
  		// Tests are executed in the order they are presented here.
  		var tests = {
  			'step': { r: false, t: testStep },
  			'start': { r: true, t: testStart },
  			'connect': { r: true, t: testConnect },
  			'direction': { r: true, t: testDirection },
  			'snap': { r: false, t: testSnap },
  			'animate': { r: false, t: testAnimate },
  			'animationDuration': { r: false, t: testAnimationDuration },
  			'range': { r: true, t: testRange },
  			'orientation': { r: false, t: testOrientation },
  			'margin': { r: false, t: testMargin },
  			'limit': { r: false, t: testLimit },
  			'padding': { r: false, t: testPadding },
  			'behaviour': { r: true, t: testBehaviour },
  			'ariaFormat': { r: false, t: testAriaFormat },
  			'format': { r: false, t: testFormat },
  			'tooltips': { r: false, t: testTooltips },
  			'cssPrefix': { r: true, t: testCssPrefix },
  			'cssClasses': { r: true, t: testCssClasses }
  		};
  
  		var defaults = {
  			'connect': false,
  			'direction': 'ltr',
  			'behaviour': 'tap',
  			'orientation': 'horizontal',
  			'cssPrefix' : 'noUi-',
  			'cssClasses': {
  				target: 'target',
  				base: 'base',
  				origin: 'origin',
  				handle: 'handle',
  				handleLower: 'handle-lower',
  				handleUpper: 'handle-upper',
  				horizontal: 'horizontal',
  				vertical: 'vertical',
  				background: 'background',
  				connect: 'connect',
  				connects: 'connects',
  				ltr: 'ltr',
  				rtl: 'rtl',
  				draggable: 'draggable',
  				drag: 'state-drag',
  				tap: 'state-tap',
  				active: 'active',
  				tooltip: 'tooltip',
  				pips: 'pips',
  				pipsHorizontal: 'pips-horizontal',
  				pipsVertical: 'pips-vertical',
  				marker: 'marker',
  				markerHorizontal: 'marker-horizontal',
  				markerVertical: 'marker-vertical',
  				markerNormal: 'marker-normal',
  				markerLarge: 'marker-large',
  				markerSub: 'marker-sub',
  				value: 'value',
  				valueHorizontal: 'value-horizontal',
  				valueVertical: 'value-vertical',
  				valueNormal: 'value-normal',
  				valueLarge: 'value-large',
  				valueSub: 'value-sub'
  			}
  		};
  
  		// AriaFormat defaults to regular format, if any.
  		if ( options.format && !options.ariaFormat ) {
  			options.ariaFormat = options.format;
  		}
  
  		// Run all options through a testing mechanism to ensure correct
  		// input. It should be noted that options might get modified to
  		// be handled properly. E.g. wrapping integers in arrays.
  		Object.keys(tests).forEach(function( name ){
  
  			// If the option isn't set, but it is required, throw an error.
  			if ( !isSet(options[name]) && defaults[name] === undefined ) {
  
  				if ( tests[name].r ) {
  					throw new Error("noUiSlider (" + VERSION + "): '" + name + "' is required.");
  				}
  
  				return true;
  			}
  
  			tests[name].t( parsed, !isSet(options[name]) ? defaults[name] : options[name] );
  		});
  
  		// Forward pips options
  		parsed.pips = options.pips;
  
  		// All recent browsers accept unprefixed transform.
  		// We need -ms- for IE9 and -webkit- for older Android;
  		// Assume use of -webkit- if unprefixed and -ms- are not supported.
  		// https://caniuse.com/#feat=transforms2d
  		var d = document.createElement("div");
  		var msPrefix = d.style.msTransform !== undefined;
  		var noPrefix = d.style.transform !== undefined;
  
  		parsed.transformRule = noPrefix ? 'transform' : (msPrefix ? 'msTransform' : 'webkitTransform');
  
  		// Pips don't move, so we can place them using left/top.
  		var styles = [['left', 'top'], ['right', 'bottom']];
  
  		parsed.style = styles[parsed.dir][parsed.ort];
  
  		return parsed;
  	}
  
  
  function scope ( target, options, originalOptions ){
  
  	var actions = getActions();
  	var supportsTouchActionNone = getSupportsTouchActionNone();
  	var supportsPassive = supportsTouchActionNone && getSupportsPassive();
  
  	// All variables local to 'scope' are prefixed with 'scope_'
  	var scope_Target = target;
  	var scope_Locations = [];
  	var scope_Base;
  	var scope_Handles;
  	var scope_HandleNumbers = [];
  	var scope_ActiveHandlesCount = 0;
  	var scope_Connects;
  	var scope_Spectrum = options.spectrum;
  	var scope_Values = [];
  	var scope_Events = {};
  	var scope_Self;
  	var scope_Pips;
  	var scope_Document = target.ownerDocument;
  	var scope_DocumentElement = scope_Document.documentElement;
  	var scope_Body = scope_Document.body;
  
  
  	// For horizontal sliders in standard ltr documents,
  	// make .noUi-origin overflow to the left so the document doesn't scroll.
  	var scope_DirOffset = (scope_Document.dir === 'rtl') || (options.ort === 1) ? 0 : 100;
  
  /*! In this file: Construction of DOM elements; */
  
  	// Creates a node, adds it to target, returns the new node.
  	function addNodeTo ( addTarget, className ) {
  
  		var div = scope_Document.createElement('div');
  
  		if ( className ) {
  			addClass(div, className);
  		}
  
  		addTarget.appendChild(div);
  
  		return div;
  	}
  
  	// Append a origin to the base
  	function addOrigin ( base, handleNumber ) {
  
  		var origin = addNodeTo(base, options.cssClasses.origin);
  		var handle = addNodeTo(origin, options.cssClasses.handle);
  
  		handle.setAttribute('data-handle', handleNumber);
  
  		// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
  		// 0 = focusable and reachable
  		handle.setAttribute('tabindex', '0');
  		handle.setAttribute('role', 'slider');
  		handle.setAttribute('aria-orientation', options.ort ? 'vertical' : 'horizontal');
  
  		if ( handleNumber === 0 ) {
  			addClass(handle, options.cssClasses.handleLower);
  		}
  
  		else if ( handleNumber === options.handles - 1 ) {
  			addClass(handle, options.cssClasses.handleUpper);
  		}
  
  		return origin;
  	}
  
  	// Insert nodes for connect elements
  	function addConnect ( base, add ) {
  
  		if ( !add ) {
  			return false;
  		}
  
  		return addNodeTo(base, options.cssClasses.connect);
  	}
  
  	// Add handles to the slider base.
  	function addElements ( connectOptions, base ) {
  
  		var connectBase = addNodeTo(base, options.cssClasses.connects);
  
  		scope_Handles = [];
  		scope_Connects = [];
  
  		scope_Connects.push(addConnect(connectBase, connectOptions[0]));
  
  		// [::::O====O====O====]
  		// connectOptions = [0, 1, 1, 1]
  
  		for ( var i = 0; i < options.handles; i++ ) {
  			// Keep a list of all added handles.
  			scope_Handles.push(addOrigin(base, i));
  			scope_HandleNumbers[i] = i;
  			scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));
  		}
  	}
  
  	// Initialize a single slider.
  	function addSlider ( addTarget ) {
  
  		// Apply classes and data to the target.
  		addClass(addTarget, options.cssClasses.target);
  
  		if ( options.dir === 0 ) {
  			addClass(addTarget, options.cssClasses.ltr);
  		} else {
  			addClass(addTarget, options.cssClasses.rtl);
  		}
  
  		if ( options.ort === 0 ) {
  			addClass(addTarget, options.cssClasses.horizontal);
  		} else {
  			addClass(addTarget, options.cssClasses.vertical);
  		}
  
  		scope_Base = addNodeTo(addTarget, options.cssClasses.base);
  	}
  
  
  	function addTooltip ( handle, handleNumber ) {
  
  		if ( !options.tooltips[handleNumber] ) {
  			return false;
  		}
  
  		return addNodeTo(handle.firstChild, options.cssClasses.tooltip);
  	}
  
  	// The tooltips option is a shorthand for using the 'update' event.
  	function tooltips ( ) {
  
  		// Tooltips are added with options.tooltips in original order.
  		var tips = scope_Handles.map(addTooltip);
  
  		bindEvent('update', function(values, handleNumber, unencoded) {
  
  			if ( !tips[handleNumber] ) {
  				return;
  			}
  
  			var formattedValue = values[handleNumber];
  
  			if ( options.tooltips[handleNumber] !== true ) {
  				formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);
  			}
  
  			tips[handleNumber].innerHTML = formattedValue;
  		});
  	}
  
  
  	function aria ( ) {
  
  		bindEvent('update', function ( values, handleNumber, unencoded, tap, positions ) {
  
  			// Update Aria Values for all handles, as a change in one changes min and max values for the next.
  			scope_HandleNumbers.forEach(function( index ){
  
  				var handle = scope_Handles[index];
  
  				var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);
  				var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);
  
  				var now = positions[index];
  				var text = options.ariaFormat.to(unencoded[index]);
  
  				handle.children[0].setAttribute('aria-valuemin', min.toFixed(1));
  				handle.children[0].setAttribute('aria-valuemax', max.toFixed(1));
  				handle.children[0].setAttribute('aria-valuenow', now.toFixed(1));
  				handle.children[0].setAttribute('aria-valuetext', text);
  			});
  		});
  	}
  
  
  	function getGroup ( mode, values, stepped ) {
  
  		// Use the range.
  		if ( mode === 'range' || mode === 'steps' ) {
  			return scope_Spectrum.xVal;
  		}
  
  		if ( mode === 'count' ) {
  
  			if ( values < 2 ) {
  				throw new Error("noUiSlider (" + VERSION + "): 'values' (>= 2) required for mode 'count'.");
  			}
  
  			// Divide 0 - 100 in 'count' parts.
  			var interval = values - 1;
  			var spread = ( 100 / interval );
  
  			values = [];
  
  			// List these parts and have them handled as 'positions'.
  			while ( interval-- ) {
  				values[ interval ] = ( interval * spread );
  			}
  
  			values.push(100);
  
  			mode = 'positions';
  		}
  
  		if ( mode === 'positions' ) {
  
  			// Map all percentages to on-range values.
  			return values.map(function( value ){
  				return scope_Spectrum.fromStepping( stepped ? scope_Spectrum.getStep( value ) : value );
  			});
  		}
  
  		if ( mode === 'values' ) {
  
  			// If the value must be stepped, it needs to be converted to a percentage first.
  			if ( stepped ) {
  
  				return values.map(function( value ){
  
  					// Convert to percentage, apply step, return to value.
  					return scope_Spectrum.fromStepping( scope_Spectrum.getStep( scope_Spectrum.toStepping( value ) ) );
  				});
  
  			}
  
  			// Otherwise, we can simply use the values.
  			return values;
  		}
  	}
  
  	function generateSpread ( density, mode, group ) {
  
  		function safeIncrement(value, increment) {
  			// Avoid floating point variance by dropping the smallest decimal places.
  			return (value + increment).toFixed(7) / 1;
  		}
  
  		var indexes = {};
  		var firstInRange = scope_Spectrum.xVal[0];
  		var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length-1];
  		var ignoreFirst = false;
  		var ignoreLast = false;
  		var prevPct = 0;
  
  		// Create a copy of the group, sort it and filter away all duplicates.
  		group = unique(group.slice().sort(function(a, b){ return a - b; }));
  
  		// Make sure the range starts with the first element.
  		if ( group[0] !== firstInRange ) {
  			group.unshift(firstInRange);
  			ignoreFirst = true;
  		}
  
  		// Likewise for the last one.
  		if ( group[group.length - 1] !== lastInRange ) {
  			group.push(lastInRange);
  			ignoreLast = true;
  		}
  
  		group.forEach(function ( current, index ) {
  
  			// Get the current step and the lower + upper positions.
  			var step;
  			var i;
  			var q;
  			var low = current;
  			var high = group[index+1];
  			var newPct;
  			var pctDifference;
  			var pctPos;
  			var type;
  			var steps;
  			var realSteps;
  			var stepsize;
  
  			// When using 'steps' mode, use the provided steps.
  			// Otherwise, we'll step on to the next subrange.
  			if ( mode === 'steps' ) {
  				step = scope_Spectrum.xNumSteps[ index ];
  			}
  
  			// Default to a 'full' step.
  			if ( !step ) {
  				step = high-low;
  			}
  
  			// Low can be 0, so test for false. If high is undefined,
  			// we are at the last subrange. Index 0 is already handled.
  			if ( low === false || high === undefined ) {
  				return;
  			}
  
  			// Make sure step isn't 0, which would cause an infinite loop (#654)
  			step = Math.max(step, 0.0000001);
  
  			// Find all steps in the subrange.
  			for ( i = low; i <= high; i = safeIncrement(i, step) ) {
  
  				// Get the percentage value for the current step,
  				// calculate the size for the subrange.
  				newPct = scope_Spectrum.toStepping( i );
  				pctDifference = newPct - prevPct;
  
  				steps = pctDifference / density;
  				realSteps = Math.round(steps);
  
  				// This ratio represents the amount of percentage-space a point indicates.
  				// For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-devided.
  				// Round the percentage offset to an even number, then divide by two
  				// to spread the offset on both sides of the range.
  				stepsize = pctDifference/realSteps;
  
  				// Divide all points evenly, adding the correct number to this subrange.
  				// Run up to <= so that 100% gets a point, event if ignoreLast is set.
  				for ( q = 1; q <= realSteps; q += 1 ) {
  
  					// The ratio between the rounded value and the actual size might be ~1% off.
  					// Correct the percentage offset by the number of points
  					// per subrange. density = 1 will result in 100 points on the
  					// full range, 2 for 50, 4 for 25, etc.
  					pctPos = prevPct + ( q * stepsize );
  					indexes[pctPos.toFixed(5)] = ['x', 0];
  				}
  
  				// Determine the point type.
  				type = (group.indexOf(i) > -1) ? 1 : ( mode === 'steps' ? 2 : 0 );
  
  				// Enforce the 'ignoreFirst' option by overwriting the type for 0.
  				if ( !index && ignoreFirst ) {
  					type = 0;
  				}
  
  				if ( !(i === high && ignoreLast)) {
  					// Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.
  					indexes[newPct.toFixed(5)] = [i, type];
  				}
  
  				// Update the percentage count.
  				prevPct = newPct;
  			}
  		});
  
  		return indexes;
  	}
  
  	function addMarking ( spread, filterFunc, formatter ) {
  
  		var element = scope_Document.createElement('div');
  
  		var valueSizeClasses = [
  			options.cssClasses.valueNormal,
  			options.cssClasses.valueLarge,
  			options.cssClasses.valueSub
  		];
  		var markerSizeClasses = [
  			options.cssClasses.markerNormal,
  			options.cssClasses.markerLarge,
  			options.cssClasses.markerSub
  		];
  		var valueOrientationClasses = [
  			options.cssClasses.valueHorizontal,
  			options.cssClasses.valueVertical
  		];
  		var markerOrientationClasses = [
  			options.cssClasses.markerHorizontal,
  			options.cssClasses.markerVertical
  		];
  
  		addClass(element, options.cssClasses.pips);
  		addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);
  
  		function getClasses( type, source ){
  			var a = source === options.cssClasses.value;
  			var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;
  			var sizeClasses = a ? valueSizeClasses : markerSizeClasses;
  
  			return source + ' ' + orientationClasses[options.ort] + ' ' + sizeClasses[type];
  		}
  
  		function addSpread ( offset, values ){
  
  			// Apply the filter function, if it is set.
  			values[1] = (values[1] && filterFunc) ? filterFunc(values[0], values[1]) : values[1];
  
  			// Add a marker for every point
  			var node = addNodeTo(element, false);
  				node.className = getClasses(values[1], options.cssClasses.marker);
  				node.style[options.style] = offset + '%';
  
  			// Values are only appended for points marked '1' or '2'.
  			if ( values[1] ) {
  				node = addNodeTo(element, false);
  				node.className = getClasses(values[1], options.cssClasses.value);
  				node.setAttribute('data-value', values[0]);
  				node.style[options.style] = offset + '%';
  				node.innerText = formatter.to(values[0]);
  			}
  		}
  
  		// Append all points.
  		Object.keys(spread).forEach(function(a){
  			addSpread(a, spread[a]);
  		});
  
  		return element;
  	}
  
  	function removePips ( ) {
  		if ( scope_Pips ) {
  			removeElement(scope_Pips);
  			scope_Pips = null;
  		}
  	}
  
  	function pips ( grid ) {
  
  		// Fix #669
  		removePips();
  
  		var mode = grid.mode;
  		var density = grid.density || 1;
  		var filter = grid.filter || false;
  		var values = grid.values || false;
  		var stepped = grid.stepped || false;
  		var group = getGroup( mode, values, stepped );
  		var spread = generateSpread( density, mode, group );
  		var format = grid.format || {
  			to: Math.round
  		};
  
  		scope_Pips = scope_Target.appendChild(addMarking(
  			spread,
  			filter,
  			format
  		));
  
  		return scope_Pips;
  	}
  
  /*! In this file: Browser events (not slider events like slide, change); */
  
  	// Shorthand for base dimensions.
  	function baseSize ( ) {
  		var rect = scope_Base.getBoundingClientRect();
  		var alt = 'offset' + ['Width', 'Height'][options.ort];
  		return options.ort === 0 ? (rect.width||scope_Base[alt]) : (rect.height||scope_Base[alt]);
  	}
  
  	// Handler for attaching events trough a proxy.
  	function attachEvent ( events, element, callback, data ) {
  
  		// This function can be used to 'filter' events to the slider.
  		// element is a node, not a nodeList
  
  		var method = function ( e ){
  
  			e = fixEvent(e, data.pageOffset, data.target || element);
  
  			// fixEvent returns false if this event has a different target
  			// when handling (multi-) touch events;
  			if ( !e ) {
  				return false;
  			}
  
  			// doNotReject is passed by all end events to make sure released touches
  			// are not rejected, leaving the slider "stuck" to the cursor;
  			if ( scope_Target.hasAttribute('disabled') && !data.doNotReject ) {
  				return false;
  			}
  
  			// Stop if an active 'tap' transition is taking place.
  			if ( hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject ) {
  				return false;
  			}
  
  			// Ignore right or middle clicks on start #454
  			if ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {
  				return false;
  			}
  
  			// Ignore right or middle clicks on start #454
  			if ( data.hover && e.buttons ) {
  				return false;
  			}
  
  			// 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.
  			// iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support
  			// touch-action: manipulation, but that allows panning, which breaks
  			// sliders after zooming/on non-responsive pages.
  			// See: https://bugs.webkit.org/show_bug.cgi?id=133112
  			if ( !supportsPassive ) {
  				e.preventDefault();
  			}
  
  			e.calcPoint = e.points[ options.ort ];
  
  			// Call the event handler with the event [ and additional data ].
  			callback ( e, data );
  		};
  
  		var methods = [];
  
  		// Bind a closure on the target for every event type.
  		events.split(' ').forEach(function( eventName ){
  			element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);
  			methods.push([eventName, method]);
  		});
  
  		return methods;
  	}
  
  	// Provide a clean event with standardized offset values.
  	function fixEvent ( e, pageOffset, eventTarget ) {
  
  		// Filter the event to register the type, which can be
  		// touch, mouse or pointer. Offset changes need to be
  		// made on an event specific basis.
  		var touch = e.type.indexOf('touch') === 0;
  		var mouse = e.type.indexOf('mouse') === 0;
  		var pointer = e.type.indexOf('pointer') === 0;
  
  		var x;
  		var y;
  
  		// IE10 implemented pointer events with a prefix;
  		if ( e.type.indexOf('MSPointer') === 0 ) {
  			pointer = true;
  		}
  
  		// In the event that multitouch is activated, the only thing one handle should be concerned
  		// about is the touches that originated on top of it.
  		if ( touch ) {
  
  			// Returns true if a touch originated on the target.
  			var isTouchOnTarget = function (checkTouch) {
  				return checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);
  			};
  
  			// In the case of touchstart events, we need to make sure there is still no more than one
  			// touch on the target so we look amongst all touches.
  			if (e.type === 'touchstart') {
  
  				var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);
  
  				// Do not support more than one touch per handle.
  				if ( targetTouches.length > 1 ) {
  					return false;
  				}
  
  				x = targetTouches[0].pageX;
  				y = targetTouches[0].pageY;
  
  			} else {
  
  				// In the other cases, find on changedTouches is enough.
  				var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);
  
  				// Cancel if the target touch has not moved.
  				if ( !targetTouch ) {
  					return false;
  				}
  
  				x = targetTouch.pageX;
  				y = targetTouch.pageY;
  			}
  		}
  
  		pageOffset = pageOffset || getPageOffset(scope_Document);
  
  		if ( mouse || pointer ) {
  			x = e.clientX + pageOffset.x;
  			y = e.clientY + pageOffset.y;
  		}
  
  		e.pageOffset = pageOffset;
  		e.points = [x, y];
  		e.cursor = mouse || pointer; // Fix #435
  
  		return e;
  	}
  
  	// Translate a coordinate in the document to a percentage on the slider
  	function calcPointToPercentage ( calcPoint ) {
  		var location = calcPoint - offset(scope_Base, options.ort);
  		var proposal = ( location * 100 ) / baseSize();
  
  		// Clamp proposal between 0% and 100%
  		// Out-of-bound coordinates may occur when .noUi-base pseudo-elements
  		// are used (e.g. contained handles feature)
  		proposal = limit(proposal);
  
  		return options.dir ? 100 - proposal : proposal;
  	}
  
  	// Find handle closest to a certain percentage on the slider
  	function getClosestHandle ( proposal ) {
  
  		var closest = 100;
  		var handleNumber = false;
  
  		scope_Handles.forEach(function(handle, index){
  
  			// Disabled handles are ignored
  			if ( handle.hasAttribute('disabled') ) {
  				return;
  			}
  
  			var pos = Math.abs(scope_Locations[index] - proposal);
  
  			if ( pos < closest || (pos === 100 && closest === 100) ) {
  				handleNumber = index;
  				closest = pos;
  			}
  		});
  
  		return handleNumber;
  	}
  
  	// Fire 'end' when a mouse or pen leaves the document.
  	function documentLeave ( event, data ) {
  		if ( event.type === "mouseout" && event.target.nodeName === "HTML" && event.relatedTarget === null ){
  			eventEnd (event, data);
  		}
  	}
  
  	// Handle movement on document for handle and range drag.
  	function eventMove ( event, data ) {
  
  		// Fix #498
  		// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).
  		// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero
  		// IE9 has .buttons and .which zero on mousemove.
  		// Firefox breaks the spec MDN defines.
  		if ( navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) {
  			return eventEnd(event, data);
  		}
  
  		// Check if we are moving up or down
  		var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);
  
  		// Convert the movement into a percentage of the slider width/height
  		var proposal = (movement * 100) / data.baseSize;
  
  		moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);
  	}
  
  	// Unbind move events on document, call callbacks.
  	function eventEnd ( event, data ) {
  
  		// The handle is no longer active, so remove the class.
  		if ( data.handle ) {
  			removeClass(data.handle, options.cssClasses.active);
  			scope_ActiveHandlesCount -= 1;
  		}
  
  		// Unbind the move and end events, which are added on 'start'.
  		data.listeners.forEach(function( c ) {
  			scope_DocumentElement.removeEventListener(c[0], c[1]);
  		});
  
  		if ( scope_ActiveHandlesCount === 0 ) {
  			// Remove dragging class.
  			removeClass(scope_Target, options.cssClasses.drag);
  			setZindex();
  
  			// Remove cursor styles and text-selection events bound to the body.
  			if ( event.cursor ) {
  				scope_Body.style.cursor = '';
  				scope_Body.removeEventListener('selectstart', preventDefault);
  			}
  		}
  
  		data.handleNumbers.forEach(function(handleNumber){
  			fireEvent('change', handleNumber);
  			fireEvent('set', handleNumber);
  			fireEvent('end', handleNumber);
  		});
  	}
  
  	// Bind move events on document.
  	function eventStart ( event, data ) {
  
  		var handle;
  		if ( data.handleNumbers.length === 1 ) {
  
  			var handleOrigin = scope_Handles[data.handleNumbers[0]];
  
  			// Ignore 'disabled' handles
  			if ( handleOrigin.hasAttribute('disabled') ) {
  				return false;
  			}
  
  			handle = handleOrigin.children[0];
  			scope_ActiveHandlesCount += 1;
  
  			// Mark the handle as 'active' so it can be styled.
  			addClass(handle, options.cssClasses.active);
  		}
  
  		// A drag should never propagate up to the 'tap' event.
  		event.stopPropagation();
  
  		// Record the event listeners.
  		var listeners = [];
  
  		// Attach the move and end events.
  		var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {
  			// The event target has changed so we need to propagate the original one so that we keep
  			// relying on it to extract target touches.
  			target: event.target,
  			handle: handle,
  			listeners: listeners,
  			startCalcPoint: event.calcPoint,
  			baseSize: baseSize(),
  			pageOffset: event.pageOffset,
  			handleNumbers: data.handleNumbers,
  			buttonsProperty: event.buttons,
  			locations: scope_Locations.slice()
  		});
  
  		var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
  			target: event.target,
  			handle: handle,
  			listeners: listeners,
  			doNotReject: true,
  			handleNumbers: data.handleNumbers
  		});
  
  		var outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
  			target: event.target,
  			handle: handle,
  			listeners: listeners,
  			doNotReject: true,
  			handleNumbers: data.handleNumbers
  		});
  
  		// We want to make sure we pushed the listeners in the listener list rather than creating
  		// a new one as it has already been passed to the event handlers.
  		listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));
  
  		// Text selection isn't an issue on touch devices,
  		// so adding cursor styles can be skipped.
  		if ( event.cursor ) {
  
  			// Prevent the 'I' cursor and extend the range-drag cursor.
  			scope_Body.style.cursor = getComputedStyle(event.target).cursor;
  
  			// Mark the target with a dragging state.
  			if ( scope_Handles.length > 1 ) {
  				addClass(scope_Target, options.cssClasses.drag);
  			}
  
  			// Prevent text selection when dragging the handles.
  			// In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,
  			// which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,
  			// meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.
  			// The 'cursor' flag is false.
  			// See: http://caniuse.com/#search=selectstart
  			scope_Body.addEventListener('selectstart', preventDefault, false);
  		}
  
  		data.handleNumbers.forEach(function(handleNumber){
  			fireEvent('start', handleNumber);
  		});
  	}
  
  	// Move closest handle to tapped location.
  	function eventTap ( event ) {
  
  		// The tap event shouldn't propagate up
  		event.stopPropagation();
  
  		var proposal = calcPointToPercentage(event.calcPoint);
  		var handleNumber = getClosestHandle(proposal);
  
  		// Tackle the case that all handles are 'disabled'.
  		if ( handleNumber === false ) {
  			return false;
  		}
  
  		// Flag the slider as it is now in a transitional state.
  		// Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.
  		if ( !options.events.snap ) {
  			addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
  		}
  
  		setHandle(handleNumber, proposal, true, true);
  
  		setZindex();
  
  		fireEvent('slide', handleNumber, true);
  		fireEvent('update', handleNumber, true);
  		fireEvent('change', handleNumber, true);
  		fireEvent('set', handleNumber, true);
  
  		if ( options.events.snap ) {
  			eventStart(event, { handleNumbers: [handleNumber] });
  		}
  	}
  
  	// Fires a 'hover' event for a hovered mouse/pen position.
  	function eventHover ( event ) {
  
  		var proposal = calcPointToPercentage(event.calcPoint);
  
  		var to = scope_Spectrum.getStep(proposal);
  		var value = scope_Spectrum.fromStepping(to);
  
  		Object.keys(scope_Events).forEach(function( targetEvent ) {
  			if ( 'hover' === targetEvent.split('.')[0] ) {
  				scope_Events[targetEvent].forEach(function( callback ) {
  					callback.call( scope_Self, value );
  				});
  			}
  		});
  	}
  
  	// Attach events to several slider parts.
  	function bindSliderEvents ( behaviour ) {
  
  		// Attach the standard drag event to the handles.
  		if ( !behaviour.fixed ) {
  
  			scope_Handles.forEach(function( handle, index ){
  
  				// These events are only bound to the visual handle
  				// element, not the 'real' origin element.
  				attachEvent ( actions.start, handle.children[0], eventStart, {
  					handleNumbers: [index]
  				});
  			});
  		}
  
  		// Attach the tap event to the slider base.
  		if ( behaviour.tap ) {
  			attachEvent (actions.start, scope_Base, eventTap, {});
  		}
  
  		// Fire hover events
  		if ( behaviour.hover ) {
  			attachEvent (actions.move, scope_Base, eventHover, { hover: true });
  		}
  
  		// Make the range draggable.
  		if ( behaviour.drag ){
  
  			scope_Connects.forEach(function( connect, index ){
  
  				if ( connect === false || index === 0 || index === scope_Connects.length - 1 ) {
  					return;
  				}
  
  				var handleBefore = scope_Handles[index - 1];
  				var handleAfter = scope_Handles[index];
  				var eventHolders = [connect];
  
  				addClass(connect, options.cssClasses.draggable);
  
  				// When the range is fixed, the entire range can
  				// be dragged by the handles. The handle in the first
  				// origin will propagate the start event upward,
  				// but it needs to be bound manually on the other.
  				if ( behaviour.fixed ) {
  					eventHolders.push(handleBefore.children[0]);
  					eventHolders.push(handleAfter.children[0]);
  				}
  
  				eventHolders.forEach(function( eventHolder ) {
  					attachEvent ( actions.start, eventHolder, eventStart, {
  						handles: [handleBefore, handleAfter],
  						handleNumbers: [index - 1, index]
  					});
  				});
  			});
  		}
  	}
  
  /*! In this file: Slider events (not browser events); */
  
  	// Attach an event to this slider, possibly including a namespace
  	function bindEvent ( namespacedEvent, callback ) {
  		scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
  		scope_Events[namespacedEvent].push(callback);
  
  		// If the event bound is 'update,' fire it immediately for all handles.
  		if ( namespacedEvent.split('.')[0] === 'update' ) {
  			scope_Handles.forEach(function(a, index){
  				fireEvent('update', index);
  			});
  		}
  	}
  
  	// Undo attachment of event
  	function removeEvent ( namespacedEvent ) {
  
  		var event = namespacedEvent && namespacedEvent.split('.')[0];
  		var namespace = event && namespacedEvent.substring(event.length);
  
  		Object.keys(scope_Events).forEach(function( bind ){
  
  			var tEvent = bind.split('.')[0];
  			var tNamespace = bind.substring(tEvent.length);
  
  			if ( (!event || event === tEvent) && (!namespace || namespace === tNamespace) ) {
  				delete scope_Events[bind];
  			}
  		});
  	}
  
  	// External event handling
  	function fireEvent ( eventName, handleNumber, tap ) {
  
  		Object.keys(scope_Events).forEach(function( targetEvent ) {
  
  			var eventType = targetEvent.split('.')[0];
  
  			if ( eventName === eventType ) {
  				scope_Events[targetEvent].forEach(function( callback ) {
  
  					callback.call(
  						// Use the slider public API as the scope ('this')
  						scope_Self,
  						// Return values as array, so arg_1[arg_2] is always valid.
  						scope_Values.map(options.format.to),
  						// Handle index, 0 or 1
  						handleNumber,
  						// Unformatted slider values
  						scope_Values.slice(),
  						// Event is fired by tap, true or false
  						tap || false,
  						// Left offset of the handle, in relation to the slider
  						scope_Locations.slice()
  					);
  				});
  			}
  		});
  	}
  
  /*! In this file: Mechanics for slider operation */
  
  	function toPct ( pct ) {
  		return pct + '%';
  	}
  
  	// Split out the handle positioning logic so the Move event can use it, too
  	function checkHandlePosition ( reference, handleNumber, to, lookBackward, lookForward, getValue ) {
  
  		// For sliders with multiple handles, limit movement to the other handle.
  		// Apply the margin option by adding it to the handle positions.
  		if ( scope_Handles.length > 1 ) {
  
  			if ( lookBackward && handleNumber > 0 ) {
  				to = Math.max(to, reference[handleNumber - 1] + options.margin);
  			}
  
  			if ( lookForward && handleNumber < scope_Handles.length - 1 ) {
  				to = Math.min(to, reference[handleNumber + 1] - options.margin);
  			}
  		}
  
  		// The limit option has the opposite effect, limiting handles to a
  		// maximum distance from another. Limit must be > 0, as otherwise
  		// handles would be unmoveable.
  		if ( scope_Handles.length > 1 && options.limit ) {
  
  			if ( lookBackward && handleNumber > 0 ) {
  				to = Math.min(to, reference[handleNumber - 1] + options.limit);
  			}
  
  			if ( lookForward && handleNumber < scope_Handles.length - 1 ) {
  				to = Math.max(to, reference[handleNumber + 1] - options.limit);
  			}
  		}
  
  		// The padding option keeps the handles a certain distance from the
  		// edges of the slider. Padding must be > 0.
  		if ( options.padding ) {
  
  			if ( handleNumber === 0 ) {
  				to = Math.max(to, options.padding[0]);
  			}
  
  			if ( handleNumber === scope_Handles.length - 1 ) {
  				to = Math.min(to, 100 - options.padding[1]);
  			}
  		}
  
  		to = scope_Spectrum.getStep(to);
  
  		// Limit percentage to the 0 - 100 range
  		to = limit(to);
  
  		// Return false if handle can't move
  		if ( to === reference[handleNumber] && !getValue ) {
  			return false;
  		}
  
  		return to;
  	}
  
  	// Uses slider orientation to create CSS rules. a = base value;
  	function inRuleOrder ( v, a ) {
  		var o = options.ort;
  		return (o?a:v) + ', ' + (o?v:a);
  	}
  
  	// Moves handle(s) by a percentage
  	// (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])
  	function moveHandles ( upward, proposal, locations, handleNumbers ) {
  
  		var proposals = locations.slice();
  
  		var b = [!upward, upward];
  		var f = [upward, !upward];
  
  		// Copy handleNumbers so we don't change the dataset
  		handleNumbers = handleNumbers.slice();
  
  		// Check to see which handle is 'leading'.
  		// If that one can't move the second can't either.
  		if ( upward ) {
  			handleNumbers.reverse();
  		}
  
  		// Step 1: get the maximum percentage that any of the handles can move
  		if ( handleNumbers.length > 1 ) {
  
  			handleNumbers.forEach(function(handleNumber, o) {
  
  				var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false);
  
  				// Stop if one of the handles can't move.
  				if ( to === false ) {
  					proposal = 0;
  				} else {
  					proposal = to - proposals[handleNumber];
  					proposals[handleNumber] = to;
  				}
  			});
  		}
  
  		// If using one handle, check backward AND forward
  		else {
  			b = f = [true];
  		}
  
  		var state = false;
  
  		// Step 2: Try to set the handles with the found percentage
  		handleNumbers.forEach(function(handleNumber, o) {
  			state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
  		});
  
  		// Step 3: If a handle moved, fire events
  		if ( state ) {
  			handleNumbers.forEach(function(handleNumber){
  				fireEvent('update', handleNumber);
  				fireEvent('slide', handleNumber);
  			});
  		}
  	}
  
  	// Takes a base value and an offset. This offset is used for the connect bar size.
  	// In the initial design for this feature, the origin element was 1% wide.
  	// Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature
  	// in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223
  	function transformDirection ( a, b ) {
  		return options.dir ? 100 - a - b : a;
  	}
  
  	// Updates scope_Locations and scope_Values, updates visual state
  	function updateHandlePosition ( handleNumber, to ) {
  
  		// Update locations.
  		scope_Locations[handleNumber] = to;
  
  		// Convert the value to the slider stepping/range.
  		scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);
  
  		var rule = 'translate(' + inRuleOrder(toPct(transformDirection(to, 0) - scope_DirOffset), '0') + ')';
  		scope_Handles[handleNumber].style[options.transformRule] = rule;
  
  		updateConnect(handleNumber);
  		updateConnect(handleNumber + 1);
  	}
  
  	// Handles before the slider middle are stacked later = higher,
  	// Handles after the middle later is lower
  	// [[7] [8] .......... | .......... [5] [4]
  	function setZindex ( ) {
  
  		scope_HandleNumbers.forEach(function(handleNumber){
  			var dir = (scope_Locations[handleNumber] > 50 ? -1 : 1);
  			var zIndex = 3 + (scope_Handles.length + (dir * handleNumber));
  			scope_Handles[handleNumber].style.zIndex = zIndex;
  		});
  	}
  
  	// Test suggested values and apply margin, step.
  	function setHandle ( handleNumber, to, lookBackward, lookForward ) {
  
  		to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);
  
  		if ( to === false ) {
  			return false;
  		}
  
  		updateHandlePosition(handleNumber, to);
  
  		return true;
  	}
  
  	// Updates style attribute for connect nodes
  	function updateConnect ( index ) {
  
  		// Skip connects set to false
  		if ( !scope_Connects[index] ) {
  			return;
  		}
  
  		var l = 0;
  		var h = 100;
  
  		if ( index !== 0 ) {
  			l = scope_Locations[index - 1];
  		}
  
  		if ( index !== scope_Connects.length - 1 ) {
  			h = scope_Locations[index];
  		}
  
  		// We use two rules:
  		// 'translate' to change the left/top offset;
  		// 'scale' to change the width of the element;
  		// As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)
  		var connectWidth = h - l;
  		var translateRule = 'translate(' + inRuleOrder(toPct(transformDirection(l, connectWidth)), '0') + ')';
  		var scaleRule = 'scale(' + inRuleOrder(connectWidth / 100, '1') + ')';
  
  		scope_Connects[index].style[options.transformRule] = translateRule + ' ' + scaleRule;
  	}
  
  /*! In this file: All methods eventually exposed in slider.noUiSlider... */
  
  	// Parses value passed to .set method. Returns current value if not parse-able.
  	function resolveToValue ( to, handleNumber ) {
  
  		// Setting with null indicates an 'ignore'.
  		// Inputting 'false' is invalid.
  		if ( to === null || to === false || to === undefined ) {
  			return scope_Locations[handleNumber];
  		}
  
  		// If a formatted number was passed, attempt to decode it.
  		if ( typeof to === 'number' ) {
  			to = String(to);
  		}
  
  		to = options.format.from(to);
  		to = scope_Spectrum.toStepping(to);
  
  		// If parsing the number failed, use the current value.
  		if ( to === false || isNaN(to) ) {
  			return scope_Locations[handleNumber];
  		}
  
  		return to;
  	}
  
  	// Set the slider value.
  	function valueSet ( input, fireSetEvent ) {
  
  		var values = asArray(input);
  		var isInit = scope_Locations[0] === undefined;
  
  		// Event fires by default
  		fireSetEvent = (fireSetEvent === undefined ? true : !!fireSetEvent);
  
  		// Animation is optional.
  		// Make sure the initial values were set before using animated placement.
  		if ( options.animate && !isInit ) {
  			addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
  		}
  
  		// First pass, without lookAhead but with lookBackward. Values are set from left to right.
  		scope_HandleNumbers.forEach(function(handleNumber){
  			setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false);
  		});
  
  		// Second pass. Now that all base values are set, apply constraints
  		scope_HandleNumbers.forEach(function(handleNumber){
  			setHandle(handleNumber, scope_Locations[handleNumber], true, true);
  		});
  
  		setZindex();
  
  		scope_HandleNumbers.forEach(function(handleNumber){
  
  			fireEvent('update', handleNumber);
  
  			// Fire the event only for handles that received a new value, as per #579
  			if ( values[handleNumber] !== null && fireSetEvent ) {
  				fireEvent('set', handleNumber);
  			}
  		});
  	}
  
  	// Reset slider to initial values
  	function valueReset ( fireSetEvent ) {
  		valueSet(options.start, fireSetEvent);
  	}
  
  	// Get the slider value.
  	function valueGet ( ) {
  
  		var values = scope_Values.map(options.format.to);
  
  		// If only one handle is used, return a single value.
  		if ( values.length === 1 ){
  			return values[0];
  		}
  
  		return values;
  	}
  
  	// Removes classes from the root and empties it.
  	function destroy ( ) {
  
  		for ( var key in options.cssClasses ) {
  			if ( !options.cssClasses.hasOwnProperty(key) ) { continue; }
  			removeClass(scope_Target, options.cssClasses[key]);
  		}
  
  		while (scope_Target.firstChild) {
  			scope_Target.removeChild(scope_Target.firstChild);
  		}
  
  		delete scope_Target.noUiSlider;
  	}
  
  	// Get the current step size for the slider.
  	function getCurrentStep ( ) {
  
  		// Check all locations, map them to their stepping point.
  		// Get the step point, then find it in the input list.
  		return scope_Locations.map(function( location, index ){
  
  			var nearbySteps = scope_Spectrum.getNearbySteps( location );
  			var value = scope_Values[index];
  			var increment = nearbySteps.thisStep.step;
  			var decrement = null;
  
  			// If the next value in this step moves into the next step,
  			// the increment is the start of the next step - the current value
  			if ( increment !== false ) {
  				if ( value + increment > nearbySteps.stepAfter.startValue ) {
  					increment = nearbySteps.stepAfter.startValue - value;
  				}
  			}
  
  
  			// If the value is beyond the starting point
  			if ( value > nearbySteps.thisStep.startValue ) {
  				decrement = nearbySteps.thisStep.step;
  			}
  
  			else if ( nearbySteps.stepBefore.step === false ) {
  				decrement = false;
  			}
  
  			// If a handle is at the start of a step, it always steps back into the previous step first
  			else {
  				decrement = value - nearbySteps.stepBefore.highestStep;
  			}
  
  
  			// Now, if at the slider edges, there is not in/decrement
  			if ( location === 100 ) {
  				increment = null;
  			}
  
  			else if ( location === 0 ) {
  				decrement = null;
  			}
  
  			// As per #391, the comparison for the decrement step can have some rounding issues.
  			var stepDecimals = scope_Spectrum.countStepDecimals();
  
  			// Round per #391
  			if ( increment !== null && increment !== false ) {
  				increment = Number(increment.toFixed(stepDecimals));
  			}
  
  			if ( decrement !== null && decrement !== false ) {
  				decrement = Number(decrement.toFixed(stepDecimals));
  			}
  
  			return [decrement, increment];
  		});
  	}
  
  	// Updateable: margin, limit, padding, step, range, animate, snap
  	function updateOptions ( optionsToUpdate, fireSetEvent ) {
  
  		// Spectrum is created using the range, snap, direction and step options.
  		// 'snap' and 'step' can be updated.
  		// If 'snap' and 'step' are not passed, they should remain unchanged.
  		var v = valueGet();
  
  		var updateAble = ['margin', 'limit', 'padding', 'range', 'animate', 'snap', 'step', 'format'];
  
  		// Only change options that we're actually passed to update.
  		updateAble.forEach(function(name){
  			if ( optionsToUpdate[name] !== undefined ) {
  				originalOptions[name] = optionsToUpdate[name];
  			}
  		});
  
  		var newOptions = testOptions(originalOptions);
  
  		// Load new options into the slider state
  		updateAble.forEach(function(name){
  			if ( optionsToUpdate[name] !== undefined ) {
  				options[name] = newOptions[name];
  			}
  		});
  
  		scope_Spectrum = newOptions.spectrum;
  
  		// Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)
  		options.margin = newOptions.margin;
  		options.limit = newOptions.limit;
  		options.padding = newOptions.padding;
  
  		// Update pips, removes existing.
  		if ( options.pips ) {
  			pips(options.pips);
  		}
  
  		// Invalidate the current positioning so valueSet forces an update.
  		scope_Locations = [];
  		valueSet(optionsToUpdate.start || v, fireSetEvent);
  	}
  
  /*! In this file: Calls to functions. All other scope_ files define functions only; */
  
  	// Create the base element, initialize HTML and set classes.
  	// Add handles and connect elements.
  	addSlider(scope_Target);
  	addElements(options.connect, scope_Base);
  
  	// Attach user events.
  	bindSliderEvents(options.events);
  
  	// Use the public value method to set the start values.
  	valueSet(options.start);
  
  	scope_Self = {
  		destroy: destroy,
  		steps: getCurrentStep,
  		on: bindEvent,
  		off: removeEvent,
  		get: valueGet,
  		set: valueSet,
  		reset: valueReset,
  		// Exposed for unit testing, don't use this in your application.
  		__moveHandles: function(a, b, c) { moveHandles(a, b, scope_Locations, c); },
  		options: originalOptions, // Issue #600, #678
  		updateOptions: updateOptions,
  		target: scope_Target, // Issue #597
  		removePips: removePips,
  		pips: pips // Issue #594
  	};
  
  	if ( options.pips ) {
  		pips(options.pips);
  	}
  
  	if ( options.tooltips ) {
  		tooltips();
  	}
  
  	aria();
  
  	return scope_Self;
  
  }
  
  
  	// Run the standard initializer
  	function initialize ( target, originalOptions ) {
  
  		if ( !target || !target.nodeName ) {
  			throw new Error("noUiSlider (" + VERSION + "): create requires a single element, got: " + target);
  		}
  
  		// Throw an error if the slider was already initialized.
  		if ( target.noUiSlider ) {
  			throw new Error("noUiSlider (" + VERSION + "): Slider was already initialized.");
  		}
  
  		// Test the options and create the slider environment;
  		var options = testOptions( originalOptions, target );
  		var api = scope( target, options, originalOptions );
  
  		target.noUiSlider = api;
  
  		return api;
  	}
  
  	// Use an object instead of a function for future expandability;
  	return {
  		version: VERSION,
  		create: initialize
  	};
  
  }));
  
  // jQuery Mask Plugin v1.14.15
  // github.com/igorescobar/jQuery-Mask-Plugin
  var $jscomp={scope:{},findInternal:function(a,l,d){a instanceof String&&(a=String(a));for(var p=a.length,h=0;h<p;h++){var b=a[h];if(l.call(d,b,h,a))return{i:h,v:b}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,l,d){if(d.get||d.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[l]=d.value)};
  $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,l,d,p){if(l){d=$jscomp.global;a=a.split(".");for(p=0;p<a.length-1;p++){var h=a[p];h in d||(d[h]={});d=d[h]}a=a[a.length-1];p=d[a];l=l(p);l!=p&&null!=l&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:l})}};
  $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6-impl","es3");
  (function(a,l,d){"function"===typeof define&&define.amd?define(["jquery"],a):"object"===typeof exports?module.exports=a(require("jquery")):a(l||d)})(function(a){var l=function(b,e,f){var c={invalid:[],getCaret:function(){try{var a,r=0,g=b.get(0),e=document.selection,f=g.selectionStart;if(e&&-1===navigator.appVersion.indexOf("MSIE 10"))a=e.createRange(),a.moveStart("character",-c.val().length),r=a.text.length;else if(f||"0"===f)r=f;return r}catch(C){}},setCaret:function(a){try{if(b.is(":focus")){var c,
  g=b.get(0);g.setSelectionRange?g.setSelectionRange(a,a):(c=g.createTextRange(),c.collapse(!0),c.moveEnd("character",a),c.moveStart("character",a),c.select())}}catch(B){}},events:function(){b.on("keydown.mask",function(a){b.data("mask-keycode",a.keyCode||a.which);b.data("mask-previus-value",b.val());b.data("mask-previus-caret-pos",c.getCaret());c.maskDigitPosMapOld=c.maskDigitPosMap}).on(a.jMaskGlobals.useInput?"input.mask":"keyup.mask",c.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){b.keydown().keyup()},
  100)}).on("change.mask",function(){b.data("changed",!0)}).on("blur.mask",function(){d===c.val()||b.data("changed")||b.trigger("change");b.data("changed",!1)}).on("blur.mask",function(){d=c.val()}).on("focus.mask",function(b){!0===f.selectOnFocus&&a(b.target).select()}).on("focusout.mask",function(){f.clearIfNotMatch&&!h.test(c.val())&&c.val("")})},getRegexMask:function(){for(var a=[],b,c,f,n,d=0;d<e.length;d++)(b=m.translation[e.charAt(d)])?(c=b.pattern.toString().replace(/.{1}$|^.{1}/g,""),f=b.optional,
  (b=b.recursive)?(a.push(e.charAt(d)),n={digit:e.charAt(d),pattern:c}):a.push(f||b?c+"?":c)):a.push(e.charAt(d).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));a=a.join("");n&&(a=a.replace(new RegExp("("+n.digit+"(.*"+n.digit+")?)"),"($1)?").replace(new RegExp(n.digit,"g"),n.pattern));return new RegExp(a)},destroyEvents:function(){b.off("input keydown keyup paste drop blur focusout ".split(" ").join(".mask "))},val:function(a){var c=b.is("input")?"val":"text";if(0<arguments.length){if(b[c]()!==a)b[c](a);
  c=b}else c=b[c]();return c},calculateCaretPosition:function(){var a=b.data("mask-previus-value")||"",e=c.getMasked(),g=c.getCaret();if(a!==e){var f=b.data("mask-previus-caret-pos")||0,e=e.length,d=a.length,m=a=0,h=0,l=0,k;for(k=g;k<e&&c.maskDigitPosMap[k];k++)m++;for(k=g-1;0<=k&&c.maskDigitPosMap[k];k--)a++;for(k=g-1;0<=k;k--)c.maskDigitPosMap[k]&&h++;for(k=f-1;0<=k;k--)c.maskDigitPosMapOld[k]&&l++;g>d?g=10*e:f>=g&&f!==d?c.maskDigitPosMapOld[g]||(f=g,g=g-(l-h)-a,c.maskDigitPosMap[g]&&(g=f)):g>f&&
  (g=g+(h-l)+m)}return g},behaviour:function(f){f=f||window.event;c.invalid=[];var e=b.data("mask-keycode");if(-1===a.inArray(e,m.byPassKeys)){var e=c.getMasked(),g=c.getCaret();setTimeout(function(){c.setCaret(c.calculateCaretPosition())},a.jMaskGlobals.keyStrokeCompensation);c.val(e);c.setCaret(g);return c.callbacks(f)}},getMasked:function(a,b){var g=[],d=void 0===b?c.val():b+"",n=0,h=e.length,q=0,l=d.length,k=1,r="push",p=-1,t=0,y=[],v,z;f.reverse?(r="unshift",k=-1,v=0,n=h-1,q=l-1,z=function(){return-1<
  n&&-1<q}):(v=h-1,z=function(){return n<h&&q<l});for(var A;z();){var x=e.charAt(n),w=d.charAt(q),u=m.translation[x];if(u)w.match(u.pattern)?(g[r](w),u.recursive&&(-1===p?p=n:n===v&&n!==p&&(n=p-k),v===p&&(n-=k)),n+=k):w===A?(t--,A=void 0):u.optional?(n+=k,q-=k):u.fallback?(g[r](u.fallback),n+=k,q-=k):c.invalid.push({p:q,v:w,e:u.pattern}),q+=k;else{if(!a)g[r](x);w===x?(y.push(q),q+=k):(A=x,y.push(q+t),t++);n+=k}}d=e.charAt(v);h!==l+1||m.translation[d]||g.push(d);g=g.join("");c.mapMaskdigitPositions(g,
  y,l);return g},mapMaskdigitPositions:function(a,b,e){a=f.reverse?a.length-e:0;c.maskDigitPosMap={};for(e=0;e<b.length;e++)c.maskDigitPosMap[b[e]+a]=1},callbacks:function(a){var h=c.val(),g=h!==d,m=[h,a,b,f],q=function(a,b,c){"function"===typeof f[a]&&b&&f[a].apply(this,c)};q("onChange",!0===g,m);q("onKeyPress",!0===g,m);q("onComplete",h.length===e.length,m);q("onInvalid",0<c.invalid.length,[h,a,b,c.invalid,f])}};b=a(b);var m=this,d=c.val(),h;e="function"===typeof e?e(c.val(),void 0,b,f):e;m.mask=
  e;m.options=f;m.remove=function(){var a=c.getCaret();m.options.placeholder&&b.removeAttr("placeholder");b.data("mask-maxlength")&&b.removeAttr("maxlength");c.destroyEvents();c.val(m.getCleanVal());c.setCaret(a);return b};m.getCleanVal=function(){return c.getMasked(!0)};m.getMaskedVal=function(a){return c.getMasked(!1,a)};m.init=function(d){d=d||!1;f=f||{};m.clearIfNotMatch=a.jMaskGlobals.clearIfNotMatch;m.byPassKeys=a.jMaskGlobals.byPassKeys;m.translation=a.extend({},a.jMaskGlobals.translation,f.translation);
  m=a.extend(!0,{},m,f);h=c.getRegexMask();if(d)c.events(),c.val(c.getMasked());else{f.placeholder&&b.attr("placeholder",f.placeholder);b.data("mask")&&b.attr("autocomplete","off");d=0;for(var l=!0;d<e.length;d++){var g=m.translation[e.charAt(d)];if(g&&g.recursive){l=!1;break}}l&&b.attr("maxlength",e.length).data("mask-maxlength",!0);c.destroyEvents();c.events();d=c.getCaret();c.val(c.getMasked());c.setCaret(d)}};m.init(!b.is("input"))};a.maskWatchers={};var d=function(){var b=a(this),e={},f=b.attr("data-mask");
  b.attr("data-mask-reverse")&&(e.reverse=!0);b.attr("data-mask-clearifnotmatch")&&(e.clearIfNotMatch=!0);"true"===b.attr("data-mask-selectonfocus")&&(e.selectOnFocus=!0);if(p(b,f,e))return b.data("mask",new l(this,f,e))},p=function(b,e,f){f=f||{};var c=a(b).data("mask"),d=JSON.stringify;b=a(b).val()||a(b).text();try{return"function"===typeof e&&(e=e(b)),"object"!==typeof c||d(c.options)!==d(f)||c.mask!==e}catch(t){}},h=function(a){var b=document.createElement("div"),d;a="on"+a;d=a in b;d||(b.setAttribute(a,
  "return;"),d="function"===typeof b[a]);return d};a.fn.mask=function(b,d){d=d||{};var e=this.selector,c=a.jMaskGlobals,h=c.watchInterval,c=d.watchInputs||c.watchInputs,t=function(){if(p(this,b,d))return a(this).data("mask",new l(this,b,d))};a(this).each(t);e&&""!==e&&c&&(clearInterval(a.maskWatchers[e]),a.maskWatchers[e]=setInterval(function(){a(document).find(e).each(t)},h));return this};a.fn.masked=function(a){return this.data("mask").getMaskedVal(a)};a.fn.unmask=function(){clearInterval(a.maskWatchers[this.selector]);
  delete a.maskWatchers[this.selector];return this.each(function(){var b=a(this).data("mask");b&&b.remove().removeData("mask")})};a.fn.cleanVal=function(){return this.data("mask").getCleanVal()};a.applyDataMask=function(b){b=b||a.jMaskGlobals.maskElements;(b instanceof a?b:a(b)).filter(a.jMaskGlobals.dataMaskAttr).each(d)};h={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&
  h("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};a.jMaskGlobals=a.jMaskGlobals||{};h=a.jMaskGlobals=a.extend(!0,{},h,a.jMaskGlobals);h.dataMask&&a.applyDataMask();setInterval(function(){a.jMaskGlobals.watchDataMask&&a.applyDataMask()},h.watchInterval)},window.jQuery,window.Zepto);
  
  //# sourceMappingURL=frontend-event-libs.js.map
  