// pxg /*! ------------------------------------------------------ Underscore.js 1.5.1 http://underscorejs.org (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Underscore may be freely distributed under the MIT license. ------------------------------------------------------- */ (function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=i.toString,l=i.hasOwnProperty,c=r.forEach,h=r.map,p=r.reduce,d=r.reduceRight,v=r.filter,m=r.every,g=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,E=Object.keys,S=s.bind,x=function(e){return e instanceof x?e:this instanceof x?void (this._wrapped=e):new x(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=x),exports._=x):e._=x,x.VERSION="1.5.1";var T=x.each=x.forEach=function(e,t,r){if(null!=e)if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;s>i;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(x.has(e,o)&&t.call(r,e[o],o,e)===n)return};x.map=x.collect=function(e,t,n){var r=[];return null==e?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r.push(t.call(n,e,i,s))}),r)};var N="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),p&&e.reduce===p)return r&&(t=x.bind(t,r)),i?e.reduce(t,n):e.reduce(t);if(T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)}),!i)throw new TypeError(N);return n},x.reduceRight=x.foldr=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),d&&e.reduceRight===d)return r&&(t=x.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=x.keys(e);s=o.length}if(T(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)}),!i)throw new TypeError(N);return n},x.find=x.detect=function(e,t,n){var r;return C(e,function(e,i,s){return t.call(n,e,i,s)?(r=e,!0):void 0}),r},x.filter=x.select=function(e,t,n){var r=[];return null==e?r:v&&e.filter===v?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&r.push(e)}),r)},x.reject=function(e,t,n){return x.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},x.every=x.all=function(e,t,r){t||(t=x.identity);var i=!0;return null==e?i:m&&e.every===m?e.every(t,r):(T(e,function(e,s,o){return(i=i&&t.call(r,e,s,o))?void 0:n}),!!i)};var C=x.some=x.any=function(e,t,r){t||(t=x.identity);var i=!1;return null==e?i:g&&e.some===g?e.some(t,r):(T(e,function(e,s,o){return i||(i=t.call(r,e,s,o))?n:void 0}),!!i)};x.contains=x.include=function(e,t){return null==e?!1:y&&e.indexOf===y?-1!=e.indexOf(t):C(e,function(e){return e===t})},x.invoke=function(e,t){var n=u.call(arguments,2),r=x.isFunction(t);return x.map(e,function(e){return(r?t:e[t]).apply(e,n)})},x.pluck=function(e,t){return x.map(e,function(e){return e[t]})},x.where=function(e,t,n){return x.isEmpty(t)?n?void 0:[]:x[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},x.findWhere=function(e,t){return x.where(e,t,!0)},x.max=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&x.isEmpty(e))return-1/0;var r={computed:-1/0,value:-1/0};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>r.computed&&(r={value:e,computed:o})}),r.value},x.min=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&x.isEmpty(e))return 1/0;var r={computed:1/0,value:1/0};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;or||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.indexs;){var u=s+o>>>1;n.call(r,e[u])=0})})},x.difference=function(e){var t=a.apply(r,u.call(arguments,1));return x.filter(e,function(e){return!x.contains(t,e)})},x.zip=function(){for(var e=x.max(x.pluck(arguments,"length").concat(0)),t=new Array(e),n=0;e>n;n++)t[n]=x.pluck(arguments,""+n);return t},x.object=function(e,t){if(null==e)return{};for(var n={},r=0,i=e.length;i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},x.indexOf=function(e,t,n){if(null==e)return-1;var r=0,i=e.length;if(n){if("number"!=typeof n)return r=x.sortedIndex(e,t),e[r]===t?r:-1;r=0>n?Math.max(0,i+n):n}if(y&&e.indexOf===y)return e.indexOf(t,n);for(;i>r;r++)if(e[r]===t)return r;return-1},x.lastIndexOf=function(e,t,n){if(null==e)return-1;var r=null!=n;if(b&&e.lastIndexOf===b)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);for(var i=r?n:e.length;i--;)if(e[i]===t)return i;return-1},x.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);r>i;)s[i++]=e,e+=n;return s};var O=function(){};x.bind=function(e,t){var n,r;if(S&&e.bind===S)return S.apply(e,u.call(arguments,1));if(!x.isFunction(e))throw new TypeError;return n=u.call(arguments,2),r=function(){if(this instanceof r){O.prototype=e.prototype;var i=new O;O.prototype=null;var s=e.apply(i,n.concat(u.call(arguments)));return Object(s)===s?s:i}return e.apply(t,n.concat(u.call(arguments)))}},x.partial=function(e){var t=u.call(arguments,1);return function(){return e.apply(this,t.concat(u.call(arguments)))}},x.bindAll=function(e){var t=u.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return T(t,function(t){e[t]=x.bind(e[t],e)}),e},x.memoize=function(e,t){var n={};return t||(t=x.identity),function(){var r=t.apply(this,arguments);return x.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},x.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=function(e){return x.delay.apply(x,[e,1].concat(u.call(arguments,1)))},x.throttle=function(e,t,n){var r,i,s,o=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:new Date,o=null,s=e.apply(r,i)};return function(){var f=new Date;u||n.leading!==!1||(u=f);var l=t-(f-u);return r=this,i=arguments,0>=l?(clearTimeout(o),o=null,u=f,s=e.apply(r,i)):o||n.trailing===!1||(o=setTimeout(a,l)),s}},x.debounce=function(e,t,n){var r,i=null;return function(){var s=this,o=arguments,u=function(){i=null,n||(r=e.apply(s,o))},a=n&&!i;return clearTimeout(i),i=setTimeout(u,t),a&&(r=e.apply(s,o)),r}},x.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},x.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},x.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},x.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},x.keys=E||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)x.has(e,n)&&t.push(n);return t},x.values=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push(e[n]);return t},x.pairs=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push([n,e[n]]);return t},x.invert=function(e){var t={};for(var n in e)x.has(e,n)&&(t[e[n]]=n);return t},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},x.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return T(n,function(n){n in e&&(t[n]=e[n])}),t},x.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)x.contains(n,i)||(t[i]=e[i]);return t},x.defaults=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e};var M=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof x&&(e=e._wrapped),t instanceof x&&(t=t._wrapped);var i=f.call(e);if(i!=f.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var s=n.length;s--;)if(n[s]==e)return r[s]==t;var o=e.constructor,u=t.constructor;if(o!==u&&!(x.isFunction(o)&&o instanceof o&&x.isFunction(u)&&u instanceof u))return!1;n.push(e),r.push(t);var a=0,l=!0;if("[object Array]"==i){if(a=e.length,l=a==t.length)for(;a--&&(l=M(e[a],t[a],n,r)););}else{for(var c in e)if(x.has(e,c)&&(a++,!(l=x.has(t,c)&&M(e[c],t[c],n,r))))break;if(l){for(c in t)if(x.has(t,c)&&!(a--))break;l=!a}}return n.pop(),r.pop(),l};x.isEqual=function(e,t){return M(e,t,[],[])},x.isEmpty=function(e){if(null==e)return!0;if(x.isArray(e)||x.isString(e))return 0===e.length;for(var t in e)if(x.has(e,t))return!1;return!0},x.isElement=function(e){return!!e&&1===e.nodeType},x.isArray=w||function(e){return"[object Array]"==f.call(e)},x.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){x["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return!!e&&!!x.has(e,"callee")}),"function"!=typeof /./&&(x.isFunction=function(e){return"function"==typeof e}),x.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},x.isNaN=function(e){return x.isNumber(e)&&e!=+e},x.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==f.call(e)},x.isNull=function(e){return null===e},x.isUndefined=function(e){return void 0===e},x.has=function(e,t){return l.call(e,t)},x.noConflict=function(){return e._=t,this},x.identity=function(e){return e},x.times=function(e,t,n){for(var r=Array(Math.max(0,e)),i=0;e>i;i++)r[i]=t.call(n,i);return r},x.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var _={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};_.unescape=x.invert(_.escape);var D={escape:new RegExp("["+x.keys(_.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(_.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(e){x[e]=function(t){return null==t?"":(""+t).replace(D[e],function(t){return _[e][t]})}}),x.result=function(e,t){if(null!=e){var n=e[t];return x.isFunction(n)?n.call(e):n}},x.mixin=function(e){T(x.functions(e),function(t){var n=x[t]=e[t];x.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),F.call(this,n.apply(x,e))}})};var P=0;x.uniqueId=function(e){var t=++P+"";return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(e,t,n){var r;n=x.defaults({},n,x.templateSettings);var i=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join("|")+"|$","g"),s=0,o="__p+='";e.replace(i,function(t,n,r,i,u){return o+=e.slice(s,u).replace(j,function(e){return"\\"+B[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(o+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(o+="';\n"+i+"\n__p+='"),s=u+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{r=new Function(n.variable||"obj","_",o)}catch(u){throw u.source=o,u}if(t)return r(t,x);var a=function(e){return r.call(this,e,x)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},x.chain=function(e){return x(e).chain()};var F=function(e){return this._chain?x(e).chain():e};x.mixin(x),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];x.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!=e&&"splice"!=e||0!==n.length||delete n[0],F.call(this,n)}}),T(["concat","join","slice"],function(e){var t=r[e];x.prototype[e]=function(){return F.call(this,t.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this),!function(e){var t,n,r;n="data-auto-height",t="data-height-group",r="data-height-part",jQuery.fn.heighter=function(){function n(e){var t;return t=[],_.each(e,function(e){return _.each(e.querySelectorAll("["+r+"]"),function(e,n){var r,i;return i=e.style,i.height="auto",i.minHeight="0",r=e.offsetHeight,t[n]>r?void 0:t[n]=r})}),t}function i(t,n){return _.each(t,function(t){return _.each(t.querySelectorAll("["+r+"]"),function(t,r){var i,s,o,u,a,f,l;return i=n[r],s=t.style,"border-box"!==s.boxSizing&&(o=e(t),u=parseInt(o.css("padding-top")||0,10),a=parseInt(o.css("padding-bottom")||0,10),f=parseInt(o.css("border-top-width")||0,10),l=parseInt(o.css("border-bottom-width")||0,10),i-=u+a+f+l),s.height="",s.minHeight=i+"px"})})}function s(t){var n;return n=_.map(t,function(t){return e.Deferred(function(e){return function(e){return t.onLoad=function(){return this.onLoad=null,this.onError=null,e.resolve()},t.onError=function(){return this.onLoad=null,this.onError=null,e.resolve()}}}(this)).promise()}),e.when(n)}var o;return o=this.toArray(),0!==o.length?(_.each(o,function(e){var r,o=_.uniq(_.map(e.querySelectorAll("["+t+"]"),function(e){return e.getAttribute(t)}));_.each(o,function(o){var a="["+t+'="'+o+'"]',f=e.querySelectorAll(a+" img"),l=e.querySelectorAll(a);l.length<2||(0!==f.length?s(f).then(function(){r=n(l),i(l,r)}):(r=n(l),i(l,r)))})}),this):void 0},jQuery.heighter=function(){jQuery("["+n+"]").heighter()},jQuery(jQuery.heighter)}(jQuery),function(){var e=[].slice,t=function(e,t){return function(){return e.apply(t,arguments)}},n={}.hasOwnProperty,r=function(e,t){function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};(function(n,i,s){var o,u,a,f,l,c;return l={},u=n(i),o=n(s),c=Math.round,f=Math.min,a=Math.abs,l.yOf=function(e){var t;for(t=0;e.offsetParent;)t+=e.offsetTop,e=e.offsetParent;return t},l.isHash=function(e){return/^#.+$/.test(e)},l.getWhereTo=function(e){var t;return t=n(e),t.data("scrollto")||t.attr("href")},l.calcY=function(e){var t,r;if("number"===n.type(e))return e;if("string"===n.type(e)){if(!l.isHash(e))return!1;t=o.find(e)}else t=n(e);return t.size()?r=l.yOf(t[0]):null},l.scrollTop=function(){return o.scrollTop()||s.documentElement.scrollTop||s.body.scrollTop||i.pageYOffset||0},l.ua=function(){var e,t,r;return t={},r=navigator.userAgent,e=function(e){var i;return i=!1,n.each(e,function(e,n){var s;return s=RegExp(n,"i"),Boolean(r.match(s))?(t[n]=!0,i=!0):t[n]=!1,!0}),i},e(["iphone","ipod","ipad"]||e(["android"]))&&(t.mobile=!0),t}(),l.Event=function(){function t(){}return t.prototype.bind=function(e,t){var n,r,i,s,o;for(this._callbacks||(this._callbacks={}),n=e.split(" "),s=0,o=n.length;o>s;s++)r=n[s],(i=this._callbacks)[r]||(i[r]=[]),this._callbacks[r].push(t);return this},t.prototype.one=function(e,t){return this._callbacks||(this._callbacks={}),this.bind(e,function(){return this.unbind(e,arguments.callee),t.apply(this,arguments)})},t.prototype.trigger=function(){var t,n,r,i,s,o,u;if(t=arguments.length>=1?e.call(arguments,0):[],this._callbacks||(this._callbacks={}),r=t.shift(),i=null!=(u=this._callbacks)?u[r]:void 0){for(s=0,o=i.length;o>s&&(n=i[s],n.apply(this,t)!==!1);s++);return this}},t.prototype.unbind=function(e,t){var n,r,i,s,o,u;if(this._callbacks||(this._callbacks={}),!e)return this._callbacks={},this;if(i=null!=(u=this._callbacks)?u[e]:void 0,!i)return this;if(!t)return delete this._callbacks[e],this;for(r=s=0,o=i.length;o>s;r=++s)if(n=i[r],n===t){i=i.slice(),i.splice(r,1),this._callbacks[e]=i;break}return this},t}(),l.Scroller=function(e){function s(e){this._stepToNext=t(this._stepToNext,this),e&&this.option(e),this._handleMobile()}var p;return r(s,e),p=["scrollstart","scrollend","scrollcancel"],s.prototype.options={speed:30,maxStep:2e3,slowdownRate:3,changehash:!0,userskip:!0,selector:"a[href^=#]:not(.apply-noscroll)",adjustEndY:!1,dontAdjustEndYIfSelectorIs:null,dontAdjustEndYIfYis:null},s.prototype._handleMobile=function(){return l.ua.mobile?(this.options.userskip=!1,this):this},s.prototype._invokeScroll=function(){var e=this;return this.trigger("scrollstart",this._endY,this._reservedHash),this._scrollDefer.then(function(){return e.options.changehash&&e._reservedHash&&(location.hash=e._reservedHash),e.trigger("scrollend",e._endY,e._reservedHash)},function(){return e.trigger("scrollcancel",e._endY,e._reservedHash)}).always(function(){return e._reservedHash&&(e._reservedHash=null),e._scrollDefer=null}),this._stepToNext(),this},s.prototype._stepToNext=function(){var e,t,n,r,s,p,d,v,m,g,y,b=this;return v=l.scrollTop(),r=this.options,r.userskip&&this._prevY&&v!==this._prevY?(i.scrollTo(0,this._endY),null!=(g=this._scrollDefer)&&g.resolve(),this._prevY=null,this):(this._endY>v?(e=o.height(),m=u.height(),p=c((e-v-m)/r.slowdownRate),d=c((this._endY-v)/r.slowdownRate),t=f(p,d),s=f(t,r.maxStep),2>s&&(s=2)):s=-f(a(c((this._endY-v)/r.slowdownRate)),r.maxStep),n=v+s,i.scrollTo(0,n),this._prevY=n,this._cancelNext?(this._cancelNext=!1,null!=(y=this._scrollDefer)&&y.reject(),this):(setTimeout(function(){var e;return 1>=a(v-b._endY)||l.scrollTop()===v?(i.scrollTo(0,b._endY),b._prevY=null,null!=(e=b._scrollDefer)&&e.resolve(),b):b._stepToNext()},r.speed),this))},s.prototype.scrollTo=function(e,t){var r,i;return i=!0,this.options.changehash&&(i=!1),this.options.adjustEndY===!1&&(i=!1),(null!=t?t.adjustEndY:void 0)===!1&&(i=!1),l.isHash(e)&&(this._reservedHash=e,this.options.dontAdjustEndYIfSelectorIs&&o.find(e).is(this.options.dontAdjustEndYIfSelectorIs)&&(i=!1)),r=l.calcY(e),r===!1?this:("number"===n.type(this.options.dontAdjustEndYIfYis)&&r===this.options.dontAdjustEndYIfYis&&(i=!1),null!=(null!=t?t.adjustEndY:void 0)?r+=t.adjustEndY:this.options.adjustEndY!==!1&&(r+=this.options.adjustEndY),this._endY=r,this._scrollDefer=n.Deferred(),this._invokeScroll(),this._scrollDefer)},s.prototype.stop=function(){var e=this;return n.Deferred(function(t){return e._scrollDefer?(e._cancelNext=!0,e._scrollDefer.fail(function(){return t.resolve()})):t.resolve()})},s.prototype.option=function(e){var t=this;return e?(this.options=n.extend({},this.options,e),this._handleMobile(),n.each(p,function(e,n){return t.options[n]&&t.bind(n,t.options[n]),!0}),this):this.options},s.prototype.live=function(e){var t;return e=e||this.options.selector,t=this,o.delegate(e,"click",function(e){return e.preventDefault(),t.scrollTo(l.getWhereTo(this))}),this},s}(l.Event),n.fn.tinyscrollable=function(e){var t;return t=new l.Scroller(e),this.each(function(){var e;return e=n(this),e.data("tinyscroller",t),e.data("tinyscrollerattached")?this:(e.bind("click",function(e){return e.preventDefault(),t.scrollTo(l.getWhereTo(this))}),e.data("tinyscrollerattached",!0))})},n.TinyscrollerNs=l,n.Tinyscroller=l.Scroller})(jQuery,window,document)}.call(this),function(){var e,t,n;e=jQuery,n=function(){function e(){this.fadeDuration=500,this.fitImagesInViewport=!0,this.resizeDuration=700,this.showImageNumberLabel=!0,this.wrapAround=!1}return e.prototype.albumLabel=function(e,t){return"Image "+e+" of "+t},e}(),t=function(){function t(e){this.options=e,this.album=[],this.currentImageIndex=void 0,this.init()}return t.prototype.init=function(){return this.enable(),this.build()},t.prototype.enable=function(){var t=this;return e("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(n){return t.start(e(n.currentTarget)),!1})},t.prototype.build=function(){var t=this;return e("
").appendTo(e("body")),this.$lightbox=e("#lightbox"),this.$overlay=e("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return t.end(),!1}),this.$lightbox.hide().on("click",function(n){return e(n.target).attr("id")==="lightbox"&&t.end(),!1}),this.$outerContainer.on("click",function(n){return e(n.target).attr("id")==="lightbox"&&t.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return t.currentImageIndex===0?t.changeImage(t.album.length-1):t.changeImage(t.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return t.currentImageIndex===t.album.length-1?t.changeImage(0):t.changeImage(t.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return t.end(),!1})},t.prototype.start=function(t){var n,r,i,s,o,u,a,f,l,c,h,p,d;e(window).on("resize",this.sizeOverlay),e("select, object, embed").css({visibility:"hidden"}),this.$overlay.width(e(document).width()).height(e(document).height()).fadeIn(this.options.fadeDuration),this.album=[],o=0,i=t.attr("data-lightbox");if(i){p=e(t.prop("tagName")+'[data-lightbox="'+i+'"]');for(s=f=0,c=p.length;fl||r.height>a)r.width/l>r.height/a?(u=l,o=parseInt(r.height/(r.width/u),10),n.width(u),n.height(o)):(o=a,u=parseInt(r.width/(r.height/o),10),n.width(u),n.height(o))}return i.sizeContainer(n.width(),n.height())},r.src=this.album[t].link,this.currentImageIndex=t},t.prototype.sizeOverlay=function(){return e("#lightboxOverlay").width(e(document).width()).height(e(document).height())},t.prototype.sizeContainer=function(e,t){var n,r,i,s,o=this;s=this.$outerContainer.outerWidth(),i=this.$outerContainer.outerHeight(),r=e+this.containerLeftPadding+this.containerRightPadding,n=t+this.containerTopPadding+this.containerBottomPadding,this.$outerContainer.animate({width:r,height:n},this.options.resizeDuration,"swing"),setTimeout(function(){o.$lightbox.find(".lb-dataContainer").width(r),o.$lightbox.find(".lb-prevLink").height(n),o.$lightbox.find(".lb-nextLink").height(n),o.showImage()},this.options.resizeDuration)},t.prototype.showImage=function(){this.$lightbox.find(".lb-loader").hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},t.prototype.updateNav=function(){this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?this.$lightbox.find(".lb-prev, .lb-next").show():(this.currentImageIndex>0&&this.$lightbox.find(".lb-prev").show(),this.currentImageIndex1&&this.options.showImageNumberLabel?this.$lightbox.find(".lb-number").text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn("fast"):this.$lightbox.find(".lb-number").hide(),this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.resizeDuration,function(){return e.sizeOverlay()})},t.prototype.preloadNeighboringImages=function(){var e,t;this.album.length>this.currentImageIndex+1&&(e=new Image,e.src=this.album[this.currentImageIndex+1].link),this.currentImageIndex>0&&(t=new Image,t.src=this.album[this.currentImageIndex-1].link)},t.prototype.enableKeyboardNav=function(){e(document).on("keyup.keyboard",e.proxy(this.keyboardAction,this))},t.prototype.disableKeyboardNav=function(){e(document).off(".keyboard")},t.prototype.keyboardAction=function(e){var t,n,r,i,s;t=27,n=37,r=39,s=e.keyCode,i=String.fromCharCode(s).toLowerCase(),s===t||i.match(/x|o|c/)?this.end():i==="p"||s===n?this.currentImageIndex!==0&&this.changeImage(this.currentImageIndex-1):(i==="n"||s===r)&&this.currentImageIndex!==this.album.length-1&&this.changeImage(this.currentImageIndex+1)},t.prototype.end=function(){return this.disableKeyboardNav(),e(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),e("select, object, embed").css({visibility:"visible"})},t}(),e(function(){var e,r;return r=new n,e=new t(r)})}.call(this),jQuery(function(){$(".area_all").eq(0).attr("id","js_top"),$("a[href^=#]").tinyscrollable(),$(["a[href$=jpg]","a[href$=JPG]","a[href$=jpeg]","a[href$=JPEG]","a[href$=png]","a[href$=PNG]","a[href$=gif]","a[href$=GIF]"].join(",")).filter(function(){var e=location.href,t=this.href,n=!1;return/cms_v2/.test(e)?n=/\/cms_v2\/_master\/acre\/photo/.test(t)?!0:/\/cms_v2\/_cms_store\/acre\/upload/.test(t)?!0:!1:n=/\/_master\/acre\/photo/.test(t)?!0:/\/_p\/acre\/\d+\/images\/pc\/large_thumb/.test(t)?!0:!1,n}).attr("data-lightbox","cms")});