Commit caa59c72 authored by Tobias Reich's avatar Tobias Reich
Browse files

Fixed "If EXIF data is missing, don't show them in the info #194"

parent 55295fe4
......@@ -322,7 +322,7 @@ build = {
["Tags", build.tags(photoJSON.tags, forView)]
];
if ((photoJSON.takestamp+photoJSON.make+photoJSON.model+photoJSON.shutter+photoJSON.aperture+photoJSON.focal+photoJSON.iso)!=="null") {
if ((photoJSON.takestamp+photoJSON.make+photoJSON.model+photoJSON.shutter+photoJSON.aperture+photoJSON.focal+photoJSON.iso)!="0") {
infos = infos.concat([
["", "Camera"],
......
function mobileBrowser(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?!0:!1}function gup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t="[\\?&]"+e+"=([^&#]*)",n=new RegExp(t),o=n.exec(window.location.href);return null===o?"":o[1]}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=J.type(e);return"function"===n||J.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function o(e,t,n){if(J.isFunction(t))return J.grep(e,function(e,o){return!!t.call(e,o,e)!==n});if(t.nodeType)return J.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return J.filter(t,e,n);t=J.filter(t,e)}return J.grep(e,function(e){return z.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t=ft[e]={};return J.each(e.match(ht)||[],function(e,n){t[n]=!0}),t}function r(){Q.removeEventListener("DOMContentLoaded",r,!1),e.removeEventListener("load",r,!1),J.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=J.expando+Math.random()}function l(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(wt,"-$1").toLowerCase(),n=e.getAttribute(o),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:yt.test(n)?J.parseJSON(n):n}catch(i){}bt.set(e,t,n)}else n=void 0;return n}function u(){return!0}function c(){return!1}function d(){try{return Q.activeElement}catch(e){}}function p(e,t){return J.nodeName(e,"table")&&J.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function h(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function f(e){var t=Lt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n=0,o=e.length;o>n;n++)vt.set(e[n],"globalEval",!t||vt.get(t[n],"globalEval"))}function g(e,t){var n,o,i,a,r,s,l,u;if(1===t.nodeType){if(vt.hasData(e)&&(a=vt.access(e),r=vt.set(t,a),u=a.events)){delete r.handle,r.events={};for(i in u)for(n=0,o=u[i].length;o>n;n++)J.event.add(t,i,u[i][n])}bt.hasData(e)&&(s=bt.access(e),l=J.extend({},s),bt.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&J.nodeName(e,t)?J.merge([e],n):n}function b(e,t){var n=t.nodeName.toLowerCase();"input"===n&&kt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function y(t,n){var o,i=J(n.createElement(t)).appendTo(n.body),a=e.getDefaultComputedStyle&&(o=e.getDefaultComputedStyle(i[0]))?o.display:J.css(i[0],"display");return i.detach(),a}function w(e){var t=Q,n=Rt[e];return n||(n=y(e,t),"none"!==n&&n||(Ht=(Ht||J("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Ht[0].contentDocument,t.write(),t.close(),n=y(e,t),Ht.detach()),Rt[e]=n),n}function x(e,t,n){var o,i,a,r,s=e.style;return n=n||Wt(e),n&&(r=n.getPropertyValue(t)||n[t]),n&&(""!==r||J.contains(e.ownerDocument,e)||(r=J.style(e,t)),Ft.test(r)&&Bt.test(t)&&(o=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=r,r=n.width,s.width=o,s.minWidth=i,s.maxWidth=a)),void 0!==r?r+"":r}function T(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function $(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),o=t,i=Vt.length;i--;)if(t=Vt[i]+n,t in e)return t;return o}function k(e,t,n){var o=Xt.exec(t);return o?Math.max(0,o[1]-(n||0))+(o[2]||"px"):t}function j(e,t,n,o,i){for(var a=n===(o?"border":"content")?4:"width"===t?1:0,r=0;4>a;a+=2)"margin"===n&&(r+=J.css(e,n+Tt[a],!0,i)),o?("content"===n&&(r-=J.css(e,"padding"+Tt[a],!0,i)),"margin"!==n&&(r-=J.css(e,"border"+Tt[a]+"Width",!0,i))):(r+=J.css(e,"padding"+Tt[a],!0,i),"padding"!==n&&(r+=J.css(e,"border"+Tt[a]+"Width",!0,i)));return r}function C(e,t,n){var o=!0,i="width"===t?e.offsetWidth:e.offsetHeight,a=Wt(e),r="border-box"===J.css(e,"boxSizing",!1,a);if(0>=i||null==i){if(i=x(e,t,a),(0>i||null==i)&&(i=e.style[t]),Ft.test(i))return i;o=r&&(G.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+j(e,t,n||(r?"border":"content"),o,a)+"px"}function D(e,t){for(var n,o,i,a=[],r=0,s=e.length;s>r;r++)o=e[r],o.style&&(a[r]=vt.get(o,"olddisplay"),n=o.style.display,t?(a[r]||"none"!==n||(o.style.display=""),""===o.style.display&&$t(o)&&(a[r]=vt.access(o,"olddisplay",w(o.nodeName)))):(i=$t(o),"none"===n&&i||vt.set(o,"olddisplay",i?n:J.css(o,"display"))));for(r=0;s>r;r++)o=e[r],o.style&&(t&&"none"!==o.style.display&&""!==o.style.display||(o.style.display=t?a[r]||"":"none"));return e}function S(e,t,n,o,i){return new S.prototype.init(e,t,n,o,i)}function A(){return setTimeout(function(){Gt=void 0}),Gt=J.now()}function N(e,t){var n,o=0,i={height:e};for(t=t?1:0;4>o;o+=2-t)n=Tt[o],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function I(e,t,n){for(var o,i=(nn[t]||[]).concat(nn["*"]),a=0,r=i.length;r>a;a++)if(o=i[a].call(n,t,e))return o}function E(e,t,n){var o,i,a,r,s,l,u,c,d=this,p={},h=e.style,f=e.nodeType&&$t(e),m=vt.get(e,"fxshow");n.queue||(s=J._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,J.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=J.css(e,"display"),c="none"===u?vt.get(e,"olddisplay")||w(e.nodeName):u,"inline"===c&&"none"===J.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(o in t)if(i=t[o],Zt.exec(i)){if(delete t[o],a=a||"toggle"===i,i===(f?"hide":"show")){if("show"!==i||!m||void 0===m[o])continue;f=!0}p[o]=m&&m[o]||J.style(e,o)}else u=void 0;if(J.isEmptyObject(p))"inline"===("none"===u?w(e.nodeName):u)&&(h.display=u);else{m?"hidden"in m&&(f=m.hidden):m=vt.access(e,"fxshow",{}),a&&(m.hidden=!f),f?J(e).show():d.done(function(){J(e).hide()}),d.done(function(){var t;vt.remove(e,"fxshow");for(t in p)J.style(e,t,p[t])});for(o in p)r=I(f?m[o]:0,o,d),o in m||(m[o]=r.start,f&&(r.end=r.start,r.start="width"===o||"height"===o?1:0))}}function _(e,t){var n,o,i,a,r;for(n in e)if(o=J.camelCase(n),i=t[o],a=e[n],J.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==o&&(e[o]=a,delete e[n]),r=J.cssHooks[o],r&&"expand"in r){a=r.expand(a),delete e[o];for(n in a)n in e||(e[n]=a[n],t[n]=i)}else t[o]=i}function M(e,t,n){var o,i,a=0,r=tn.length,s=J.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=Gt||A(),n=Math.max(0,u.startTime+u.duration-t),o=n/u.duration||0,a=1-o,r=0,l=u.tweens.length;l>r;r++)u.tweens[r].run(a);return s.notifyWith(e,[u,a,n]),1>a&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:J.extend({},t),opts:J.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Gt||A(),duration:n.duration,tweens:[],createTween:function(t,n){var o=J.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(o),o},stop:function(t){var n=0,o=t?u.tweens.length:0;if(i)return this;for(i=!0;o>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(_(c,u.opts.specialEasing);r>a;a++)if(o=tn[a].call(u,e,c,u.opts))return o;return J.map(c,I,u),J.isFunction(u.opts.start)&&u.opts.start.call(e,u),J.fx.timer(J.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function P(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var o,i=0,a=t.toLowerCase().match(ht)||[];if(J.isFunction(n))for(;o=a[i++];)"+"===o[0]?(o=o.slice(1)||"*",(e[o]=e[o]||[]).unshift(n)):(e[o]=e[o]||[]).push(n)}}function L(e,t,n,o){function i(s){var l;return a[s]=!0,J.each(e[s]||[],function(e,s){var u=s(t,n,o);return"string"!=typeof u||r||a[u]?r?!(l=u):void 0:(t.dataTypes.unshift(u),i(u),!1)}),l}var a={},r=e===Tn;return i(t.dataTypes[0])||!a["*"]&&i("*")}function O(e,t){var n,o,i=J.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:o||(o={}))[n]=t[n]);return o&&J.extend(!0,e,o),e}function q(e,t,n){for(var o,i,a,r,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(i in s)if(s[i]&&s[i].test(o)){l.unshift(i);break}if(l[0]in n)a=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){a=i;break}r||(r=i)}a=a||r}return a?(a!==l[0]&&l.unshift(a),n[a]):void 0}function H(e,t,n,o){var i,a,r,s,l,u={},c=e.dataTypes.slice();if(c[1])for(r in e.converters)u[r.toLowerCase()]=e.converters[r];for(a=c.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!l&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=c.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(r=u[l+" "+a]||u["* "+a],!r)for(i in u)if(s=i.split(" "),s[1]===a&&(r=u[l+" "+s[0]]||u["* "+s[0]])){r===!0?r=u[i]:u[i]!==!0&&(a=s[0],c.unshift(s[1]));break}if(r!==!0)if(r&&e["throws"])t=r(t);else try{t=r(t)}catch(d){return{state:"parsererror",error:r?d:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}function R(e,t,n,o){var i;if(J.isArray(t))J.each(t,function(t,i){n||Cn.test(e)?o(e,i):R(e+"["+("object"==typeof i?t:"")+"]",i,n,o)});else if(n||"object"!==J.type(t))o(e,t);else for(i in t)R(e+"["+i+"]",t[i],n,o)}function B(e){return J.isWindow(e)?e:9===e.nodeType&&e.defaultView}var F=[],W=F.slice,U=F.concat,X=F.push,z=F.indexOf,Y={},K=Y.toString,V=Y.hasOwnProperty,G={},Q=e.document,Z="2.1.1",J=function(e,t){return new J.fn.init(e,t)},et=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,tt=/^-ms-/,nt=/-([\da-z])/gi,ot=function(e,t){return t.toUpperCase()};J.fn=J.prototype={jquery:Z,constructor:J,selector:"",length:0,toArray:function(){return W.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:W.call(this)},pushStack:function(e){var t=J.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return J.each(this,e,t)},map:function(e){return this.pushStack(J.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(W.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:X,sort:F.sort,splice:F.splice},J.extend=J.fn.extend=function(){var e,t,n,o,i,a,r=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof r&&(u=r,r=arguments[s]||{},s++),"object"==typeof r||J.isFunction(r)||(r={}),s===l&&(r=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=r[t],o=e[t],r!==o&&(u&&o&&(J.isPlainObject(o)||(i=J.isArray(o)))?(i?(i=!1,a=n&&J.isArray(n)?n:[]):a=n&&J.isPlainObject(n)?n:{},r[t]=J.extend(u,a,o)):void 0!==o&&(r[t]=o));return r},J.extend({expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===J.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!J.isArray(e)&&e-parseFloat(e)>=0},isPlainObject:function(e){return"object"!==J.type(e)||e.nodeType||J.isWindow(e)?!1:e.constructor&&!V.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Y[K.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=J.trim(e),e&&(1===e.indexOf("use strict")?(t=Q.createElement("script"),t.text=e,Q.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(tt,"ms-").replace(nt,ot)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,o){var i,a=0,r=e.length,s=n(e);if(o){if(s)for(;r>a&&(i=t.apply(e[a],o),i!==!1);a++);else for(a in e)if(i=t.apply(e[a],o),i===!1)break}else if(s)for(;r>a&&(i=t.call(e[a],a,e[a]),i!==!1);a++);else for(a in e)if(i=t.call(e[a],a,e[a]),i===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(et,"")},makeArray:function(e,t){var o=t||[];return null!=e&&(n(Object(e))?J.merge(o,"string"==typeof e?[e]:e):X.call(o,e)),o},inArray:function(e,t,n){return null==t?-1:z.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,i=e.length;n>o;o++)e[i++]=t[o];return e.length=i,e},grep:function(e,t,n){for(var o,i=[],a=0,r=e.length,s=!n;r>a;a++)o=!t(e[a],a),o!==s&&i.push(e[a]);return i},map:function(e,t,o){var i,a=0,r=e.length,s=n(e),l=[];if(s)for(;r>a;a++)i=t(e[a],a,o),null!=i&&l.push(i);else for(a in e)i=t(e[a],a,o),null!=i&&l.push(i);return U.apply([],l)},guid:1,proxy:function(e,t){var n,o,i;return"string"==typeof t&&(n=e[t],t=e,e=n),J.isFunction(e)?(o=W.call(arguments,2),i=function(){return e.apply(t||this,o.concat(W.call(arguments)))},i.guid=e.guid=e.guid||J.guid++,i):void 0},now:Date.now,support:G}),J.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Y["[object "+t+"]"]=t.toLowerCase()});var it=function(e){function t(e,t,n,o){var i,a,r,s,l,u,d,h,f,m;if((t?t.ownerDocument||t:R)!==E&&I(t),t=t||E,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(M&&!o){if(i=bt.exec(e))if(r=i[1]){if(9===s){if(a=t.getElementById(r),!a||!a.parentNode)return n;if(a.id===r)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(r))&&q(t,a)&&a.id===r)return n.push(a),n}else{if(i[2])return J.apply(n,t.getElementsByTagName(e)),n;if((r=i[3])&&x.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(r)),n}if(x.qsa&&(!P||!P.test(e))){if(h=d=H,f=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=j(e),(d=t.getAttribute("id"))?h=d.replace(wt,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=u.length;l--;)u[l]=h+p(u[l]);f=yt.test(e)&&c(t.parentNode)||t,m=u.join(",")}if(m)try{return J.apply(n,f.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return D(e.replace(lt,"$1"),t,n,o)}function n(){function e(n,o){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=o}var t=[];return e}function o(e){return e[H]=!0,e}function i(e){var t=E.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),o=e.length;o--;)T.attrHandle[n[o]]=t}function r(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return o(function(t){return t=+t,o(function(n,o){for(var i,a=e([],n.length,t),r=a.length;r--;)n[i=a[r]]&&(n[i]=!(o[i]=n[i]))})})}function c(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function p(e){for(var t=0,n=e.length,o="";n>t;t++)o+=e[t].value;return o}function h(e,t,n){var o=t.dir,i=n&&"parentNode"===o,a=F++;return t.first?function(t,n,a){for(;t=t[o];)if(1===t.nodeType||i)return e(t,n,a)}:function(t,n,r){var s,l,u=[B,a];if(r){for(;t=t[o];)if((1===t.nodeType||i)&&e(t,n,r))return!0}else for(;t=t[o];)if(1===t.nodeType||i){if(l=t[H]||(t[H]={}),(s=l[o])&&s[0]===B&&s[1]===a)return u[2]=s[2];if(l[o]=u,u[2]=e(t,n,r))return!0}}}function f(e){return e.length>1?function(t,n,o){for(var i=e.length;i--;)if(!e[i](t,n,o))return!1;return!0}:e[0]}function m(e,n,o){for(var i=0,a=n.length;a>i;i++)t(e,n[i],o);return o}function g(e,t,n,o,i){for(var a,r=[],s=0,l=e.length,u=null!=t;l>s;s++)(a=e[s])&&(!n||n(a,o,i))&&(r.push(a),u&&t.push(s));return r}function v(e,t,n,i,a,r){return i&&!i[H]&&(i=v(i)),a&&!a[H]&&(a=v(a,r)),o(function(o,r,s,l){var u,c,d,p=[],h=[],f=r.length,v=o||m(t||"*",s.nodeType?[s]:s,[]),b=!e||!o&&t?v:g(v,p,e,s,l),y=n?a||(o?e:f||i)?[]:r:b;if(n&&n(b,y,s,l),i)for(u=g(y,h),i(u,[],s,l),c=u.length;c--;)(d=u[c])&&(y[h[c]]=!(b[h[c]]=d));if(o){if(a||e){if(a){for(u=[],c=y.length;c--;)(d=y[c])&&u.push(b[c]=d);a(null,y=[],u,l)}for(c=y.length;c--;)(d=y[c])&&(u=a?tt.call(o,d):p[c])>-1&&(o[u]=!(r[u]=d))}}else y=g(y===r?y.splice(f,y.length):y),a?a(null,r,y,l):J.apply(r,y)})}function b(e){for(var t,n,o,i=e.length,a=T.relative[e[0].type],r=a||T.relative[" "],s=a?1:0,l=h(function(e){return e===t},r,!0),u=h(function(e){return tt.call(t,e)>-1},r,!0),c=[function(e,n,o){return!a&&(o||n!==S)||((t=n).nodeType?l(e,n,o):u(e,n,o))}];i>s;s++)if(n=T.relative[e[s].type])c=[h(f(c),n)];else{if(n=T.filter[e[s].type].apply(null,e[s].matches),n[H]){for(o=++s;i>o&&!T.relative[e[o].type];o++);return v(s>1&&f(c),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(lt,"$1"),n,o>s&&b(e.slice(s,o)),i>o&&b(e=e.slice(o)),i>o&&p(e))}c.push(n)}return f(c)}function y(e,n){var i=n.length>0,a=e.length>0,r=function(o,r,s,l,u){var c,d,p,h=0,f="0",m=o&&[],v=[],b=S,y=o||a&&T.find.TAG("*",u),w=B+=null==b?1:Math.random()||.1,x=y.length;for(u&&(S=r!==E&&r);f!==x&&null!=(c=y[f]);f++){if(a&&c){for(d=0;p=e[d++];)if(p(c,r,s)){l.push(c);break}u&&(B=w)}i&&((c=!p&&c)&&h--,o&&m.push(c))}if(h+=f,i&&f!==h){for(d=0;p=n[d++];)p(m,v,r,s);if(o){if(h>0)for(;f--;)m[f]||v[f]||(v[f]=Q.call(l));v=g(v)}J.apply(l,v),u&&!o&&v.length>0&&h+n.length>1&&t.uniqueSort(l)}return u&&(B=w,S=b),m};return i?o(r):r}var w,x,T,$,k,j,C,D,S,A,N,I,E,_,M,P,L,O,q,H="sizzle"+-new Date,R=e.document,B=0,F=0,W=n(),U=n(),X=n(),z=function(e,t){return e===t&&(N=!0),0},Y="undefined",K=1<<31,V={}.hasOwnProperty,G=[],Q=G.pop,Z=G.push,J=G.push,et=G.slice,tt=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ot="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",at=it.replace("w","w#"),rt="\\["+ot+"*("+it+")(?:"+ot+"*([*^$|!~]?=)"+ot+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+at+"))|)"+ot+"*\\]",st=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+rt+")*)|.*)\\)|)",lt=new RegExp("^"+ot+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ot+"+$","g"),ut=new RegExp("^"+ot+"*,"+ot+"*"),ct=new RegExp("^"+ot+"*([>+~]|"+ot+")"+ot+"*"),dt=new RegExp("="+ot+"*([^\\]'\"]*?)"+ot+"*\\]","g"),pt=new RegExp(st),ht=new RegExp("^"+at+"$"),ft={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it.replace("w","w*")+")"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ot+"*(even|odd|(([+-]|)(\\d*)n|)"+ot+"*(?:([+-]|)"+ot+"*(\\d+)|))"+ot+"*\\)|)","i"),bool:new RegExp("^(?:"+nt+")$","i"),needsContext:new RegExp("^"+ot+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ot+"*((?:-\\d)?\\d*)"+ot+"*\\)|)(?=[^-]|$)","i")},mt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,bt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,wt=/'|\\/g,xt=new RegExp("\\\\([\\da-f]{1,6}"+ot+"?|("+ot+")|.)","ig"),Tt=function(e,t,n){var o="0x"+t-65536;return o!==o||n?t:0>o?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320)};try{J.apply(G=et.call(R.childNodes),R.childNodes),G[R.childNodes.length].nodeType}catch($t){J={apply:G.length?function(e,t){Z.apply(e,et.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}x=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},I=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:R,o=n.defaultView;return n!==E&&9===n.nodeType&&n.documentElement?(E=n,_=n.documentElement,M=!k(n),o&&o!==o.top&&(o.addEventListener?o.addEventListener("unload",function(){I()},!1):o.attachEvent&&o.attachEvent("onunload",function(){I()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=vt.test(n.getElementsByClassName)&&i(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),x.getById=i(function(e){return _.appendChild(e).id=H,!n.getElementsByName||!n.getElementsByName(H).length}),x.getById?(T.find.ID=function(e,t){if(typeof t.getElementById!==Y&&M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var n,o=[],i=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[i++];)1===n.nodeType&&o.push(n);return o}return a},T.find.CLASS=x.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==Y&&M?t.getElementsByClassName(e):void 0},L=[],P=[],(x.qsa=vt.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&P.push("[*^$]="+ot+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ot+"*(?:value|"+nt+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ot+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=vt.test(O=_.matches||_.webkitMatchesSelector||_.mozMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),L.push("!=",st)}),P=P.length&&new RegExp(P.join("|")),L=L.length&&new RegExp(L.join("|")),t=vt.test(_.compareDocumentPosition),q=t||vt.test(_.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return N=!0,0;var o=!e.compareDocumentPosition-!t.compareDocumentPosition;return o?o:(o=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&o||!x.sortDetached&&t.compareDocumentPosition(e)===o?e===n||e.ownerDocument===R&&q(R,e)?-1:t===n||t.ownerDocument===R&&q(R,t)?1:A?tt.call(A,e)-tt.call(A,t):0:4&o?-1:1)}:function(e,t){if(e===t)return N=!0,0;var o,i=0,a=e.parentNode,s=t.parentNode,l=[e],u=[t];if(!a||!s)return e===n?-1:t===n?1:a?-1:s?1:A?tt.call(A,e)-tt.call(A,t):0;if(a===s)return r(e,t);for(o=e;o=o.parentNode;)l.unshift(o);for(o=t;o=o.parentNode;)u.unshift(o);for(;l[i]===u[i];)i++;return i?r(l[i],u[i]):l[i]===R?-1:u[i]===R?1:0},n):E},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==E&&I(e),n=n.replace(dt,"='$1']"),!(!x.matchesSelector||!M||L&&L.test(n)||P&&P.test(n)))try{var o=O.call(e,n);if(o||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(i){}return t(n,E,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==E&&I(e),q(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==E&&I(e);var n=T.attrHandle[t.toLowerCase()],o=n&&V.call(T.attrHandle,t.toLowerCase())?n(e,t,!M):void 0;return void 0!==o?o:x.attributes||!M?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],o=0,i=0;if(N=!x.detectDuplicates,A=!x.sortStable&&e.slice(0),e.sort(z),N){for(;t=e[i++];)t===e[i]&&(o=n.push(i));for(;o--;)e.splice(n[o],1)}return A=null,e},$=t.getText=function(e){var t,n="",o=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=$(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[o++];)n+=$(t);return n},T=t.selectors={cacheLength:50,createPseudo:o,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,Tt),e[3]=(e[3]||e[4]||e[5]||"").replace(xt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ft.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pt.test(n)&&(t=j(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xt,Tt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ot+")"+e+"("+ot+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(e,n,o){return function(i){var a=t.attr(i,e);return null==a?"!="===n:n?(a+="","="===n?a===o:"!="===n?a!==o:"^="===n?o&&0===a.indexOf(o):"*="===n?o&&a.indexOf(o)>-1:"$="===n?o&&a.slice(-o.length)===o:"~="===n?(" "+a+" ").indexOf(o)>-1:"|="===n?a===o||a.slice(0,o.length+1)===o+"-":!1):!0}},CHILD:function(e,t,n,o,i){var a="nth"!==e.slice(0,3),r="last"!==e.slice(-4),s="of-type"===t;return 1===o&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,p,h,f,m=a!==r?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s;if(g){if(a){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[r?g.firstChild:g.lastChild],r&&b){for(c=g[H]||(g[H]={}),u=c[e]||[],h=u[0]===B&&u[1],p=u[0]===B&&u[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(p=h=0)||f.pop();)if(1===d.nodeType&&++p&&d===t){c[e]=[B,h,p];break}}else if(b&&(u=(t[H]||(t[H]={}))[e])&&u[0]===B)p=u[1];else for(;(d=++h&&d&&d[m]||(p=h=0)||f.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++p||(b&&((d[H]||(d[H]={}))[e]=[B,p]),d!==t)););return p-=i,p===o||p%o===0&&p/o>=0}}},PSEUDO:function(e,n){var i,a=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[H]?a(n):a.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,t){for(var o,i=a(e,n),r=i.length;r--;)o=tt.call(e,i[r]),e[o]=!(t[o]=i[r])}):function(e){return a(e,0,i)}):a}},pseudos:{not:o(function(e){var t=[],n=[],i=C(e.replace(lt,"$1"));return i[H]?o(function(e,t,n,o){for(var a,r=i(e,null,o,[]),s=e.length;s--;)(a=r[s])&&(e[s]=!(t[s]=a))}):function(e,o,a){return t[0]=e,i(t,null,a,n),!n.pop()}}),has:o(function(e){return function(n){return t(e,n).length>0}}),contains:o(function(e){return function(t){return(t.textContent||t.innerText||$(t)).indexOf(e)>-1}}),lang:o(function(e){return ht.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xt,Tt).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===_},focus:function(e){return e===E.activeElement&&(!E.hasFocus||E.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return gt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var o=0>n?n+t:n;--o>=0;)e.push(o);return e}),gt:u(function(e,t,n){for(var o=0>n?n+t:n;++o<t;)e.push(o);return e})}},T.pseudos.nth=T.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})T.pseudos[w]=l(w);return d.prototype=T.filters=T.pseudos,T.setFilters=new d,j=t.tokenize=function(e,n){var o,i,a,r,s,l,u,c=U[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=T.preFilter;s;){(!o||(i=ut.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),l.push(a=[])),o=!1,(i=ct.exec(s))&&(o=i.shift(),a.push({value:o,type:i[0].replace(lt," ")}),s=s.slice(o.length));for(r in T.filter)!(i=ft[r].exec(s))||u[r]&&!(i=u[r](i))||(o=i.shift(),a.push({value:o,type:r,matches:i}),s=s.slice(o.length));if(!o)break}return n?s.length:s?t.error(e):U(e,l).slice(0)},C=t.compile=function(e,t){var n,o=[],i=[],a=X[e+" "];if(!a){for(t||(t=j(e)),n=t.length;n--;)a=b(t[n]),a[H]?o.push(a):i.push(a);a=X(e,y(i,o)),a.selector=e}return a},D=t.select=function(e,t,n,o){var i,a,r,s,l,u="function"==typeof e&&e,d=!o&&j(e=u.selector||e);if(n=n||[],1===d.length){if(a=d[0]=d[0].slice(0),a.length>2&&"ID"===(r=a[0]).type&&x.getById&&9===t.nodeType&&M&&T.relative[a[1].type]){if(t=(T.find.ID(r.matches[0].replace(xt,Tt),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=ft.needsContext.test(e)?0:a.length;i--&&(r=a[i],!T.relative[s=r.type]);)if((l=T.find[s])&&(o=l(r.matches[0].replace(xt,Tt),yt.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(i,1),e=o.length&&p(a),!e)return J.apply(n,o),n;break}}return(u||C(e,d))(o,t,!M,n,yt.test(e)&&c(t.parentNode)||t),n},x.sortStable=H.split("").sort(z).join("")===H,x.detectDuplicates=!!N,I(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(E.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||a(nt,function(e,t,n){var o;return n?void 0:e[t]===!0?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),t}(e);J.find=it,J.expr=it.selectors,J.expr[":"]=J.expr.pseudos,J.unique=it.uniqueSort,J.text=it.getText,J.isXMLDoc=it.isXML,J.contains=it.contains;var at=J.expr.match.needsContext,rt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^.[^:#\[\.,]*$/;J.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?J.find.matchesSelector(o,e)?[o]:[]:J.find.matches(e,J.grep(t,function(e){return 1===e.nodeType
}))},J.fn.extend({find:function(e){var t,n=this.length,o=[],i=this;if("string"!=typeof e)return this.pushStack(J(e).filter(function(){for(t=0;n>t;t++)if(J.contains(i[t],this))return!0}));for(t=0;n>t;t++)J.find(e,i[t],o);return o=this.pushStack(n>1?J.unique(o):o),o.selector=this.selector?this.selector+" "+e:e,o},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&at.test(e)?J(e):e||[],!1).length}});var lt,ut=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ct=J.fn.init=function(e,t){var n,o;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ut.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||lt).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof J?t[0]:t,J.merge(this,J.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Q,!0)),rt.test(n[1])&&J.isPlainObject(t))for(n in t)J.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return o=Q.getElementById(n[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=Q,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):J.isFunction(e)?"undefined"!=typeof lt.ready?lt.ready(e):e(J):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),J.makeArray(e,this))};ct.prototype=J.fn,lt=J(Q);var dt=/^(?:parents|prev(?:Until|All))/,pt={children:!0,contents:!0,next:!0,prev:!0};J.extend({dir:function(e,t,n){for(var o=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&J(e).is(n))break;o.push(e)}return o},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),J.fn.extend({has:function(e){var t=J(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(J.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,o=0,i=this.length,a=[],r=at.test(e)||"string"!=typeof e?J(e,t||this.context):0;i>o;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&J.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?J.unique(a):a)},index:function(e){return e?"string"==typeof e?z.call(J(e),this[0]):z.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(J.unique(J.merge(this.get(),J(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),J.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return J.dir(e,"parentNode")},parentsUntil:function(e,t,n){return J.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return J.dir(e,"nextSibling")},prevAll:function(e){return J.dir(e,"previousSibling")},nextUntil:function(e,t,n){return J.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return J.dir(e,"previousSibling",n)},siblings:function(e){return J.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return J.sibling(e.firstChild)},contents:function(e){return e.contentDocument||J.merge([],e.childNodes)}},function(e,t){J.fn[e]=function(n,o){var i=J.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(i=J.filter(o,i)),this.length>1&&(pt[e]||J.unique(i),dt.test(e)&&i.reverse()),this.pushStack(i)}});var ht=/\S+/g,ft={};J.Callbacks=function(e){e="string"==typeof e?ft[e]||a(e):J.extend({},e);var t,n,o,i,r,s,l=[],u=!e.once&&[],c=function(a){for(t=e.memory&&a,n=!0,s=i||0,i=0,r=l.length,o=!0;l&&r>s;s++)if(l[s].apply(a[0],a[1])===!1&&e.stopOnFalse){t=!1;break}o=!1,l&&(u?u.length&&c(u.shift()):t?l=[]:d.disable())},d={add:function(){if(l){var n=l.length;!function a(t){J.each(t,function(t,n){var o=J.type(n);"function"===o?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==o&&a(n)})}(arguments),o?r=l.length:t&&(i=n,c(t))}return this},remove:function(){return l&&J.each(arguments,function(e,t){for(var n;(n=J.inArray(t,l,n))>-1;)l.splice(n,1),o&&(r>=n&&r--,s>=n&&s--)}),this},has:function(e){return e?J.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=u=t=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,t||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],o?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!n}};return d},J.extend({Deferred:function(e){var t=[["resolve","done",J.Callbacks("once memory"),"resolved"],["reject","fail",J.Callbacks("once memory"),"rejected"],["notify","progress",J.Callbacks("memory")]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return J.Deferred(function(n){J.each(t,function(t,a){var r=J.isFunction(e[t])&&e[t];i[a[1]](function(){var e=r&&r.apply(this,arguments);e&&J.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a[0]+"With"](this===o?n.promise():this,r?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?J.extend(e,o):o}},i={};return o.pipe=o.then,J.each(t,function(e,a){var r=a[2],s=a[3];o[a[1]]=r.add,s&&r.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[a[0]]=function(){return i[a[0]+"With"](this===i?o:this,arguments),this},i[a[0]+"With"]=r.fireWith}),o.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,o,i=0,a=W.call(arguments),r=a.length,s=1!==r||e&&J.isFunction(e.promise)?r:0,l=1===s?e:J.Deferred(),u=function(e,n,o){return function(i){n[e]=this,o[e]=arguments.length>1?W.call(arguments):i,o===t?l.notifyWith(n,o):--s||l.resolveWith(n,o)}};if(r>1)for(t=new Array(r),n=new Array(r),o=new Array(r);r>i;i++)a[i]&&J.isFunction(a[i].promise)?a[i].promise().done(u(i,o,a)).fail(l.reject).progress(u(i,n,t)):--s;return s||l.resolveWith(o,a),l.promise()}});var mt;J.fn.ready=function(e){return J.ready.promise().done(e),this},J.extend({isReady:!1,readyWait:1,holdReady:function(e){e?J.readyWait++:J.ready(!0)},ready:function(e){(e===!0?--J.readyWait:J.isReady)||(J.isReady=!0,e!==!0&&--J.readyWait>0||(mt.resolveWith(Q,[J]),J.fn.triggerHandler&&(J(Q).triggerHandler("ready"),J(Q).off("ready"))))}}),J.ready.promise=function(t){return mt||(mt=J.Deferred(),"complete"===Q.readyState?setTimeout(J.ready):(Q.addEventListener("DOMContentLoaded",r,!1),e.addEventListener("load",r,!1))),mt.promise(t)},J.ready.promise();var gt=J.access=function(e,t,n,o,i,a,r){var s=0,l=e.length,u=null==n;if("object"===J.type(n)){i=!0;for(s in n)J.access(e,t,s,n[s],!0,a,r)}else if(void 0!==o&&(i=!0,J.isFunction(o)||(r=!0),u&&(r?(t.call(e,o),t=null):(u=t,t=function(e,t,n){return u.call(J(e),n)})),t))for(;l>s;s++)t(e[s],n,r?o:o.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):a};J.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=J.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(o){t[this.expando]=n,J.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var o,i=this.key(e),a=this.cache[i];if("string"==typeof t)a[t]=n;else if(J.isEmptyObject(a))J.extend(this.cache[i],t);else for(o in t)a[o]=t[o];return a},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var o;return void 0===t||t&&"string"==typeof t&&void 0===n?(o=this.get(e,t),void 0!==o?o:this.get(e,J.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o,i,a=this.key(e),r=this.cache[a];if(void 0===t)this.cache[a]={};else{J.isArray(t)?o=t.concat(t.map(J.camelCase)):(i=J.camelCase(t),t in r?o=[t,i]:(o=i,o=o in r?[o]:o.match(ht)||[])),n=o.length;for(;n--;)delete r[o[n]]}},hasData:function(e){return!J.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var vt=new s,bt=new s,yt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,wt=/([A-Z])/g;J.extend({hasData:function(e){return bt.hasData(e)||vt.hasData(e)},data:function(e,t,n){return bt.access(e,t,n)},removeData:function(e,t){bt.remove(e,t)},_data:function(e,t,n){return vt.access(e,t,n)},_removeData:function(e,t){vt.remove(e,t)}}),J.fn.extend({data:function(e,t){var n,o,i,a=this[0],r=a&&a.attributes;if(void 0===e){if(this.length&&(i=bt.get(a),1===a.nodeType&&!vt.get(a,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&(o=r[n].name,0===o.indexOf("data-")&&(o=J.camelCase(o.slice(5)),l(a,o,i[o])));vt.set(a,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){bt.set(this,e)}):gt(this,function(t){var n,o=J.camelCase(e);if(a&&void 0===t){if(n=bt.get(a,e),void 0!==n)return n;if(n=bt.get(a,o),void 0!==n)return n;if(n=l(a,o,void 0),void 0!==n)return n}else this.each(function(){var n=bt.get(this,o);bt.set(this,o,t),-1!==e.indexOf("-")&&void 0!==n&&bt.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){bt.remove(this,e)})}}),J.extend({queue:function(e,t,n){var o;return e?(t=(t||"fx")+"queue",o=vt.get(e,t),n&&(!o||J.isArray(n)?o=vt.access(e,t,J.makeArray(n)):o.push(n)),o||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=J.queue(e,t),o=n.length,i=n.shift(),a=J._queueHooks(e,t),r=function(){J.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,r,a)),!o&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return vt.get(e,n)||vt.access(e,n,{empty:J.Callbacks("once memory").add(function(){vt.remove(e,[t+"queue",n])})})}}),J.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?J.queue(this[0],e):void 0===t?this:this.each(function(){var n=J.queue(this,e,t);J._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&J.dequeue(this,e)})},dequeue:function(e){return this.each(function(){J.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,o=1,i=J.Deferred(),a=this,r=this.length,s=function(){--o||i.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";r--;)n=vt.get(a[r],e+"queueHooks"),n&&n.empty&&(o++,n.empty.add(s));return s(),i.promise(t)}});var xt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Tt=["Top","Right","Bottom","Left"],$t=function(e,t){return e=t||e,"none"===J.css(e,"display")||!J.contains(e.ownerDocument,e)},kt=/^(?:checkbox|radio)$/i;!function(){var e=Q.createDocumentFragment(),t=e.appendChild(Q.createElement("div")),n=Q.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),G.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",G.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var jt="undefined";G.focusinBubbles="onfocusin"in e;var Ct=/^key/,Dt=/^(?:mouse|pointer|contextmenu)|click/,St=/^(?:focusinfocus|focusoutblur)$/,At=/^([^.]*)(?:\.(.+)|)$/;J.event={global:{},add:function(e,t,n,o,i){var a,r,s,l,u,c,d,p,h,f,m,g=vt.get(e);if(g)for(n.handler&&(a=n,n=a.handler,i=a.selector),n.guid||(n.guid=J.guid++),(l=g.events)||(l=g.events={}),(r=g.handle)||(r=g.handle=function(t){return typeof J!==jt&&J.event.triggered!==t.type?J.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ht)||[""],u=t.length;u--;)s=At.exec(t[u])||[],h=m=s[1],f=(s[2]||"").split(".").sort(),h&&(d=J.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=J.event.special[h]||{},c=J.extend({type:h,origType:m,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&J.expr.match.needsContext.test(i),namespace:f.join(".")},a),(p=l[h])||(p=l[h]=[],p.delegateCount=0,d.setup&&d.setup.call(e,o,f,r)!==!1||e.addEventListener&&e.addEventListener(h,r,!1)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),J.event.global[h]=!0)},remove:function(e,t,n,o,i){var a,r,s,l,u,c,d,p,h,f,m,g=vt.hasData(e)&&vt.get(e);if(g&&(l=g.events)){for(t=(t||"").match(ht)||[""],u=t.length;u--;)if(s=At.exec(t[u])||[],h=m=s[1],f=(s[2]||"").split(".").sort(),h){for(d=J.event.special[h]||{},h=(o?d.delegateType:d.bindType)||h,p=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=a=p.length;a--;)c=p[a],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||o&&o!==c.selector&&("**"!==o||!c.selector)||(p.splice(a,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));r&&!p.length&&(d.teardown&&d.teardown.call(e,f,g.handle)!==!1||J.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)J.event.remove(e,h+t[u],n,o,!0);J.isEmptyObject(l)&&(delete g.handle,vt.remove(e,"events"))}},trigger:function(t,n,o,i){var a,r,s,l,u,c,d,p=[o||Q],h=V.call(t,"type")?t.type:t,f=V.call(t,"namespace")?t.namespace.split("."):[];if(r=s=o=o||Q,3!==o.nodeType&&8!==o.nodeType&&!St.test(h+J.event.triggered)&&(h.indexOf(".")>=0&&(f=h.split("."),h=f.shift(),f.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[J.expando]?t:new J.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),n=null==n?[t]:J.makeArray(n,[t]),d=J.event.special[h]||{},i||!d.trigger||d.trigger.apply(o,n)!==!1)){if(!i&&!d.noBubble&&!J.isWindow(o)){for(l=d.delegateType||h,St.test(l+h)||(r=r.parentNode);r;r=r.parentNode)p.push(r),s=r;s===(o.ownerDocument||Q)&&p.push(s.defaultView||s.parentWindow||e)}for(a=0;(r=p[a++])&&!t.isPropagationStopped();)t.type=a>1?l:d.bindType||h,c=(vt.get(r,"events")||{})[t.type]&&vt.get(r,"handle"),c&&c.apply(r,n),c=u&&r[u],c&&c.apply&&J.acceptData(r)&&(t.result=c.apply(r,n),t.result===!1&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||d._default&&d._default.apply(p.pop(),n)!==!1||!J.acceptData(o)||u&&J.isFunction(o[h])&&!J.isWindow(o)&&(s=o[u],s&&(o[u]=null),J.event.triggered=h,o[h](),J.event.triggered=void 0,s&&(o[u]=s)),t.result}},dispatch:function(e){e=J.event.fix(e);var t,n,o,i,a,r=[],s=W.call(arguments),l=(vt.get(this,"events")||{})[e.type]||[],u=J.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(r=J.event.handlers.call(this,e,l),t=0;(i=r[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,o=((J.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s),void 0!==o&&(e.result=o)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,o,i,a,r=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(o=[],n=0;s>n;n++)a=t[n],i=a.selector+" ",void 0===o[i]&&(o[i]=a.needsContext?J(i,this).index(l)>=0:J.find(i,this,null,[l]).length),o[i]&&o.push(a);o.length&&r.push({elem:l,handlers:o})}return s<t.length&&r.push({elem:this,handlers:t.slice(s)}),r},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,o,i,a=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Q,o=n.documentElement,i=n.body,e.pageX=t.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[J.expando])return e;var t,n,o,i=e.type,a=e,r=this.fixHooks[i];for(r||(this.fixHooks[i]=r=Dt.test(i)?this.mouseHooks:Ct.test(i)?this.keyHooks:{}),o=r.props?this.props.concat(r.props):this.props,e=new J.Event(a),t=o.length;t--;)n=o[t],e[n]=a[n];return e.target||(e.target=Q),3===e.target.nodeType&&(e.target=e.target.parentNode),r.filter?r.filter(e,a):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==d()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===d()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&J.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return J.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,o){var i=J.extend(new J.Event,n,{type:e,isSimulated:!0,originalEvent:{}});o?J.event.trigger(i,null,t):J.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},J.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},J.Event=function(e,t){return this instanceof J.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?u:c):this.type=e,t&&J.extend(this,t),this.timeStamp=e&&e.timeStamp||J.now(),void(this[J.expando]=!0)):new J.Event(e,t)},J.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=u,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},J.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){J.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,o=this,i=e.relatedTarget,a=e.handleObj;return(!i||i!==o&&!J.contains(o,i))&&(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),G.focusinBubbles||J.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){J.event.simulate(t,e.target,J.event.fix(e),!0)};J.event.special[t]={setup:function(){var o=this.ownerDocument||this,i=vt.access(o,t);i||o.addEventListener(e,n,!0),vt.access(o,t,(i||0)+1)},teardown:function(){var o=this.ownerDocument||this,i=vt.access(o,t)-1;i?vt.access(o,t,i):(o.removeEventListener(e,n,!0),vt.remove(o,t))}}}),J.fn.extend({on:function(e,t,n,o,i){var a,r;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(r in e)this.on(r,t,n,e[r],i);return this}if(null==n&&null==o?(o=t,n=t=void 0):null==o&&("string"==typeof t?(o=n,n=void 0):(o=n,n=t,t=void 0)),o===!1)o=c;else if(!o)return this;return 1===i&&(a=o,o=function(e){return J().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=J.guid++)),this.each(function(){J.event.add(this,e,o,n,t)})},one:function(e,t,n,o){return this.on(e,t,n,o,1)},off:function(e,t,n){var o,i;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,J(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){J.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){J.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?J.event.trigger(e,t,n,!0):void 0}});var Nt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,It=/<([\w:]+)/,Et=/<|&#?\w+;/,_t=/<(?:script|style|link)/i,Mt=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^$|\/(?:java|ecma)script/i,Lt=/^true\/(.*)/,Ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,qt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};qt.optgroup=qt.option,qt.tbody=qt.tfoot=qt.colgroup=qt.caption=qt.thead,qt.th=qt.td,J.extend({clone:function(e,t,n){var o,i,a,r,s=e.cloneNode(!0),l=J.contains(e.ownerDocument,e);if(!(G.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||J.isXMLDoc(e)))for(r=v(s),a=v(e),o=0,i=a.length;i>o;o++)b(a[o],r[o]);if(t)if(n)for(a=a||v(e),r=r||v(s),o=0,i=a.length;i>o;o++)g(a[o],r[o]);else g(e,s);return r=v(s,"script"),r.length>0&&m(r,!l&&v(e,"script")),s},buildFragment:function(e,t,n,o){for(var i,a,r,s,l,u,c=t.createDocumentFragment(),d=[],p=0,h=e.length;h>p;p++)if(i=e[p],i||0===i)if("object"===J.type(i))J.merge(d,i.nodeType?[i]:i);else if(Et.test(i)){for(a=a||c.appendChild(t.createElement("div")),r=(It.exec(i)||["",""])[1].toLowerCase(),s=qt[r]||qt._default,a.innerHTML=s[1]+i.replace(Nt,"<$1></$2>")+s[2],u=s[0];u--;)a=a.lastChild;J.merge(d,a.childNodes),a=c.firstChild,a.textContent=""}else d.push(t.createTextNode(i));for(c.textContent="",p=0;i=d[p++];)if((!o||-1===J.inArray(i,o))&&(l=J.contains(i.ownerDocument,i),a=v(c.appendChild(i),"script"),l&&m(a),n))for(u=0;i=a[u++];)Pt.test(i.type||"")&&n.push(i);return c},cleanData:function(e){for(var t,n,o,i,a=J.event.special,r=0;void 0!==(n=e[r]);r++){if(J.acceptData(n)&&(i=n[vt.expando],i&&(t=vt.cache[i]))){if(t.events)for(o in t.events)a[o]?J.event.remove(n,o):J.removeEvent(n,o,t.handle);vt.cache[i]&&delete vt.cache[i]}delete bt.cache[n[bt.expando]]}}}),J.fn.extend({text:function(e){return gt(this,function(e){return void 0===e?J.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,o=e?J.filter(e,this):this,i=0;null!=(n=o[i]);i++)t||1!==n.nodeType||J.cleanData(v(n)),n.parentNode&&(t&&J.contains(n.ownerDocument,n)&&m(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(J.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return J.clone(this,e,t)})},html:function(e){return gt(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!_t.test(e)&&!qt[(It.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Nt,"<$1></$2>");try{for(;o>n;n++)t=this[n]||{},1===t.nodeType&&(J.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,J.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=U.apply([],e);var n,o,i,a,r,s,l=0,u=this.length,c=this,d=u-1,p=e[0],m=J.isFunction(p);if(m||u>1&&"string"==typeof p&&!G.checkClone&&Mt.test(p))return this.each(function(n){var o=c.eq(n);m&&(e[0]=p.call(this,n,o.html())),o.domManip(e,t)});if(u&&(n=J.buildFragment(e,this[0].ownerDocument,!1,this),o=n.firstChild,1===n.childNodes.length&&(n=o),o)){for(i=J.map(v(n,"script"),h),a=i.length;u>l;l++)r=n,l!==d&&(r=J.clone(r,!0,!0),a&&J.merge(i,v(r,"script"))),t.call(this[l],r,l);if(a)for(s=i[i.length-1].ownerDocument,J.map(i,f),l=0;a>l;l++)r=i[l],Pt.test(r.type||"")&&!vt.access(r,"globalEval")&&J.contains(s,r)&&(r.src?J._evalUrl&&J._evalUrl(r.src):J.globalEval(r.textContent.replace(Ot,"")))}return this}}),J.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){J.fn[e]=function(e){for(var n,o=[],i=J(e),a=i.length-1,r=0;a>=r;r++)n=r===a?this:this.clone(!0),J(i[r])[t](n),X.apply(o,n.get());return this.pushStack(o)}});var Ht,Rt={},Bt=/^margin/,Ft=new RegExp("^("+xt+")(?!px)[a-z%]+$","i"),Wt=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",r.innerHTML="",i.appendChild(a);var t=e.getComputedStyle(r,null);n="1%"!==t.top,o="4px"===t.width,i.removeChild(a)}var n,o,i=Q.documentElement,a=Q.createElement("div"),r=Q.createElement("div");r.style&&(r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",G.clearCloneStyle="content-box"===r.style.backgroundClip,a.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",a.appendChild(r),e.getComputedStyle&&J.extend(G,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==o&&t(),o},reliableMarginRight:function(){var t,n=r.appendChild(Q.createElement("div"));return n.style.cssText=r.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",r.style.width="1px",i.appendChild(a),t=!parseFloat(e.getComputedStyle(n,null).marginRight),i.removeChild(a),t}}))}(),J.swap=function(e,t,n,o){var i,a,r={};for(a in t)r[a]=e.style[a],e.style[a]=t[a];i=n.apply(e,o||[]);for(a in t)e.style[a]=r[a];return i};var Ut=/^(none|table(?!-c[ea]).+)/,Xt=new RegExp("^("+xt+")(.*)$","i"),zt=new RegExp("^([+-])=("+xt+")","i"),Yt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:"0",fontWeight:"400"},Vt=["Webkit","O","Moz","ms"];J.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=x(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,r,s=J.camelCase(t),l=e.style;return t=J.cssProps[s]||(J.cssProps[s]=$(l,s)),r=J.cssHooks[t]||J.cssHooks[s],void 0===n?r&&"get"in r&&void 0!==(i=r.get(e,!1,o))?i:l[t]:(a=typeof n,"string"===a&&(i=zt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(J.css(e,t)),a="number"),void(null!=n&&n===n&&("number"!==a||J.cssNumber[s]||(n+="px"),G.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),r&&"set"in r&&void 0===(n=r.set(e,n,o))||(l[t]=n))))}},css:function(e,t,n,o){var i,a,r,s=J.camelCase(t);return t=J.cssProps[s]||(J.cssProps[s]=$(e.style,s)),r=J.cssHooks[t]||J.cssHooks[s],r&&"get"in r&&(i=r.get(e,!0,n)),void 0===i&&(i=x(e,t,o)),"normal"===i&&t in Kt&&(i=Kt[t]),""===n||n?(a=parseFloat(i),n===!0||J.isNumeric(a)?a||0:i):i}}),J.each(["height","width"],function(e,t){J.cssHooks[t]={get:function(e,n,o){return n?Ut.test(J.css(e,"display"))&&0===e.offsetWidth?J.swap(e,Yt,function(){return C(e,t,o)}):C(e,t,o):void 0},set:function(e,n,o){var i=o&&Wt(e);return k(e,n,o?j(e,t,o,"border-box"===J.css(e,"boxSizing",!1,i),i):0)}}}),J.cssHooks.marginRight=T(G.reliableMarginRight,function(e,t){return t?J.swap(e,{display:"inline-block"},x,[e,"marginRight"]):void 0}),J.each({margin:"",padding:"",border:"Width"},function(e,t){J.cssHooks[e+t]={expand:function(n){for(var o=0,i={},a="string"==typeof n?n.split(" "):[n];4>o;o++)i[e+Tt[o]+t]=a[o]||a[o-2]||a[0];return i}},Bt.test(e)||(J.cssHooks[e+t].set=k)}),J.fn.extend({css:function(e,t){return gt(this,function(e,t,n){var o,i,a={},r=0;if(J.isArray(t)){for(o=Wt(e),i=t.length;i>r;r++)a[t[r]]=J.css(e,t[r],!1,o);return a}return void 0!==n?J.style(e,t,n):J.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){$t(this)?J(this).show():J(this).hide()})}}),J.Tween=S,S.prototype={constructor:S,init:function(e,t,n,o,i,a){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=a||(J.cssNumber[n]?"":"px")},cur:function(){var e=S.propHooks[this.prop];return e&&e.get?e.get(this):S.propHooks._default.get(this)},run:function(e){var t,n=S.propHooks[this.prop];return this.pos=t=this.options.duration?J.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):S.propHooks._default.set(this),this}},S.prototype.init.prototype=S.prototype,S.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=J.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){J.fx.step[e.prop]?J.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[J.cssProps[e.prop]]||J.cssHooks[e.prop])?J.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},S.propHooks.scrollTop=S.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},J.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},J.fx=S.prototype.init,J.fx.step={};var Gt,Qt,Zt=/^(?:toggle|show|hide)$/,Jt=new RegExp("^(?:([+-])=|)("+xt+")([a-z%]*)$","i"),en=/queueHooks$/,tn=[E],nn={"*":[function(e,t){var n=this.createTween(e,t),o=n.cur(),i=Jt.exec(t),a=i&&i[3]||(J.cssNumber[e]?"":"px"),r=(J.cssNumber[e]||"px"!==a&&+o)&&Jt.exec(J.css(n.elem,e)),s=1,l=20;if(r&&r[3]!==a){a=a||r[3],i=i||[],r=+o||1;do s=s||".5",r/=s,J.style(n.elem,e,r+a);while(s!==(s=n.cur()/o)&&1!==s&&--l)}return i&&(r=n.start=+r||+o||0,n.unit=a,n.end=i[1]?r+(i[1]+1)*i[2]:+i[2]),n}]};J.Animation=J.extend(M,{tweener:function(e,t){J.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,o=0,i=e.length;i>o;o++)n=e[o],nn[n]=nn[n]||[],nn[n].unshift(t)},prefilter:function(e,t){t?tn.unshift(e):tn.push(e)}}),J.speed=function(e,t,n){var o=e&&"object"==typeof e?J.extend({},e):{complete:n||!n&&t||J.isFunction(e)&&e,duration:e,easing:n&&t||t&&!J.isFunction(t)&&t};return o.duration=J.fx.off?0:"number"==typeof o.duration?o.duration:o.duration in J.fx.speeds?J.fx.speeds[o.duration]:J.fx.speeds._default,(null==o.queue||o.queue===!0)&&(o.queue="fx"),o.old=o.complete,o.complete=function(){J.isFunction(o.old)&&o.old.call(this),o.queue&&J.dequeue(this,o.queue)},o},J.fn.extend({fadeTo:function(e,t,n,o){return this.filter($t).css("opacity",0).show().end().animate({opacity:t},e,n,o)},animate:function(e,t,n,o){var i=J.isEmptyObject(e),a=J.speed(t,n,o),r=function(){var t=M(this,J.extend({},e),a);(i||vt.get(this,"finish"))&&t.stop(!0)};return r.finish=r,i||a.queue===!1?this.each(r):this.queue(a.queue,r)},stop:function(e,t,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",a=J.timers,r=vt.get(this);if(i)r[i]&&r[i].stop&&o(r[i]);else for(i in r)r[i]&&r[i].stop&&en.test(i)&&o(r[i]);for(i=a.length;i--;)a[i].elem!==this||null!=e&&a[i].queue!==e||(a[i].anim.stop(n),t=!1,a.splice(i,1));(t||!n)&&J.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=vt.get(this),o=n[e+"queue"],i=n[e+"queueHooks"],a=J.timers,r=o?o.length:0;for(n.finish=!0,J.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));
for(t=0;r>t;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish})}}),J.each(["toggle","show","hide"],function(e,t){var n=J.fn[t];J.fn[t]=function(e,o,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(N(t,!0),e,o,i)}}),J.each({slideDown:N("show"),slideUp:N("hide"),slideToggle:N("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){J.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}}),J.timers=[],J.fx.tick=function(){var e,t=0,n=J.timers;for(Gt=J.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||J.fx.stop(),Gt=void 0},J.fx.timer=function(e){J.timers.push(e),e()?J.fx.start():J.timers.pop()},J.fx.interval=13,J.fx.start=function(){Qt||(Qt=setInterval(J.fx.tick,J.fx.interval))},J.fx.stop=function(){clearInterval(Qt),Qt=null},J.fx.speeds={slow:600,fast:200,_default:400},J.fn.delay=function(e,t){return e=J.fx?J.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var o=setTimeout(t,e);n.stop=function(){clearTimeout(o)}})},function(){var e=Q.createElement("input"),t=Q.createElement("select"),n=t.appendChild(Q.createElement("option"));e.type="checkbox",G.checkOn=""!==e.value,G.optSelected=n.selected,t.disabled=!0,G.optDisabled=!n.disabled,e=Q.createElement("input"),e.value="t",e.type="radio",G.radioValue="t"===e.value}();var on,an,rn=J.expr.attrHandle;J.fn.extend({attr:function(e,t){return gt(this,J.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){J.removeAttr(this,e)})}}),J.extend({attr:function(e,t,n){var o,i,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?typeof e.getAttribute===jt?J.prop(e,t,n):(1===a&&J.isXMLDoc(e)||(t=t.toLowerCase(),o=J.attrHooks[t]||(J.expr.match.bool.test(t)?an:on)),void 0===n?o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=J.find.attr(e,t),null==i?void 0:i):null!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void J.removeAttr(e,t)):void 0},removeAttr:function(e,t){var n,o,i=0,a=t&&t.match(ht);if(a&&1===e.nodeType)for(;n=a[i++];)o=J.propFix[n]||n,J.expr.match.bool.test(n)&&(e[o]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!G.radioValue&&"radio"===t&&J.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),an={set:function(e,t,n){return t===!1?J.removeAttr(e,n):e.setAttribute(n,n),n}},J.each(J.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rn[t]||J.find.attr;rn[t]=function(e,t,o){var i,a;return o||(a=rn[t],rn[t]=i,i=null!=n(e,t,o)?t.toLowerCase():null,rn[t]=a),i}});var sn=/^(?:input|select|textarea|button)$/i;J.fn.extend({prop:function(e,t){return gt(this,J.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[J.propFix[e]||e]})}}),J.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var o,i,a,r=e.nodeType;return e&&3!==r&&8!==r&&2!==r?(a=1!==r||!J.isXMLDoc(e),a&&(t=J.propFix[t]||t,i=J.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:e[t]=n:i&&"get"in i&&null!==(o=i.get(e,t))?o:e[t]):void 0},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||sn.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),G.optSelected||(J.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),J.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){J.propFix[this.toLowerCase()]=this});var ln=/[\t\r\n\f]/g;J.fn.extend({addClass:function(e){var t,n,o,i,a,r,s="string"==typeof e&&e,l=0,u=this.length;if(J.isFunction(e))return this.each(function(t){J(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(ht)||[];u>l;l++)if(n=this[l],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):" ")){for(a=0;i=t[a++];)o.indexOf(" "+i+" ")<0&&(o+=i+" ");r=J.trim(o),n.className!==r&&(n.className=r)}return this},removeClass:function(e){var t,n,o,i,a,r,s=0===arguments.length||"string"==typeof e&&e,l=0,u=this.length;if(J.isFunction(e))return this.each(function(t){J(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(ht)||[];u>l;l++)if(n=this[l],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):"")){for(a=0;i=t[a++];)for(;o.indexOf(" "+i+" ")>=0;)o=o.replace(" "+i+" "," ");r=e?J.trim(o):"",n.className!==r&&(n.className=r)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(J.isFunction(e)?function(n){J(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,o=0,i=J(this),a=e.match(ht)||[];t=a[o++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===jt||"boolean"===n)&&(this.className&&vt.set(this,"__className__",this.className),this.className=this.className||e===!1?"":vt.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,o=this.length;o>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ln," ").indexOf(t)>=0)return!0;return!1}});var un=/\r/g;J.fn.extend({val:function(e){var t,n,o,i=this[0];return arguments.length?(o=J.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=o?e.call(this,n,J(this).val()):e,null==i?i="":"number"==typeof i?i+="":J.isArray(i)&&(i=J.map(i,function(e){return null==e?"":e+""})),t=J.valHooks[this.type]||J.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=J.valHooks[i.type]||J.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(un,""):null==n?"":n)):void 0}}),J.extend({valHooks:{option:{get:function(e){var t=J.find.attr(e,"value");return null!=t?t:J.trim(J.text(e))}},select:{get:function(e){for(var t,n,o=e.options,i=e.selectedIndex,a="select-one"===e.type||0>i,r=a?null:[],s=a?i+1:o.length,l=0>i?s:a?i:0;s>l;l++)if(n=o[l],!(!n.selected&&l!==i||(G.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&J.nodeName(n.parentNode,"optgroup"))){if(t=J(n).val(),a)return t;r.push(t)}return r},set:function(e,t){for(var n,o,i=e.options,a=J.makeArray(t),r=i.length;r--;)o=i[r],(o.selected=J.inArray(o.value,a)>=0)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),J.each(["radio","checkbox"],function(){J.valHooks[this]={set:function(e,t){return J.isArray(t)?e.checked=J.inArray(J(e).val(),t)>=0:void 0}},G.checkOn||(J.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),J.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){J.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),J.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var cn=J.now(),dn=/\?/;J.parseJSON=function(e){return JSON.parse(e+"")},J.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(o){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&J.error("Invalid XML: "+e),t};var pn,hn,fn=/#.*$/,mn=/([?&])_=[^&]*/,gn=/^(.*?):[ \t]*([^\r\n]*)$/gm,vn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,bn=/^(?:GET|HEAD)$/,yn=/^\/\//,wn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,xn={},Tn={},$n="*/".concat("*");try{hn=location.href}catch(kn){hn=Q.createElement("a"),hn.href="",hn=hn.href}pn=wn.exec(hn.toLowerCase())||[],J.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:hn,type:"GET",isLocal:vn.test(pn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$n,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":J.parseJSON,"text xml":J.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?O(O(e,J.ajaxSettings),t):O(J.ajaxSettings,e)},ajaxPrefilter:P(xn),ajaxTransport:P(Tn),ajax:function(e,t){function n(e,t,n,r){var l,c,v,b,w,T=t;2!==y&&(y=2,s&&clearTimeout(s),o=void 0,a=r||"",x.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(b=q(d,x,n)),b=H(d,b,x,l),l?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(J.lastModified[i]=w),w=x.getResponseHeader("etag"),w&&(J.etag[i]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=b.state,c=b.data,v=b.error,l=!v)):(v=T,(e||!T)&&(T="error",0>e&&(e=0))),x.status=e,x.statusText=(t||T)+"",l?f.resolveWith(p,[c,T,x]):f.rejectWith(p,[x,T,v]),x.statusCode(g),g=void 0,u&&h.trigger(l?"ajaxSuccess":"ajaxError",[x,d,l?c:v]),m.fireWith(p,[x,T]),u&&(h.trigger("ajaxComplete",[x,d]),--J.active||J.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,i,a,r,s,l,u,c,d=J.ajaxSetup({},t),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?J(p):J.event,f=J.Deferred(),m=J.Callbacks("once memory"),g=d.statusCode||{},v={},b={},y=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!r)for(r={};t=gn.exec(a);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>y)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return o&&o.abort(t),n(0,t),this}};if(f.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||hn)+"").replace(fn,"").replace(yn,pn[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=J.trim(d.dataType||"*").toLowerCase().match(ht)||[""],null==d.crossDomain&&(l=wn.exec(d.url.toLowerCase()),d.crossDomain=!(!l||l[1]===pn[1]&&l[2]===pn[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(pn[3]||("http:"===pn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=J.param(d.data,d.traditional)),L(xn,d,t,x),2===y)return x;u=d.global,u&&0===J.active++&&J.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!bn.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(dn.test(i)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=mn.test(i)?i.replace(mn,"$1_="+cn++):i+(dn.test(i)?"&":"?")+"_="+cn++)),d.ifModified&&(J.lastModified[i]&&x.setRequestHeader("If-Modified-Since",J.lastModified[i]),J.etag[i]&&x.setRequestHeader("If-None-Match",J.etag[i])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$n+"; q=0.01":""):d.accepts["*"]);for(c in d.headers)x.setRequestHeader(c,d.headers[c]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===y))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](d[c]);if(o=L(Tn,d,t,x)){x.readyState=1,u&&h.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){x.abort("timeout")},d.timeout));try{y=1,o.send(v,n)}catch(T){if(!(2>y))throw T;n(-1,T)}}else n(-1,"No Transport");return x},getJSON:function(e,t,n){return J.get(e,t,n,"json")},getScript:function(e,t){return J.get(e,void 0,t,"script")}}),J.each(["get","post"],function(e,t){J[t]=function(e,n,o,i){return J.isFunction(n)&&(i=i||o,o=n,n=void 0),J.ajax({url:e,type:t,dataType:i,data:n,success:o})}}),J.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){J.fn[t]=function(e){return this.on(t,e)}}),J._evalUrl=function(e){return J.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},J.fn.extend({wrapAll:function(e){var t;return J.isFunction(e)?this.each(function(t){J(this).wrapAll(e.call(this,t))}):(this[0]&&(t=J(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(J.isFunction(e)?function(t){J(this).wrapInner(e.call(this,t))}:function(){var t=J(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=J.isFunction(e);return this.each(function(n){J(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){J.nodeName(this,"body")||J(this).replaceWith(this.childNodes)}).end()}}),J.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},J.expr.filters.visible=function(e){return!J.expr.filters.hidden(e)};var jn=/%20/g,Cn=/\[\]$/,Dn=/\r?\n/g,Sn=/^(?:submit|button|image|reset|file)$/i,An=/^(?:input|select|textarea|keygen)/i;J.param=function(e,t){var n,o=[],i=function(e,t){t=J.isFunction(t)?t():null==t?"":t,o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=J.ajaxSettings&&J.ajaxSettings.traditional),J.isArray(e)||e.jquery&&!J.isPlainObject(e))J.each(e,function(){i(this.name,this.value)});else for(n in e)R(n,e[n],t,i);return o.join("&").replace(jn,"+")},J.fn.extend({serialize:function(){return J.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=J.prop(this,"elements");return e?J.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!J(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!kt.test(e))}).map(function(e,t){var n=J(this).val();return null==n?null:J.isArray(n)?J.map(n,function(e){return{name:t.name,value:e.replace(Dn,"\r\n")}}):{name:t.name,value:n.replace(Dn,"\r\n")}}).get()}}),J.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Nn=0,In={},En={0:200,1223:204},_n=J.ajaxSettings.xhr();e.ActiveXObject&&J(e).on("unload",function(){for(var e in In)In[e]()}),G.cors=!!_n&&"withCredentials"in _n,G.ajax=_n=!!_n,J.ajaxTransport(function(e){var t;return G.cors||_n&&!e.crossDomain?{send:function(n,o){var i,a=e.xhr(),r=++Nn;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)a[i]=e.xhrFields[i];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)a.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete In[r],t=a.onload=a.onerror=null,"abort"===e?a.abort():"error"===e?o(a.status,a.statusText):o(En[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:void 0,a.getAllResponseHeaders()))}},a.onload=t(),a.onerror=t("error"),t=In[r]=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),J.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return J.globalEval(e),e}}}),J.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),J.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(o,i){t=J("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),Q.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Mn=[],Pn=/(=)\?(?=&|$)|\?\?/;J.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||J.expando+"_"+cn++;return this[e]=!0,e}}),J.ajaxPrefilter("json jsonp",function(t,n,o){var i,a,r,s=t.jsonp!==!1&&(Pn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Pn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=J.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Pn,"$1"+i):t.jsonp!==!1&&(t.url+=(dn.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return r||J.error(i+" was not called"),r[0]},t.dataTypes[0]="json",a=e[i],e[i]=function(){r=arguments},o.always(function(){e[i]=a,t[i]&&(t.jsonpCallback=n.jsonpCallback,Mn.push(i)),r&&J.isFunction(a)&&a(r[0]),r=a=void 0}),"script"):void 0}),J.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Q;var o=rt.exec(e),i=!n&&[];return o?[t.createElement(o[1])]:(o=J.buildFragment([e],t,i),i&&i.length&&J(i).remove(),J.merge([],o.childNodes))};var Ln=J.fn.load;J.fn.load=function(e,t,n){if("string"!=typeof e&&Ln)return Ln.apply(this,arguments);var o,i,a,r=this,s=e.indexOf(" ");return s>=0&&(o=J.trim(e.slice(s)),e=e.slice(0,s)),J.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),r.length>0&&J.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){a=arguments,r.html(o?J("<div>").append(J.parseHTML(e)).find(o):e)}).complete(n&&function(e,t){r.each(n,a||[e.responseText,t,e])}),this},J.expr.filters.animated=function(e){return J.grep(J.timers,function(t){return e===t.elem}).length};var On=e.document.documentElement;J.offset={setOffset:function(e,t,n){var o,i,a,r,s,l,u,c=J.css(e,"position"),d=J(e),p={};"static"===c&&(e.style.position="relative"),s=d.offset(),a=J.css(e,"top"),l=J.css(e,"left"),u=("absolute"===c||"fixed"===c)&&(a+l).indexOf("auto")>-1,u?(o=d.position(),r=o.top,i=o.left):(r=parseFloat(a)||0,i=parseFloat(l)||0),J.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(p.top=t.top-s.top+r),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):d.css(p)}},J.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){J.offset.setOffset(this,e,t)});var t,n,o=this[0],i={top:0,left:0},a=o&&o.ownerDocument;return a?(t=a.documentElement,J.contains(t,o)?(typeof o.getBoundingClientRect!==jt&&(i=o.getBoundingClientRect()),n=B(a),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,n=this[0],o={top:0,left:0};return"fixed"===J.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),J.nodeName(e[0],"html")||(o=e.offset()),o.top+=J.css(e[0],"borderTopWidth",!0),o.left+=J.css(e[0],"borderLeftWidth",!0)),{top:t.top-o.top-J.css(n,"marginTop",!0),left:t.left-o.left-J.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||On;e&&!J.nodeName(e,"html")&&"static"===J.css(e,"position");)e=e.offsetParent;return e||On})}}),J.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var o="pageYOffset"===n;J.fn[t]=function(i){return gt(this,function(t,i,a){var r=B(t);return void 0===a?r?r[n]:t[i]:void(r?r.scrollTo(o?e.pageXOffset:a,o?a:e.pageYOffset):t[i]=a)},t,i,arguments.length,null)}}),J.each(["top","left"],function(e,t){J.cssHooks[t]=T(G.pixelPosition,function(e,n){return n?(n=x(e,t),Ft.test(n)?J(e).position()[t]+"px":n):void 0})}),J.each({Height:"height",Width:"width"},function(e,t){J.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,o){J.fn[o]=function(o,i){var a=arguments.length&&(n||"boolean"!=typeof o),r=n||(o===!0||i===!0?"margin":"border");return gt(this,function(t,n,o){var i;return J.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===o?J.css(t,n,r):J.style(t,n,o,r)},t,a?o:void 0,a,null)}})}),J.fn.size=function(){return this.length},J.fn.andSelf=J.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return J});var qn=e.jQuery,Hn=e.$;return J.noConflict=function(t){return e.$===J&&(e.$=Hn),t&&e.jQuery===J&&(e.jQuery=qn),J},typeof t===jt&&(e.jQuery=e.$=J),J}),!function(e){"use strict";function t(e,t){var n=(65535&e)+(65535&t),o=(e>>16)+(t>>16)+(n>>16);return o<<16|65535&n}function n(e,t){return e<<t|e>>>32-t}function o(e,o,i,a,r,s){return t(n(t(t(o,e),t(a,s)),r),i)}function i(e,t,n,i,a,r,s){return o(t&n|~t&i,e,t,a,r,s)}function a(e,t,n,i,a,r,s){return o(t&i|n&~i,e,t,a,r,s)}function r(e,t,n,i,a,r,s){return o(t^n^i,e,t,a,r,s)}function s(e,t,n,i,a,r,s){return o(n^(t|~i),e,t,a,r,s)}function l(e,n){e[n>>5]|=128<<n%32,e[(n+64>>>9<<4)+14]=n;var o,l,u,c,d,p=1732584193,h=-271733879,f=-1732584194,m=271733878;for(o=0;o<e.length;o+=16)l=p,u=h,c=f,d=m,p=i(p,h,f,m,e[o],7,-680876936),m=i(m,p,h,f,e[o+1],12,-389564586),f=i(f,m,p,h,e[o+2],17,606105819),h=i(h,f,m,p,e[o+3],22,-1044525330),p=i(p,h,f,m,e[o+4],7,-176418897),m=i(m,p,h,f,e[o+5],12,1200080426),f=i(f,m,p,h,e[o+6],17,-1473231341),h=i(h,f,m,p,e[o+7],22,-45705983),p=i(p,h,f,m,e[o+8],7,1770035416),m=i(m,p,h,f,e[o+9],12,-1958414417),f=i(f,m,p,h,e[o+10],17,-42063),h=i(h,f,m,p,e[o+11],22,-1990404162),p=i(p,h,f,m,e[o+12],7,1804603682),m=i(m,p,h,f,e[o+13],12,-40341101),f=i(f,m,p,h,e[o+14],17,-1502002290),h=i(h,f,m,p,e[o+15],22,1236535329),p=a(p,h,f,m,e[o+1],5,-165796510),m=a(m,p,h,f,e[o+6],9,-1069501632),f=a(f,m,p,h,e[o+11],14,643717713),h=a(h,f,m,p,e[o],20,-373897302),p=a(p,h,f,m,e[o+5],5,-701558691),m=a(m,p,h,f,e[o+10],9,38016083),f=a(f,m,p,h,e[o+15],14,-660478335),h=a(h,f,m,p,e[o+4],20,-405537848),p=a(p,h,f,m,e[o+9],5,568446438),m=a(m,p,h,f,e[o+14],9,-1019803690),f=a(f,m,p,h,e[o+3],14,-187363961),h=a(h,f,m,p,e[o+8],20,1163531501),p=a(p,h,f,m,e[o+13],5,-1444681467),m=a(m,p,h,f,e[o+2],9,-51403784),f=a(f,m,p,h,e[o+7],14,1735328473),h=a(h,f,m,p,e[o+12],20,-1926607734),p=r(p,h,f,m,e[o+5],4,-378558),m=r(m,p,h,f,e[o+8],11,-2022574463),f=r(f,m,p,h,e[o+11],16,1839030562),h=r(h,f,m,p,e[o+14],23,-35309556),p=r(p,h,f,m,e[o+1],4,-1530992060),m=r(m,p,h,f,e[o+4],11,1272893353),f=r(f,m,p,h,e[o+7],16,-155497632),h=r(h,f,m,p,e[o+10],23,-1094730640),p=r(p,h,f,m,e[o+13],4,681279174),m=r(m,p,h,f,e[o],11,-358537222),f=r(f,m,p,h,e[o+3],16,-722521979),h=r(h,f,m,p,e[o+6],23,76029189),p=r(p,h,f,m,e[o+9],4,-640364487),m=r(m,p,h,f,e[o+12],11,-421815835),f=r(f,m,p,h,e[o+15],16,530742520),h=r(h,f,m,p,e[o+2],23,-995338651),p=s(p,h,f,m,e[o],6,-198630844),m=s(m,p,h,f,e[o+7],10,1126891415),f=s(f,m,p,h,e[o+14],15,-1416354905),h=s(h,f,m,p,e[o+5],21,-57434055),p=s(p,h,f,m,e[o+12],6,1700485571),m=s(m,p,h,f,e[o+3],10,-1894986606),f=s(f,m,p,h,e[o+10],15,-1051523),h=s(h,f,m,p,e[o+1],21,-2054922799),p=s(p,h,f,m,e[o+8],6,1873313359),m=s(m,p,h,f,e[o+15],10,-30611744),f=s(f,m,p,h,e[o+6],15,-1560198380),h=s(h,f,m,p,e[o+13],21,1309151649),p=s(p,h,f,m,e[o+4],6,-145523070),m=s(m,p,h,f,e[o+11],10,-1120210379),f=s(f,m,p,h,e[o+2],15,718787259),h=s(h,f,m,p,e[o+9],21,-343485551),p=t(p,l),h=t(h,u),f=t(f,c),m=t(m,d);return[p,h,f,m]}function u(e){var t,n="";for(t=0;t<32*e.length;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function c(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;for(t=0;t<8*e.length;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function d(e){return u(l(c(e),8*e.length))}function p(e,t){var n,o,i=c(e),a=[],r=[];for(a[15]=r[15]=void 0,i.length>16&&(i=l(i,8*e.length)),n=0;16>n;n+=1)a[n]=909522486^i[n],r[n]=1549556828^i[n];return o=l(a.concat(c(t)),512+8*t.length),u(l(r.concat(o),640))}function h(e){var t,n,o="0123456789abcdef",i="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),i+=o.charAt(t>>>4&15)+o.charAt(15&t);return i}function f(e){return unescape(encodeURIComponent(e))}function m(e){return d(f(e))}function g(e){return h(m(e))}function v(e,t){return p(f(e),f(t))}function b(e,t){return h(v(e,t))}function y(e,t,n){return t?n?v(t,e):b(t,e):n?m(e):g(e)}"function"==typeof define&&define.amd?define(function(){return y}):e.md5=y}(this),function(e,t,n){function o(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function i(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return g[e.which]?g[e.which]:v[e.which]?v[e.which]:String.fromCharCode(e.which).toLowerCase()}function a(e){e=e||{};var t,n=!1;for(t in T)e[t]?n=!0:T[t]=0;n||(j=!1)}function r(e,t,n,o,i,a){var r,s,l=[],u=n.type;if(!w[e])return[];for("keyup"==u&&c(e)&&(t=[e]),r=0;r<w[e].length;++r)if(s=w[e][r],!(!o&&s.seq&&T[s.seq]!=s.level||u!=s.action||("keypress"!=u||n.metaKey||n.ctrlKey)&&t.sort().join(",")!==s.modifiers.sort().join(","))){var d=o&&s.seq==o&&s.level==a;(!o&&s.combo==i||d)&&w[e].splice(r,1),l.push(s)}return l}function s(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function l(e,t,n,o){C.stopCallback(t,t.target||t.srcElement,n,o)||!1!==e(t,n)||(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)}function u(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=i(e);t&&("keyup"==e.type&&$===t?$=!1:C.handleKey(t,s(e),e))}function c(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function d(e,t,n,o){function r(t){return function(){j=t,++T[e],clearTimeout(m),m=setTimeout(a,1e3)}}function s(t){l(n,t,e),"keyup"!==o&&($=i(t)),setTimeout(a,10)}for(var u=T[e]=0;u<t.length;++u){var c=u+1===t.length?s:r(o||p(t[u+1]).action);h(t[u],c,o,e,u)}}function p(e,t){var n,o,i,a=[];for(n="+"===e?["+"]:e.split("+"),i=0;i<n.length;++i)o=n[i],y[o]&&(o=y[o]),t&&"keypress"!=t&&b[o]&&(o=b[o],a.push("shift")),c(o)&&a.push(o);if(n=o,i=t,!i){if(!f){f={};for(var r in g)r>95&&112>r||g.hasOwnProperty(r)&&(f[g[r]]=r)}i=f[n]?"keydown":"keypress"}return"keypress"==i&&a.length&&(i="keydown"),{key:o,modifiers:a,action:i}}function h(e,t,n,o,i){x[e+":"+n]=t,e=e.replace(/\s+/g," ");var a=e.split(" ");1<a.length?d(e,a,t,n):(n=p(e,n),w[n.key]=w[n.key]||[],r(n.key,n.modifiers,{type:n.action},o,e,i),w[n.key][o?"unshift":"push"]({callback:t,modifiers:n.modifiers,action:n.action,seq:o,level:i,combo:e}))}var f,m,g={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},v={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},b={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},y={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},w={},x={},T={},$=!1,k=!1,j=!1;for(n=1;20>n;++n)g[111+n]="f"+n;for(n=0;9>=n;++n)g[n+96]=n;o(t,"keypress",u),o(t,"keydown",u),o(t,"keyup",u);var C={bind:function(e,t,n){e=e instanceof Array?e:[e];for(var o=0;o<e.length;++o)h(e[o],t,n);return this},unbind:function(e,t){return C.bind(e,function(){},t)},trigger:function(e,t){return x[e+":"+t]&&x[e+":"+t]({},e),this},reset:function(){return w={},x={},this},stopCallback:function(e,t){return-1<(" "+t.className+" ").indexOf(" mousetrap ")?!1:"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},handleKey:function(e,t,n){var o,i=r(e,t,n);t={};var s=0,u=!1;for(o=0;o<i.length;++o)i[o].seq&&(s=Math.max(s,i[o].level));for(o=0;o<i.length;++o)i[o].seq?i[o].level==s&&(u=!0,t[i[o].seq]=1,l(i[o].callback,n,i[o].combo,i[o].seq)):u||l(i[o].callback,n,i[o].combo);i="keypress"==n.type&&k,n.type!=j||c(e)||i||a(t),k=u&&"keydown"==n.type}};e.Mousetrap=C,"function"==typeof define&&define.amd&&define(C)}(window,document),Mousetrap=function(e){var t={},n=e.stopCallback;return e.stopCallback=function(e,o,i){return t[i]?!1:n(e,o,i)},e.bindGlobal=function(n,o,i){if(e.bind(n,o,i),n instanceof Array)for(o=0;o<n.length;o++)t[n[o]]=!0;else t[n]=!0},e}(Mousetrap),function(e){function t(e,t){return"function"==typeof e?e.call(t):e}function n(t,n){this.$element=e(t),this.options=n,this.enabled=!0,this.fixTitle()}n.prototype={show:function(){var n=this.getTitle();if(n&&this.enabled){var o=this.tip();o.find(".tipsy-inner")[this.options.html?"html":"text"](n),o[0].className="tipsy",o.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var i,a=e.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),r=o[0].offsetWidth,s=o[0].offsetHeight,l=t(this.options.gravity,this.$element[0]);switch(l.charAt(0)){case"n":i={top:a.top+a.height+this.options.offset,left:a.left+a.width/2-r/2};break;case"s":i={top:a.top-s-this.options.offset,left:a.left+a.width/2-r/2};break;case"e":i={top:a.top+a.height/2-s/2,left:a.left-r-this.options.offset};break;case"w":i={top:a.top+a.height/2-s/2,left:a.left+a.width+this.options.offset}}2==l.length&&(i.left="w"==l.charAt(1)?a.left+a.width/2-15:a.left+a.width/2-r+15),o.css(i).addClass("tipsy-"+l),o.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+l.charAt(0),this.options.className&&o.addClass(t(this.options.className,this.$element[0])),this.options.fade?o.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):o.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){e(this).remove()}):this.tip().remove()},fixTitle:function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("original-title"))&&e.attr("original-title",e.attr("title")||"").removeAttr("title")},getTitle:function(){var e,t=this.$element,n=this.options;this.fixTitle();var e,n=this.options;return"string"==typeof n.title?e=t.attr("title"==n.title?"original-title":n.title):"function"==typeof n.title&&(e=n.title.call(t[0])),e=(""+e).replace(/(^\s*|\s*$)/,""),e||n.fallback},tip:function(){return this.$tip||(this.$tip=e('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')),this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}},e.fn.tipsy=function(t){function o(o){var i=e.data(o,"tipsy");return i||(i=new n(o,e.fn.tipsy.elementOptions(o,t)),e.data(o,"tipsy",i)),i}function i(){var e=o(this);e.hoverState="in",0==t.delayIn?e.show():(e.fixTitle(),setTimeout(function(){"in"==e.hoverState&&e.show()},t.delayIn))}function a(){var e=o(this);e.hoverState="out",0==t.delayOut?e.hide():setTimeout(function(){"out"==e.hoverState&&e.hide()},t.delayOut)}if(t===!0)return this.data("tipsy");if("string"==typeof t){var r=this.data("tipsy");return r&&r[t](),this}if(t=e.extend({},e.fn.tipsy.defaults,t),t.live||this.each(function(){o(this)}),"manual"!=t.trigger){var s=t.live?"live":"bind",l="hover"==t.trigger?"mouseenter":"focus",u="hover"==t.trigger?"mouseleave":"blur";this[s](l,i)[s](u,a)}return this},e.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:.8,title:"title",trigger:"hover"},e.fn.tipsy.elementOptions=function(t,n){return e.metadata?e.extend({},n,e(t).metadata()):n},e.fn.tipsy.autoNS=function(){return e(this).offset().top>e(document).scrollTop()+e(window).height()/2?"s":"n"},e.fn.tipsy.autoWE=function(){return e(this).offset().left>e(document).scrollLeft()+e(window).width()/2?"e":"w"},e.fn.tipsy.autoBounds=function(t,n){return function(){var o={ns:n[0],ew:n.length>1?n[1]:!1},i=e(document).scrollTop()+t,a=e(document).scrollLeft()+t,r=e(this);return r.offset().top<i&&(o.ns="n"),r.offset().left<a&&(o.ew="w"),e(window).width()+e(document).scrollLeft()-r.offset().left<t&&(o.ew="e"),e(window).height()+e(document).scrollTop()-r.offset().top<t&&(o.ns="s"),o.ns+(o.ew?o.ew:"")}}}(jQuery);var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version",this.OS=this.searchString(this.dataOS)||"an unknown OS"
},searchString:function(e){for(var t=0;t<e.length;t++){var n=e[t].string,o=e[t].prop;if(this.versionSearchString=e[t].versionSearch||e[t].identity,n){if(-1!=n.indexOf(e[t].subString))return e[t].identity}else if(o)return e[t].identity}},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(-1!=t)return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init(),function(e){e.fn.retina=function(t){var n={"retina-background":!1,"retina-suffix":"@2x"};t&&e.extend(n,t);var o=function(e,t){var n=new Image;n.onload=function(){t(n)},n.src=e};window.devicePixelRatio>1&&this.each(function(){var t=e(this);if("img"==this.tagName.toLowerCase()&&t.attr("src")){var i=t.attr("src").replace(/\.(?!.*\.)/,n["retina-suffix"]+".");o(i,function(n){t.attr("src",n.src);var o=e("<div>").append(t.clone()).remove().html();/(width|height)=["']\d+["']/.test(o)||t.attr("width",n.width/2)})}if(n["retina-background"]){var a=t.css("background-image");if(/^url\(.*\)$/.test(a)){var i=a.substring(4,a.length-1).replace(/\.(?!.*\.)/,n["retina-suffix"]+".");o(i,function(e){t.css("background-image","url("+e.src+")"),"auto auto"==t.css("background-size")&&t.css("background-size",e.width/2+"px auto")})}}})}}(jQuery),function(e){var t=function(t){var n=this;this.el=e(t),this.pos={start:{x:0,y:0},end:{x:0,y:0}},this.startTime,t.on("touchstart",function(e){n.touchStart(e)}),t.on("touchmove",function(e){n.touchMove(e)}),t.on("touchend",function(){n.swipeEnd()}),t.on("mousedown",function(e){n.mouseDown(e)})};t.prototype={touchStart:function(e){var t=e.originalEvent.touches[0];this.swipeStart(e,t.pageX,t.pageY)},touchMove:function(e){var t=e.originalEvent.touches[0];this.swipeMove(e,t.pageX,t.pageY)},mouseDown:function(e){var t=this;this.swipeStart(e,e.pageX,e.pageY),this.el.on("mousemove",function(e){t.mouseMove(e)}),this.el.on("mouseup",function(){t.mouseUp()})},mouseMove:function(e){this.swipeMove(e,e.pageX,e.pageY)},mouseUp:function(e){this.swipeEnd(e),this.el.off("mousemove"),this.el.off("mouseup")},swipeStart:function(e,t,n){this.pos.start.x=t,this.pos.start.y=n,this.pos.end.x=t,this.pos.end.y=n,this.startTime=(new Date).getTime(),this.trigger("swipeStart",e)},swipeMove:function(e,t,n){this.pos.end.x=t,this.pos.end.y=n,this.trigger("swipeMove",e)},swipeEnd:function(e){this.trigger("swipeEnd",e)},trigger:function(t,n){var o=this,i=e.Event(t),a=o.pos.start.x-o.pos.end.x,r=o.pos.end.y-o.pos.start.y,s=Math.atan2(r,a),l="up",u=Math.round(Math.sqrt(Math.pow(a,2)+Math.pow(r,2))),c=Math.round(180*s/Math.PI),d=Math.round(u/((new Date).getTime()-o.startTime)*1e3);0>c&&(c=360-Math.abs(c)),45>=c&&c>=0||360>=c&&c>=315?l="left":c>=135&&225>=c?l="right":c>45&&135>c&&(l="down"),i.originalEvent=n,i.swipe={x:a,y:r,direction:l,distance:u,angle:c,speed:d},e(o.el).trigger(i)}},e.fn.swipe=function(){new t(this);return this}}(jQuery),album={json:null,getID:function(){var e;return e=photo.json?photo.json.album:album.json?album.json.id:$(".album:hover, .album.active").attr("data-id"),e||(e=$(".album:hover, .album.active").attr("data-id")),e||(e=$(".photo:hover, .photo.active").attr("data-album-id")),e?e:!1},load:function(e,t){var n,o,i,a;password.get(e,function(){t||(loadingBar.show(),lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomOut"),lychee.animate(".divider","fadeOut")),n=(new Date).getTime(),o="getAlbum&albumID="+e+"&password="+password.value,lychee.api(o,function(o){return"Warning: Album private!"===o?(void 0!=document.location.hash.replace("#","").split("/")[1]?lychee.setMode("view"):(lychee.content.show(),lychee.goto("")),!1):"Warning: Wrong password!"===o?(album.load(e,t),!1):(album.json=o,i=(new Date).getTime()-n,a=i>300?0:t?0:300-i,visible.albums()||visible.photo()||visible.album()||(a=0),void setTimeout(function(){view.album.init(),t||(lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomIn"),view.header.mode("album"))},a))})})},parse:function(){album.json.title||(album.json.title="Untitled")},add:function(){var e,t,n,o=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};n=[["Create Album",function(){e=$(".message input.text").val(),0===e.length&&(e="Untitled"),modal.close(),t="addAlbum&title="+escape(encodeURI(e)),lychee.api(t,function(e){e===!0&&(e=1),e!==!1&&o(e)?lychee.goto(e):lychee.error(null,t,e)})}],["Cancel",function(){}]],modal.show("New Album","Enter a title for this album: <input class='text' type='text' maxlength='30' placeholder='Title' value='Untitled'>",n)},"delete":function(e){var t,n,o;return e?(e instanceof Array==!1&&(e=[e]),n=[["",function(){t="deleteAlbum&albumIDs="+e,lychee.api(t,function(n){visible.albums()?e.forEach(function(e){albums.json.num--,view.albums.content.delete(e)}):lychee.goto(""),n!==!0&&lychee.error(null,t,n)})}],["",function(){}]],void("0"===e.toString()?(n[0][0]="Clear Unsorted",n[1][0]="Keep Unsorted",modal.show("Clear Unsorted","Are you sure you want to delete all photos from 'Unsorted'?<br>This action can't be undone!",n)):1===e.length?(n[0][0]="Delete Album and Photos",n[1][0]="Keep Album",album.json?o=album.json.title:albums.json&&(o=albums.json.content[e].title),modal.show("Delete Album","Are you sure you want to delete the album '"+o+"' and all of the photos it contains? This action can't be undone!",n)):(n[0][0]="Delete Albums and Photos",n[1][0]="Keep Albums",modal.show("Delete Albums","Are you sure you want to delete all "+e.length+" selected albums and all of the photos they contain? This action can't be undone!",n)))):!1},setTitle:function(e){var t,n,o,i="";return e?(e instanceof Array==!1&&(e=[e]),1===e.length&&(album.json?i=album.json.title:albums.json&&(i=albums.json.content[e].title),i||(i=""),i=i.replace("'","&apos;")),o=[["Set Title",function(){t=$(".message input.text").val(),t=lychee.removeHTML(t),t=""===t?"Untitled":t,visible.album()?(album.json.title=t,view.album.title()):visible.albums()&&e.forEach(function(e){albums.json.content[e].title=t,view.albums.content.title(e)}),n="setAlbumTitle&albumIDs="+e+"&title="+escape(encodeURI(t)),lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})}],["Cancel",function(){}]],void(1===e.length?modal.show("Set Title","Enter a new title for this album: <input class='text' type='text' maxlength='30' placeholder='Title' value='"+i+"'>",o):modal.show("Set Titles","Enter a title for all "+e.length+" selected album: <input class='text' type='text' maxlength='30' placeholder='Title' value='"+i+"'>",o))):!1},setDescription:function(e){var t,n,o,i=album.json.description.replace("'","&apos;");o=[["Set Description",function(){t=$(".message input.text").val(),t=lychee.removeHTML(t),visible.album()&&(album.json.description=t,view.album.description()),n="setAlbumDescription&albumID="+e+"&description="+escape(encodeURI(t)),lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})}],["Cancel",function(){}]],modal.show("Set Description","Please enter a description for this album: <input class='text' type='text' maxlength='800' placeholder='Description' value='"+i+"'>",o)},setPublic:function(e,t){var n,o="",i=!1;return visible.message()||0!=album.json.public?(visible.message()&&("password"===$(".message .choice input[name='password']:checked").val()?(o=md5($(".message input.text").val()),album.json.password=1):(o="",album.json.password=0),"listed"===$(".message .choice input[name='listed']:checked").val()&&(i=!0)),n="setAlbumPublic&albumID="+e+"&password="+o+"&visible="+i,visible.album()&&(album.json.public=0==album.json.public?1:0,album.json.password=0==album.json.public?0:album.json.password,view.album.public(),view.album.password(),1==album.json.public&&contextMenu.shareAlbum(e,t)),void lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})):(modal.show("Share Album","This album will be shared with one of the following properties:</p><form><div class='choice'><input type='checkbox' name='listed' value='listed' checked><h2>Visible</h2><p>Listed to visitors of your Lychee.</p></div><div class='choice'><input type='checkbox' name='password' value='password'><h2>Password protected</h2><p>Only accessible with a valid password.<input class='text' type='password' placeholder='password' value='' style='display: none;'></p></div></form><p style='display: none;'>",[["Share Album",function(){album.setPublic(album.getID(),t)}],["Cancel",function(){}]],-160),$(".message .choice input[name='password']").on("change",function(){$(this).prop("checked")===!0?$(".message .choice input.text").show():$(".message .choice input.text").hide()}),!0)},share:function(e){var t="",n=location.href;switch(e){case 0:t="https://twitter.com/share?url="+encodeURI(n);break;case 1:t="http://www.facebook.com/sharer.php?u="+encodeURI(n)+"&t="+encodeURI(album.json.title);break;case 2:t="mailto:?subject="+encodeURI(album.json.title)+"&body="+encodeURI(n);break;default:t=""}t.length>5&&(location.href=t)},getArchive:function(e){var t;t=location.href.indexOf("index.html")>0?location.href.replace(location.hash,"").replace("index.html","php/api.php?function=getAlbumArchive&albumID="+e):location.href.replace(location.hash,"")+"php/api.php?function=getAlbumArchive&albumID="+e,lychee.publicMode&&(t+="&password="+password.value),location.href=t}},albums={json:null,load:function(){var e,t,n;lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomOut"),lychee.animate(".divider","fadeOut"),e=(new Date).getTime(),lychee.api("getAlbums",function(o){o.unsortedAlbum={id:0,title:"Unsorted",sysdate:o.unsortedNum+" photos",unsorted:1,thumb0:o.unsortedThumb0,thumb1:o.unsortedThumb1,thumb2:o.unsortedThumb2},o.starredAlbum={id:"f",title:"Starred",sysdate:o.starredNum+" photos",star:1,thumb0:o.starredThumb0,thumb1:o.starredThumb1,thumb2:o.starredThumb2},o.publicAlbum={id:"s",title:"Public",sysdate:o.publicNum+" photos","public":1,thumb0:o.publicThumb0,thumb1:o.publicThumb1,thumb2:o.publicThumb2},o.recentAlbum={id:"r",title:"Recent",sysdate:o.recentNum+" photos",recent:1,thumb0:o.recentThumb0,thumb1:o.recentThumb1,thumb2:o.recentThumb2},albums.json=o,t=(new Date).getTime()-e,n=t>300?0:300-t,visible.albums()||visible.photo()||visible.album()||(n=0),setTimeout(function(){view.header.mode("albums"),view.albums.init(),lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomIn")},n)})},parse:function(e){e.password&&lychee.publicMode?(e.thumb0="assets/img/password.svg",e.thumb1="assets/img/password.svg",e.thumb2="assets/img/password.svg"):(e.thumb0||(e.thumb0="assets/img/no_images.svg"),e.thumb1||(e.thumb1="assets/img/no_images.svg"),e.thumb2||(e.thumb2="assets/img/no_images.svg"))}},build={divider:function(e){return"<div class='divider fadeIn'><h1>"+e+"</h1></div>"},editIcon:function(e){return"<div id='"+e+"' class='edit'><a class='icon-pencil'></a></div>"},multiselect:function(e,t){return"<div id='multiselect' style='top: "+e+"px; left: "+t+"px;'></div>"},album:function(e){if(!e)return"";var t="",n="",o=e.title,i="";return o.length>18&&(o=e.title.substr(0,18)+"...",n=e.title),"svg"===e.thumb0.split(".").pop()&&(i="nonretina"),t+="<div class='album' data-id='"+e.id+"' data-password='"+e.password+"'>",t+="<img src='"+e.thumb2+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb1+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb0+"' width='200' height='200' alt='thumb' data-type='"+i+"'>",t+="<div class='overlay'>",t+=e.password&&!lychee.publicMode?"<h1><span class='icon-lock'></span> "+o+"</h1>":"<h1 title='"+n+"'>"+o+"</h1>",t+="<a>"+e.sysdate+"</a>",t+="</div>",lychee.publicMode||(1==e.star&&(t+="<a class='badge red icon-star'></a>"),1==e.public&&(t+="<a class='badge red icon-share'></a>"),1==e.unsorted&&(t+="<a class='badge red icon-reorder'></a>"),1==e.recent&&(t+="<a class='badge red icon-time'></a>")),t+="</div>"},photo:function(e){if(!e)return"";var t="",n="",o=e.title;return o.length>18&&(o=e.title.substr(0,18)+"...",n=e.title),t+="<div class='photo' data-album-id='"+e.album+"' data-id='"+e.id+"'>",t+="<img src='"+e.thumbUrl+"' width='200' height='200' alt='thumb'>",t+="<div class='overlay'>",t+="<h1 title='"+n+"'>"+o+"</h1>",t+=1==e.cameraDate?"<a><span class='icon-camera' title='Photo Date'></span>"+e.sysdate+"</a>":"<a>"+e.sysdate+"</a>",t+="</div>",1==e.star&&(t+="<a class='badge red icon-star'></a>"),lychee.publicMode||1!=e.public||1==album.json.public||(t+="<a class='badge red icon-share'></a>"),t+="</div>"},imageview:function(e,t,n){if(!e)return"";var o="";return o+="<div class='arrow_wrapper previous'><a id='previous' class='icon-caret-left'></a></div>",o+="<div class='arrow_wrapper next'><a id='next' class='icon-caret-right'></a></div>",o+=t?n?"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2-20)+"px; margin-left: -"+e.width/2+"px;'></div>":"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2)+"px; margin-left: -"+e.width/2+"px;'></div>":n?"<div id='image' style='background-image: url("+e.url+")'></div>":"<div id='image' style='background-image: url("+e.url+");' class='full'></div>"},no_content:function(e){var t="";return t+="<div class='no_content fadeIn'>",t+="<a class='icon icon-"+e+"'></a>","search"===e?t+="<p>No results</p>":"picture"===e?t+="<p>No public albums</p>":"cog"===e&&(t+="<p>No Configuration!</p>"),t+="</div>"},modal:function(e,t,n,o,i){var a="",r="";return o&&(r="style='margin-top: "+o+"px;'"),a+="<div class='message_overlay fadeIn'>",a+="<div class='message center'"+r+">",a+="<h1>"+e+"</h1>",i!==!1&&(a+="<a class='close icon-remove-sign'></a>"),a+="<p>"+t+"</p>",$.each(n,function(e){""!==this[0]&&(a+=0===e?"<a class='button active'>"+this[0]+"</a>":"<a class='button'>"+this[0]+"</a>")}),a+="</div>",a+="</div>"},signInModal:function(){var e="";return e+="<div class='message_overlay'>",e+="<div class='message center'>",e+="<h1><a class='icon-lock'></a> Sign In</h1>",e+="<a class='close icon-remove-sign'></a>",e+="<div class='sign_in'>",e+="<input id='username' type='text' name='' value='' placeholder='username'>",e+="<input id='password' type='password' name='' value='' placeholder='password'>",e+="</div>",e+="<div id='version'>Version "+lychee.version+"<span> &#8211; <a target='_blank' href='"+lychee.updateURL+"'>Update available!</a><span></div>",e+="<a onclick='lychee.login()' class='button active'>Sign in</a>",e+="</div>",e+="</div>"},uploadModal:function(e,t){var n="";return n+="<div class='upload_overlay fadeIn'>",n+="<div class='upload_message center'>",n+="<a class='icon-"+e+"'></a>",n+=void 0!==t?"<p>"+t+"</p>":"<div class='progressbar'><div></div></div>",n+="</div>",n+="</div>"},contextMenu:function(e){var t="";return t+="<div class='contextmenu_bg'></div>",t+="<div class='contextmenu'>",t+="<table>",t+="<tbody>",$.each(e,function(n){t+="separator"===e[n][0]&&-1===e[n][1]?"<tr class='separator'></tr>":-1===e[n][1]?"<tr class='no_hover'><td>"+e[n][0]+"</td></tr>":void 0!=e[n][2]?"<tr><td onclick='"+e[n][2]+"; window.contextMenu.close();'>"+e[n][0]+"</td></tr>":"<tr><td onclick='window.contextMenu.fns["+e[n][1]+"](); window.contextMenu.close();'>"+e[n][0]+"</td></tr>"}),t+="</tbody>",t+="</table>",t+="</div>"},tags:function(e,t){var n="",o=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_tags");return""!==e?(e=e.split(","),e.forEach(function(e,t){n+="<a class='tag'>"+e+"<span class='icon-remove' data-index='"+t+"'></span></a>"}),n+=o):n="<div class='empty'>No Tags"+o+"</div>",n},infoboxPhoto:function(e,t){if(!e)return"";var n,o,i,a,r="";switch(r+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",r+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;case"2":n="Public (Album)";break;default:n="-"}return o=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title"),i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description"),a=[["","Basics"],["Title",e.title+o],["Uploaded",e.sysdate],["Description",e.description+i],["","Image"],["Size",e.size],["Format",e.type],["Resolution",e.width+" x "+e.height],["Tags",build.tags(e.tags,t)]],e.takestamp+e.make+e.model+e.shutter+e.aperture+e.focal+e.iso!=="null"&&(a=a.concat([["","Camera"],["Captured",e.takedate],["Make",e.make],["Type/Model",e.model],["Shutter Speed",e.shutter],["Aperture",e.aperture],["Focal Length",e.focal],["ISO",e.iso]])),a=a.concat([["","Share"],["Visibility",n]]),$.each(a,function(e){switch((""===a[e][1]||void 0===a[e][1]||null===a[e][1])&&(a[e][1]="-"),a[e][0]){case"":r+="</table>",r+="<div class='separator'><h1>"+a[e][1]+"</h1></div>",r+="<table>";break;case"Tags":t===!0||lychee.publicMode||(r+="</table>",r+="<div class='separator'><h1>"+a[e][0]+"</h1></div>",r+="<div id='tags'>"+a[e][1]+"</div>");break;default:r+="<tr>",r+="<td>"+a[e][0]+"</td>",r+="<td class='attr_"+a[e][0].toLowerCase()+"'>"+a[e][1]+"</td>",r+="</tr>"}}),r+="</table>",r+="<div class='bumper'></div>",r+="</div>"},infoboxAlbum:function(e,t){if(!e)return"";var n,o,i,a,r,s="";switch(s+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",s+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;default:n="-"}switch(e.password){case!1:o="No";break;case!0:o="Yes";break;default:o="-"}return i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title_album"),a=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description_album"),r=[["","Basics"],["Title",e.title+i],["Description",e.description+a],["","Album"],["Created",e.sysdate],["Images",e.num],["","Share"],["Visibility",n],["Password",o]],$.each(r,function(e){(""===r[e][1]||void 0===r[e][1]||null===r[e][1])&&(r[e][1]="-"),""===r[e][0]?(s+="</table>",s+="<div class='separator'><h1>"+r[e][1]+"</h1></div>",s+="<table id='infos'>"):(s+="<tr>",s+="<td>"+r[e][0]+"</td>",s+="<td class='attr_"+r[e][0].toLowerCase()+"'>"+r[e][1]+"</td>",s+="</tr>")}),s+="</table>",s+="<div class='bumper'></div>",s+="</div>"}},contextMenu={fns:null,show:function(e,t,n,o){contextMenu.close(),$("body").css("overflow","hidden").append(build.contextMenu(e)),t+$(".contextmenu").outerWidth(!0)>$("html").width()&&(o="left"),n+$(".contextmenu").outerHeight(!0)>$("html").height()&&(n-=n+$(".contextmenu").outerHeight(!0)-$("html").height()),t>$(document).width()&&(t=$(document).width()),0>t&&(t=0),n>$(document).height()&&(n=$(document).height()),0>n&&(n=0),"left"===o&&(t-=$(".contextmenu").outerWidth(!0)),(null===t||void 0===t||isNaN(t)||null===n||void 0===n||isNaN(n))&&(t="10px",n="10px"),$(".contextmenu").css({top:n,left:t,opacity:.98})},add:function(e){var t,n=e.pageX,o=e.pageY-$(document).scrollTop();upload.notify(),contextMenu.fns=[function(){$("#upload_files").click()},function(){upload.start.url()},function(){upload.start.dropbox()},function(){upload.start.server()},function(){album.add()}],t=[["<a class='icon-picture'></a> Upload Photo",0],["separator",-1],["<a class='icon-link'></a> Import from Link",1],["<a class='icon-folder-open'></a> Import from Dropbox",2],["<a class='icon-hdd'></a> Import from Server",3],["separator",-1],["<a class='icon-folder-close'></a> New Album",4]],contextMenu.show(t,n,o,"left")},settings:function(e){var t,n=e.pageX,o=e.pageY-$(document).scrollTop();contextMenu.fns=[function(){settings.setLogin()},function(){settings.setSorting()},function(){settings.setDropboxKey()},function(){window.open(lychee.website)},function(){window.open("plugins/check/")},function(){window.open("plugins/displaylog/")},function(){lychee.logout()}],t=[["<a class='icon-user'></a> Change Login",0],["<a class='icon-sort'></a> Change Sorting",1],["<a class='icon-folder-open'></a> Set Dropbox",2],["separator",-1],["<a class='icon-info-sign'></a> About Lychee",3],["<a class='icon-dashboard'></a> Diagnostics",4],["<a class='icon-list'></a> Show Log",5],["separator",-1],["<a class='icon-signout'></a> Sign Out",6]],contextMenu.show(t,n,o,"right")},album:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();return"0"===e||"f"===e||"s"===e||"r"===e?!1:(contextMenu.fns=[function(){album.setTitle([e])},function(){album.delete([e])}],n=[["<a class='icon-edit'></a> Rename",0],["<a class='icon-trash'></a> Delete",1]],contextMenu.show(n,o,i,"right"),void $(".album[data-id='"+e+"']").addClass("active"))},albumMulti:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();multiselect.stopResize(),contextMenu.fns=[function(){album.setTitle(e)},function(){album.delete(e)}],n=[["<a class='icon-edit'></a> Rename All",0],["<a class='icon-trash'></a> Delete All",1]],contextMenu.show(n,o,i,"right")},photo:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();contextMenu.fns=[function(){photo.setStar([e])},function(){photo.editTags([e])},function(){photo.setTitle([e])},function(){contextMenu.move([e],t,"right")},function(){photo.delete([e])}],n=[["<a class='icon-star'></a> Star",0],["<a class='icon-tags'></a> Tags",1],["separator",-1],["<a class='icon-edit'></a> Rename",2],["<a class='icon-folder-open'></a> Move",3],["<a class='icon-trash'></a> Delete",4]],contextMenu.show(n,o,i,"right"),$(".photo[data-id='"+e+"']").addClass("active")},photoMulti:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();multiselect.stopResize(),contextMenu.fns=[function(){photo.setStar(e)},function(){photo.editTags(e)},function(){photo.setTitle(e)},function(){contextMenu.move(e,t,"right")},function(){photo.delete(e)}],n=[["<a class='icon-star'></a> Star All",0],["<a class='icon-tags'></a> Tag All",1],["separator",-1],["<a class='icon-edit'></a> Rename All",2],["<a class='icon-folder-open'></a> Move All",3],["<a class='icon-trash'></a> Delete All",4]],contextMenu.show(n,o,i,"right")},photoMore:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();contextMenu.fns=[function(){window.open(photo.getDirectLink())},function(){photo.getArchive(e)}],n=[["<a class='icon-resize-full'></a> Full Photo",0],["<a class='icon-circle-arrow-down'></a> Download",1]],contextMenu.show(n,o,i,"right")},move:function(e,t){var n=t.pageX,o=t.pageY-$(document).scrollTop(),i=[];contextMenu.close(!0),"0"!==album.getID()&&(i=[["Unsorted",0,"photo.setAlbum(["+e+"], 0)"],["separator",-1]]),lychee.api("getAlbums",function(t){0===t.num?i=[["New Album",0,"album.add()"]]:$.each(t.content,function(){this.id!=album.getID()&&i.push([this.title,0,"photo.setAlbum(["+e+"], "+this.id+")"])}),visible.photo()?contextMenu.show(i,n,o,"left"):contextMenu.show(i,n,o,"right")})},sharePhoto:function(e,t){var n,o=t.pageX,i=t.pageY;i-=$(document).scrollTop(),contextMenu.fns=[function(){photo.setPublic(e)},function(){photo.share(e,0)},function(){photo.share(e,1)},function(){photo.share(e,2)},function(){photo.share(e,3)},function(){window.open(photo.getDirectLink())}],link=photo.getViewLink(e),"2"===photo.json.public&&(link=location.href),n=[["<input readonly id='link' value='"+link+"'>",-1],["separator",-1],["<a class='icon-eye-close'></a> Make Private",0],["separator",-1],["<a class='icon-twitter'></a> Twitter",1],["<a class='icon-facebook'></a> Facebook",2],["<a class='icon-envelope'></a> Mail",3],["<a class='icon-hdd'></a> Dropbox",4],["<a class='icon-link'></a> Direct Link",5]],contextMenu.show(n,o,i,"left"),$(".contextmenu input").focus().select()},shareAlbum:function(e,t){var n,o=t.pageX,i=t.pageY;i-=$(document).scrollTop(),contextMenu.fns=[function(){album.setPublic(e)},function(){album.share(0)},function(){album.share(1)},function(){album.share(2)},function(){password.remove(e)}],n=[["<input readonly id='link' value='"+location.href+"'>",-1],["separator",-1],["<a class='icon-eye-close'></a> Make Private",0],["separator",-1],["<a class='icon-twitter'></a> Twitter",1],["<a class='icon-facebook'></a> Facebook",2],["<a class='icon-envelope'></a> Mail",3]],contextMenu.show(n,o,i,"left"),$(".contextmenu input").focus().select()},close:function(e){return visible.contextMenu()?(contextMenu.fns=[],$(".contextmenu_bg, .contextmenu").remove(),$("body").css("overflow","auto"),void(e!==!0&&($(".photo.active, .album.active").removeClass("active"),visible.multiselect()&&multiselect.close()))):!1}},$(document).ready(function(){var e=mobileBrowser()?"touchend":"click";$(document).bind("contextmenu",function(e){e.preventDefault()}),mobileBrowser()||$(".tools").tipsy({gravity:"n",fade:!1,delayIn:0,opacity:1}),$("#content").on("mousedown",multiselect.show),$(document).on("mouseup",multiselect.getSelection),$("#hostedwith").on(e,function(){window.open(lychee.website)}),$("#button_signin").on(e,lychee.loginDialog),$("#button_settings").on("click",contextMenu.settings),$("#button_share").on(e,function(e){1==photo.json.public||2==photo.json.public?contextMenu.sharePhoto(photo.getID(),e):photo.setPublic(photo.getID(),e)}),$("#button_share_album").on(e,function(e){1==album.json.public?contextMenu.shareAlbum(album.getID(),e):album.setPublic(album.getID(),e)}),$("#button_more").on(e,function(e){contextMenu.photoMore(photo.getID(),e)}),$("#button_trash_album").on(e,function(){album.delete([album.getID()])}),$("#button_move").on(e,function(e){contextMenu.move([photo.getID()],e)}),$("#button_trash").on(e,function(){photo.delete([photo.getID()])}),$("#button_info_album").on(e,function(){view.infobox.show()}),$("#button_info").on(e,function(){view.infobox.show()}),$("#button_archive").on(e,function(){album.getArchive(album.getID())}),$("#button_star").on(e,function(){photo.setStar([photo.getID()])}),$("#search").on("keyup click",function(){search.find($(this).val())}),$("#clearSearch").on(e,function(){$("#search").focus(),search.reset()}),$("#button_back_home").on(e,function(){lychee.goto("")}),$("#button_back").on(e,function(){lychee.goto(album.getID())}),lychee.imageview.on(e,".arrow_wrapper.previous",photo.previous).on(e,".arrow_wrapper.next",photo.next),$("#infobox").on(e,".header a",function(){view.infobox.hide()}).on(e,"#edit_title_album",function(){album.setTitle([album.getID()])}).on(e,"#edit_description_album",function(){album.setDescription(album.getID())}).on(e,"#edit_title",function(){photo.setTitle([photo.getID()])}).on(e,"#edit_description",function(){photo.setDescription(photo.getID())}).on(e,"#edit_tags",function(){photo.editTags([photo.getID()])}).on(e,"#tags .tag span",function(){photo.deleteTag(photo.getID(),$(this).data("index"))}),Mousetrap.bind("left",function(){visible.photo()&&$("#imageview a#previous").click()}).bind("right",function(){visible.photo()&&$("#imageview a#next").click()}).bind(["u","ctrl+u"],function(){$("#upload_files").click()}).bind(["s","ctrl+s","f","ctrl+f"],function(e){visible.photo()?$("#button_star").click():visible.albums()&&(e.preventDefault(),$("#search").focus())}).bind(["r","ctrl+r"],function(e){e.preventDefault(),visible.album()?album.setTitle(album.getID()):visible.photo()&&photo.setTitle([photo.getID()])}).bind(["d","ctrl+d"],function(e){e.preventDefault(),visible.photo()?photo.setDescription(photo.getID()):visible.album()&&album.setDescription(album.getID())}).bind(["t","ctrl+t"],function(e){visible.photo()&&(e.preventDefault(),photo.editTags([photo.getID()]))}).bind(["i","ctrl+i"],function(){visible.infobox()?view.infobox.hide():visible.infoboxbutton()&&view.infobox.show()}).bind(["command+backspace","ctrl+backspace"],function(){visible.photo()&&!visible.message()?photo.delete([photo.getID()]):visible.album()&&!visible.message()&&album.delete([album.getID()])}),Mousetrap.bindGlobal("enter",function(){$(".message .button.active").length&&$(".message .button.active").addClass("pressed").click()}),Mousetrap.bindGlobal(["esc","command+up"],function(e){e.preventDefault(),visible.message()&&$(".message .close").length>0?modal.close():visible.contextMenu()?contextMenu.close():visible.infobox()?view.infobox.hide():visible.photo()?lychee.goto(album.getID()):visible.album()?lychee.goto(""):visible.albums()&&0!==$("#search").val().length&&search.reset()}),mobileBrowser()&&$(document).on("touchend","#image",function(e){(null===swipe.obj||swipe.offset>=-5&&swipe.offset<=5)&&(visible.controls()?view.header.hide(e,0):view.header.show())}).swipe().on("swipeStart",function(){visible.photo()&&swipe.start($("#image"))}).swipe().on("swipeMove",function(e){visible.photo()&&swipe.move(e.swipe)}).swipe().on("swipeEnd",function(e){visible.photo()&&swipe.stop(e.swipe,photo.previous,photo.next)}),$(document).on("keyup","#password",function(){$(this).val().length>0&&$(this).removeClass("error")}).on(e,"#title.editable",function(){visible.photo()?photo.setTitle([photo.getID()]):album.setTitle([album.getID()])}).on("click",".album",function(){lychee.goto($(this).attr("data-id"))}).on("click",".photo",function(){lychee.goto(album.getID()+"/"+$(this).attr("data-id"))}).on(e,".message .close",modal.close).on(e,".message .button:first",function(){null!==modal.fns&&modal.fns[0](),visible.signin()||modal.close()}).on(e,".message .button:last",function(){null!==modal.fns&&modal.fns[1](),visible.signin()||modal.close()}).on(e,".button_add",function(e){contextMenu.add(e)}).on("change","#upload_files",function(){modal.close(),upload.start.local(this.files)}).on("contextmenu",".photo",function(e){contextMenu.photo(photo.getID(),e)}).on("contextmenu",".album",function(e){contextMenu.album(album.getID(),e)}).on(e,".contextmenu_bg",contextMenu.close).on("contextmenu",".contextmenu_bg",contextMenu.close).on(e,"#infobox_overlay",view.infobox.hide).on("dragover",function(e){e.preventDefault()},!1).on("drop",function(e){return e.stopPropagation(),e.preventDefault(),e.originalEvent.dataTransfer.files.length>0?upload.start.local(e.originalEvent.dataTransfer.files):e.originalEvent.dataTransfer.getData("Text").length>3&&upload.start.url(e.originalEvent.dataTransfer.getData("Text")),!0}),lychee.init()}),loadingBar={status:null,show:function(e,t){return"error"===e?(loadingBar.status="error",t&&(t=t.replace("<br>","")),t||(t="Whoops, it looks like something went wrong. Please reload the site and try again!"),visible.controls()&&lychee.header.addClass("error"),lychee.loadingBar.removeClass("loading uploading error").addClass(e).html("<h1>Error: <span>"+t+"</span></h1>").show().css("height","40px"),clearTimeout(lychee.loadingBar.data("timeout")),lychee.loadingBar.data("timeout",setTimeout(function(){loadingBar.hide(!0)},3e3)),!0):null===loadingBar.status?(loadingBar.status="loading",clearTimeout(lychee.loadingBar.data("timeout")),lychee.loadingBar.data("timeout",setTimeout(function(){visible.controls()&&lychee.header.addClass("loading"),lychee.loadingBar.removeClass("loading uploading error").addClass("loading").show()},1e3)),!0):void 0},hide:function(e){("error"!==loadingBar.status&&null!==loadingBar.status||e)&&(loadingBar.status=null,visible.controls()&&lychee.header.removeClass("error loading"),lychee.loadingBar.html("").css("height","3px"),clearTimeout(lychee.loadingBar.data("timeout")),setTimeout(function(){lychee.loadingBar.hide()
},searchString:function(e){for(var t=0;t<e.length;t++){var n=e[t].string,o=e[t].prop;if(this.versionSearchString=e[t].versionSearch||e[t].identity,n){if(-1!=n.indexOf(e[t].subString))return e[t].identity}else if(o)return e[t].identity}},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(-1!=t)return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init(),function(e){e.fn.retina=function(t){var n={"retina-background":!1,"retina-suffix":"@2x"};t&&e.extend(n,t);var o=function(e,t){var n=new Image;n.onload=function(){t(n)},n.src=e};window.devicePixelRatio>1&&this.each(function(){var t=e(this);if("img"==this.tagName.toLowerCase()&&t.attr("src")){var i=t.attr("src").replace(/\.(?!.*\.)/,n["retina-suffix"]+".");o(i,function(n){t.attr("src",n.src);var o=e("<div>").append(t.clone()).remove().html();/(width|height)=["']\d+["']/.test(o)||t.attr("width",n.width/2)})}if(n["retina-background"]){var a=t.css("background-image");if(/^url\(.*\)$/.test(a)){var i=a.substring(4,a.length-1).replace(/\.(?!.*\.)/,n["retina-suffix"]+".");o(i,function(e){t.css("background-image","url("+e.src+")"),"auto auto"==t.css("background-size")&&t.css("background-size",e.width/2+"px auto")})}}})}}(jQuery),function(e){var t=function(t){var n=this;this.el=e(t),this.pos={start:{x:0,y:0},end:{x:0,y:0}},this.startTime,t.on("touchstart",function(e){n.touchStart(e)}),t.on("touchmove",function(e){n.touchMove(e)}),t.on("touchend",function(){n.swipeEnd()}),t.on("mousedown",function(e){n.mouseDown(e)})};t.prototype={touchStart:function(e){var t=e.originalEvent.touches[0];this.swipeStart(e,t.pageX,t.pageY)},touchMove:function(e){var t=e.originalEvent.touches[0];this.swipeMove(e,t.pageX,t.pageY)},mouseDown:function(e){var t=this;this.swipeStart(e,e.pageX,e.pageY),this.el.on("mousemove",function(e){t.mouseMove(e)}),this.el.on("mouseup",function(){t.mouseUp()})},mouseMove:function(e){this.swipeMove(e,e.pageX,e.pageY)},mouseUp:function(e){this.swipeEnd(e),this.el.off("mousemove"),this.el.off("mouseup")},swipeStart:function(e,t,n){this.pos.start.x=t,this.pos.start.y=n,this.pos.end.x=t,this.pos.end.y=n,this.startTime=(new Date).getTime(),this.trigger("swipeStart",e)},swipeMove:function(e,t,n){this.pos.end.x=t,this.pos.end.y=n,this.trigger("swipeMove",e)},swipeEnd:function(e){this.trigger("swipeEnd",e)},trigger:function(t,n){var o=this,i=e.Event(t),a=o.pos.start.x-o.pos.end.x,r=o.pos.end.y-o.pos.start.y,s=Math.atan2(r,a),l="up",u=Math.round(Math.sqrt(Math.pow(a,2)+Math.pow(r,2))),c=Math.round(180*s/Math.PI),d=Math.round(u/((new Date).getTime()-o.startTime)*1e3);0>c&&(c=360-Math.abs(c)),45>=c&&c>=0||360>=c&&c>=315?l="left":c>=135&&225>=c?l="right":c>45&&135>c&&(l="down"),i.originalEvent=n,i.swipe={x:a,y:r,direction:l,distance:u,angle:c,speed:d},e(o.el).trigger(i)}},e.fn.swipe=function(){new t(this);return this}}(jQuery),album={json:null,getID:function(){var e;return e=photo.json?photo.json.album:album.json?album.json.id:$(".album:hover, .album.active").attr("data-id"),e||(e=$(".album:hover, .album.active").attr("data-id")),e||(e=$(".photo:hover, .photo.active").attr("data-album-id")),e?e:!1},load:function(e,t){var n,o,i,a;password.get(e,function(){t||(loadingBar.show(),lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomOut"),lychee.animate(".divider","fadeOut")),n=(new Date).getTime(),o="getAlbum&albumID="+e+"&password="+password.value,lychee.api(o,function(o){return"Warning: Album private!"===o?(void 0!=document.location.hash.replace("#","").split("/")[1]?lychee.setMode("view"):(lychee.content.show(),lychee.goto("")),!1):"Warning: Wrong password!"===o?(album.load(e,t),!1):(album.json=o,i=(new Date).getTime()-n,a=i>300?0:t?0:300-i,visible.albums()||visible.photo()||visible.album()||(a=0),void setTimeout(function(){view.album.init(),t||(lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomIn"),view.header.mode("album"))},a))})})},parse:function(){album.json.title||(album.json.title="Untitled")},add:function(){var e,t,n,o=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};n=[["Create Album",function(){e=$(".message input.text").val(),0===e.length&&(e="Untitled"),modal.close(),t="addAlbum&title="+escape(encodeURI(e)),lychee.api(t,function(e){e===!0&&(e=1),e!==!1&&o(e)?lychee.goto(e):lychee.error(null,t,e)})}],["Cancel",function(){}]],modal.show("New Album","Enter a title for this album: <input class='text' type='text' maxlength='30' placeholder='Title' value='Untitled'>",n)},"delete":function(e){var t,n,o;return e?(e instanceof Array==!1&&(e=[e]),n=[["",function(){t="deleteAlbum&albumIDs="+e,lychee.api(t,function(n){visible.albums()?e.forEach(function(e){albums.json.num--,view.albums.content.delete(e)}):lychee.goto(""),n!==!0&&lychee.error(null,t,n)})}],["",function(){}]],void("0"===e.toString()?(n[0][0]="Clear Unsorted",n[1][0]="Keep Unsorted",modal.show("Clear Unsorted","Are you sure you want to delete all photos from 'Unsorted'?<br>This action can't be undone!",n)):1===e.length?(n[0][0]="Delete Album and Photos",n[1][0]="Keep Album",album.json?o=album.json.title:albums.json&&(o=albums.json.content[e].title),modal.show("Delete Album","Are you sure you want to delete the album '"+o+"' and all of the photos it contains? This action can't be undone!",n)):(n[0][0]="Delete Albums and Photos",n[1][0]="Keep Albums",modal.show("Delete Albums","Are you sure you want to delete all "+e.length+" selected albums and all of the photos they contain? This action can't be undone!",n)))):!1},setTitle:function(e){var t,n,o,i="";return e?(e instanceof Array==!1&&(e=[e]),1===e.length&&(album.json?i=album.json.title:albums.json&&(i=albums.json.content[e].title),i||(i=""),i=i.replace("'","&apos;")),o=[["Set Title",function(){t=$(".message input.text").val(),t=lychee.removeHTML(t),t=""===t?"Untitled":t,visible.album()?(album.json.title=t,view.album.title()):visible.albums()&&e.forEach(function(e){albums.json.content[e].title=t,view.albums.content.title(e)}),n="setAlbumTitle&albumIDs="+e+"&title="+escape(encodeURI(t)),lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})}],["Cancel",function(){}]],void(1===e.length?modal.show("Set Title","Enter a new title for this album: <input class='text' type='text' maxlength='30' placeholder='Title' value='"+i+"'>",o):modal.show("Set Titles","Enter a title for all "+e.length+" selected album: <input class='text' type='text' maxlength='30' placeholder='Title' value='"+i+"'>",o))):!1},setDescription:function(e){var t,n,o,i=album.json.description.replace("'","&apos;");o=[["Set Description",function(){t=$(".message input.text").val(),t=lychee.removeHTML(t),visible.album()&&(album.json.description=t,view.album.description()),n="setAlbumDescription&albumID="+e+"&description="+escape(encodeURI(t)),lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})}],["Cancel",function(){}]],modal.show("Set Description","Please enter a description for this album: <input class='text' type='text' maxlength='800' placeholder='Description' value='"+i+"'>",o)},setPublic:function(e,t){var n,o="",i=!1;return visible.message()||0!=album.json.public?(visible.message()&&("password"===$(".message .choice input[name='password']:checked").val()?(o=md5($(".message input.text").val()),album.json.password=1):(o="",album.json.password=0),"listed"===$(".message .choice input[name='listed']:checked").val()&&(i=!0)),n="setAlbumPublic&albumID="+e+"&password="+o+"&visible="+i,visible.album()&&(album.json.public=0==album.json.public?1:0,album.json.password=0==album.json.public?0:album.json.password,view.album.public(),view.album.password(),1==album.json.public&&contextMenu.shareAlbum(e,t)),void lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})):(modal.show("Share Album","This album will be shared with one of the following properties:</p><form><div class='choice'><input type='checkbox' name='listed' value='listed' checked><h2>Visible</h2><p>Listed to visitors of your Lychee.</p></div><div class='choice'><input type='checkbox' name='password' value='password'><h2>Password protected</h2><p>Only accessible with a valid password.<input class='text' type='password' placeholder='password' value='' style='display: none;'></p></div></form><p style='display: none;'>",[["Share Album",function(){album.setPublic(album.getID(),t)}],["Cancel",function(){}]],-160),$(".message .choice input[name='password']").on("change",function(){$(this).prop("checked")===!0?$(".message .choice input.text").show():$(".message .choice input.text").hide()}),!0)},share:function(e){var t="",n=location.href;switch(e){case 0:t="https://twitter.com/share?url="+encodeURI(n);break;case 1:t="http://www.facebook.com/sharer.php?u="+encodeURI(n)+"&t="+encodeURI(album.json.title);break;case 2:t="mailto:?subject="+encodeURI(album.json.title)+"&body="+encodeURI(n);break;default:t=""}t.length>5&&(location.href=t)},getArchive:function(e){var t;t=location.href.indexOf("index.html")>0?location.href.replace(location.hash,"").replace("index.html","php/api.php?function=getAlbumArchive&albumID="+e):location.href.replace(location.hash,"")+"php/api.php?function=getAlbumArchive&albumID="+e,lychee.publicMode&&(t+="&password="+password.value),location.href=t}},albums={json:null,load:function(){var e,t,n;lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomOut"),lychee.animate(".divider","fadeOut"),e=(new Date).getTime(),lychee.api("getAlbums",function(o){o.unsortedAlbum={id:0,title:"Unsorted",sysdate:o.unsortedNum+" photos",unsorted:1,thumb0:o.unsortedThumb0,thumb1:o.unsortedThumb1,thumb2:o.unsortedThumb2},o.starredAlbum={id:"f",title:"Starred",sysdate:o.starredNum+" photos",star:1,thumb0:o.starredThumb0,thumb1:o.starredThumb1,thumb2:o.starredThumb2},o.publicAlbum={id:"s",title:"Public",sysdate:o.publicNum+" photos","public":1,thumb0:o.publicThumb0,thumb1:o.publicThumb1,thumb2:o.publicThumb2},o.recentAlbum={id:"r",title:"Recent",sysdate:o.recentNum+" photos",recent:1,thumb0:o.recentThumb0,thumb1:o.recentThumb1,thumb2:o.recentThumb2},albums.json=o,t=(new Date).getTime()-e,n=t>300?0:300-t,visible.albums()||visible.photo()||visible.album()||(n=0),setTimeout(function(){view.header.mode("albums"),view.albums.init(),lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomIn")},n)})},parse:function(e){e.password&&lychee.publicMode?(e.thumb0="assets/img/password.svg",e.thumb1="assets/img/password.svg",e.thumb2="assets/img/password.svg"):(e.thumb0||(e.thumb0="assets/img/no_images.svg"),e.thumb1||(e.thumb1="assets/img/no_images.svg"),e.thumb2||(e.thumb2="assets/img/no_images.svg"))}},build={divider:function(e){return"<div class='divider fadeIn'><h1>"+e+"</h1></div>"},editIcon:function(e){return"<div id='"+e+"' class='edit'><a class='icon-pencil'></a></div>"},multiselect:function(e,t){return"<div id='multiselect' style='top: "+e+"px; left: "+t+"px;'></div>"},album:function(e){if(!e)return"";var t="",n="",o=e.title,i="";return o.length>18&&(o=e.title.substr(0,18)+"...",n=e.title),"svg"===e.thumb0.split(".").pop()&&(i="nonretina"),t+="<div class='album' data-id='"+e.id+"' data-password='"+e.password+"'>",t+="<img src='"+e.thumb2+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb1+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb0+"' width='200' height='200' alt='thumb' data-type='"+i+"'>",t+="<div class='overlay'>",t+=e.password&&!lychee.publicMode?"<h1><span class='icon-lock'></span> "+o+"</h1>":"<h1 title='"+n+"'>"+o+"</h1>",t+="<a>"+e.sysdate+"</a>",t+="</div>",lychee.publicMode||(1==e.star&&(t+="<a class='badge red icon-star'></a>"),1==e.public&&(t+="<a class='badge red icon-share'></a>"),1==e.unsorted&&(t+="<a class='badge red icon-reorder'></a>"),1==e.recent&&(t+="<a class='badge red icon-time'></a>")),t+="</div>"},photo:function(e){if(!e)return"";var t="",n="",o=e.title;return o.length>18&&(o=e.title.substr(0,18)+"...",n=e.title),t+="<div class='photo' data-album-id='"+e.album+"' data-id='"+e.id+"'>",t+="<img src='"+e.thumbUrl+"' width='200' height='200' alt='thumb'>",t+="<div class='overlay'>",t+="<h1 title='"+n+"'>"+o+"</h1>",t+=1==e.cameraDate?"<a><span class='icon-camera' title='Photo Date'></span>"+e.sysdate+"</a>":"<a>"+e.sysdate+"</a>",t+="</div>",1==e.star&&(t+="<a class='badge red icon-star'></a>"),lychee.publicMode||1!=e.public||1==album.json.public||(t+="<a class='badge red icon-share'></a>"),t+="</div>"},imageview:function(e,t,n){if(!e)return"";var o="";return o+="<div class='arrow_wrapper previous'><a id='previous' class='icon-caret-left'></a></div>",o+="<div class='arrow_wrapper next'><a id='next' class='icon-caret-right'></a></div>",o+=t?n?"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2-20)+"px; margin-left: -"+e.width/2+"px;'></div>":"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2)+"px; margin-left: -"+e.width/2+"px;'></div>":n?"<div id='image' style='background-image: url("+e.url+")'></div>":"<div id='image' style='background-image: url("+e.url+");' class='full'></div>"},no_content:function(e){var t="";return t+="<div class='no_content fadeIn'>",t+="<a class='icon icon-"+e+"'></a>","search"===e?t+="<p>No results</p>":"picture"===e?t+="<p>No public albums</p>":"cog"===e&&(t+="<p>No Configuration!</p>"),t+="</div>"},modal:function(e,t,n,o,i){var a="",r="";return o&&(r="style='margin-top: "+o+"px;'"),a+="<div class='message_overlay fadeIn'>",a+="<div class='message center'"+r+">",a+="<h1>"+e+"</h1>",i!==!1&&(a+="<a class='close icon-remove-sign'></a>"),a+="<p>"+t+"</p>",$.each(n,function(e){""!==this[0]&&(a+=0===e?"<a class='button active'>"+this[0]+"</a>":"<a class='button'>"+this[0]+"</a>")}),a+="</div>",a+="</div>"},signInModal:function(){var e="";return e+="<div class='message_overlay'>",e+="<div class='message center'>",e+="<h1><a class='icon-lock'></a> Sign In</h1>",e+="<a class='close icon-remove-sign'></a>",e+="<div class='sign_in'>",e+="<input id='username' type='text' name='' value='' placeholder='username'>",e+="<input id='password' type='password' name='' value='' placeholder='password'>",e+="</div>",e+="<div id='version'>Version "+lychee.version+"<span> &#8211; <a target='_blank' href='"+lychee.updateURL+"'>Update available!</a><span></div>",e+="<a onclick='lychee.login()' class='button active'>Sign in</a>",e+="</div>",e+="</div>"},uploadModal:function(e,t){var n="";return n+="<div class='upload_overlay fadeIn'>",n+="<div class='upload_message center'>",n+="<a class='icon-"+e+"'></a>",n+=void 0!==t?"<p>"+t+"</p>":"<div class='progressbar'><div></div></div>",n+="</div>",n+="</div>"},contextMenu:function(e){var t="";return t+="<div class='contextmenu_bg'></div>",t+="<div class='contextmenu'>",t+="<table>",t+="<tbody>",$.each(e,function(n){t+="separator"===e[n][0]&&-1===e[n][1]?"<tr class='separator'></tr>":-1===e[n][1]?"<tr class='no_hover'><td>"+e[n][0]+"</td></tr>":void 0!=e[n][2]?"<tr><td onclick='"+e[n][2]+"; window.contextMenu.close();'>"+e[n][0]+"</td></tr>":"<tr><td onclick='window.contextMenu.fns["+e[n][1]+"](); window.contextMenu.close();'>"+e[n][0]+"</td></tr>"}),t+="</tbody>",t+="</table>",t+="</div>"},tags:function(e,t){var n="",o=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_tags");return""!==e?(e=e.split(","),e.forEach(function(e,t){n+="<a class='tag'>"+e+"<span class='icon-remove' data-index='"+t+"'></span></a>"}),n+=o):n="<div class='empty'>No Tags"+o+"</div>",n},infoboxPhoto:function(e,t){if(!e)return"";var n,o,i,a,r="";switch(r+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",r+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;case"2":n="Public (Album)";break;default:n="-"}return o=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title"),i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description"),a=[["","Basics"],["Title",e.title+o],["Uploaded",e.sysdate],["Description",e.description+i],["","Image"],["Size",e.size],["Format",e.type],["Resolution",e.width+" x "+e.height],["Tags",build.tags(e.tags,t)]],e.takestamp+e.make+e.model+e.shutter+e.aperture+e.focal+e.iso!="0"&&(a=a.concat([["","Camera"],["Captured",e.takedate],["Make",e.make],["Type/Model",e.model],["Shutter Speed",e.shutter],["Aperture",e.aperture],["Focal Length",e.focal],["ISO",e.iso]])),a=a.concat([["","Share"],["Visibility",n]]),$.each(a,function(e){switch((""===a[e][1]||void 0===a[e][1]||null===a[e][1])&&(a[e][1]="-"),a[e][0]){case"":r+="</table>",r+="<div class='separator'><h1>"+a[e][1]+"</h1></div>",r+="<table>";break;case"Tags":t===!0||lychee.publicMode||(r+="</table>",r+="<div class='separator'><h1>"+a[e][0]+"</h1></div>",r+="<div id='tags'>"+a[e][1]+"</div>");break;default:r+="<tr>",r+="<td>"+a[e][0]+"</td>",r+="<td class='attr_"+a[e][0].toLowerCase()+"'>"+a[e][1]+"</td>",r+="</tr>"}}),r+="</table>",r+="<div class='bumper'></div>",r+="</div>"},infoboxAlbum:function(e,t){if(!e)return"";var n,o,i,a,r,s="";switch(s+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",s+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;default:n="-"}switch(e.password){case!1:o="No";break;case!0:o="Yes";break;default:o="-"}return i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title_album"),a=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description_album"),r=[["","Basics"],["Title",e.title+i],["Description",e.description+a],["","Album"],["Created",e.sysdate],["Images",e.num],["","Share"],["Visibility",n],["Password",o]],$.each(r,function(e){(""===r[e][1]||void 0===r[e][1]||null===r[e][1])&&(r[e][1]="-"),""===r[e][0]?(s+="</table>",s+="<div class='separator'><h1>"+r[e][1]+"</h1></div>",s+="<table id='infos'>"):(s+="<tr>",s+="<td>"+r[e][0]+"</td>",s+="<td class='attr_"+r[e][0].toLowerCase()+"'>"+r[e][1]+"</td>",s+="</tr>")}),s+="</table>",s+="<div class='bumper'></div>",s+="</div>"}},contextMenu={fns:null,show:function(e,t,n,o){contextMenu.close(),$("body").css("overflow","hidden").append(build.contextMenu(e)),t+$(".contextmenu").outerWidth(!0)>$("html").width()&&(o="left"),n+$(".contextmenu").outerHeight(!0)>$("html").height()&&(n-=n+$(".contextmenu").outerHeight(!0)-$("html").height()),t>$(document).width()&&(t=$(document).width()),0>t&&(t=0),n>$(document).height()&&(n=$(document).height()),0>n&&(n=0),"left"===o&&(t-=$(".contextmenu").outerWidth(!0)),(null===t||void 0===t||isNaN(t)||null===n||void 0===n||isNaN(n))&&(t="10px",n="10px"),$(".contextmenu").css({top:n,left:t,opacity:.98})},add:function(e){var t,n=e.pageX,o=e.pageY-$(document).scrollTop();upload.notify(),contextMenu.fns=[function(){$("#upload_files").click()},function(){upload.start.url()},function(){upload.start.dropbox()},function(){upload.start.server()},function(){album.add()}],t=[["<a class='icon-picture'></a> Upload Photo",0],["separator",-1],["<a class='icon-link'></a> Import from Link",1],["<a class='icon-folder-open'></a> Import from Dropbox",2],["<a class='icon-hdd'></a> Import from Server",3],["separator",-1],["<a class='icon-folder-close'></a> New Album",4]],contextMenu.show(t,n,o,"left")},settings:function(e){var t,n=e.pageX,o=e.pageY-$(document).scrollTop();contextMenu.fns=[function(){settings.setLogin()},function(){settings.setSorting()},function(){settings.setDropboxKey()},function(){window.open(lychee.website)},function(){window.open("plugins/check/")},function(){window.open("plugins/displaylog/")},function(){lychee.logout()}],t=[["<a class='icon-user'></a> Change Login",0],["<a class='icon-sort'></a> Change Sorting",1],["<a class='icon-folder-open'></a> Set Dropbox",2],["separator",-1],["<a class='icon-info-sign'></a> About Lychee",3],["<a class='icon-dashboard'></a> Diagnostics",4],["<a class='icon-list'></a> Show Log",5],["separator",-1],["<a class='icon-signout'></a> Sign Out",6]],contextMenu.show(t,n,o,"right")},album:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();return"0"===e||"f"===e||"s"===e||"r"===e?!1:(contextMenu.fns=[function(){album.setTitle([e])},function(){album.delete([e])}],n=[["<a class='icon-edit'></a> Rename",0],["<a class='icon-trash'></a> Delete",1]],contextMenu.show(n,o,i,"right"),void $(".album[data-id='"+e+"']").addClass("active"))},albumMulti:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();multiselect.stopResize(),contextMenu.fns=[function(){album.setTitle(e)},function(){album.delete(e)}],n=[["<a class='icon-edit'></a> Rename All",0],["<a class='icon-trash'></a> Delete All",1]],contextMenu.show(n,o,i,"right")},photo:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();contextMenu.fns=[function(){photo.setStar([e])},function(){photo.editTags([e])},function(){photo.setTitle([e])},function(){contextMenu.move([e],t,"right")},function(){photo.delete([e])}],n=[["<a class='icon-star'></a> Star",0],["<a class='icon-tags'></a> Tags",1],["separator",-1],["<a class='icon-edit'></a> Rename",2],["<a class='icon-folder-open'></a> Move",3],["<a class='icon-trash'></a> Delete",4]],contextMenu.show(n,o,i,"right"),$(".photo[data-id='"+e+"']").addClass("active")},photoMulti:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();multiselect.stopResize(),contextMenu.fns=[function(){photo.setStar(e)},function(){photo.editTags(e)},function(){photo.setTitle(e)},function(){contextMenu.move(e,t,"right")},function(){photo.delete(e)}],n=[["<a class='icon-star'></a> Star All",0],["<a class='icon-tags'></a> Tag All",1],["separator",-1],["<a class='icon-edit'></a> Rename All",2],["<a class='icon-folder-open'></a> Move All",3],["<a class='icon-trash'></a> Delete All",4]],contextMenu.show(n,o,i,"right")},photoMore:function(e,t){var n,o=t.pageX,i=t.pageY-$(document).scrollTop();contextMenu.fns=[function(){window.open(photo.getDirectLink())},function(){photo.getArchive(e)}],n=[["<a class='icon-resize-full'></a> Full Photo",0],["<a class='icon-circle-arrow-down'></a> Download",1]],contextMenu.show(n,o,i,"right")},move:function(e,t){var n=t.pageX,o=t.pageY-$(document).scrollTop(),i=[];contextMenu.close(!0),"0"!==album.getID()&&(i=[["Unsorted",0,"photo.setAlbum(["+e+"], 0)"],["separator",-1]]),lychee.api("getAlbums",function(t){0===t.num?i=[["New Album",0,"album.add()"]]:$.each(t.content,function(){this.id!=album.getID()&&i.push([this.title,0,"photo.setAlbum(["+e+"], "+this.id+")"])}),visible.photo()?contextMenu.show(i,n,o,"left"):contextMenu.show(i,n,o,"right")})},sharePhoto:function(e,t){var n,o=t.pageX,i=t.pageY;i-=$(document).scrollTop(),contextMenu.fns=[function(){photo.setPublic(e)},function(){photo.share(e,0)},function(){photo.share(e,1)},function(){photo.share(e,2)},function(){photo.share(e,3)},function(){window.open(photo.getDirectLink())}],link=photo.getViewLink(e),"2"===photo.json.public&&(link=location.href),n=[["<input readonly id='link' value='"+link+"'>",-1],["separator",-1],["<a class='icon-eye-close'></a> Make Private",0],["separator",-1],["<a class='icon-twitter'></a> Twitter",1],["<a class='icon-facebook'></a> Facebook",2],["<a class='icon-envelope'></a> Mail",3],["<a class='icon-hdd'></a> Dropbox",4],["<a class='icon-link'></a> Direct Link",5]],contextMenu.show(n,o,i,"left"),$(".contextmenu input").focus().select()},shareAlbum:function(e,t){var n,o=t.pageX,i=t.pageY;i-=$(document).scrollTop(),contextMenu.fns=[function(){album.setPublic(e)},function(){album.share(0)},function(){album.share(1)},function(){album.share(2)},function(){password.remove(e)}],n=[["<input readonly id='link' value='"+location.href+"'>",-1],["separator",-1],["<a class='icon-eye-close'></a> Make Private",0],["separator",-1],["<a class='icon-twitter'></a> Twitter",1],["<a class='icon-facebook'></a> Facebook",2],["<a class='icon-envelope'></a> Mail",3]],contextMenu.show(n,o,i,"left"),$(".contextmenu input").focus().select()},close:function(e){return visible.contextMenu()?(contextMenu.fns=[],$(".contextmenu_bg, .contextmenu").remove(),$("body").css("overflow","auto"),void(e!==!0&&($(".photo.active, .album.active").removeClass("active"),visible.multiselect()&&multiselect.close()))):!1}},$(document).ready(function(){var e=mobileBrowser()?"touchend":"click";$(document).bind("contextmenu",function(e){e.preventDefault()}),mobileBrowser()||$(".tools").tipsy({gravity:"n",fade:!1,delayIn:0,opacity:1}),$("#content").on("mousedown",multiselect.show),$(document).on("mouseup",multiselect.getSelection),$("#hostedwith").on(e,function(){window.open(lychee.website)}),$("#button_signin").on(e,lychee.loginDialog),$("#button_settings").on("click",contextMenu.settings),$("#button_share").on(e,function(e){1==photo.json.public||2==photo.json.public?contextMenu.sharePhoto(photo.getID(),e):photo.setPublic(photo.getID(),e)}),$("#button_share_album").on(e,function(e){1==album.json.public?contextMenu.shareAlbum(album.getID(),e):album.setPublic(album.getID(),e)}),$("#button_more").on(e,function(e){contextMenu.photoMore(photo.getID(),e)}),$("#button_trash_album").on(e,function(){album.delete([album.getID()])}),$("#button_move").on(e,function(e){contextMenu.move([photo.getID()],e)}),$("#button_trash").on(e,function(){photo.delete([photo.getID()])}),$("#button_info_album").on(e,function(){view.infobox.show()}),$("#button_info").on(e,function(){view.infobox.show()}),$("#button_archive").on(e,function(){album.getArchive(album.getID())}),$("#button_star").on(e,function(){photo.setStar([photo.getID()])}),$("#search").on("keyup click",function(){search.find($(this).val())}),$("#clearSearch").on(e,function(){$("#search").focus(),search.reset()}),$("#button_back_home").on(e,function(){lychee.goto("")}),$("#button_back").on(e,function(){lychee.goto(album.getID())}),lychee.imageview.on(e,".arrow_wrapper.previous",photo.previous).on(e,".arrow_wrapper.next",photo.next),$("#infobox").on(e,".header a",function(){view.infobox.hide()}).on(e,"#edit_title_album",function(){album.setTitle([album.getID()])}).on(e,"#edit_description_album",function(){album.setDescription(album.getID())}).on(e,"#edit_title",function(){photo.setTitle([photo.getID()])}).on(e,"#edit_description",function(){photo.setDescription(photo.getID())}).on(e,"#edit_tags",function(){photo.editTags([photo.getID()])}).on(e,"#tags .tag span",function(){photo.deleteTag(photo.getID(),$(this).data("index"))}),Mousetrap.bind("left",function(){visible.photo()&&$("#imageview a#previous").click()}).bind("right",function(){visible.photo()&&$("#imageview a#next").click()}).bind(["u","ctrl+u"],function(){$("#upload_files").click()}).bind(["s","ctrl+s","f","ctrl+f"],function(e){visible.photo()?$("#button_star").click():visible.albums()&&(e.preventDefault(),$("#search").focus())}).bind(["r","ctrl+r"],function(e){e.preventDefault(),visible.album()?album.setTitle(album.getID()):visible.photo()&&photo.setTitle([photo.getID()])}).bind(["d","ctrl+d"],function(e){e.preventDefault(),visible.photo()?photo.setDescription(photo.getID()):visible.album()&&album.setDescription(album.getID())}).bind(["t","ctrl+t"],function(e){visible.photo()&&(e.preventDefault(),photo.editTags([photo.getID()]))}).bind(["i","ctrl+i"],function(){visible.infobox()?view.infobox.hide():visible.infoboxbutton()&&view.infobox.show()}).bind(["command+backspace","ctrl+backspace"],function(){visible.photo()&&!visible.message()?photo.delete([photo.getID()]):visible.album()&&!visible.message()&&album.delete([album.getID()])}),Mousetrap.bindGlobal("enter",function(){$(".message .button.active").length&&$(".message .button.active").addClass("pressed").click()}),Mousetrap.bindGlobal(["esc","command+up"],function(e){e.preventDefault(),visible.message()&&$(".message .close").length>0?modal.close():visible.contextMenu()?contextMenu.close():visible.infobox()?view.infobox.hide():visible.photo()?lychee.goto(album.getID()):visible.album()?lychee.goto(""):visible.albums()&&0!==$("#search").val().length&&search.reset()}),mobileBrowser()&&$(document).on("touchend","#image",function(e){(null===swipe.obj||swipe.offset>=-5&&swipe.offset<=5)&&(visible.controls()?view.header.hide(e,0):view.header.show())}).swipe().on("swipeStart",function(){visible.photo()&&swipe.start($("#image"))}).swipe().on("swipeMove",function(e){visible.photo()&&swipe.move(e.swipe)}).swipe().on("swipeEnd",function(e){visible.photo()&&swipe.stop(e.swipe,photo.previous,photo.next)}),$(document).on("keyup","#password",function(){$(this).val().length>0&&$(this).removeClass("error")}).on(e,"#title.editable",function(){visible.photo()?photo.setTitle([photo.getID()]):album.setTitle([album.getID()])}).on("click",".album",function(){lychee.goto($(this).attr("data-id"))}).on("click",".photo",function(){lychee.goto(album.getID()+"/"+$(this).attr("data-id"))}).on(e,".message .close",modal.close).on(e,".message .button:first",function(){null!==modal.fns&&modal.fns[0](),visible.signin()||modal.close()}).on(e,".message .button:last",function(){null!==modal.fns&&modal.fns[1](),visible.signin()||modal.close()}).on(e,".button_add",function(e){contextMenu.add(e)}).on("change","#upload_files",function(){modal.close(),upload.start.local(this.files)}).on("contextmenu",".photo",function(e){contextMenu.photo(photo.getID(),e)}).on("contextmenu",".album",function(e){contextMenu.album(album.getID(),e)}).on(e,".contextmenu_bg",contextMenu.close).on("contextmenu",".contextmenu_bg",contextMenu.close).on(e,"#infobox_overlay",view.infobox.hide).on("dragover",function(e){e.preventDefault()},!1).on("drop",function(e){return e.stopPropagation(),e.preventDefault(),e.originalEvent.dataTransfer.files.length>0?upload.start.local(e.originalEvent.dataTransfer.files):e.originalEvent.dataTransfer.getData("Text").length>3&&upload.start.url(e.originalEvent.dataTransfer.getData("Text")),!0}),lychee.init()}),loadingBar={status:null,show:function(e,t){return"error"===e?(loadingBar.status="error",t&&(t=t.replace("<br>","")),t||(t="Whoops, it looks like something went wrong. Please reload the site and try again!"),visible.controls()&&lychee.header.addClass("error"),lychee.loadingBar.removeClass("loading uploading error").addClass(e).html("<h1>Error: <span>"+t+"</span></h1>").show().css("height","40px"),clearTimeout(lychee.loadingBar.data("timeout")),lychee.loadingBar.data("timeout",setTimeout(function(){loadingBar.hide(!0)},3e3)),!0):null===loadingBar.status?(loadingBar.status="loading",clearTimeout(lychee.loadingBar.data("timeout")),lychee.loadingBar.data("timeout",setTimeout(function(){visible.controls()&&lychee.header.addClass("loading"),lychee.loadingBar.removeClass("loading uploading error").addClass("loading").show()},1e3)),!0):void 0},hide:function(e){("error"!==loadingBar.status&&null!==loadingBar.status||e)&&(loadingBar.status=null,visible.controls()&&lychee.header.removeClass("error loading"),lychee.loadingBar.html("").css("height","3px"),clearTimeout(lychee.loadingBar.data("timeout")),setTimeout(function(){lychee.loadingBar.hide()
},300))}};var lychee={title:"",version:"2.5.6",version_code:"020506",api_path:"php/api.php",update_path:"http://lychee.electerious.com/version/index.php",updateURL:"https://github.com/electerious/Lychee",website:"http://lychee.electerious.com",publicMode:!1,viewMode:!1,debugMode:!1,username:"",checkForUpdates:!1,sorting:"",dropbox:!1,dropboxKey:"",loadingBar:$("#loading"),header:$("header"),content:$("#content"),imageview:$("#imageview"),infobox:$("#infobox"),init:function(){var e;e="init&version="+lychee.version_code,lychee.api(e,function(e){return e.loggedIn!==!0?lychee.setMode("public"):(lychee.username=e.config.username||"",lychee.sorting=e.config.sorting||"",lychee.dropboxKey=e.config.dropboxKey||""),"Warning: No configuration!"===e?(lychee.header.hide(),lychee.content.hide(),$("body").append(build.no_content("cog")),settings.createConfig(),!0):(e.config.login===!1&&settings.createLogin(),lychee.checkForUpdates=e.config.checkForUpdates,$(window).bind("popstate",lychee.load),void lychee.load())})},api:function(e,t,n){void 0===n&&loadingBar.show(),$.ajax({type:"POST",url:lychee.api_path,data:"function="+e,dataType:"text",success:function(n){return setTimeout(function(){loadingBar.hide()},100),"string"==typeof n&&"Error: "===n.substring(0,7)?(lychee.error(n.substring(7,n.length),e,n),upload.close(!0),!1):("1"===n?n=!0:""===n&&(n=!1),"string"==typeof n&&"{"===n.substring(0,1)&&"}"===n.substring(n.length-1,n.length)&&(n=$.parseJSON(n)),lychee.debugMode&&console.log(n),void t(n))},error:function(t,n,o){lychee.error("Server error or API not found.",e,o),upload.close(!0)}})},login:function(){var e,t=$("input#username").val(),n=md5($("input#password").val());e="login&user="+t+"&password="+n,lychee.api(e,function(e){e===!0?(localStorage.setItem("lychee_username",t),window.location.reload()):($("#password").val("").addClass("error").focus(),$(".message .button.active").removeClass("pressed"))})},loginDialog:function(){var e;$("body").append(build.signInModal()),$("#username").focus(),localStorage&&(e=localStorage.getItem("lychee_username"),null!==e&&(e.length>0&&$("#username").val(e),$("#password").focus())),"1"===lychee.checkForUpdates&&lychee.getUpdate()},logout:function(){lychee.api("logout",function(){window.location.reload()})},"goto":function(e){void 0===e&&(e=""),document.location.hash=e},load:function(){var e="",t="",n=document.location.hash.replace("#","").split("/");$(".no_content").remove(),contextMenu.close(),multiselect.close(),void 0!==n[0]&&(e=n[0]),void 0!==n[1]&&(t=n[1]),e&&t?(albums.json=null,photo.json=null,(""===lychee.content.html()||$("#search").length&&0!==$("#search").val().length)&&(lychee.content.hide(),album.load(e,!0)),photo.load(t,e)):e?(albums.json=null,photo.json=null,visible.photo()&&view.photo.hide(),album.json&&e==album.json.id?view.album.title():album.load(e)):(albums.json=null,album.json=null,photo.json=null,search.code="",visible.album()&&view.album.hide(),visible.photo()&&view.photo.hide(),albums.load())},getUpdate:function(){$.ajax({url:lychee.update_path,success:function(e){e!=lychee.version&&$("#version span").show()}})},setTitle:function(e,t){""===lychee.title&&(lychee.title=document.title),document.title="Albums"===e?lychee.title:lychee.title+" - "+e,t?$("#title").addClass("editable"):$("#title").removeClass("editable"),$("#title").html(e)},setMode:function(e){$("#button_settings, #button_settings, #button_search, #search, #button_trash_album, #button_share_album, .button_add, .button_divider").remove(),$("#button_trash, #button_move, #button_share, #button_star").remove(),$(document).on("mouseenter","#title.editable",function(){$(this).removeClass("editable")}).off("click","#title.editable").off("touchend","#title.editable").off("contextmenu",".photo").off("contextmenu",".album").off("drop"),Mousetrap.unbind(["u","ctrl+u"]).unbind(["s","ctrl+s"]).unbind(["r","ctrl+r"]).unbind(["d","ctrl+d"]).unbind(["t","ctrl+t"]).unbind(["command+backspace","ctrl+backspace"]),"public"===e?($("header #button_signin, header #hostedwith").show(),lychee.publicMode=!0):"view"===e&&(Mousetrap.unbind("esc"),$("#button_back, a#next, a#previous").remove(),$(".no_content").remove(),lychee.publicMode=!0,lychee.viewMode=!0)},animate:function(e,t){var n=[["fadeIn","fadeOut"],["contentZoomIn","contentZoomOut"]];e.jQuery||(e=$(e));for(var o=0;o<n.length;o++)for(var i=0;i<n[o].length;i++)if(n[o][i]==t)return e.removeClass(n[o][0]+" "+n[o][1]).addClass(t),!0;return!1},loadDropbox:function(e){if(!lychee.dropbox&&lychee.dropboxKey){loadingBar.show();var t=document.createElement("script"),n=document.getElementsByTagName("script")[0];t.src="https://www.dropbox.com/static/api/1/dropins.js",t.id="dropboxjs",t.type="text/javascript",t.async="true",t.setAttribute("data-app-key",lychee.dropboxKey),t.onload=t.onreadystatechange=function(){var t=this.readyState;t&&"complete"!==t&&"loaded"!==t||(lychee.dropbox=!0,loadingBar.hide(),e())},n.parentNode.insertBefore(t,n)}else lychee.dropbox&&lychee.dropboxKey?e():settings.setDropboxKey(e)},removeHTML:function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText},error:function(e,t,n){console.log("Error Description: "+e),console.log("Error Params: "+t),console.log("Server Response: "+n),loadingBar.show("error",e)}};modal={fns:null,show:function(e,t,n,o,i){n||(n=[["",function(){}],["",function(){}]]),modal.fns=[n[0][1],n[1][1]],$("body").append(build.modal(e,t,n,o,i)),$(".message input:first-child").focus().select()},close:function(){modal.fns=null,$(".message_overlay").removeClass("fadeIn").css("opacity",0),setTimeout(function(){$(".message_overlay").remove()},300)}},multiselect={position:{top:null,right:null,bottom:null,left:null},show:function(e){return mobileBrowser()?!1:lychee.publicMode?!1:visible.search()?!1:0!==$(".album:hover, .photo:hover").length?!1:(visible.multiselect()&&$("#multiselect").remove(),multiselect.position.top=e.pageY,multiselect.position.right=-1*(e.pageX-$(document).width()),multiselect.position.bottom=-1*(multiselect.position.top-$(window).height()),multiselect.position.left=e.pageX,$("body").append(build.multiselect(multiselect.position.top,multiselect.position.left)),void $(document).on("mousemove",multiselect.resize))},resize:function(e){var t,n,o=e.pageX,i=e.pageY;return null===multiselect.position.top||null===multiselect.position.right||null===multiselect.position.bottom||null===multiselect.position.left?!1:(i>=multiselect.position.top?(t=e.pageY-multiselect.position.top,multiselect.position.top+t>=$(document).height()&&(t-=multiselect.position.top+t-$(document).height()+2),$("#multiselect").css({top:multiselect.position.top,bottom:"inherit",height:t})):$("#multiselect").css({top:"inherit",bottom:multiselect.position.bottom,height:multiselect.position.top-e.pageY}),void(o>=multiselect.position.left?(n=e.pageX-multiselect.position.left,multiselect.position.left+n>=$(document).width()&&(n-=multiselect.position.left+n-$(document).width()+2),$("#multiselect").css({right:"inherit",left:multiselect.position.left,width:n})):$("#multiselect").css({right:multiselect.position.right,left:"inherit",width:multiselect.position.left-e.pageX})))},stopResize:function(){$(document).off("mousemove")},getSize:function(){return visible.multiselect()?{top:$("#multiselect").offset().top,left:$("#multiselect").offset().left,width:parseInt($("#multiselect").css("width").replace("px","")),height:parseInt($("#multiselect").css("height").replace("px",""))}:!1},getSelection:function(e){var t,n,o=150,i=[],a=multiselect.getSize();return visible.contextMenu()?!1:visible.multiselect()?($(".photo, .album").each(function(){n=$(this).offset(),n.top>=a.top-o&&n.left>=a.left-o&&n.top+206<=a.top+a.height+o&&n.left+206<=a.left+a.width+o&&(t=$(this).data("id"),"0"!==t&&0!==t&&"f"!==t&&"s"!==t&&"r"!==t&&null!==t&void 0!==t&&(i.push(t),$(this).addClass("active")))}),void(0!==i.length&&visible.album()?contextMenu.photoMulti(i,e):0!==i.length&&visible.albums()?contextMenu.albumMulti(i,e):multiselect.close())):!1},close:function(){multiselect.stopResize(),multiselect.position.top=null,multiselect.position.right=null,multiselect.position.bottom=null,multiselect.position.left=null,lychee.animate("#multiselect","fadeOut"),setTimeout(function(){$("#multiselect").remove()},300)}},password={value:"",get:function(e,t){var n,o=$(".message input.text").val();lychee.publicMode?album.json&&0==album.json.password?t():albums.json&&0==albums.json.content[e].password?t():albums.json||album.json?void 0==o?password.getDialog(e,t):(n="checkAlbumAccess&albumID="+e+"&password="+md5(o),lychee.api(n,function(e){e===!0?(password.value=md5(o),t()):(lychee.goto(""),loadingBar.show("error","Access denied. Wrong password!"))})):(album.json={password:!0},t("")):t()},getDialog:function(e,t){var n;n=[["Enter",function(){password.get(e,t)}],["Cancel",lychee.goto]],modal.show("<a class='icon-lock'></a> Enter Password","This album is protected by a password. Enter the password below to view the photos of this album: <input class='text' type='password' placeholder='password' value=''>",n,-110,!1)}},photo={json:null,getID:function(){var e;return e=photo.json?photo.json.id:$(".photo:hover, .photo.active").attr("data-id"),e?e:!1},load:function(e,t){var n,o;n="getPhoto&photoID="+e+"&albumID="+t+"&password="+password.value,lychee.api(n,function(n){return"Warning: Wrong password!"===n?(o=function(){""!==password.value?photo.load(e,t):setTimeout(o,250)},o(),!1):(photo.json=n,visible.photo()||view.photo.show(),view.photo.init(),lychee.imageview.show(),void setTimeout(function(){lychee.content.show()},300))})},parse:function(){photo.json.title||(photo.json.title="Untitled")},previous:function(e){var t=0;photo.getID()!==!1&&album.json&&album.json.content[photo.getID()]&&""!==album.json.content[photo.getID()].previousPhoto&&(e===!0&&(t=200,$("#image").css({WebkitTransform:"translateX(100%)",MozTransform:"translateX(100%)",transform:"translateX(100%)",opacity:0})),setTimeout(function(){return photo.getID()===!1?!1:void lychee.goto(album.getID()+"/"+album.json.content[photo.getID()].previousPhoto)},t))},next:function(e){var t=0;photo.getID()!==!1&&album.json&&album.json.content[photo.getID()]&&""!==album.json.content[photo.getID()].nextPhoto&&(e===!0&&(t=200,$("#image").css({WebkitTransform:"translateX(-100%)",MozTransform:"translateX(-100%)",transform:"translateX(-100%)",opacity:0})),setTimeout(function(){return photo.getID()===!1?!1:void lychee.goto(album.getID()+"/"+album.json.content[photo.getID()].nextPhoto)},t))},"delete":function(e){var t,n,o;return e?(e instanceof Array==!1&&(e=[e]),1===e.length&&(o=visible.photo()?photo.json.title:album.json.content[e].title,""===o&&(o="Untitled")),n=[["",function(){e.forEach(function(e){(""!==album.json.content[e].nextPhoto||""!==album.json.content[e].previousPhoto)&&(nextPhoto=album.json.content[e].nextPhoto,previousPhoto=album.json.content[e].previousPhoto,album.json.content[previousPhoto].nextPhoto=nextPhoto,album.json.content[nextPhoto].previousPhoto=previousPhoto),album.json.content[e]=null,view.album.content.delete(e)}),visible.albums()||lychee.goto(album.getID()),t="deletePhoto&photoIDs="+e,lychee.api(t,function(e){e!==!0&&lychee.error(null,t,e)})}],["",function(){}]],void(1===e.length?(n[0][0]="Delete Photo",n[1][0]="Keep Photo",modal.show("Delete Photo","Are you sure you want to delete the photo '"+o+"'?<br>This action can't be undone!",n)):(n[0][0]="Delete Photos",n[1][0]="Keep Photos",modal.show("Delete Photos","Are you sure you want to delete all "+e.length+" selected photo?<br>This action can't be undone!",n)))):!1},setTitle:function(e){var t,n,o,i="";return e?(e instanceof Array==!1&&(e=[e]),1===e.length&&(photo.json?i=photo.json.title:album.json&&(i=album.json.content[e].title),i=i.replace("'","&apos;")),o=[["Set Title",function(){t=$(".message input.text").val(),t=lychee.removeHTML(t),visible.photo()&&(photo.json.title=""===t?"Untitled":t,view.photo.title()),e.forEach(function(e){album.json.content[e].title=t,view.album.content.title(e)}),n="setPhotoTitle&photoIDs="+e+"&title="+escape(encodeURI(t)),lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})}],["Cancel",function(){}]],void(1===e.length?modal.show("Set Title","Enter a new title for this photo: <input class='text' type='text' maxlength='30' placeholder='Title' value='"+i+"'>",o):modal.show("Set Titles","Enter a title for all "+e.length+" selected photos: <input class='text' type='text' maxlength='30' placeholder='Title' value=''>",o))):!1},setAlbum:function(e,t){var n,o,i;return e?(visible.photo&&lychee.goto(album.getID()),e instanceof Array==!1&&(e=[e]),e.forEach(function(e){(""!==album.json.content[e].nextPhoto||""!==album.json.content[e].previousPhoto)&&(o=album.json.content[e].nextPhoto,i=album.json.content[e].previousPhoto,album.json.content[i].nextPhoto=o,album.json.content[o].previousPhoto=i),album.json.content[e]=null,view.album.content.delete(e)}),n="setPhotoAlbum&photoIDs="+e+"&albumID="+t,void lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})):!1},setStar:function(e){var t;return e?(visible.photo()&&(photo.json.star=0==photo.json.star?1:0,view.photo.star()),e.forEach(function(e){album.json.content[e].star=0==album.json.content[e].star?1:0,view.album.content.star(e)}),t="setPhotoStar&photoIDs="+e,void lychee.api(t,function(e){e!==!0&&lychee.error(null,t,e)})):!1},setPublic:function(e,t){var n;return 2==photo.json.public?(modal.show("Public Album","This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.",[["Show Album",function(){lychee.goto(photo.json.original_album)}],["Close",function(){}]]),!1):(visible.photo()&&(photo.json.public=0==photo.json.public?1:0,view.photo.public(),1==photo.json.public&&contextMenu.sharePhoto(e,t)),album.json.content[e].public=0==album.json.content[e].public?1:0,view.album.content.public(e),n="setPhotoPublic&photoID="+e,void lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)}))},setDescription:function(e){var t,n,o,i=photo.json.description.replace("'","&apos;");o=[["Set Description",function(){t=$(".message input.text").val(),t=lychee.removeHTML(t),visible.photo()&&(photo.json.description=t,view.photo.description()),n="setPhotoDescription&photoID="+e+"&description="+escape(encodeURI(t)),lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})}],["Cancel",function(){}]],modal.show("Set Description","Enter a description for this photo: <input class='text' type='text' maxlength='800' placeholder='Description' value='"+i+"'>",o)},editTags:function(e){var t,n="",o="";if(!e)return!1;if(e instanceof Array==!1&&(e=[e]),visible.photo()&&(n=photo.json.tags),visible.album()&&1===e.length&&(n=album.json.content[e].tags),visible.album()&&e.length>1){var i=!0;e.forEach(function(t){i=album.json.content[t].tags===album.json.content[e[0]].tags&&i===!0?!0:!1}),i&&(n=album.json.content[e[0]].tags)}n=n.replace(/,/g,", "),t=[["Set Tags",function(){o=$(".message input.text").val(),photo.setTags(e,o)}],["Cancel",function(){}]],1===e.length?modal.show("Set Tags","Enter your tags for this photo. You can add multiple tags by separating them with a comma: <input class='text' type='text' maxlength='800' placeholder='Tags' value='"+n+"'>",t):modal.show("Set Tags","Enter your tags for all "+e.length+" selected photos. Existing tags will be overwritten. You can add multiple tags by separating them with a comma: <input class='text' type='text' maxlength='800' placeholder='Tags' value='"+n+"'>",t)},setTags:function(e,t){var n;return e?(e instanceof Array==!1&&(e=[e]),t=t.replace(/(\ ,\ )|(\ ,)|(,\ )|(,{1,}\ {0,})|(,$|^,)/g,","),t=t.replace(/,$|^,|(\ ){0,}$/g,""),t=lychee.removeHTML(t),visible.photo()&&(photo.json.tags=t,view.photo.tags()),e.forEach(function(e){album.json.content[e].tags=t}),n="setPhotoTags&photoIDs="+e+"&tags="+t,void lychee.api(n,function(e){e!==!0&&lychee.error(null,n,e)})):!1},deleteTag:function(e,t){var n;n=photo.json.tags.split(","),n.splice(t,1),photo.json.tags=n.toString(),photo.setTags([e],photo.json.tags)},share:function(e,t){var n="",o=photo.getViewLink(e),i="unknown";switch(t){case 0:n="https://twitter.com/share?url="+encodeURI(o);break;case 1:n="http://www.facebook.com/sharer.php?u="+encodeURI(o)+"&t="+encodeURI(photo.json.title);break;case 2:n="mailto:?subject="+encodeURI(photo.json.title)+"&body="+encodeURI(o);break;case 3:lychee.loadDropbox(function(){i=photo.json.title+"."+photo.getDirectLink().split(".").pop(),Dropbox.save(photo.getDirectLink(),i)});break;default:n=""}n.length>5&&(location.href=n)},isSmall:function(){var e={width:!1,height:!1};return photo.json.width<$(window).width()-60&&(e.width=!0),photo.json.height<$(window).height()-100&&(e.height=!0),e.width&&e.height?!0:!1},getArchive:function(e){var t;t=location.href.indexOf("index.html")>0?location.href.replace(location.hash,"").replace("index.html","php/api.php?function=getPhotoArchive&photoID="+e):location.href.replace(location.hash,"")+"php/api.php?function=getPhotoArchive&photoID="+e,lychee.publicMode&&(t+="&password="+password.value),location.href=t},getDirectLink:function(){return $("#imageview #image").css("background-image").replace(/"/g,"").replace(/url\(|\)$/gi,"")},getViewLink:function(e){return location.href.indexOf("index.html")>0?location.href.replace("index.html"+location.hash,"view.php?p="+e):location.href.replace(location.hash,"view.php?p="+e)}},search={code:null,find:function(e){var t,n,o="",i="";clearTimeout($(window).data("timeout")),$(window).data("timeout",setTimeout(function(){0!==$("#search").val().length?(t="search&term="+e,lychee.api(t,function(e){e&&e.albums&&(albums.json={content:e.albums},$.each(albums.json.content,function(){albums.parse(this),o+=build.album(this)})),e&&e.photos&&(album.json={content:e.photos},$.each(album.json.content,function(){i+=build.photo(this)})),n=""===o&&""===i?"error":""===o?build.divider("Photos")+i:""===i?build.divider("Albums")+o:build.divider("Photos")+i+build.divider("Albums")+o,search.code!==md5(n)&&($(".no_content").remove(),lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomOut"),lychee.animate(".divider","fadeOut"),search.code=md5(n),setTimeout(function(){"error"===n?$("body").append(build.no_content("search")):(lychee.content.html(n),lychee.animate(".album:nth-child(-n+50), .photo:nth-child(-n+50)","contentZoomIn"),$("img[data-type!='svg']").retina())},300))})):search.reset()},250))},reset:function(){$("#search").val(""),$(".no_content").remove(),""!==search.code&&(albums.json=null,album.json=null,photo.json=null,search.code="",lychee.animate(".divider","fadeOut"),albums.load())}};var settings={createConfig:function(){var e,t,n,o,i,a;i=[["Connect",function(){o=$(".message input.text#dbHost").val(),t=$(".message input.text#dbUser").val(),n=$(".message input.text#dbPassword").val(),e=$(".message input.text#dbName").val(),o.length<1&&(o="localhost"),e.length<1&&(e="lychee"),a="dbCreateConfig&dbName="+escape(e)+"&dbUser="+escape(t)+"&dbPassword="+escape(n)+"&dbHost="+escape(o),lychee.api(a,function(e){e!==!0?setTimeout(function(){return-1!==e.indexOf("Warning: Connection failed!")?(i=[["Retry",function(){setTimeout(settings.createConfig,400)}],["",function(){}]],modal.show("Connection Failed","Unable to connect to host database because access was denied. Double-check your host, username and password and ensure that access from your current location is permitted.",i,null,!1),!1):-1!==e.indexOf("Warning: Could not create file!")?(i=[["Retry",function(){setTimeout(settings.createConfig,400)}],["",function(){}]],modal.show("Saving Failed","Unable to save this configuration. Permission denied in <b>'data/'</b>. Please set the read, write and execute rights for others in <b>'data/'</b> and <b>'uploads/'</b>. Take a look the readme for more information.",i,null,!1),!1):(i=[["Retry",function(){setTimeout(settings.createConfig,400)}],["",function(){}]],modal.show("Configuration Failed","Something unexpected happened. Please try again and check your installation and server. Take a look the readme for more information.",i,null,!1),!1)},400):window.location.reload()})}],["",function(){}]],modal.show("Configuration","Enter your database connection details below: <input id='dbHost' class='text less' type='text' placeholder='Host (optional)' value=''><input id='dbUser' class='text less' type='text' placeholder='Username' value=''><input id='dbPassword' class='text more' type='password' placeholder='Password' value=''><br>Lychee will create its own database. If required, you can enter the name of an existing database instead:<input id='dbName' class='text more' type='text' placeholder='Database (optional)' value=''>",i,-215,!1)},createLogin:function(){var e,t,n,o;o=[["Create Login",function(){e=$(".message input.text#username").val(),t=$(".message input.text#password").val(),e.length<1||t.length<1?setTimeout(function(){return o=[["Retry",function(){setTimeout(settings.createLogin,400)}],["",function(){}]],modal.show("Wrong Input","The username or password you entered is not long enough. Please try again with another username and password!",o,null,!1),!1},400):(n="setLogin&username="+escape(e)+"&password="+md5(t),lychee.api(n,function(e){e!==!0&&setTimeout(function(){return o=[["Retry",function(){setTimeout(settings.createLogin,400)}],["",function(){}]],modal.show("Creation Failed","Unable to save login. Please try again with another username and password!",o,null,!1),!1},400)}))}],["",function(){}]],modal.show("Create Login","Enter a username and password for your installation: <input id='username' class='text less' type='text' placeholder='New Username' value=''><input id='password' class='text' type='password' placeholder='New Password' value=''>",o,-122,!1)},setLogin:function(){var e,t,n,o,i;i=[["Change Login",function(){return e=$(".message input.text#old_password").val(),t=$(".message input.text#username").val(),n=$(".message input.text#password").val(),e.length<1?(loadingBar.show("error","Your old password was entered incorrectly. Please try again!"),!1):t.length<1?(loadingBar.show("error","Your new username was entered incorrectly. Please try again!"),!1):n.length<1?(loadingBar.show("error","Your new password was entered incorrectly. Please try again!"),!1):(o="setLogin&oldPassword="+md5(e)+"&username="+escape(t)+"&password="+md5(n),void lychee.api(o,function(e){e!==!0&&lychee.error(null,o,e)}))}],["Cancel",function(){}]],modal.show("Change Login","Enter your current password: <input id='old_password' class='text more' type='password' placeholder='Current Password' value=''><br>Your username and password will be changed to the following: <input id='username' class='text less' type='text' placeholder='New Username' value=''><input id='password' class='text' type='password' placeholder='New Password' value=''>",i,-171)},setSorting:function(){var e,t,n;e=[["Change Sorting",function(){t[0]=$("select#settings_type").val(),t[1]=$("select#settings_order").val(),n="setSorting&type="+t[0]+"&order="+t[1],lychee.api(n,function(e){e===!0?(lychee.sorting="ORDER BY "+t[0]+" "+t[1],lychee.load()):lychee.error(null,n,e)})}],["Cancel",function(){}]],modal.show("Change Sorting","Sort photos by <select id='settings_type'> <option value='id'>Upload Time</option> <option value='takestamp'>Take Date</option> <option value='title'>Title</option> <option value='description'>Description</option> <option value='public'>Public</option> <option value='star'>Star</option> <option value='type'>Photo Format</option> </select> in an <select id='settings_order'> <option value='ASC'>Ascending</option> <option value='DESC'>Descending</option> </select> order. ",e),""!==lychee.sorting&&(t=lychee.sorting.replace("ORDER BY ","").split(" "),$("select#settings_type").val(t[0]),$("select#settings_order").val(t[1]))},setDropboxKey:function(e){var t,n,o;t=[["Set Key",function(){o=$(".message input.text#key").val(),n="setDropboxKey&key="+o,lychee.api(n,function(t){t===!0?(lychee.dropboxKey=o,e&&lychee.loadDropbox(e)):lychee.error(null,n,t)})}],["Cancel",function(){}]],modal.show("Set Dropbox Key","In order to import photos from your Dropbox, you need a valid drop-ins app key from <a href='https://www.dropbox.com/developers/apps/create'>their website</a>. Generate yourself a personal key and enter it below: <input id='key' class='text' type='text' placeholder='Dropbox API Key' value='"+lychee.dropboxKey+"'>",t)}};swipe={obj:null,tolerance:150,offset:0,start:function(e,t){return e&&(swipe.obj=e),t&&(swipe.tolerance=t),!0},move:function(e){return null===swipe.obj?!1:(swipe.offset=-1*e.x,void swipe.obj.css({WebkitTransform:"translateX("+swipe.offset+"px)",MozTransform:"translateX("+swipe.offset+"px)",transform:"translateX("+swipe.offset+"px)"}))},stop:function(e,t,n){e.x<=-swipe.tolerance?t(!0):e.x>=swipe.tolerance?n(!0):null!==swipe.obj&&swipe.obj.css({WebkitTransform:"translateX(0px)",MozTransform:"translateX(0px)",transform:"translateX(0px)"}),swipe.obj=null,swipe.offset=0}},upload={show:function(e,t){void 0===e&&(e="upload"),upload.close(!0),$("body").append(build.uploadModal(e,t))},setIcon:function(e){$(".upload_message a").remove(),$(".upload_message").prepend("<a class='icon-"+e+"'></a>")},setProgress:function(e){$(".progressbar div").css("width",e+"%")},setText:function(e){$(".progressbar").remove(),$(".upload_message").append("<p>"+e+"</p>")},notify:function(e){var t;return window.webkitNotifications?(0!==window.webkitNotifications.checkPermission()&&window.webkitNotifications.requestPermission(),void(0===window.webkitNotifications.checkPermission()&&e&&(t=window.webkitNotifications.createNotification("",e,"You can now manage your new photo(s)."),t.show()))):!1},start:{local:function(e){var t,n=0,o=new FormData,i=new XMLHttpRequest,a=album.getID();if(e.length<=0)return!1;(a===!1||visible.albums()===!0)&&(a=0),o.append("function","upload"),o.append("albumID",a);for(var r=0;r<e.length;r++){if("image/jpeg"!==e[r].type&&"image/jpg"!==e[r].type&&"image/png"!==e[r].type&&"image/gif"!==e[r].type&&"image/webp"!==e[r].type)return loadingBar.show("error","The file format of "+e[r].name+" is not supported."),!1;o.append(r,e[r])}upload.show(),window.onbeforeunload=function(){return"Lychee is currently uploading!"},i.open("POST",lychee.api_path),i.onload=function(){200===i.status&&(upload.close(),upload.notify("Upload complete"),window.onbeforeunload=null,album.getID()===!1?lychee.goto("0"):album.load(a))},i.upload.onprogress=function(e){e.lengthComputable&&(t=e.loaded/e.total*100|0,t>n&&(upload.setProgress(t),n=t),t>=100&&(upload.setIcon("cog"),upload.setText("Processing photos")))},$("#upload_files").val(""),i.send(o)},url:function(){var e,t,n,o,i=album.getID();i===!1&&(i=0),n=[["Import",function(){if(o=$(".message input.text").val(),o&&o.length>3){if(t=o.split(".").pop(),"jpeg"!==t&&"jpg"!==t&&"png"!==t&&"gif"!==t&&"webp"!==t)return loadingBar.show("error","The file format of this link is not supported."),!1;modal.close(),upload.show("cog","Importing from URL"),e="importUrl&url="+escape(encodeURI(o))+"&albumID="+i,lychee.api(e,function(t){upload.close(),upload.notify("Import complete"),album.getID()===!1?lychee.goto("0"):album.load(i),t!==!0&&lychee.error(null,e,t)})}else loadingBar.show("error","Link to short or too long. Please try another one!")}],["Cancel",function(){}]],modal.show("Import from Link","Please enter the direct link to a photo to import it: <input class='text' type='text' placeholder='http://' value='http://'>",n)},server:function(){var e,t,n=album.getID();n===!1&&(n=0),t=[["Import",function(){modal.close(),upload.show("cog","Importing photos"),e="importServer&albumID="+n,lychee.api(e,function(t){return upload.close(),upload.notify("Import complete"),"Notice: Import only contains albums!"===t?visible.albums()?lychee.load():lychee.goto(""):album.getID()===!1?lychee.goto("0"):album.load(n),"Notice: Import only contains albums!"===t?!0:void("Warning: Folder empty!"===t?lychee.error("Folder empty. No photos imported!",e,t):t!==!0&&lychee.error(null,e,t))})}],["Cancel",function(){}]],modal.show("Import from Server","This action will import all photos and albums which are located in <b>'uploads/import/'</b> of your Lychee installation.",t)},dropbox:function(){var e,t=album.getID();t===!1&&(t=0),lychee.loadDropbox(function(){Dropbox.choose({linkType:"direct",multiselect:!0,success:function(n){if(n.length>1)for(var o=0;o<n.length;o++)n[o]=n[o].link;else n=n[0].link;upload.show("cog","Importing photos"),e="importUrl&url="+escape(n)+"&albumID="+t,lychee.api(e,function(n){upload.close(),upload.notify("Import complete"),album.getID()===!1?lychee.goto("0"):album.load(t),n!==!0&&lychee.error(null,e,n)})}})})}},close:function(e){e===!0?$(".upload_overlay").remove():(upload.setProgress(100),$(".upload_overlay").removeClass("fadeIn").css("opacity",0),setTimeout(function(){$(".upload_overlay").remove()},300))}},view={header:{show:function(){var e=-1*($("#imageview #image").height()/2)+20;clearTimeout($(window).data("timeout")),lychee.imageview.removeClass("full"),lychee.header.removeClass("hidden"),lychee.loadingBar.css("opacity",1),$("#imageview #image.small").length>0?$("#imageview #image").css("margin-top",e):$("#imageview #image").removeClass("full")},hide:function(e,t){var n=-1*($("#imageview #image").height()/2);void 0===t&&(t=500),!visible.photo()||visible.infobox()||visible.contextMenu()||visible.message()||(clearTimeout($(window).data("timeout")),$(window).data("timeout",setTimeout(function(){lychee.imageview.addClass("full"),lychee.header.addClass("hidden"),lychee.loadingBar.css("opacity",0),$("#imageview #image.small").length>0?$("#imageview #image").css("margin-top",n):$("#imageview #image").addClass("full")},t)))},mode:function(e){var t=album.getID();switch(e){case"albums":lychee.header.removeClass("view"),$("#tools_album, #tools_photo").hide(),$("#tools_albums").show();break;case"album":lychee.header.removeClass("view"),$("#tools_albums, #tools_photo").hide(),$("#tools_album").show(),album.json.content===!1?$("#button_archive").hide():$("#button_archive").show(),"s"===t||"f"===t||"r"===t?$("#button_info_album, #button_trash_album, #button_share_album").hide():"0"===t?($("#button_info_album, #button_share_album").hide(),$("#button_trash_album").show()):$("#button_info_album, #button_trash_album, #button_share_album").show();break;case"photo":lychee.header.addClass("view"),$("#tools_albums, #tools_album").hide(),$("#tools_photo").show()}}},infobox:{show:function(){visible.infobox()||$("body").append("<div id='infobox_overlay' class='fadeIn'></div>"),lychee.infobox.addClass("active")},hide:function(){lychee.animate("#infobox_overlay","fadeOut"),setTimeout(function(){$("#infobox_overlay").remove()},300),lychee.infobox.removeClass("active")}},albums:{init:function(){view.albums.title(),view.albums.content.init()},title:function(){lychee.setTitle("Albums",!1)},content:{init:function(){var e="",t="";albums.parse(albums.json.unsortedAlbum),albums.parse(albums.json.publicAlbum),albums.parse(albums.json.starredAlbum),albums.parse(albums.json.recentAlbum),lychee.publicMode||(e=build.divider("Smart Albums")+build.album(albums.json.unsortedAlbum)+build.album(albums.json.starredAlbum)+build.album(albums.json.publicAlbum)+build.album(albums.json.recentAlbum)),albums.json.content&&(lychee.publicMode||(t=build.divider("Albums")),$.each(albums.json.content,function(){albums.parse(this),t+=build.album(this)})),""===e&&""===t?(lychee.content.html(""),$("body").append(build.no_content("picture"))):lychee.content.html(e+t),$("img[data-type!='nonretina']").retina()},title:function(e){var t="",n="",o=albums.json.content[e].title;albums.json.content[e].password&&(t="<span class='icon-lock'></span> "),o.length>18&&(n=o,o=o.substr(0,18)+"..."),$(".album[data-id='"+e+"'] .overlay h1").html(t+o).attr("title",n)},"delete":function(e){$(".album[data-id='"+e+"']").css("opacity",0).animate({width:0,marginLeft:0},300,function(){$(this).remove(),albums.json.num<=0&&lychee.animate(".divider:last-of-type","fadeOut")
})}}},album:{init:function(){album.parse(),view.album.infobox(),view.album.title(),view.album.public(),view.album.content.init(),album.json.init=1},hide:function(){view.infobox.hide()},title:function(){if((visible.album()||!album.json.init)&&!visible.photo())switch(album.getID()){case"f":lychee.setTitle("Starred",!1);break;case"s":lychee.setTitle("Public",!1);break;case"r":lychee.setTitle("Recent",!1);break;case"0":lychee.setTitle("Unsorted",!1);break;default:album.json.init&&$("#infobox .attr_title").html(album.json.title+" "+build.editIcon("edit_title_album")),lychee.setTitle(album.json.title,!0)}},description:function(){$("#infobox .attr_description").html(album.json.description+" "+build.editIcon("edit_description_album"))},content:{init:function(){var e="";$.each(album.json.content,function(){e+=build.photo(this)}),lychee.content.html(e),$("img[data-type!='svg']").retina()},title:function(e){var t="",n=album.json.content[e].title;n.length>18&&(t=n,n=n.substr(0,18)+"..."),$(".photo[data-id='"+e+"'] .overlay h1").html(n).attr("title",t)},star:function(e){$(".photo[data-id='"+e+"'] .icon-star").remove(),1==album.json.content[e].star&&$(".photo[data-id='"+e+"']").append("<a class='badge red icon-star'></a>")},"public":function(e){$(".photo[data-id='"+e+"'] .icon-share").remove(),1==album.json.content[e].public&&$(".photo[data-id='"+e+"']").append("<a class='badge red icon-share'></a>")},"delete":function(e){$(".photo[data-id='"+e+"']").css("opacity",0).animate({width:0,marginLeft:0},300,function(){$(this).remove(),visible.albums()||(album.json.num--,view.album.num(),view.album.title())})}},num:function(){$("#infobox .attr_images").html(album.json.num)},"public":function(){1==album.json.public?($("#button_share_album a").addClass("active"),$("#button_share_album").attr("title","Share Album"),$(".photo .icon-share").remove(),album.json.init&&$("#infobox .attr_visibility").html("Public")):($("#button_share_album a").removeClass("active"),$("#button_share_album").attr("title","Make Public"),album.json.init&&$("#infobox .attr_visibility").html("Private"))},password:function(){$("#infobox .attr_password").html(1==album.json.password?"Yes":"No")},infobox:function(){!visible.album()&&album.json.init||visible.photo()||lychee.infobox.html(build.infoboxAlbum(album.json)).show()}},photo:{init:function(){photo.parse(),view.photo.infobox(),view.photo.title(),view.photo.star(),view.photo.public(),view.photo.photo(),photo.json.init=1},show:function(){lychee.content.addClass("view"),view.header.mode("photo"),$("body").css("overflow","hidden"),$(document).bind("mouseenter",view.header.show).bind("mouseleave",view.header.hide),lychee.animate(lychee.imageview,"fadeIn")},hide:function(){view.header.show(),visible.infobox&&view.infobox.hide(),lychee.content.removeClass("view"),view.header.mode("album"),$("body").css("overflow","auto"),$(document).unbind("mouseenter").unbind("mouseleave"),lychee.animate(lychee.imageview,"fadeOut"),setTimeout(function(){lychee.imageview.hide(),view.album.infobox()},300)},title:function(){photo.json.init&&$("#infobox .attr_title").html(photo.json.title+" "+build.editIcon("edit_title")),lychee.setTitle(photo.json.title,!0)},description:function(){photo.json.init&&$("#infobox .attr_description").html(photo.json.description+" "+build.editIcon("edit_description"))},star:function(){$("#button_star a").removeClass("icon-star-empty icon-star"),1==photo.json.star?($("#button_star a").addClass("icon-star"),$("#button_star").attr("title","Unstar Photo")):($("#button_star a").addClass("icon-star-empty"),$("#button_star").attr("title","Star Photo"))},"public":function(){1==photo.json.public||2==photo.json.public?($("#button_share a").addClass("active"),$("#button_share").attr("title","Share Photo"),photo.json.init&&$("#infobox .attr_visibility").html("Public")):($("#button_share a").removeClass("active"),$("#button_share").attr("title","Make Public"),photo.json.init&&$("#infobox .attr_visibility").html("Private"))},tags:function(){$("#infobox #tags").html(build.tags(photo.json.tags))},photo:function(){lychee.imageview.html(build.imageview(photo.json,photo.isSmall(),visible.controls())),(album.json&&album.json.content&&album.json.content[photo.getID()]&&""===album.json.content[photo.getID()].nextPhoto||lychee.viewMode)&&$("a#next").hide(),(album.json&&album.json.content&&album.json.content[photo.getID()]&&""===album.json.content[photo.getID()].previousPhoto||lychee.viewMode)&&$("a#previous").hide()},infobox:function(){lychee.infobox.html(build.infoboxPhoto(photo.json)).show()}}},visible={albums:function(){return"block"===$("#tools_albums").css("display")?!0:!1},album:function(){return"block"===$("#tools_album").css("display")?!0:!1},photo:function(){return $("#imageview.fadeIn").length>0?!0:!1},search:function(){return null!==search.code&&""!==search.code?!0:!1},infobox:function(){return $("#infobox.active").length>0?!0:!1},infoboxbutton:function(){return visible.albums()?!1:visible.photo()?!0:visible.album()&&$("#button_info_album:visible").length>0?!0:!1},controls:function(){return lychee.loadingBar.css("opacity")<1?!1:!0},message:function(){return $(".message").length>0?!0:!1},signin:function(){return $(".message .sign_in").length>0?!0:!1},contextMenu:function(){return $(".contextmenu").length>0?!0:!1},multiselect:function(){return $("#multiselect").length>0?!0:!1}};
\ No newline at end of file
function mobileBrowser(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?!0:!1}function gup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t="[\\?&]"+e+"=([^&#]*)",n=new RegExp(t),i=n.exec(window.location.href);return null===i?"":i[1]}function key(e){code=e.keyCode?e.keyCode:e.which,27===code&&visibleInfobox()&&(hideInfobox(),e.preventDefault())}function visibleInfobox(){return parseInt(infobox.css("right").replace("px",""))<0?!1:!0}function isPhotoSmall(e){return size=[["width",!1],["height",!1]],e.width<$(window).width()-60&&(size.width=!0),e.height<$(window).height()-100&&(size.height=!0),size.width&&size.height?!0:!1}function showInfobox(){$("body").append("<div id='infobox_overlay' class='fadeIn'></div>"),infobox.addClass("active")}function hideInfobox(){$("#infobox_overlay").removeClass("fadeIn").addClass("fadeOut"),setTimeout(function(){$("#infobox_overlay").remove()},300),infobox.removeClass("active")}function loadPhotoInfo(e){params="function=getPhoto&photoID="+e+"&albumID=0&password=''",$.ajax({type:"POST",url:api_path,data:params,dataType:"json",success:function(t){t.title||(t.title="Untitled"),document.title="Lychee - "+t.title,headerTitle.html(t.title),imageview.attr("data-id",e),imageview.html(isPhotoSmall(t)?"<div id='image' class='small' style='background-image: url("+t.url+"); width: "+t.width+"px; height: "+t.height+"px; margin-top: -"+parseInt(t.height/2-20)+"px; margin-left: -"+t.width/2+"px;'></div>":"<div id='image' style='background-image: url("+t.url+");'></div>"),imageview.removeClass("fadeOut").addClass("fadeIn").show(),infobox.html(build.infoboxPhoto(t,!0)).show()},error:ajaxError})}function ajaxError(e,t,n){console.log(e),console.log(t),console.log(n)}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=Z.type(e);return"function"===n||Z.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return U.call(t,e)>=0!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=ht[e]={};return Z.each(e.match(pt)||[],function(e,n){t[n]=!0}),t}function a(){Q.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),Z.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+Math.random()}function u(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(xt,"-$1").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:bt.test(n)?Z.parseJSON(n):n}catch(r){}yt.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return Q.activeElement}catch(e){}}function d(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Mt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,i=e.length;i>n;n++)mt.set(e[n],"globalEval",!t||mt.get(t[n],"globalEval"))}function v(e,t){var n,i,r,o,a,s,u,l;if(1===t.nodeType){if(mt.hasData(e)&&(o=mt.access(e),a=mt.set(t,o),l=o.events)){delete a.handle,a.events={};for(r in l)for(n=0,i=l[r].length;i>n;n++)Z.event.add(t,r,l[r][n])}yt.hasData(e)&&(s=yt.access(e),u=Z.extend({},s),yt.set(t,u))}}function m(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Z.nodeName(e,t)?Z.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ct.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var i,r=Z(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(r[0]))?i.display:Z.css(r[0],"display");return r.detach(),o}function x(e){var t=Q,n=Rt[e];return n||(n=b(e,t),"none"!==n&&n||(Ft=(Ft||Z("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Ft[0].contentDocument,t.write(),t.close(),n=b(e,t),Ft.detach()),Rt[e]=n),n}function w(e,t,n){var i,r,o,a,s=e.style;return n=n||Bt(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||Z.contains(e.ownerDocument,e)||(a=Z.style(e,t)),Wt.test(a)&&_t.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function T(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function k(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),i=t,r=Yt.length;r--;)if(t=Yt[r]+n,t in e)return t;return i}function C(e,t,n){var i=Xt.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function S(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=Z.css(e,n+Tt[o],!0,r)),i?("content"===n&&(a-=Z.css(e,"padding"+Tt[o],!0,r)),"margin"!==n&&(a-=Z.css(e,"border"+Tt[o]+"Width",!0,r))):(a+=Z.css(e,"padding"+Tt[o],!0,r),"padding"!==n&&(a+=Z.css(e,"border"+Tt[o]+"Width",!0,r)));return a}function N(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=Bt(e),a="border-box"===Z.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=w(e,t,o),(0>r||null==r)&&(r=e.style[t]),Wt.test(r))return r;i=a&&(G.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+S(e,t,n||(a?"border":"content"),i,o)+"px"}function E(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(o[a]=mt.get(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&kt(i)&&(o[a]=mt.access(i,"olddisplay",x(i.nodeName)))):(r=kt(i),"none"===n&&r||mt.set(i,"olddisplay",r?n:Z.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function A(e,t,n,i,r){return new A.prototype.init(e,t,n,i,r)}function D(){return setTimeout(function(){Gt=void 0}),Gt=Z.now()}function j(e,t){var n,i=0,r={height:e};for(t=t?1:0;4>i;i+=2-t)n=Tt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function L(e,t,n){for(var i,r=(nn[t]||[]).concat(nn["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function q(e,t,n){var i,r,o,a,s,u,l,c,f=this,d={},p=e.style,h=e.nodeType&&kt(e),g=mt.get(e,"fxshow");n.queue||(s=Z._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,f.always(function(){f.always(function(){s.unqueued--,Z.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=Z.css(e,"display"),c="none"===l?mt.get(e,"olddisplay")||x(e.nodeName):l,"inline"===c&&"none"===Z.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],Jt.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(h?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;h=!0}d[i]=g&&g[i]||Z.style(e,i)}else l=void 0;if(Z.isEmptyObject(d))"inline"===("none"===l?x(e.nodeName):l)&&(p.display=l);else{g?"hidden"in g&&(h=g.hidden):g=mt.access(e,"fxshow",{}),o&&(g.hidden=!h),h?Z(e).show():f.done(function(){Z(e).hide()}),f.done(function(){var t;mt.remove(e,"fxshow");for(t in d)Z.style(e,t,d[t])});for(i in d)a=L(h?g[i]:0,i,f),i in g||(g[i]=a.start,h&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function O(e,t){var n,i,r,o,a;for(n in e)if(i=Z.camelCase(n),r=t[i],o=e[n],Z.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=Z.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function P(e,t,n){var i,r,o=0,a=tn.length,s=Z.Deferred().always(function(){delete u.elem}),u=function(){if(r)return!1;for(var t=Gt||D(),n=Math.max(0,l.startTime+l.duration-t),i=n/l.duration||0,o=1-i,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:Z.extend({},t),opts:Z.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Gt||D(),duration:n.duration,tweens:[],createTween:function(t,n){var i=Z.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){var n=0,i=t?l.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(O(c,l.opts.specialEasing);a>o;o++)if(i=tn[o].call(l,e,c,l.opts))return i;return Z.map(c,L,l),Z.isFunction(l.opts.start)&&l.opts.start.call(e,l),Z.fx.timer(Z.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function H(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(pt)||[];if(Z.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function M(e,t,n,i){function r(s){var u;return o[s]=!0,Z.each(e[s]||[],function(e,s){var l=s(t,n,i);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),r(l),!1)}),u}var o={},a=e===Tn;return r(t.dataTypes[0])||!o["*"]&&r("*")}function $(e,t){var n,i,r=Z.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&Z.extend(!0,e,i),e}function I(e,t,n){for(var i,r,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){u.unshift(r);break}if(u[0]in n)o=u[0];else{for(r in n){if(!u[0]||e.converters[r+" "+u[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function F(e,t,n,i){var r,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=l[u+" "+o]||l["* "+o],!a)for(r in l)if(s=r.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[r]:l[r]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function R(e,t,n,i){var r;if(Z.isArray(t))Z.each(t,function(t,r){n||Nn.test(e)?i(e,r):R(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==Z.type(t))i(e,t);else for(r in t)R(e+"["+r+"]",t[r],n,i)}function _(e){return Z.isWindow(e)?e:9===e.nodeType&&e.defaultView}var W=[],B=W.slice,z=W.concat,X=W.push,U=W.indexOf,V={},K=V.toString,Y=V.hasOwnProperty,G={},Q=e.document,J="2.1.1",Z=function(e,t){return new Z.fn.init(e,t)},et=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,tt=/^-ms-/,nt=/-([\da-z])/gi,it=function(e,t){return t.toUpperCase()};Z.fn=Z.prototype={jquery:J,constructor:Z,selector:"",length:0,toArray:function(){return B.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:B.call(this)},pushStack:function(e){var t=Z.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Z.each(this,e,t)},map:function(e){return this.pushStack(Z.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(B.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:X,sort:W.sort,splice:W.splice},Z.extend=Z.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||Z.isFunction(a)||(a={}),s===u&&(a=this,s--);u>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(l&&i&&(Z.isPlainObject(i)||(r=Z.isArray(i)))?(r?(r=!1,o=n&&Z.isArray(n)?n:[]):o=n&&Z.isPlainObject(n)?n:{},a[t]=Z.extend(l,o,i)):void 0!==i&&(a[t]=i));return a},Z.extend({expando:"jQuery"+(J+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Z.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!Z.isArray(e)&&e-parseFloat(e)>=0},isPlainObject:function(e){return"object"!==Z.type(e)||e.nodeType||Z.isWindow(e)?!1:e.constructor&&!Y.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?V[K.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Z.trim(e),e&&(1===e.indexOf("use strict")?(t=Q.createElement("script"),t.text=e,Q.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(tt,"ms-").replace(nt,it)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,a=e.length,s=n(e);if(i){if(s)for(;a>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(s)for(;a>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(et,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?Z.merge(i,"string"==typeof e?[e]:e):X.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:U.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)r=t(e[o],o,i),null!=r&&u.push(r);else for(o in e)r=t(e[o],o,i),null!=r&&u.push(r);return z.apply([],u)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(n=e[t],t=e,e=n),Z.isFunction(e)?(i=B.call(arguments,2),r=function(){return e.apply(t||this,i.concat(B.call(arguments)))},r.guid=e.guid=e.guid||Z.guid++,r):void 0},now:Date.now,support:G}),Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){V["[object "+t+"]"]=t.toLowerCase()});var rt=function(e){function t(e,t,n,i){var r,o,a,s,u,l,f,p,h,g;if((t?t.ownerDocument||t:R)!==q&&L(t),t=t||q,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(P&&!i){if(r=yt.exec(e))if(a=r[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(w.qsa&&(!H||!H.test(e))){if(p=f=F,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=S(e),(f=t.getAttribute("id"))?p=f.replace(xt,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",u=l.length;u--;)l[u]=p+d(l[u]);h=bt.test(e)&&c(t.parentNode)||t,g=l.join(",")}if(g)try{return Z.apply(n,h.querySelectorAll(g)),n}catch(v){}finally{f||t.removeAttribute("id")}}}return E(e.replace(ut,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[F]=!0,e}function r(e){var t=q.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)T.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&typeof e.getElementsByTagName!==V&&e}function f(){}function d(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=W++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,u,l=[_,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(u=t[F]||(t[F]={}),(s=u[i])&&s[0]===_&&s[1]===o)return l[2]=s[2];if(u[i]=l,l[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function v(e,t,n,i,r){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),l&&t.push(s));return a}function m(e,t,n,r,o,a){return r&&!r[F]&&(r=m(r)),o&&!o[F]&&(o=m(o,a)),i(function(i,a,s,u){var l,c,f,d=[],p=[],h=a.length,m=i||g(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?m:v(m,d,e,s,u),b=n?o||(i?e:h||r)?[]:a:y;if(n&&n(y,b,s,u),r)for(l=v(b,p),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(b[p[c]]=!(y[p[c]]=f));if(i){if(o||e){if(o){for(l=[],c=b.length;c--;)(f=b[c])&&l.push(y[c]=f);o(null,b=[],l,u)}for(c=b.length;c--;)(f=b[c])&&(l=o?tt.call(i,f):d[c])>-1&&(i[l]=!(a[l]=f))}}else b=v(b===a?b.splice(h,b.length):b),o?o(null,a,b,u):Z.apply(a,b)})}function y(e){for(var t,n,i,r=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return tt.call(t,e)>-1},a,!0),c=[function(e,n,i){return!o&&(i||n!==A)||((t=n).nodeType?u(e,n,i):l(e,n,i))}];r>s;s++)if(n=T.relative[e[s].type])c=[p(h(c),n)];else{if(n=T.filter[e[s].type].apply(null,e[s].matches),n[F]){for(i=++s;r>i&&!T.relative[e[i].type];i++);return m(s>1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ut,"$1"),n,i>s&&y(e.slice(s,i)),r>i&&y(e=e.slice(i)),r>i&&d(e))}c.push(n)}return h(c)}function b(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,u,l){var c,f,d,p=0,h="0",g=i&&[],m=[],y=A,b=i||o&&T.find.TAG("*",l),x=_+=null==y?1:Math.random()||.1,w=b.length;for(l&&(A=a!==q&&a);h!==w&&null!=(c=b[h]);h++){if(o&&c){for(f=0;d=e[f++];)if(d(c,a,s)){u.push(c);break}l&&(_=x)}r&&((c=!d&&c)&&p--,i&&g.push(c))}if(p+=h,r&&h!==p){for(f=0;d=n[f++];)d(g,m,a,s);if(i){if(p>0)for(;h--;)g[h]||m[h]||(m[h]=Q.call(u));m=v(m)}Z.apply(u,m),l&&!i&&m.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(_=x,A=y),g};return r?i(a):a}var x,w,T,k,C,S,N,E,A,D,j,L,q,O,P,H,M,$,I,F="sizzle"+-new Date,R=e.document,_=0,W=0,B=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V="undefined",K=1<<31,Y={}.hasOwnProperty,G=[],Q=G.pop,J=G.push,Z=G.push,et=G.slice,tt=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot=rt.replace("w","w#"),at="\\["+it+"*("+rt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ot+"))|)"+it+"*\\]",st=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+at+")*)|.*)\\)|)",ut=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ct=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ft=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),dt=new RegExp(st),pt=new RegExp("^"+ot+"$"),ht={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+nt+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,vt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,xt=/'|\\/g,wt=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),Tt=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Z.apply(G=et.call(R.childNodes),R.childNodes),G[R.childNodes.length].nodeType}catch(kt){Z={apply:G.length?function(e,t){J.apply(e,et.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}w=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},L=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:R,i=n.defaultView;return n!==q&&9===n.nodeType&&n.documentElement?(q=n,O=n.documentElement,P=!C(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){L()},!1):i.attachEvent&&i.attachEvent("onunload",function(){L()})),w.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=r(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=mt.test(n.getElementsByClassName)&&r(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),w.getById=r(function(e){return O.appendChild(e).id=F,!n.getElementsByName||!n.getElementsByName(F).length}),w.getById?(T.find.ID=function(e,t){if(typeof t.getElementById!==V&&P){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(wt,Tt);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(wt,Tt);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==V?t.getElementsByTagName(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==V&&P?t.getElementsByClassName(e):void 0},M=[],H=[],(w.qsa=mt.test(n.querySelectorAll))&&(r(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&H.push("[*^$]="+it+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+it+"*(?:value|"+nt+")"),e.querySelectorAll(":checked").length||H.push(":checked")}),r(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+it+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(w.matchesSelector=mt.test($=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&r(function(e){w.disconnectedMatch=$.call(e,"div"),$.call(e,"[s!='']:x"),M.push("!=",st)}),H=H.length&&new RegExp(H.join("|")),M=M.length&&new RegExp(M.join("|")),t=mt.test(O.compareDocumentPosition),I=t||mt.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!w.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===R&&I(R,e)?-1:t===n||t.ownerDocument===R&&I(R,t)?1:D?tt.call(D,e)-tt.call(D,t):0:4&i?-1:1)}:function(e,t){if(e===t)return j=!0,0;var i,r=0,o=e.parentNode,s=t.parentNode,u=[e],l=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:D?tt.call(D,e)-tt.call(D,t):0;if(o===s)return a(e,t);for(i=e;i=i.parentNode;)u.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;u[r]===l[r];)r++;return r?a(u[r],l[r]):u[r]===R?-1:l[r]===R?1:0},n):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&L(e),n=n.replace(ft,"='$1']"),!(!w.matchesSelector||!P||M&&M.test(n)||H&&H.test(n)))try{var i=$.call(e,n);if(i||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&L(e),I(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&L(e);var n=T.attrHandle[t.toLowerCase()],i=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==i?i:w.attributes||!P?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return D=null,e},k=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=k(t);return n},T=t.selectors={cacheLength:50,createPseudo:i,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(wt,Tt),e[3]=(e[3]||e[4]||e[5]||"").replace(wt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&dt.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(wt,Tt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+it+")"+e+"("+it+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s;if(v){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===m:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(c=v[F]||(v[F]={}),l=c[e]||[],p=l[0]===_&&l[1],d=l[0]===_&&l[2],f=p&&v.childNodes[p];f=++p&&f&&f[g]||(d=p=0)||h.pop();)if(1===f.nodeType&&++d&&f===t){c[e]=[_,p,d];break}}else if(y&&(l=(t[F]||(t[F]={}))[e])&&l[0]===_)d=l[1];else for(;(f=++p&&f&&f[g]||(d=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==m:1!==f.nodeType)||!++d||(y&&((f[F]||(f[F]={}))[e]=[_,d]),f!==t)););return d-=r,d===i||d%i===0&&d/i>=0}}},PSEUDO:function(e,n){var r,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[F]?o(n):o.length>1?(r=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=tt.call(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=N(e.replace(ut,"$1"));return r[F]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return pt.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(wt,Tt).toLowerCase(),function(t){var n;do if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return vt.test(e.nodeName)},input:function(e){return gt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},T.pseudos.nth=T.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})T.pseudos[x]=u(x);return f.prototype=T.filters=T.pseudos,T.setFilters=new f,S=t.tokenize=function(e,n){var i,r,o,a,s,u,l,c=z[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=T.preFilter;s;){(!i||(r=lt.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),i=!1,(r=ct.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(ut," ")}),s=s.slice(i.length));for(a in T.filter)!(r=ht[a].exec(s))||l[a]&&!(r=l[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):z(e,u).slice(0)},N=t.compile=function(e,t){var n,i=[],r=[],o=X[e+" "];if(!o){for(t||(t=S(e)),n=t.length;n--;)o=y(t[n]),o[F]?i.push(o):r.push(o);o=X(e,b(r,i)),o.selector=e}return o},E=t.select=function(e,t,n,i){var r,o,a,s,u,l="function"==typeof e&&e,f=!i&&S(e=l.selector||e);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&P&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(wt,Tt),t)||[])[0],!t)return n;
l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=ht.needsContext.test(e)?0:o.length;r--&&(a=o[r],!T.relative[s=a.type]);)if((u=T.find[s])&&(i=u(a.matches[0].replace(wt,Tt),bt.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&d(o),!e)return Z.apply(n,i),n;break}}return(l||N(e,f))(i,t,!P,n,bt.test(e)&&c(t.parentNode)||t),n},w.sortStable=F.split("").sort(U).join("")===F,w.detectDuplicates=!!j,L(),w.sortDetached=r(function(e){return 1&e.compareDocumentPosition(q.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(nt,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);Z.find=rt,Z.expr=rt.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=rt.uniqueSort,Z.text=rt.getText,Z.isXMLDoc=rt.isXML,Z.contains=rt.contains;var ot=Z.expr.match.needsContext,at=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^.[^:#\[\.,]*$/;Z.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?Z.find.matchesSelector(i,e)?[i]:[]:Z.find.matches(e,Z.grep(t,function(e){return 1===e.nodeType}))},Z.fn.extend({find:function(e){var t,n=this.length,i=[],r=this;if("string"!=typeof e)return this.pushStack(Z(e).filter(function(){for(t=0;n>t;t++)if(Z.contains(r[t],this))return!0}));for(t=0;n>t;t++)Z.find(e,r[t],i);return i=this.pushStack(n>1?Z.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&ot.test(e)?Z(e):e||[],!1).length}});var ut,lt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ct=Z.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:lt.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ut).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Z?t[0]:t,Z.merge(this,Z.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Q,!0)),at.test(n[1])&&Z.isPlainObject(t))for(n in t)Z.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return i=Q.getElementById(n[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=Q,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Z.isFunction(e)?"undefined"!=typeof ut.ready?ut.ready(e):e(Z):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))};ct.prototype=Z.fn,ut=Z(Q);var ft=/^(?:parents|prev(?:Until|All))/,dt={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&Z(e).is(n))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Z.fn.extend({has:function(e){var t=Z(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Z.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=ot.test(e)||"string"!=typeof e?Z(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Z.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(e){return e?"string"==typeof e?U.call(Z(e),this[0]):U.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Z.unique(Z.merge(this.get(),Z(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Z.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Z.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z.dir(e,"previousSibling",n)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(n,i){var r=Z.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=Z.filter(i,r)),this.length>1&&(dt[e]||Z.unique(r),ft.test(e)&&r.reverse()),this.pushStack(r)}});var pt=/\S+/g,ht={};Z.Callbacks=function(e){e="string"==typeof e?ht[e]||o(e):Z.extend({},e);var t,n,i,r,a,s,u=[],l=!e.once&&[],c=function(o){for(t=e.memory&&o,n=!0,s=r||0,r=0,a=u.length,i=!0;u&&a>s;s++)if(u[s].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}i=!1,u&&(l?l.length&&c(l.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var n=u.length;!function o(t){Z.each(t,function(t,n){var i=Z.type(n);"function"===i?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),i?a=u.length:t&&(r=n,c(t))}return this},remove:function(){return u&&Z.each(arguments,function(e,t){for(var n;(n=Z.inArray(t,u,n))>-1;)u.splice(n,1),i&&(a>=n&&a--,s>=n&&s--)}),this},has:function(e){return e?Z.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],a=0,this},disable:function(){return u=l=t=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!u||n&&!l||(t=t||[],t=[e,t.slice?t.slice():t],i?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(n){Z.each(t,function(t,o){var a=Z.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Z.extend(e,i):i}},r={};return i.pipe=i.then,Z.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=B.call(arguments),a=o.length,s=1!==a||e&&Z.isFunction(e.promise)?a:0,u=1===s?e:Z.Deferred(),l=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?B.call(arguments):r,i===t?u.notifyWith(n,i):--s||u.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&Z.isFunction(o[r].promise)?o[r].promise().done(l(r,i,o)).fail(u.reject).progress(l(r,n,t)):--s;return s||u.resolveWith(i,o),u.promise()}});var gt;Z.fn.ready=function(e){return Z.ready.promise().done(e),this},Z.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Z.readyWait++:Z.ready(!0)},ready:function(e){(e===!0?--Z.readyWait:Z.isReady)||(Z.isReady=!0,e!==!0&&--Z.readyWait>0||(gt.resolveWith(Q,[Z]),Z.fn.triggerHandler&&(Z(Q).triggerHandler("ready"),Z(Q).off("ready"))))}}),Z.ready.promise=function(t){return gt||(gt=Z.Deferred(),"complete"===Q.readyState?setTimeout(Z.ready):(Q.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1))),gt.promise(t)},Z.ready.promise();var vt=Z.access=function(e,t,n,i,r,o,a){var s=0,u=e.length,l=null==n;if("object"===Z.type(n)){r=!0;for(s in n)Z.access(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,Z.isFunction(i)||(a=!0),l&&(a?(t.call(e,i),t=null):(l=t,t=function(e,t,n){return l.call(Z(e),n)})),t))for(;u>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:l?t.call(e):u?t(e[0],n):o};Z.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=Z.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(i){t[this.expando]=n,Z.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var i,r=this.key(e),o=this.cache[r];if("string"==typeof t)o[t]=n;else if(Z.isEmptyObject(o))Z.extend(this.cache[r],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?(i=this.get(e,t),void 0!==i?i:this.get(e,Z.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,r,o=this.key(e),a=this.cache[o];if(void 0===t)this.cache[o]={};else{Z.isArray(t)?i=t.concat(t.map(Z.camelCase)):(r=Z.camelCase(t),t in a?i=[t,r]:(i=r,i=i in a?[i]:i.match(pt)||[])),n=i.length;for(;n--;)delete a[i[n]]}},hasData:function(e){return!Z.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var mt=new s,yt=new s,bt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,xt=/([A-Z])/g;Z.extend({hasData:function(e){return yt.hasData(e)||mt.hasData(e)},data:function(e,t,n){return yt.access(e,t,n)},removeData:function(e,t){yt.remove(e,t)},_data:function(e,t,n){return mt.access(e,t,n)},_removeData:function(e,t){mt.remove(e,t)}}),Z.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=yt.get(o),1===o.nodeType&&!mt.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=Z.camelCase(i.slice(5)),u(o,i,r[i])));mt.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){yt.set(this,e)}):vt(this,function(t){var n,i=Z.camelCase(e);if(o&&void 0===t){if(n=yt.get(o,e),void 0!==n)return n;if(n=yt.get(o,i),void 0!==n)return n;if(n=u(o,i,void 0),void 0!==n)return n}else this.each(function(){var n=yt.get(this,i);yt.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&yt.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){yt.remove(this,e)})}}),Z.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=mt.get(e,t),n&&(!i||Z.isArray(n)?i=mt.access(e,t,Z.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Z.queue(e,t),i=n.length,r=n.shift(),o=Z._queueHooks(e,t),a=function(){Z.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return mt.get(e,n)||mt.access(e,n,{empty:Z.Callbacks("once memory").add(function(){mt.remove(e,[t+"queue",n])})})}}),Z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Z.queue(this[0],e):void 0===t?this:this.each(function(){var n=Z.queue(this,e,t);Z._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Z.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Z.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=Z.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=mt.get(o[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var wt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Tt=["Top","Right","Bottom","Left"],kt=function(e,t){return e=t||e,"none"===Z.css(e,"display")||!Z.contains(e.ownerDocument,e)},Ct=/^(?:checkbox|radio)$/i;!function(){var e=Q.createDocumentFragment(),t=e.appendChild(Q.createElement("div")),n=Q.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),G.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",G.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var St="undefined";G.focusinBubbles="onfocusin"in e;var Nt=/^key/,Et=/^(?:mouse|pointer|contextmenu)|click/,At=/^(?:focusinfocus|focusoutblur)$/,Dt=/^([^.]*)(?:\.(.+)|)$/;Z.event={global:{},add:function(e,t,n,i,r){var o,a,s,u,l,c,f,d,p,h,g,v=mt.get(e);if(v)for(n.handler&&(o=n,n=o.handler,r=o.selector),n.guid||(n.guid=Z.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return typeof Z!==St&&Z.event.triggered!==t.type?Z.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(pt)||[""],l=t.length;l--;)s=Dt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=Z.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,f=Z.event.special[p]||{},c=Z.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&Z.expr.match.needsContext.test(r),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,i,h,a)!==!1||e.addEventListener&&e.addEventListener(p,a,!1)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),Z.event.global[p]=!0)},remove:function(e,t,n,i,r){var o,a,s,u,l,c,f,d,p,h,g,v=mt.hasData(e)&&mt.get(e);if(v&&(u=v.events)){for(t=(t||"").match(pt)||[""],l=t.length;l--;)if(s=Dt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=Z.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!r&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||Z.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)Z.event.remove(e,p+t[l],n,i,!0);Z.isEmptyObject(u)&&(delete v.handle,mt.remove(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,u,l,c,f,d=[i||Q],p=Y.call(t,"type")?t.type:t,h=Y.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||Q,3!==i.nodeType&&8!==i.nodeType&&!At.test(p+Z.event.triggered)&&(p.indexOf(".")>=0&&(h=p.split("."),p=h.shift(),h.sort()),l=p.indexOf(":")<0&&"on"+p,t=t[Z.expando]?t:new Z.Event(p,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:Z.makeArray(n,[t]),f=Z.event.special[p]||{},r||!f.trigger||f.trigger.apply(i,n)!==!1)){if(!r&&!f.noBubble&&!Z.isWindow(i)){for(u=f.delegateType||p,At.test(u+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(i.ownerDocument||Q)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||p,c=(mt.get(a,"events")||{})[t.type]&&mt.get(a,"handle"),c&&c.apply(a,n),c=l&&a[l],c&&c.apply&&Z.acceptData(a)&&(t.result=c.apply(a,n),t.result===!1&&t.preventDefault());return t.type=p,r||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!Z.acceptData(i)||l&&Z.isFunction(i[p])&&!Z.isWindow(i)&&(s=i[l],s&&(i[l]=null),Z.event.triggered=p,i[p](),Z.event.triggered=void 0,s&&(i[l]=s)),t.result}},dispatch:function(e){e=Z.event.fix(e);var t,n,i,r,o,a=[],s=B.call(arguments),u=(mt.get(this,"events")||{})[e.type]||[],l=Z.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=Z.event.handlers.call(this,e,u),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,i=((Z.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(i=[],n=0;s>n;n++)o=t[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?Z(r,this).index(u)>=0:Z.find(r,this,null,[u]).length),i[r]&&i.push(o);i.length&&a.push({elem:u,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Q,i=n.documentElement,r=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Z.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Et.test(r)?this.mouseHooks:Nt.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new Z.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=Q),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==f()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&Z.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return Z.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=Z.extend(new Z.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?Z.event.trigger(r,null,t):Z.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},Z.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},Z.Event=function(e,t){return this instanceof Z.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?l:c):this.type=e,t&&Z.extend(this,t),this.timeStamp=e&&e.timeStamp||Z.now(),void(this[Z.expando]=!0)):new Z.Event(e,t)},Z.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=l,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},Z.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Z.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return(!r||r!==i&&!Z.contains(i,r))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),G.focusinBubbles||Z.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Z.event.simulate(t,e.target,Z.event.fix(e),!0)};Z.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=mt.access(i,t);r||i.addEventListener(e,n,!0),mt.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=mt.access(i,t)-1;r?mt.access(i,t,r):(i.removeEventListener(e,n,!0),mt.remove(i,t))}}}),Z.fn.extend({on:function(e,t,n,i,r){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=c;else if(!i)return this;return 1===r&&(o=i,i=function(e){return Z().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=Z.guid++)),this.each(function(){Z.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,Z(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){Z.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){Z.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?Z.event.trigger(e,t,n,!0):void 0}});var jt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Lt=/<([\w:]+)/,qt=/<|&#?\w+;/,Ot=/<(?:script|style|link)/i,Pt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ht=/^$|\/(?:java|ecma)script/i,Mt=/^true\/(.*)/,$t=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,It={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};It.optgroup=It.option,It.tbody=It.tfoot=It.colgroup=It.caption=It.thead,It.th=It.td,Z.extend({clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),u=Z.contains(e.ownerDocument,e);if(!(G.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(a=m(s),o=m(e),i=0,r=o.length;r>i;i++)y(o[i],a[i]);if(t)if(n)for(o=o||m(e),a=a||m(s),i=0,r=o.length;r>i;i++)v(o[i],a[i]);else v(e,s);return a=m(s,"script"),a.length>0&&g(a,!u&&m(e,"script")),s},buildFragment:function(e,t,n,i){for(var r,o,a,s,u,l,c=t.createDocumentFragment(),f=[],d=0,p=e.length;p>d;d++)if(r=e[d],r||0===r)if("object"===Z.type(r))Z.merge(f,r.nodeType?[r]:r);else if(qt.test(r)){for(o=o||c.appendChild(t.createElement("div")),a=(Lt.exec(r)||["",""])[1].toLowerCase(),s=It[a]||It._default,o.innerHTML=s[1]+r.replace(jt,"<$1></$2>")+s[2],l=s[0];l--;)o=o.lastChild;Z.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(r));for(c.textContent="",d=0;r=f[d++];)if((!i||-1===Z.inArray(r,i))&&(u=Z.contains(r.ownerDocument,r),o=m(c.appendChild(r),"script"),u&&g(o),n))for(l=0;r=o[l++];)Ht.test(r.type||"")&&n.push(r);return c},cleanData:function(e){for(var t,n,i,r,o=Z.event.special,a=0;void 0!==(n=e[a]);a++){if(Z.acceptData(n)&&(r=n[mt.expando],r&&(t=mt.cache[r]))){if(t.events)for(i in t.events)o[i]?Z.event.remove(n,i):Z.removeEvent(n,i,t.handle);mt.cache[r]&&delete mt.cache[r]}delete yt.cache[n[yt.expando]]}}}),Z.fn.extend({text:function(e){return vt(this,function(e){return void 0===e?Z.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?Z.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||Z.cleanData(m(n)),n.parentNode&&(t&&Z.contains(n.ownerDocument,n)&&g(m(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Z.cleanData(m(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Z.clone(this,e,t)})},html:function(e){return vt(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ot.test(e)&&!It[(Lt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(jt,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(Z.cleanData(m(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Z.cleanData(m(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=z.apply([],e);var n,i,r,o,a,s,u=0,l=this.length,c=this,f=l-1,d=e[0],g=Z.isFunction(d);if(g||l>1&&"string"==typeof d&&!G.checkClone&&Pt.test(d))return this.each(function(n){var i=c.eq(n);g&&(e[0]=d.call(this,n,i.html())),i.domManip(e,t)});if(l&&(n=Z.buildFragment(e,this[0].ownerDocument,!1,this),i=n.firstChild,1===n.childNodes.length&&(n=i),i)){for(r=Z.map(m(n,"script"),p),o=r.length;l>u;u++)a=n,u!==f&&(a=Z.clone(a,!0,!0),o&&Z.merge(r,m(a,"script"))),t.call(this[u],a,u);if(o)for(s=r[r.length-1].ownerDocument,Z.map(r,h),u=0;o>u;u++)a=r[u],Ht.test(a.type||"")&&!mt.access(a,"globalEval")&&Z.contains(s,a)&&(a.src?Z._evalUrl&&Z._evalUrl(a.src):Z.globalEval(a.textContent.replace($t,"")))}return this}}),Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Z.fn[e]=function(e){for(var n,i=[],r=Z(e),o=r.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),Z(r[a])[t](n),X.apply(i,n.get());return this.pushStack(i)}});var Ft,Rt={},_t=/^margin/,Wt=new RegExp("^("+wt+")(?!px)[a-z%]+$","i"),Bt=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",a.innerHTML="",r.appendChild(o);var t=e.getComputedStyle(a,null);n="1%"!==t.top,i="4px"===t.width,r.removeChild(o)}var n,i,r=Q.documentElement,o=Q.createElement("div"),a=Q.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",G.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(a),e.getComputedStyle&&Z.extend(G,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},reliableMarginRight:function(){var t,n=a.appendChild(Q.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",r.appendChild(o),t=!parseFloat(e.getComputedStyle(n,null).marginRight),r.removeChild(o),t}}))}(),Z.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var zt=/^(none|table(?!-c[ea]).+)/,Xt=new RegExp("^("+wt+")(.*)$","i"),Ut=new RegExp("^([+-])=("+wt+")","i"),Vt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:"0",fontWeight:"400"},Yt=["Webkit","O","Moz","ms"];Z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=w(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=Z.camelCase(t),u=e.style;return t=Z.cssProps[s]||(Z.cssProps[s]=k(u,s)),a=Z.cssHooks[t]||Z.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:u[t]:(o=typeof n,"string"===o&&(r=Ut.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(Z.css(e,t)),o="number"),void(null!=n&&n===n&&("number"!==o||Z.cssNumber[s]||(n+="px"),G.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(u[t]=n))))}},css:function(e,t,n,i){var r,o,a,s=Z.camelCase(t);return t=Z.cssProps[s]||(Z.cssProps[s]=k(e.style,s)),a=Z.cssHooks[t]||Z.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=w(e,t,i)),"normal"===r&&t in Kt&&(r=Kt[t]),""===n||n?(o=parseFloat(r),n===!0||Z.isNumeric(o)?o||0:r):r}}),Z.each(["height","width"],function(e,t){Z.cssHooks[t]={get:function(e,n,i){return n?zt.test(Z.css(e,"display"))&&0===e.offsetWidth?Z.swap(e,Vt,function(){return N(e,t,i)}):N(e,t,i):void 0},set:function(e,n,i){var r=i&&Bt(e);return C(e,n,i?S(e,t,i,"border-box"===Z.css(e,"boxSizing",!1,r),r):0)}}}),Z.cssHooks.marginRight=T(G.reliableMarginRight,function(e,t){return t?Z.swap(e,{display:"inline-block"},w,[e,"marginRight"]):void 0}),Z.each({margin:"",padding:"",border:"Width"},function(e,t){Z.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Tt[i]+t]=o[i]||o[i-2]||o[0];return r}},_t.test(e)||(Z.cssHooks[e+t].set=C)}),Z.fn.extend({css:function(e,t){return vt(this,function(e,t,n){var i,r,o={},a=0;if(Z.isArray(t)){for(i=Bt(e),r=t.length;r>a;a++)o[t[a]]=Z.css(e,t[a],!1,i);return o}return void 0!==n?Z.style(e,t,n):Z.css(e,t)},e,t,arguments.length>1)},show:function(){return E(this,!0)},hide:function(){return E(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){kt(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=A,A.prototype={constructor:A,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var e=A.propHooks[this.prop];return e&&e.get?e.get(this):A.propHooks._default.get(this)},run:function(e){var t,n=A.propHooks[this.prop];return this.pos=t=this.options.duration?Z.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):A.propHooks._default.set(this),this}},A.prototype.init.prototype=A.prototype,A.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},A.propHooks.scrollTop=A.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.fx=A.prototype.init,Z.fx.step={};var Gt,Qt,Jt=/^(?:toggle|show|hide)$/,Zt=new RegExp("^(?:([+-])=|)("+wt+")([a-z%]*)$","i"),en=/queueHooks$/,tn=[q],nn={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=Zt.exec(t),o=r&&r[3]||(Z.cssNumber[e]?"":"px"),a=(Z.cssNumber[e]||"px"!==o&&+i)&&Zt.exec(Z.css(n.elem,e)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||".5",a/=s,Z.style(n.elem,e,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--u)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};Z.Animation=Z.extend(P,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],nn[n]=nn[n]||[],nn[n].unshift(t)
},prefilter:function(e,t){t?tn.unshift(e):tn.push(e)}}),Z.speed=function(e,t,n){var i=e&&"object"==typeof e?Z.extend({},e):{complete:n||!n&&t||Z.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Z.isFunction(t)&&t};return i.duration=Z.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in Z.fx.speeds?Z.fx.speeds[i.duration]:Z.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){Z.isFunction(i.old)&&i.old.call(this),i.queue&&Z.dequeue(this,i.queue)},i},Z.fn.extend({fadeTo:function(e,t,n,i){return this.filter(kt).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=Z.isEmptyObject(e),o=Z.speed(t,n,i),a=function(){var t=P(this,Z.extend({},e),o);(r||mt.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=Z.timers,a=mt.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&en.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&Z.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=mt.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=Z.timers,a=i?i.length:0;for(n.finish=!0,Z.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),Z.each(["toggle","show","hide"],function(e,t){var n=Z.fn[t];Z.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(j(t,!0),e,i,r)}}),Z.each({slideDown:j("show"),slideUp:j("hide"),slideToggle:j("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Z.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),Z.timers=[],Z.fx.tick=function(){var e,t=0,n=Z.timers;for(Gt=Z.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Z.fx.stop(),Gt=void 0},Z.fx.timer=function(e){Z.timers.push(e),e()?Z.fx.start():Z.timers.pop()},Z.fx.interval=13,Z.fx.start=function(){Qt||(Qt=setInterval(Z.fx.tick,Z.fx.interval))},Z.fx.stop=function(){clearInterval(Qt),Qt=null},Z.fx.speeds={slow:600,fast:200,_default:400},Z.fn.delay=function(e,t){return e=Z.fx?Z.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e=Q.createElement("input"),t=Q.createElement("select"),n=t.appendChild(Q.createElement("option"));e.type="checkbox",G.checkOn=""!==e.value,G.optSelected=n.selected,t.disabled=!0,G.optDisabled=!n.disabled,e=Q.createElement("input"),e.value="t",e.type="radio",G.radioValue="t"===e.value}();var rn,on,an=Z.expr.attrHandle;Z.fn.extend({attr:function(e,t){return vt(this,Z.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})}}),Z.extend({attr:function(e,t,n){var i,r,o=e.nodeType;return e&&3!==o&&8!==o&&2!==o?typeof e.getAttribute===St?Z.prop(e,t,n):(1===o&&Z.isXMLDoc(e)||(t=t.toLowerCase(),i=Z.attrHooks[t]||(Z.expr.match.bool.test(t)?on:rn)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Z.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void Z.removeAttr(e,t)):void 0},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(pt);if(o&&1===e.nodeType)for(;n=o[r++];)i=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!G.radioValue&&"radio"===t&&Z.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),on={set:function(e,t,n){return t===!1?Z.removeAttr(e,n):e.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(e,t){var n=an[t]||Z.find.attr;an[t]=function(e,t,i){var r,o;return i||(o=an[t],an[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,an[t]=o),r}});var sn=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(e,t){return vt(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Z.propFix[e]||e]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,r,o,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?(o=1!==a||!Z.isXMLDoc(e),o&&(t=Z.propFix[t]||t,r=Z.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]):void 0},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||sn.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),G.optSelected||(Z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var un=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(e){var t,n,i,r,o,a,s="string"==typeof e&&e,u=0,l=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(pt)||[];l>u;u++)if(n=this[u],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(un," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=Z.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0===arguments.length||"string"==typeof e&&e,u=0,l=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(pt)||[];l>u;u++)if(n=this[u],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(un," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=e?Z.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(Z.isFunction(e)?function(n){Z(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,i=0,r=Z(this),o=e.match(pt)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===St||"boolean"===n)&&(this.className&&mt.set(this,"__className__",this.className),this.className=this.className||e===!1?"":mt.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(un," ").indexOf(t)>=0)return!0;return!1}});var ln=/\r/g;Z.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=Z.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,Z(this).val()):e,null==r?r="":"number"==typeof r?r+="":Z.isArray(r)&&(r=Z.map(r,function(e){return null==e?"":e+""})),t=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=Z.valHooks[r.type]||Z.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(ln,""):null==n?"":n)):void 0}}),Z.extend({valHooks:{option:{get:function(e){var t=Z.find.attr(e,"value");return null!=t?t:Z.trim(Z.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,u=0>r?s:o?r:0;s>u;u++)if(n=i[u],!(!n.selected&&u!==r||(G.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&Z.nodeName(n.parentNode,"optgroup"))){if(t=Z(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=Z.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=Z.inArray(i.value,o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(e,t){return Z.isArray(t)?e.checked=Z.inArray(Z(e).val(),t)>=0:void 0}},G.checkOn||(Z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Z.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Z.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Z.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var cn=Z.now(),fn=/\?/;Z.parseJSON=function(e){return JSON.parse(e+"")},Z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(i){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+e),t};var dn,pn,hn=/#.*$/,gn=/([?&])_=[^&]*/,vn=/^(.*?):[ \t]*([^\r\n]*)$/gm,mn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,yn=/^(?:GET|HEAD)$/,bn=/^\/\//,xn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,wn={},Tn={},kn="*/".concat("*");try{pn=location.href}catch(Cn){pn=Q.createElement("a"),pn.href="",pn=pn.href}dn=xn.exec(pn.toLowerCase())||[],Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pn,type:"GET",isLocal:mn.test(dn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":kn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$($(e,Z.ajaxSettings),t):$(Z.ajaxSettings,e)},ajaxPrefilter:H(wn),ajaxTransport:H(Tn),ajax:function(e,t){function n(e,t,n,a){var u,c,m,y,x,T=t;2!==b&&(b=2,s&&clearTimeout(s),i=void 0,o=a||"",w.readyState=e>0?4:0,u=e>=200&&300>e||304===e,n&&(y=I(f,w,n)),y=F(f,y,w,u),u?(f.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(Z.lastModified[r]=x),x=w.getResponseHeader("etag"),x&&(Z.etag[r]=x)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=y.state,c=y.data,m=y.error,u=!m)):(m=T,(e||!T)&&(T="error",0>e&&(e=0))),w.status=e,w.statusText=(t||T)+"",u?h.resolveWith(d,[c,T,w]):h.rejectWith(d,[w,T,m]),w.statusCode(v),v=void 0,l&&p.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?c:m]),g.fireWith(d,[w,T]),l&&(p.trigger("ajaxComplete",[w,f]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,u,l,c,f=Z.ajaxSetup({},t),d=f.context||f,p=f.context&&(d.nodeType||d.jquery)?Z(d):Z.event,h=Z.Deferred(),g=Z.Callbacks("once memory"),v=f.statusCode||{},m={},y={},b=0,x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=vn.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)v[t]=[v[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||x;return i&&i.abort(t),n(0,t),this}};if(h.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||pn)+"").replace(hn,"").replace(bn,dn[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=Z.trim(f.dataType||"*").toLowerCase().match(pt)||[""],null==f.crossDomain&&(u=xn.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===dn[1]&&u[2]===dn[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(dn[3]||("http:"===dn[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=Z.param(f.data,f.traditional)),M(wn,f,t,w),2===b)return w;l=f.global,l&&0===Z.active++&&Z.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!yn.test(f.type),r=f.url,f.hasContent||(f.data&&(r=f.url+=(fn.test(r)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=gn.test(r)?r.replace(gn,"$1_="+cn++):r+(fn.test(r)?"&":"?")+"_="+cn++)),f.ifModified&&(Z.lastModified[r]&&w.setRequestHeader("If-Modified-Since",Z.lastModified[r]),Z.etag[r]&&w.setRequestHeader("If-None-Match",Z.etag[r])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+kn+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)w.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(f.beforeSend.call(d,w,f)===!1||2===b))return w.abort();x="abort";for(c in{success:1,error:1,complete:1})w[c](f[c]);if(i=M(Tn,f,t,w)){w.readyState=1,l&&p.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},f.timeout));try{b=1,i.send(m,n)}catch(T){if(!(2>b))throw T;n(-1,T)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return Z.get(e,t,n,"json")},getScript:function(e,t){return Z.get(e,void 0,t,"script")}}),Z.each(["get","post"],function(e,t){Z[t]=function(e,n,i,r){return Z.isFunction(n)&&(r=r||i,i=n,n=void 0),Z.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),Z.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Z.fn[t]=function(e){return this.on(t,e)}}),Z._evalUrl=function(e){return Z.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Z.fn.extend({wrapAll:function(e){var t;return Z.isFunction(e)?this.each(function(t){Z(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Z(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(Z.isFunction(e)?function(t){Z(this).wrapInner(e.call(this,t))}:function(){var t=Z(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Z.isFunction(e);return this.each(function(n){Z(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()}}),Z.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Z.expr.filters.visible=function(e){return!Z.expr.filters.hidden(e)};var Sn=/%20/g,Nn=/\[\]$/,En=/\r?\n/g,An=/^(?:submit|button|image|reset|file)$/i,Dn=/^(?:input|select|textarea|keygen)/i;Z.param=function(e,t){var n,i=[],r=function(e,t){t=Z.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(e)||e.jquery&&!Z.isPlainObject(e))Z.each(e,function(){r(this.name,this.value)});else for(n in e)R(n,e[n],t,r);return i.join("&").replace(Sn,"+")},Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Z.prop(this,"elements");return e?Z.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Z(this).is(":disabled")&&Dn.test(this.nodeName)&&!An.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=Z(this).val();return null==n?null:Z.isArray(n)?Z.map(n,function(e){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),Z.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var jn=0,Ln={},qn={0:200,1223:204},On=Z.ajaxSettings.xhr();e.ActiveXObject&&Z(e).on("unload",function(){for(var e in Ln)Ln[e]()}),G.cors=!!On&&"withCredentials"in On,G.ajax=On=!!On,Z.ajaxTransport(function(e){var t;return G.cors||On&&!e.crossDomain?{send:function(n,i){var r,o=e.xhr(),a=++jn;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)o.setRequestHeader(r,n[r]);t=function(e){return function(){t&&(delete Ln[a],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?i(o.status,o.statusText):i(qn[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=Ln[a]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Z.globalEval(e),e}}}),Z.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Z.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=Z("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),Q.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Pn=[],Hn=/(=)\?(?=&|$)|\?\?/;Z.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Pn.pop()||Z.expando+"_"+cn++;return this[e]=!0,e}}),Z.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=t.jsonp!==!1&&(Hn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(r=t.jsonpCallback=Z.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Hn,"$1"+r):t.jsonp!==!1&&(t.url+=(fn.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||Z.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Pn.push(r)),a&&Z.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),Z.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Q;var i=at.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=Z.buildFragment([e],t,r),r&&r.length&&Z(r).remove(),Z.merge([],i.childNodes))};var Mn=Z.fn.load;Z.fn.load=function(e,t,n){if("string"!=typeof e&&Mn)return Mn.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return s>=0&&(i=Z.trim(e.slice(s)),e=e.slice(0,s)),Z.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&Z.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?Z("<div>").append(Z.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},Z.expr.filters.animated=function(e){return Z.grep(Z.timers,function(t){return e===t.elem}).length};var $n=e.document.documentElement;Z.offset={setOffset:function(e,t,n){var i,r,o,a,s,u,l,c=Z.css(e,"position"),f=Z(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=Z.css(e,"top"),u=Z.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(i=f.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(u)||0),Z.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+r),"using"in t?t.using.call(e,d):f.css(d)}},Z.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Z.offset.setOffset(this,e,t)});var t,n,i=this[0],r={top:0,left:0},o=i&&i.ownerDocument;return o?(t=o.documentElement,Z.contains(t,i)?(typeof i.getBoundingClientRect!==St&&(r=i.getBoundingClientRect()),n=_(o),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r):void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===Z.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Z.nodeName(e[0],"html")||(i=e.offset()),i.top+=Z.css(e[0],"borderTopWidth",!0),i.left+=Z.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-Z.css(n,"marginTop",!0),left:t.left-i.left-Z.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||$n;e&&!Z.nodeName(e,"html")&&"static"===Z.css(e,"position");)e=e.offsetParent;return e||$n})}}),Z.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var i="pageYOffset"===n;Z.fn[t]=function(r){return vt(this,function(t,r,o){var a=_(t);return void 0===o?a?a[n]:t[r]:void(a?a.scrollTo(i?e.pageXOffset:o,i?o:e.pageYOffset):t[r]=o)},t,r,arguments.length,null)}}),Z.each(["top","left"],function(e,t){Z.cssHooks[t]=T(G.pixelPosition,function(e,n){return n?(n=w(e,t),Wt.test(n)?Z(e).position()[t]+"px":n):void 0})}),Z.each({Height:"height",Width:"width"},function(e,t){Z.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){Z.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return vt(this,function(t,n,i){var r;return Z.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?Z.css(t,n,a):Z.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),Z.fn.size=function(){return this.length},Z.fn.andSelf=Z.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return Z});var In=e.jQuery,Fn=e.$;return Z.noConflict=function(t){return e.$===Z&&(e.$=Fn),t&&e.jQuery===Z&&(e.jQuery=In),Z},typeof t===St&&(e.jQuery=e.$=Z),Z}),!function(e){"use strict";function t(e,t){var n=(65535&e)+(65535&t),i=(e>>16)+(t>>16)+(n>>16);return i<<16|65535&n}function n(e,t){return e<<t|e>>>32-t}function i(e,i,r,o,a,s){return t(n(t(t(i,e),t(o,s)),a),r)}function r(e,t,n,r,o,a,s){return i(t&n|~t&r,e,t,o,a,s)}function o(e,t,n,r,o,a,s){return i(t&r|n&~r,e,t,o,a,s)}function a(e,t,n,r,o,a,s){return i(t^n^r,e,t,o,a,s)}function s(e,t,n,r,o,a,s){return i(n^(t|~r),e,t,o,a,s)}function u(e,n){e[n>>5]|=128<<n%32,e[(n+64>>>9<<4)+14]=n;var i,u,l,c,f,d=1732584193,p=-271733879,h=-1732584194,g=271733878;for(i=0;i<e.length;i+=16)u=d,l=p,c=h,f=g,d=r(d,p,h,g,e[i],7,-680876936),g=r(g,d,p,h,e[i+1],12,-389564586),h=r(h,g,d,p,e[i+2],17,606105819),p=r(p,h,g,d,e[i+3],22,-1044525330),d=r(d,p,h,g,e[i+4],7,-176418897),g=r(g,d,p,h,e[i+5],12,1200080426),h=r(h,g,d,p,e[i+6],17,-1473231341),p=r(p,h,g,d,e[i+7],22,-45705983),d=r(d,p,h,g,e[i+8],7,1770035416),g=r(g,d,p,h,e[i+9],12,-1958414417),h=r(h,g,d,p,e[i+10],17,-42063),p=r(p,h,g,d,e[i+11],22,-1990404162),d=r(d,p,h,g,e[i+12],7,1804603682),g=r(g,d,p,h,e[i+13],12,-40341101),h=r(h,g,d,p,e[i+14],17,-1502002290),p=r(p,h,g,d,e[i+15],22,1236535329),d=o(d,p,h,g,e[i+1],5,-165796510),g=o(g,d,p,h,e[i+6],9,-1069501632),h=o(h,g,d,p,e[i+11],14,643717713),p=o(p,h,g,d,e[i],20,-373897302),d=o(d,p,h,g,e[i+5],5,-701558691),g=o(g,d,p,h,e[i+10],9,38016083),h=o(h,g,d,p,e[i+15],14,-660478335),p=o(p,h,g,d,e[i+4],20,-405537848),d=o(d,p,h,g,e[i+9],5,568446438),g=o(g,d,p,h,e[i+14],9,-1019803690),h=o(h,g,d,p,e[i+3],14,-187363961),p=o(p,h,g,d,e[i+8],20,1163531501),d=o(d,p,h,g,e[i+13],5,-1444681467),g=o(g,d,p,h,e[i+2],9,-51403784),h=o(h,g,d,p,e[i+7],14,1735328473),p=o(p,h,g,d,e[i+12],20,-1926607734),d=a(d,p,h,g,e[i+5],4,-378558),g=a(g,d,p,h,e[i+8],11,-2022574463),h=a(h,g,d,p,e[i+11],16,1839030562),p=a(p,h,g,d,e[i+14],23,-35309556),d=a(d,p,h,g,e[i+1],4,-1530992060),g=a(g,d,p,h,e[i+4],11,1272893353),h=a(h,g,d,p,e[i+7],16,-155497632),p=a(p,h,g,d,e[i+10],23,-1094730640),d=a(d,p,h,g,e[i+13],4,681279174),g=a(g,d,p,h,e[i],11,-358537222),h=a(h,g,d,p,e[i+3],16,-722521979),p=a(p,h,g,d,e[i+6],23,76029189),d=a(d,p,h,g,e[i+9],4,-640364487),g=a(g,d,p,h,e[i+12],11,-421815835),h=a(h,g,d,p,e[i+15],16,530742520),p=a(p,h,g,d,e[i+2],23,-995338651),d=s(d,p,h,g,e[i],6,-198630844),g=s(g,d,p,h,e[i+7],10,1126891415),h=s(h,g,d,p,e[i+14],15,-1416354905),p=s(p,h,g,d,e[i+5],21,-57434055),d=s(d,p,h,g,e[i+12],6,1700485571),g=s(g,d,p,h,e[i+3],10,-1894986606),h=s(h,g,d,p,e[i+10],15,-1051523),p=s(p,h,g,d,e[i+1],21,-2054922799),d=s(d,p,h,g,e[i+8],6,1873313359),g=s(g,d,p,h,e[i+15],10,-30611744),h=s(h,g,d,p,e[i+6],15,-1560198380),p=s(p,h,g,d,e[i+13],21,1309151649),d=s(d,p,h,g,e[i+4],6,-145523070),g=s(g,d,p,h,e[i+11],10,-1120210379),h=s(h,g,d,p,e[i+2],15,718787259),p=s(p,h,g,d,e[i+9],21,-343485551),d=t(d,u),p=t(p,l),h=t(h,c),g=t(g,f);return[d,p,h,g]}function l(e){var t,n="";for(t=0;t<32*e.length;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function c(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;for(t=0;t<8*e.length;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function f(e){return l(u(c(e),8*e.length))}function d(e,t){var n,i,r=c(e),o=[],a=[];for(o[15]=a[15]=void 0,r.length>16&&(r=u(r,8*e.length)),n=0;16>n;n+=1)o[n]=909522486^r[n],a[n]=1549556828^r[n];return i=u(o.concat(c(t)),512+8*t.length),l(u(a.concat(i),640))}function p(e){var t,n,i="0123456789abcdef",r="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),r+=i.charAt(t>>>4&15)+i.charAt(15&t);return r}function h(e){return unescape(encodeURIComponent(e))}function g(e){return f(h(e))}function v(e){return p(g(e))}function m(e,t){return d(h(e),h(t))}function y(e,t){return p(m(e,t))}function b(e,t,n){return t?n?m(t,e):y(t,e):n?g(e):v(e)}"function"==typeof define&&define.amd?define(function(){return b}):e.md5=b}(this),function(e,t,n){function i(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function r(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return v[e.which]?v[e.which]:m[e.which]?m[e.which]:String.fromCharCode(e.which).toLowerCase()}function o(e){e=e||{};var t,n=!1;for(t in T)e[t]?n=!0:T[t]=0;n||(S=!1)}function a(e,t,n,i,r,o){var a,s,u=[],l=n.type;if(!x[e])return[];for("keyup"==l&&c(e)&&(t=[e]),a=0;a<x[e].length;++a)if(s=x[e][a],!(!i&&s.seq&&T[s.seq]!=s.level||l!=s.action||("keypress"!=l||n.metaKey||n.ctrlKey)&&t.sort().join(",")!==s.modifiers.sort().join(","))){var f=i&&s.seq==i&&s.level==o;(!i&&s.combo==r||f)&&x[e].splice(a,1),u.push(s)}return u}function s(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function u(e,t,n,i){N.stopCallback(t,t.target||t.srcElement,n,i)||!1!==e(t,n)||(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)}function l(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=r(e);t&&("keyup"==e.type&&k===t?k=!1:N.handleKey(t,s(e),e))}function c(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function f(e,t,n,i){function a(t){return function(){S=t,++T[e],clearTimeout(g),g=setTimeout(o,1e3)}}function s(t){u(n,t,e),"keyup"!==i&&(k=r(t)),setTimeout(o,10)}for(var l=T[e]=0;l<t.length;++l){var c=l+1===t.length?s:a(i||d(t[l+1]).action);p(t[l],c,i,e,l)}}function d(e,t){var n,i,r,o=[];for(n="+"===e?["+"]:e.split("+"),r=0;r<n.length;++r)i=n[r],b[i]&&(i=b[i]),t&&"keypress"!=t&&y[i]&&(i=y[i],o.push("shift")),c(i)&&o.push(i);if(n=i,r=t,!r){if(!h){h={};for(var a in v)a>95&&112>a||v.hasOwnProperty(a)&&(h[v[a]]=a)}r=h[n]?"keydown":"keypress"}return"keypress"==r&&o.length&&(r="keydown"),{key:i,modifiers:o,action:r}}function p(e,t,n,i,r){w[e+":"+n]=t,e=e.replace(/\s+/g," ");var o=e.split(" ");1<o.length?f(e,o,t,n):(n=d(e,n),x[n.key]=x[n.key]||[],a(n.key,n.modifiers,{type:n.action},i,e,r),x[n.key][i?"unshift":"push"]({callback:t,modifiers:n.modifiers,action:n.action,seq:i,level:r,combo:e}))}var h,g,v={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},m={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},y={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},b={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},x={},w={},T={},k=!1,C=!1,S=!1;for(n=1;20>n;++n)v[111+n]="f"+n;for(n=0;9>=n;++n)v[n+96]=n;i(t,"keypress",l),i(t,"keydown",l),i(t,"keyup",l);var N={bind:function(e,t,n){e=e instanceof Array?e:[e];for(var i=0;i<e.length;++i)p(e[i],t,n);return this},unbind:function(e,t){return N.bind(e,function(){},t)},trigger:function(e,t){return w[e+":"+t]&&w[e+":"+t]({},e),this},reset:function(){return x={},w={},this},stopCallback:function(e,t){return-1<(" "+t.className+" ").indexOf(" mousetrap ")?!1:"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},handleKey:function(e,t,n){var i,r=a(e,t,n);t={};var s=0,l=!1;for(i=0;i<r.length;++i)r[i].seq&&(s=Math.max(s,r[i].level));for(i=0;i<r.length;++i)r[i].seq?r[i].level==s&&(l=!0,t[r[i].seq]=1,u(r[i].callback,n,r[i].combo,r[i].seq)):l||u(r[i].callback,n,r[i].combo);r="keypress"==n.type&&C,n.type!=S||c(e)||r||o(t),C=l&&"keydown"==n.type}};e.Mousetrap=N,"function"==typeof define&&define.amd&&define(N)}(window,document),Mousetrap=function(e){var t={},n=e.stopCallback;return e.stopCallback=function(e,i,r){return t[r]?!1:n(e,i,r)},e.bindGlobal=function(n,i,r){if(e.bind(n,i,r),n instanceof Array)for(i=0;i<n.length;i++)t[n[i]]=!0;else t[n]=!0},e}(Mousetrap),function(e){function t(e,t){return"function"==typeof e?e.call(t):e}function n(t,n){this.$element=e(t),this.options=n,this.enabled=!0,this.fixTitle()}n.prototype={show:function(){var n=this.getTitle();if(n&&this.enabled){var i=this.tip();i.find(".tipsy-inner")[this.options.html?"html":"text"](n),i[0].className="tipsy",i.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var r,o=e.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),a=i[0].offsetWidth,s=i[0].offsetHeight,u=t(this.options.gravity,this.$element[0]);switch(u.charAt(0)){case"n":r={top:o.top+o.height+this.options.offset,left:o.left+o.width/2-a/2};break;case"s":r={top:o.top-s-this.options.offset,left:o.left+o.width/2-a/2};break;case"e":r={top:o.top+o.height/2-s/2,left:o.left-a-this.options.offset};break;case"w":r={top:o.top+o.height/2-s/2,left:o.left+o.width+this.options.offset}}2==u.length&&(r.left="w"==u.charAt(1)?o.left+o.width/2-15:o.left+o.width/2-a+15),i.css(r).addClass("tipsy-"+u),i.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+u.charAt(0),this.options.className&&i.addClass(t(this.options.className,this.$element[0])),this.options.fade?i.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):i.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){e(this).remove()}):this.tip().remove()},fixTitle:function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("original-title"))&&e.attr("original-title",e.attr("title")||"").removeAttr("title")},getTitle:function(){var e,t=this.$element,n=this.options;this.fixTitle();var e,n=this.options;return"string"==typeof n.title?e=t.attr("title"==n.title?"original-title":n.title):"function"==typeof n.title&&(e=n.title.call(t[0])),e=(""+e).replace(/(^\s*|\s*$)/,""),e||n.fallback},tip:function(){return this.$tip||(this.$tip=e('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')),this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}},e.fn.tipsy=function(t){function i(i){var r=e.data(i,"tipsy");return r||(r=new n(i,e.fn.tipsy.elementOptions(i,t)),e.data(i,"tipsy",r)),r
}function r(){var e=i(this);e.hoverState="in",0==t.delayIn?e.show():(e.fixTitle(),setTimeout(function(){"in"==e.hoverState&&e.show()},t.delayIn))}function o(){var e=i(this);e.hoverState="out",0==t.delayOut?e.hide():setTimeout(function(){"out"==e.hoverState&&e.hide()},t.delayOut)}if(t===!0)return this.data("tipsy");if("string"==typeof t){var a=this.data("tipsy");return a&&a[t](),this}if(t=e.extend({},e.fn.tipsy.defaults,t),t.live||this.each(function(){i(this)}),"manual"!=t.trigger){var s=t.live?"live":"bind",u="hover"==t.trigger?"mouseenter":"focus",l="hover"==t.trigger?"mouseleave":"blur";this[s](u,r)[s](l,o)}return this},e.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:.8,title:"title",trigger:"hover"},e.fn.tipsy.elementOptions=function(t,n){return e.metadata?e.extend({},n,e(t).metadata()):n},e.fn.tipsy.autoNS=function(){return e(this).offset().top>e(document).scrollTop()+e(window).height()/2?"s":"n"},e.fn.tipsy.autoWE=function(){return e(this).offset().left>e(document).scrollLeft()+e(window).width()/2?"e":"w"},e.fn.tipsy.autoBounds=function(t,n){return function(){var i={ns:n[0],ew:n.length>1?n[1]:!1},r=e(document).scrollTop()+t,o=e(document).scrollLeft()+t,a=e(this);return a.offset().top<r&&(i.ns="n"),a.offset().left<o&&(i.ew="w"),e(window).width()+e(document).scrollLeft()-a.offset().left<t&&(i.ew="e"),e(window).height()+e(document).scrollTop()-a.offset().top<t&&(i.ns="s"),i.ns+(i.ew?i.ew:"")}}}(jQuery);var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version",this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(e){for(var t=0;t<e.length;t++){var n=e[t].string,i=e[t].prop;if(this.versionSearchString=e[t].versionSearch||e[t].identity,n){if(-1!=n.indexOf(e[t].subString))return e[t].identity}else if(i)return e[t].identity}},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(-1!=t)return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init(),function(e){e.fn.retina=function(t){var n={"retina-background":!1,"retina-suffix":"@2x"};t&&e.extend(n,t);var i=function(e,t){var n=new Image;n.onload=function(){t(n)},n.src=e};window.devicePixelRatio>1&&this.each(function(){var t=e(this);if("img"==this.tagName.toLowerCase()&&t.attr("src")){var r=t.attr("src").replace(/\.(?!.*\.)/,n["retina-suffix"]+".");i(r,function(n){t.attr("src",n.src);var i=e("<div>").append(t.clone()).remove().html();/(width|height)=["']\d+["']/.test(i)||t.attr("width",n.width/2)})}if(n["retina-background"]){var o=t.css("background-image");if(/^url\(.*\)$/.test(o)){var r=o.substring(4,o.length-1).replace(/\.(?!.*\.)/,n["retina-suffix"]+".");i(r,function(e){t.css("background-image","url("+e.src+")"),"auto auto"==t.css("background-size")&&t.css("background-size",e.width/2+"px auto")})}}})}}(jQuery),build={divider:function(e){return"<div class='divider fadeIn'><h1>"+e+"</h1></div>"},editIcon:function(e){return"<div id='"+e+"' class='edit'><a class='icon-pencil'></a></div>"},multiselect:function(e,t){return"<div id='multiselect' style='top: "+e+"px; left: "+t+"px;'></div>"},album:function(e){if(!e)return"";var t="",n="",i=e.title,r="";return i.length>18&&(i=e.title.substr(0,18)+"...",n=e.title),"svg"===e.thumb0.split(".").pop()&&(r="nonretina"),t+="<div class='album' data-id='"+e.id+"' data-password='"+e.password+"'>",t+="<img src='"+e.thumb2+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb1+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb0+"' width='200' height='200' alt='thumb' data-type='"+r+"'>",t+="<div class='overlay'>",t+=e.password&&!lychee.publicMode?"<h1><span class='icon-lock'></span> "+i+"</h1>":"<h1 title='"+n+"'>"+i+"</h1>",t+="<a>"+e.sysdate+"</a>",t+="</div>",lychee.publicMode||(1==e.star&&(t+="<a class='badge red icon-star'></a>"),1==e.public&&(t+="<a class='badge red icon-share'></a>"),1==e.unsorted&&(t+="<a class='badge red icon-reorder'></a>"),1==e.recent&&(t+="<a class='badge red icon-time'></a>")),t+="</div>"},photo:function(e){if(!e)return"";var t="",n="",i=e.title;return i.length>18&&(i=e.title.substr(0,18)+"...",n=e.title),t+="<div class='photo' data-album-id='"+e.album+"' data-id='"+e.id+"'>",t+="<img src='"+e.thumbUrl+"' width='200' height='200' alt='thumb'>",t+="<div class='overlay'>",t+="<h1 title='"+n+"'>"+i+"</h1>",t+=1==e.cameraDate?"<a><span class='icon-camera' title='Photo Date'></span>"+e.sysdate+"</a>":"<a>"+e.sysdate+"</a>",t+="</div>",1==e.star&&(t+="<a class='badge red icon-star'></a>"),lychee.publicMode||1!=e.public||1==album.json.public||(t+="<a class='badge red icon-share'></a>"),t+="</div>"},imageview:function(e,t,n){if(!e)return"";var i="";return i+="<div class='arrow_wrapper previous'><a id='previous' class='icon-caret-left'></a></div>",i+="<div class='arrow_wrapper next'><a id='next' class='icon-caret-right'></a></div>",i+=t?n?"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2-20)+"px; margin-left: -"+e.width/2+"px;'></div>":"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2)+"px; margin-left: -"+e.width/2+"px;'></div>":n?"<div id='image' style='background-image: url("+e.url+")'></div>":"<div id='image' style='background-image: url("+e.url+");' class='full'></div>"},no_content:function(e){var t="";return t+="<div class='no_content fadeIn'>",t+="<a class='icon icon-"+e+"'></a>","search"===e?t+="<p>No results</p>":"picture"===e?t+="<p>No public albums</p>":"cog"===e&&(t+="<p>No Configuration!</p>"),t+="</div>"},modal:function(e,t,n,i,r){var o="",a="";return i&&(a="style='margin-top: "+i+"px;'"),o+="<div class='message_overlay fadeIn'>",o+="<div class='message center'"+a+">",o+="<h1>"+e+"</h1>",r!==!1&&(o+="<a class='close icon-remove-sign'></a>"),o+="<p>"+t+"</p>",$.each(n,function(e){""!==this[0]&&(o+=0===e?"<a class='button active'>"+this[0]+"</a>":"<a class='button'>"+this[0]+"</a>")}),o+="</div>",o+="</div>"},signInModal:function(){var e="";return e+="<div class='message_overlay'>",e+="<div class='message center'>",e+="<h1><a class='icon-lock'></a> Sign In</h1>",e+="<a class='close icon-remove-sign'></a>",e+="<div class='sign_in'>",e+="<input id='username' type='text' name='' value='' placeholder='username'>",e+="<input id='password' type='password' name='' value='' placeholder='password'>",e+="</div>",e+="<div id='version'>Version "+lychee.version+"<span> &#8211; <a target='_blank' href='"+lychee.updateURL+"'>Update available!</a><span></div>",e+="<a onclick='lychee.login()' class='button active'>Sign in</a>",e+="</div>",e+="</div>"},uploadModal:function(e,t){var n="";return n+="<div class='upload_overlay fadeIn'>",n+="<div class='upload_message center'>",n+="<a class='icon-"+e+"'></a>",n+=void 0!==t?"<p>"+t+"</p>":"<div class='progressbar'><div></div></div>",n+="</div>",n+="</div>"},contextMenu:function(e){var t="";return t+="<div class='contextmenu_bg'></div>",t+="<div class='contextmenu'>",t+="<table>",t+="<tbody>",$.each(e,function(n){t+="separator"===e[n][0]&&-1===e[n][1]?"<tr class='separator'></tr>":-1===e[n][1]?"<tr class='no_hover'><td>"+e[n][0]+"</td></tr>":void 0!=e[n][2]?"<tr><td onclick='"+e[n][2]+"; window.contextMenu.close();'>"+e[n][0]+"</td></tr>":"<tr><td onclick='window.contextMenu.fns["+e[n][1]+"](); window.contextMenu.close();'>"+e[n][0]+"</td></tr>"}),t+="</tbody>",t+="</table>",t+="</div>"},tags:function(e,t){var n="",i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_tags");return""!==e?(e=e.split(","),e.forEach(function(e,t){n+="<a class='tag'>"+e+"<span class='icon-remove' data-index='"+t+"'></span></a>"}),n+=i):n="<div class='empty'>No Tags"+i+"</div>",n},infoboxPhoto:function(e,t){if(!e)return"";var n,i,r,o,a="";switch(a+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",a+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;case"2":n="Public (Album)";break;default:n="-"}return i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title"),r=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description"),o=[["","Basics"],["Title",e.title+i],["Uploaded",e.sysdate],["Description",e.description+r],["","Image"],["Size",e.size],["Format",e.type],["Resolution",e.width+" x "+e.height],["Tags",build.tags(e.tags,t)]],e.takestamp+e.make+e.model+e.shutter+e.aperture+e.focal+e.iso!=="null"&&(o=o.concat([["","Camera"],["Captured",e.takedate],["Make",e.make],["Type/Model",e.model],["Shutter Speed",e.shutter],["Aperture",e.aperture],["Focal Length",e.focal],["ISO",e.iso]])),o=o.concat([["","Share"],["Visibility",n]]),$.each(o,function(e){switch((""===o[e][1]||void 0===o[e][1]||null===o[e][1])&&(o[e][1]="-"),o[e][0]){case"":a+="</table>",a+="<div class='separator'><h1>"+o[e][1]+"</h1></div>",a+="<table>";break;case"Tags":t===!0||lychee.publicMode||(a+="</table>",a+="<div class='separator'><h1>"+o[e][0]+"</h1></div>",a+="<div id='tags'>"+o[e][1]+"</div>");break;default:a+="<tr>",a+="<td>"+o[e][0]+"</td>",a+="<td class='attr_"+o[e][0].toLowerCase()+"'>"+o[e][1]+"</td>",a+="</tr>"}}),a+="</table>",a+="<div class='bumper'></div>",a+="</div>"},infoboxAlbum:function(e,t){if(!e)return"";var n,i,r,o,a,s="";switch(s+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",s+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;default:n="-"}switch(e.password){case!1:i="No";break;case!0:i="Yes";break;default:i="-"}return r=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title_album"),o=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description_album"),a=[["","Basics"],["Title",e.title+r],["Description",e.description+o],["","Album"],["Created",e.sysdate],["Images",e.num],["","Share"],["Visibility",n],["Password",i]],$.each(a,function(e){(""===a[e][1]||void 0===a[e][1]||null===a[e][1])&&(a[e][1]="-"),""===a[e][0]?(s+="</table>",s+="<div class='separator'><h1>"+a[e][1]+"</h1></div>",s+="<table id='infos'>"):(s+="<tr>",s+="<td>"+a[e][0]+"</td>",s+="<td class='attr_"+a[e][0].toLowerCase()+"'>"+a[e][1]+"</td>",s+="</tr>")}),s+="</table>",s+="<div class='bumper'></div>",s+="</div>"}};var header=$("header"),headerTitle=$("#title"),imageview=$("#imageview"),api_path="php/api.php",infobox=$("#infobox");$(document).ready(function(){event_name=mobileBrowser()?"touchend":"click",$(window).keydown(key),$(document).on(event_name,"#infobox .header a",function(){hideInfobox()}),$(document).on(event_name,"#infobox_overlay",function(){hideInfobox()}),$("#button_info").on(event_name,function(){showInfobox()}),$("#button_direct").on(event_name,function(){link=$("#imageview #image").css("background-image").replace(/"/g,"").replace(/url\(|\)$/gi,""),window.open(link,"_newtab")}),loadPhotoInfo(gup("p"))});
\ No newline at end of file
}function r(){var e=i(this);e.hoverState="in",0==t.delayIn?e.show():(e.fixTitle(),setTimeout(function(){"in"==e.hoverState&&e.show()},t.delayIn))}function o(){var e=i(this);e.hoverState="out",0==t.delayOut?e.hide():setTimeout(function(){"out"==e.hoverState&&e.hide()},t.delayOut)}if(t===!0)return this.data("tipsy");if("string"==typeof t){var a=this.data("tipsy");return a&&a[t](),this}if(t=e.extend({},e.fn.tipsy.defaults,t),t.live||this.each(function(){i(this)}),"manual"!=t.trigger){var s=t.live?"live":"bind",u="hover"==t.trigger?"mouseenter":"focus",l="hover"==t.trigger?"mouseleave":"blur";this[s](u,r)[s](l,o)}return this},e.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:.8,title:"title",trigger:"hover"},e.fn.tipsy.elementOptions=function(t,n){return e.metadata?e.extend({},n,e(t).metadata()):n},e.fn.tipsy.autoNS=function(){return e(this).offset().top>e(document).scrollTop()+e(window).height()/2?"s":"n"},e.fn.tipsy.autoWE=function(){return e(this).offset().left>e(document).scrollLeft()+e(window).width()/2?"e":"w"},e.fn.tipsy.autoBounds=function(t,n){return function(){var i={ns:n[0],ew:n.length>1?n[1]:!1},r=e(document).scrollTop()+t,o=e(document).scrollLeft()+t,a=e(this);return a.offset().top<r&&(i.ns="n"),a.offset().left<o&&(i.ew="w"),e(window).width()+e(document).scrollLeft()-a.offset().left<t&&(i.ew="e"),e(window).height()+e(document).scrollTop()-a.offset().top<t&&(i.ns="s"),i.ns+(i.ew?i.ew:"")}}}(jQuery);var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version",this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(e){for(var t=0;t<e.length;t++){var n=e[t].string,i=e[t].prop;if(this.versionSearchString=e[t].versionSearch||e[t].identity,n){if(-1!=n.indexOf(e[t].subString))return e[t].identity}else if(i)return e[t].identity}},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(-1!=t)return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init(),function(e){e.fn.retina=function(t){var n={"retina-background":!1,"retina-suffix":"@2x"};t&&e.extend(n,t);var i=function(e,t){var n=new Image;n.onload=function(){t(n)},n.src=e};window.devicePixelRatio>1&&this.each(function(){var t=e(this);if("img"==this.tagName.toLowerCase()&&t.attr("src")){var r=t.attr("src").replace(/\.(?!.*\.)/,n["retina-suffix"]+".");i(r,function(n){t.attr("src",n.src);var i=e("<div>").append(t.clone()).remove().html();/(width|height)=["']\d+["']/.test(i)||t.attr("width",n.width/2)})}if(n["retina-background"]){var o=t.css("background-image");if(/^url\(.*\)$/.test(o)){var r=o.substring(4,o.length-1).replace(/\.(?!.*\.)/,n["retina-suffix"]+".");i(r,function(e){t.css("background-image","url("+e.src+")"),"auto auto"==t.css("background-size")&&t.css("background-size",e.width/2+"px auto")})}}})}}(jQuery),build={divider:function(e){return"<div class='divider fadeIn'><h1>"+e+"</h1></div>"},editIcon:function(e){return"<div id='"+e+"' class='edit'><a class='icon-pencil'></a></div>"},multiselect:function(e,t){return"<div id='multiselect' style='top: "+e+"px; left: "+t+"px;'></div>"},album:function(e){if(!e)return"";var t="",n="",i=e.title,r="";return i.length>18&&(i=e.title.substr(0,18)+"...",n=e.title),"svg"===e.thumb0.split(".").pop()&&(r="nonretina"),t+="<div class='album' data-id='"+e.id+"' data-password='"+e.password+"'>",t+="<img src='"+e.thumb2+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb1+"' width='200' height='200' alt='thumb' data-type='nonretina'>",t+="<img src='"+e.thumb0+"' width='200' height='200' alt='thumb' data-type='"+r+"'>",t+="<div class='overlay'>",t+=e.password&&!lychee.publicMode?"<h1><span class='icon-lock'></span> "+i+"</h1>":"<h1 title='"+n+"'>"+i+"</h1>",t+="<a>"+e.sysdate+"</a>",t+="</div>",lychee.publicMode||(1==e.star&&(t+="<a class='badge red icon-star'></a>"),1==e.public&&(t+="<a class='badge red icon-share'></a>"),1==e.unsorted&&(t+="<a class='badge red icon-reorder'></a>"),1==e.recent&&(t+="<a class='badge red icon-time'></a>")),t+="</div>"},photo:function(e){if(!e)return"";var t="",n="",i=e.title;return i.length>18&&(i=e.title.substr(0,18)+"...",n=e.title),t+="<div class='photo' data-album-id='"+e.album+"' data-id='"+e.id+"'>",t+="<img src='"+e.thumbUrl+"' width='200' height='200' alt='thumb'>",t+="<div class='overlay'>",t+="<h1 title='"+n+"'>"+i+"</h1>",t+=1==e.cameraDate?"<a><span class='icon-camera' title='Photo Date'></span>"+e.sysdate+"</a>":"<a>"+e.sysdate+"</a>",t+="</div>",1==e.star&&(t+="<a class='badge red icon-star'></a>"),lychee.publicMode||1!=e.public||1==album.json.public||(t+="<a class='badge red icon-share'></a>"),t+="</div>"},imageview:function(e,t,n){if(!e)return"";var i="";return i+="<div class='arrow_wrapper previous'><a id='previous' class='icon-caret-left'></a></div>",i+="<div class='arrow_wrapper next'><a id='next' class='icon-caret-right'></a></div>",i+=t?n?"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2-20)+"px; margin-left: -"+e.width/2+"px;'></div>":"<div id='image' class='small' style='background-image: url("+e.url+"); width: "+e.width+"px; height: "+e.height+"px; margin-top: -"+parseInt(e.height/2)+"px; margin-left: -"+e.width/2+"px;'></div>":n?"<div id='image' style='background-image: url("+e.url+")'></div>":"<div id='image' style='background-image: url("+e.url+");' class='full'></div>"},no_content:function(e){var t="";return t+="<div class='no_content fadeIn'>",t+="<a class='icon icon-"+e+"'></a>","search"===e?t+="<p>No results</p>":"picture"===e?t+="<p>No public albums</p>":"cog"===e&&(t+="<p>No Configuration!</p>"),t+="</div>"},modal:function(e,t,n,i,r){var o="",a="";return i&&(a="style='margin-top: "+i+"px;'"),o+="<div class='message_overlay fadeIn'>",o+="<div class='message center'"+a+">",o+="<h1>"+e+"</h1>",r!==!1&&(o+="<a class='close icon-remove-sign'></a>"),o+="<p>"+t+"</p>",$.each(n,function(e){""!==this[0]&&(o+=0===e?"<a class='button active'>"+this[0]+"</a>":"<a class='button'>"+this[0]+"</a>")}),o+="</div>",o+="</div>"},signInModal:function(){var e="";return e+="<div class='message_overlay'>",e+="<div class='message center'>",e+="<h1><a class='icon-lock'></a> Sign In</h1>",e+="<a class='close icon-remove-sign'></a>",e+="<div class='sign_in'>",e+="<input id='username' type='text' name='' value='' placeholder='username'>",e+="<input id='password' type='password' name='' value='' placeholder='password'>",e+="</div>",e+="<div id='version'>Version "+lychee.version+"<span> &#8211; <a target='_blank' href='"+lychee.updateURL+"'>Update available!</a><span></div>",e+="<a onclick='lychee.login()' class='button active'>Sign in</a>",e+="</div>",e+="</div>"},uploadModal:function(e,t){var n="";return n+="<div class='upload_overlay fadeIn'>",n+="<div class='upload_message center'>",n+="<a class='icon-"+e+"'></a>",n+=void 0!==t?"<p>"+t+"</p>":"<div class='progressbar'><div></div></div>",n+="</div>",n+="</div>"},contextMenu:function(e){var t="";return t+="<div class='contextmenu_bg'></div>",t+="<div class='contextmenu'>",t+="<table>",t+="<tbody>",$.each(e,function(n){t+="separator"===e[n][0]&&-1===e[n][1]?"<tr class='separator'></tr>":-1===e[n][1]?"<tr class='no_hover'><td>"+e[n][0]+"</td></tr>":void 0!=e[n][2]?"<tr><td onclick='"+e[n][2]+"; window.contextMenu.close();'>"+e[n][0]+"</td></tr>":"<tr><td onclick='window.contextMenu.fns["+e[n][1]+"](); window.contextMenu.close();'>"+e[n][0]+"</td></tr>"}),t+="</tbody>",t+="</table>",t+="</div>"},tags:function(e,t){var n="",i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_tags");return""!==e?(e=e.split(","),e.forEach(function(e,t){n+="<a class='tag'>"+e+"<span class='icon-remove' data-index='"+t+"'></span></a>"}),n+=i):n="<div class='empty'>No Tags"+i+"</div>",n},infoboxPhoto:function(e,t){if(!e)return"";var n,i,r,o,a="";switch(a+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",a+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;case"2":n="Public (Album)";break;default:n="-"}return i=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title"),r=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description"),o=[["","Basics"],["Title",e.title+i],["Uploaded",e.sysdate],["Description",e.description+r],["","Image"],["Size",e.size],["Format",e.type],["Resolution",e.width+" x "+e.height],["Tags",build.tags(e.tags,t)]],e.takestamp+e.make+e.model+e.shutter+e.aperture+e.focal+e.iso!="0"&&(o=o.concat([["","Camera"],["Captured",e.takedate],["Make",e.make],["Type/Model",e.model],["Shutter Speed",e.shutter],["Aperture",e.aperture],["Focal Length",e.focal],["ISO",e.iso]])),o=o.concat([["","Share"],["Visibility",n]]),$.each(o,function(e){switch((""===o[e][1]||void 0===o[e][1]||null===o[e][1])&&(o[e][1]="-"),o[e][0]){case"":a+="</table>",a+="<div class='separator'><h1>"+o[e][1]+"</h1></div>",a+="<table>";break;case"Tags":t===!0||lychee.publicMode||(a+="</table>",a+="<div class='separator'><h1>"+o[e][0]+"</h1></div>",a+="<div id='tags'>"+o[e][1]+"</div>");break;default:a+="<tr>",a+="<td>"+o[e][0]+"</td>",a+="<td class='attr_"+o[e][0].toLowerCase()+"'>"+o[e][1]+"</td>",a+="</tr>"}}),a+="</table>",a+="<div class='bumper'></div>",a+="</div>"},infoboxAlbum:function(e,t){if(!e)return"";var n,i,r,o,a,s="";switch(s+="<div class='header'><h1>About</h1><a class='icon-remove-sign'></a></div>",s+="<div class='wrapper'>",e.public){case"0":n="Private";break;case"1":n="Public";break;default:n="-"}switch(e.password){case!1:i="No";break;case!0:i="Yes";break;default:i="-"}return r=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_title_album"),o=t===!0||lychee.publicMode?"":" "+build.editIcon("edit_description_album"),a=[["","Basics"],["Title",e.title+r],["Description",e.description+o],["","Album"],["Created",e.sysdate],["Images",e.num],["","Share"],["Visibility",n],["Password",i]],$.each(a,function(e){(""===a[e][1]||void 0===a[e][1]||null===a[e][1])&&(a[e][1]="-"),""===a[e][0]?(s+="</table>",s+="<div class='separator'><h1>"+a[e][1]+"</h1></div>",s+="<table id='infos'>"):(s+="<tr>",s+="<td>"+a[e][0]+"</td>",s+="<td class='attr_"+a[e][0].toLowerCase()+"'>"+a[e][1]+"</td>",s+="</tr>")}),s+="</table>",s+="<div class='bumper'></div>",s+="</div>"}};var header=$("header"),headerTitle=$("#title"),imageview=$("#imageview"),api_path="php/api.php",infobox=$("#infobox");$(document).ready(function(){event_name=mobileBrowser()?"touchend":"click",$(window).keydown(key),$(document).on(event_name,"#infobox .header a",function(){hideInfobox()}),$(document).on(event_name,"#infobox_overlay",function(){hideInfobox()}),$("#button_info").on(event_name,function(){showInfobox()}),$("#button_direct").on(event_name,function(){link=$("#imageview #image").css("background-image").replace(/"/g,"").replace(/url\(|\)$/gi,""),window.open(link,"_newtab")}),loadPhotoInfo(gup("p"))});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment