functionmobileBrowser(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?!0:!1}functiongup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");vart="[\\?&]"+e+"=([^&#]*)",n=newRegExp(t),o=n.exec(window.location.href);returnnull===o?"":o[1]}!function(e,t){"object"==typeofmodule&&"object"==typeofmodule.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)thrownewError("jQuery requires a window with a document");returnt(e)}:t(e)}("undefined"!=typeofwindow?window:this,function(e,t){functionn(e){vart=e.length,n=J.type(e);return"function"===n||J.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeoft&&t>0&&t-1ine}functiono(e,t,n){if(J.isFunction(t))returnJ.grep(e,function(e,o){return!!t.call(e,o,e)!==n});if(t.nodeType)returnJ.grep(e,function(e){returne===t!==n});if("string"==typeoft){if(se.test(t))returnJ.filter(t,e,n);t=J.filter(t,e)}returnJ.grep(e,function(e){returnz.call(t,e)>=0!==n})}functioni(e,t){for(;(e=e[t])&&1!==e.nodeType;);returne}functionr(e){vart=fe[e]={};returnJ.each(e.match(he)||[],function(e,n){t[n]=!0}),t}functiona(){Q.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),J.ready()}functions(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=J.expando+s.uid++}functionl(e,t,n){varo;if(void0===n&&1===e.nodeType)if(o="data-"+t.replace(we,"-$1").toLowerCase(),n=e.getAttribute(o),"string"==typeofn){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:ye.test(n)?J.parseJSON(n):n}catch(i){}ve.set(e,t,n)}elsen=void0;returnn}functionu(){return!0}functionc(){return!1}functiond(){try{returnQ.activeElement}catch(e){}}functionp(e,t){returnJ.nodeName(e,"table")&&J.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}functionh(e){returne.type=(null!==e.getAttribute("type"))+"/"+e.type,e}functionf(e){vart=Le.exec(e.type);returnt?e.type=t[1]:e.removeAttribute("type"),e}functionm(e,t){for(varn=0,o=e.length;o>n;n++)be.set(e[n],"globalEval",!t||be.get(t[n],"globalEval"))}functiong(e,t){varn,o,i,r,a,s,l,u;if(1===t.nodeType){if(be.hasData(e)&&(r=be.access(e),a=be.set(t,r),u=r.events)){deletea.handle,a.events={};for(iinu)for(n=0,o=u[i].length;o>n;n++)J.event.add(t,i,u[i][n])}ve.hasData(e)&&(s=ve.access(e),l=J.extend({},s),ve.set(t,l))}}functionb(e,t){varn=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];returnvoid0===t||t&&J.nodeName(e,t)?J.merge([e],n):n}functionv(e,t){varn=t.nodeName.toLowerCase();"input"===n&&je.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}functiony(t,n){varo,i=J(n.createElement(t)).appendTo(n.body),r=e.getDefaultComputedStyle&&(o=e.getDefaultComputedStyle(i[0]))?o.display:J.css(i[0],"display");returni.detach(),r}functionw(e){vart=Q,n=He[e];returnn||(n=y(e,t),"none"!==n&&n||(Re=(Re||J("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Re[0].contentDocument,t.write(),t.close(),n=y(e,t),Re.detach()),He[e]=n),n}functionx(e,t,n){varo,i,r,a,s=e.style;returnn=n||Ue(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||J.contains(e.ownerDocument,e)||(a=J.style(e,t)),Be.test(a)&&Fe.test(t)&&(o=s.width,i=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=o,s.minWidth=i,s.maxWidth=r)),void0!==a?a+"":a}functionT(e,t){return{get:function(){returne()?voiddeletethis.get:(this.get=t).apply(this,arguments)}}}functionC(e,t){if(tine)returnt;for(varn=t[0].toUpperCase()+t.slice(1),o=t,i=Ve.length;i--;)if(t=Ve[i]+n,tine)returnt;returno}functionj(e,t,n){varo=Xe.exec(t);returno?Math.max(0,o[1]-(n||0))+(o[2]||"px"):t}functionk(e,t,n,o,i){for(varr=n===(o?"border":"content")?4:"width"===t?1:0,a=0;4>r;r+=2)"margin"===n&&(a+=J.css(e,n+Te[r],!0,i)),o?("content"===n&&(a-=J.css(e,"padding"+Te[r],!0,i)),"margin"!==n&&(a-=J.css(e,"border"+Te[r]+"Width",!0,i))):(a+=J.css(e,"padding"+Te[r],!0,i),"p
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})))},multiselect.stopResize=function(){$(document).off("mousemove")},multiselect.getSize=function(){returnvisible.multiselect()?{top:$("#multiselect").offset().top,left:$("#multiselect").offset().left,width:parseInt($("#multiselect").css("width").replace("px","")),height:parseInt($("#multiselect").css("height").replace("px",""))}:!1},multiselect.getSelection=function(e){vart,n,o=150,i=[],r=multiselect.getSize();returnvisible.contextMenu()?!1:visible.multiselect()?($(".photo, .album").each(function(){n=$(this).offset(),n.top>=r.top-o&&n.left>=r.left-o&&n.top+206<=r.top+r.height+o&&n.left+206<=r.left+r.width+o&&(t=$(this).data("id"),"0"!==t&&0!==t&&"f"!==t&&"s"!==t&&"r"!==t&&null!==t&&void0!==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},multiselect.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:""},password.get=function(e,t){varn,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?void0==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()},password.getDialog=function(e,t){varn;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,cache:null},photo.getID=function(){vare;returne=photo.json?photo.json.id:$(".photo:hover, .photo.active").attr("data-id"),e?e:!1},photo.load=function(e,t){varn,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(),voidsetTimeout(function(){lychee.content.show()},300))})},photo.preloadNext=function(e){vart,n;returnmobileBrowser()?!1:void(album.json&&album.json.content&&album.json.content[e]&&""!=album.json.content[e].nextPhoto&&(t=album.json.content[e].nextPhoto,n=album.json.content[t].url,photo.cache=newImage,photo.cache.src=n,photo.cache.onload=function(){photo.cache=null}))},photo.parse=function(){photo.json.title||(photo.json.title="Untitled")},photo.previous=function(e){vart=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(){returnphoto.getID()===!1?!1:voidlychee["goto"](album.getID()+"/"+album.json.content[photo.getID()].previousPhoto)},t))},photo.next=function(e){vart=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(){returnphoto.getID()===!1?!1:voidlychee["goto"](album.getID()+"/"+album.json.content[photo.getID()].nextPhoto)},