/* Galleria v 1.2.6 2011-12-12 http://galleria.aino.se Copyright (c) 2011, Aino Licensed under the MIT license. */ (function(e){var k=this,m=k.document,G=e(m),u=e(k),H=!0,A=3E4,B=!1,x=navigator.userAgent.toLowerCase(),I=k.location.hash.replace(/#\//,""),q=function(){var a=3,b=m.createElement("div"),d=b.getElementsByTagName("i");do b.innerHTML="<\!--[if gt IE "+ ++a+"]>";while(d[0]);return a>4?a:void 0}(),v=function(){return{html:m.documentElement,body:m.body,head:m.getElementsByTagName("head")[0],title:m.title}},J=function(){var a=[];e.each("data ready thumbnail loadstart loadfinish image play pause progress fullscreen_enter fullscreen_exit idle_enter idle_exit rescale lightbox_open lightbox_close lightbox_image".split(" "), function(b,d){a.push(d);/_/.test(d)&&a.push(d.replace(/_/g,""))});return a}(),K=function(a){var b;if(typeof a!=="object")return a;e.each(a,function(d,c){/^[a-z]+_/.test(d)&&(b="",e.each(d.split("_"),function(a,c){b+=a>0?c.substr(0,1).toUpperCase()+c.substr(1):c}),a[b]=c,delete a[d])});return a},C=function(a){return e.inArray(a,J)>-1?Galleria[a.toUpperCase()]:a},w={trunk:{},add:function(a,b,d,c){c=c||!1;this.clear(a);if(c)var e=b,b=function(){e();w.add(a,b,d)};this.trunk[a]=k.setTimeout(b,d)},clear:function(a){var b= function(a){k.clearTimeout(this.trunk[a]);delete this.trunk[a]},d;if(a&&a in this.trunk)b.call(w,a);else if(typeof a==="undefined")for(d in this.trunk)this.trunk.hasOwnProperty(d)&&b.call(w,d)}},z=[],y=[],L=!1,t=!1,M=[],D=function(a){Galleria.theme=a;e.each(M,function(a,d){d._initialized||d._init.call(d)})},f=function(){return{array:function(a){return Array.prototype.slice.call(a,0)},create:function(a,b){var d=m.createElement(b||"div");d.className=a;return d},getScriptPath:function(a){a=a||e("script:last").attr("src"); a=a.split("/");if(a.length==1)return"";a.pop();return a.join("/")+"/"},animate:function(){var a=function(a){var b="transition WebkitTransition MozTransition OTransition".split(" "),c;if(k.opera)return!1;for(c=0;b[c];c++)if(typeof a[b[c]]!=="undefined")return b[c];return!1}((m.body||m.documentElement).style),b={MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[a],d={_default:[0.25,0.1,0.25,1],galleria:[0.645,0.045,0.355,1], galleriaIn:[0.55,0.085,0.68,0.53],galleriaOut:[0.25,0.46,0.45,0.94],ease:[0.25,0,0.25,1],linear:[0.25,0.25,0.75,0.75],"ease-in":[0.42,0,1,1],"ease-out":[0,0,0.58,1],"ease-in-out":[0.42,0,0.58,1]},c=function(a,b,c){var d={},c=c||"transition";e.each("webkit moz ms o".split(" "),function(){d["-"+this+"-"+c]=b});a.css(d)},h=function(a){c(a,"none","transition");Galleria.WEBKIT&&Galleria.TOUCH&&(c(a,"translate3d(0,0,0)","transform"),a.data("revert")&&(a.css(a.data("revert")),a.data("revert",null)))},j, i,g,l,p,n,E;return function(o,s,r){r=e.extend({duration:400,complete:function(){},stop:!1},r);o=e(o);r.duration?a?(r.stop&&(o.unbind(b),h(o)),j=!1,e.each(s,function(a,b){E=o.css(a);f.parseValue(E)!=f.parseValue(b)&&(j=!0);o.css(a,E)}),j?(i=[],g=r.easing in d?d[r.easing]:d._default,l=" "+r.duration+"ms cubic-bezier("+g.join(",")+")",k.setTimeout(function(){o.one(b,function(a){return function(){h(a);r.complete.call(a[0])}}(o));if(Galleria.WEBKIT&&Galleria.TOUCH&&(p={},n=[0,0,0],e.each(["left","top"], function(a,b){b in s&&(n[a]=f.parseValue(s[b])-f.parseValue(o.css(b))+"px",p[b]=s[b],delete s[b])}),n[0]||n[1]))o.data("revert",p),i.push("-webkit-transform"+l),c(o,"translate3d("+n.join(",")+")","transform");e.each(s,function(a){i.push(a+l)});c(o,i.join(","));o.css(s)},1)):k.setTimeout(function(){r.complete.call(o[0])},r.duration)):o.animate(s,r):(o.css(s),r.complete.call(o[0]))}}(),removeAlpha:function(a){if(q<9&&a){var b=a.style,a=(a=a.currentStyle)&&a.filter||b.filter||"";if(/alpha/.test(a))b.filter= a.replace(/alpha\([^)]*\)/i,"")}},forceStyles:function(a,b){a=e(a);a.attr("style")&&a.data("styles",a.attr("style")).removeAttr("style");a.css(b)},revertStyles:function(){e.each(f.array(arguments),function(a,b){b=e(b);b.removeAttr("style");b.attr("style","");b.data("styles")&&b.attr("style",b.data("styles")).data("styles",null)})},moveOut:function(a){f.forceStyles(a,{position:"absolute",left:-1E4})},moveIn:function(){f.revertStyles.apply(f,f.array(arguments))},elem:function(a){return a instanceof e?{$:a,dom:a[0]}:{$:e(a),dom:a}},hide:function(a,b,d){var d=d||function(){},c=f.elem(a),e=c.$,a=c.dom;e.data("opacity")||e.data("opacity",e.css("opacity"));c={opacity:0};b?f.animate(a,c,{duration:b,complete:q<9&&a?function(){f.removeAlpha(a);a.style.visibility="hidden";d.call(a)}:d,stop:!0}):q<9&&a?(f.removeAlpha(a),a.style.visibility="hidden"):e.css(c)},show:function(a,b,d){var d=d||function(){},c=f.elem(a),e=c.$,a=c.dom,j={opacity:parseFloat(e.data("opacity"))||1};if(b){if(q<9)e.css("opacity",0), a.style.visibility="visible";f.animate(a,j,{duration:b,complete:q<9&&a?function(){j.opacity==1&&f.removeAlpha(a);d.call(a)}:d,stop:!0})}else q<9&&j.opacity==1&&a?(f.removeAlpha(a),a.style.visibility="visible"):e.css(j)},optimizeTouch:function(){var a,b,d,c,f={},j=function(a){a.preventDefault();f=e.extend({},a,!0)},i=function(){this.evt=f},g=function(){this.handler.call(a,this.evt)};return function(l){e(l).bind("touchend",function(l){a=l.target;for(c=!0;a.parentNode&&a!=l.currentTarget&&c;)b=e(a).data("events"), d=e(a).data("fakes"),b&&"click"in b?(c=!1,l.preventDefault(),e(a).click(j).click(),b.click.pop(),e.each(b.click,i),e(a).data("fakes",b.click),delete b.click):d&&(c=!1,l.preventDefault(),e.each(d,g)),a=a.parentNode})}}(),addTimer:function(){w.add.apply(w,f.array(arguments));return this},clearTimer:function(){w.clear.apply(w,f.array(arguments));return this},wait:function(a){var a=e.extend({until:function(){return!1},success:function(){},error:function(){Galleria.raise("Could not complete wait function.")}, timeout:3E3},a),b=f.timestamp(),d,c,h=function(){c=f.timestamp();d=c-b;if(a.until(d))return a.success(),!1;if(c>=b+a.timeout)return a.error(),!1;k.setTimeout(h,10)};k.setTimeout(h,10)},toggleQuality:function(a,b){if(!(q!==7&&q!==8)&&a)typeof b==="undefined"&&(b=a.style.msInterpolationMode==="nearest-neighbor"),a.style.msInterpolationMode=b?"bicubic":"nearest-neighbor"},insertStyleTag:function(a){var b=m.createElement("style");v().head.appendChild(b);b.styleSheet?b.styleSheet.cssText=a:(a=m.createTextNode(a), b.appendChild(a))},loadScript:function(a,b){var d=!1,c=e("