﻿if(!hs){var hs={lang:{cssDirection:"ltr",loadingText:"Loading...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size (f)",creditsText:"Powered by <i>Highslide JS</i>",creditsTitle:"Go to the Highslide JS homepage",previousText:"Previous",nextText:"Next",moveText:"Move",closeText:"Close",closeTitle:"Close (esc)",resizeTitle:"Resize",playText:"Play",playTitle:"Play slideshow (spacebar)",pauseText:"Pause",pauseTitle:"Pause slideshow (spacebar)",previousTitle:"Previous (arrow left)",nextTitle:"Next (arrow right)",moveTitle:"Move",fullExpandText:"1:1",number:"Image %1 of %2",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"highslide/graphics/",expandCursor:"zoomin.cur",restoreCursor:"zoomout.cur",expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:true,creditsHref:"http://highslide.com/",creditsTarget:"_self",enableKeyListener:true,openerTagNames:["a"],transitions:[],transitionDuration:250,dimmingOpacity:0,dimmingDuration:50,anchor:"auto",align:"auto",targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",skin:{controls:'<div class="highslide-controls"><ul><li class="highslide-previous"><a href="#" title="{hs.lang.previousTitle}"><span>{hs.lang.previousText}</span></a></li><li class="highslide-play"><a href="#" title="{hs.lang.playTitle}"><span>{hs.lang.playText}</span></a></li><li class="highslide-pause"><a href="#" title="{hs.lang.pauseTitle}"><span>{hs.lang.pauseText}</span></a></li><li class="highslide-next"><a href="#" title="{hs.lang.nextTitle}"><span>{hs.lang.nextText}</span></a></li><li class="highslide-move"><a href="#" title="{hs.lang.moveTitle}"><span>{hs.lang.moveText}</span></a></li><li class="highslide-full-expand"><a href="#" title="{hs.lang.fullExpandTitle}"><span>{hs.lang.fullExpandText}</span></a></li><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" ><span>{hs.lang.closeText}</span></a></li></ul></div>'},preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","useBox","anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","creditsPosition","dragByHeading","autoplay","numberPosition","transitions","dimmingOpacity","width","height","wrapperClassName","minWidth","minHeight","maxWidth","maxHeight","slideshowGroup","easing","easingClose","fadeInOut","src"],overlays:[],idCounter:0,oPos:{x:["leftpanel","left","center","right","rightpanel"],y:["above","top","middle","bottom","below"]},mouse:{},headingOverlay:{},captionOverlay:{},timers:[],slideshows:[],pendingOutlines:{},clones:{},onReady:[],uaVersion:/Trident\/4\.0/.test(navigator.userAgent)?8:parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]),ie:document.all&&!window.opera,safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(a){if(a)return document.getElementById(a)},push:function(a,b){a[a.length]=b},createElement:function(f,b,d,c,e){var a=document.createElement(f);if(b)hs.extend(a,b);if(e)hs.setStyles(a,{padding:0,border:"none",margin:0});if(d)hs.setStyles(a,d);if(c)c.appendChild(a);return a},extend:function(b,a){for(var c in a)b[c]=a[c];return b},setStyles:function(c,b){for(var a in b)if(hs.ie&&a=="opacity")if(b[a]>.99)c.style.removeAttribute("filter");else c.style.filter="alpha(opacity="+b[a]*100+")";else c.style[a]=b[a]},animate:function(h,d,a){var e,g,f;if(typeof a!="object"||a===null){var c=arguments;a={duration:c[2],easing:c[3],complete:c[4]}}if(typeof a.duration!="number")a.duration=250;a.easing=Math[a.easing]||Math.easeInQuad;a.curAnim=hs.extend({},d);for(var b in d){var i=new hs.fx(h,a,b);e=parseFloat(hs.css(h,b))||0;g=parseFloat(d[b]);f=b!="opacity"?"px":"";i.custom(e,g,f)}},css:function(c,a){if(document.defaultView)return document.defaultView.getComputedStyle(c,null).getPropertyValue(a);else{if(a=="opacity")a="filter";var b=c.currentStyle[a.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()})];if(a=="filter")b=b.replace(/alpha\(opacity=([0-9]+)\)/,function(b,a){return a/100});return b===""?1:b}},getPageSize:function(){var a=document,e=window,b=a.compatMode&&a.compatMode!="BackCompat"?a.documentElement:a.body,d=hs.ie?b.clientWidth:a.documentElement.clientWidth||self.innerWidth,c=hs.ie?b.clientHeight:self.innerHeight;hs.page={width:d,height:c,scrollLeft:hs.ie?b.scrollLeft:pageXOffset,scrollTop:hs.ie?b.scrollTop:pageYOffset}},getPosition:function(a){var b={x:a.offsetLeft,y:a.offsetTop};while(a.offsetParent){a=a.offsetParent;b.x+=a.offsetLeft;b.y+=a.offsetTop;if(a!=document.body&&a!=document.documentElement){b.x-=a.scrollLeft;b.y-=a.scrollTop}}return b},expand:function(a,b,c){if(!a)a=hs.createElement("a",null,{display:"none"},hs.container);if(typeof a.getParams=="function")return b;try{new hs.Expander(a,b,c);return false}catch(e){return true}},getElementByClass:function(e,d,c){var b=e.getElementsByTagName(d);for(var a=0;a<b.length;a++)if((new RegExp(c)).test(b[a].className))return b[a];return null},replaceLang:function(a){a=a.replace(/\s/g," ");var e=/{hs\.lang\.([^}]+)\}/g,b=a.match(e),d;if(b)for(var c=0;c<b.length;c++){d=b[c].replace(e,"$1");if(typeof hs.lang[d]!="undefined")a=a.replace(b[c],hs.lang[d])}return a},focusTopmost:function(){var f=0,c=-1,d=hs.expanders,e,a;for(var b=0;b<d.length;b++){e=d[b];if(e){a=e.wrapper.style.zIndex;if(a&&a>f){f=a;c=b}}}if(c==-1)hs.focusKey=-1;else d[c].focus()},getParam:function(a,b){a.getParams=a.onclick;var c=a.getParams?a.getParams():null;a.getParams=null;return c&&typeof c[b]!="undefined"?c[b]:typeof hs[b]!="undefined"?hs[b]:null},getSrc:function(b){var a=hs.getParam(b,"src");if(a)return a;return b.href},getNode:function(c){var b=hs.$(c),a=hs.clones[c],d={};if(!b&&!a)return null;if(!a){a=b.cloneNode(true);a.id="";hs.clones[c]=a;return b}else return a.cloneNode(true)},discardElement:function(a){if(a)hs.garbageBin.appendChild(a);hs.garbageBin.innerHTML=""},dim:function(a){;if(!hs.dimmer)hs.dimmer=hs.createElement("div",{className:"highslide-dimming highslide-viewport-size",owner:"",onclick:function(){hs.close()}},{visibility:"visible",opacity:0},hs.container,true);hs.dimmer.style.display="";hs.dimmer.owner+="|"+a.key;if(hs.geckoMac&&hs.dimmingGeckoFix)hs.setStyles(hs.dimmer,{background:"url("+hs.graphicsDir+"geckodimmer.png)",opacity:1});else hs.animate(hs.dimmer,{opacity:a.dimmingOpacity},hs.dimmingDuration)},undim:function(a){if(!hs.dimmer)return;if(typeof a!="undefined")hs.dimmer.owner=hs.dimmer.owner.replace("|"+a,"");if(typeof a!="undefined"&&hs.dimmer.owner!=""||hs.upcoming&&hs.getParam(hs.upcoming,"dimmingOpacity"))return;if(hs.geckoMac&&hs.dimmingGeckoFix)hs.dimmer.style.display="none";else hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display="none"})},transit:function(b,a){var c=a=a||hs.getExpander();if(hs.upcoming)return false;else hs.last=c;try{hs.upcoming=b;b.onclick()}catch(d){hs.last=hs.upcoming=null}try{if(!b||a.transitions[1]!="crossfade")a.close()}catch(d){}return false},previousOrNext:function(b,c){var a=hs.getExpander(b);if(a)return hs.transit(a.getAdjacentAnchor(c),a);else return false},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(a){if(!a)a=window.event;if(!a.target)a.target=a.srcElement;if(typeof a.target.form!="undefined")return true;var b=hs.getExpander(),c=null;switch(a.keyCode){case 70:if(b)b.doFullExpand();return true;case 32:c=2;break;case 34:case 39:case 40:c=1;break;case 8:case 33:case 37:case 38:c=-1;break;case 27:case 13:c=0}if(c!==null){if(c!=2)hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);if(!hs.enableKeyListener)return true;if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b){if(c==0)b.close();else if(c==2){if(b.slideshow)b.slideshow.hitSpace()}else{if(b.slideshow)b.slideshow.pause();hs.previousOrNext(b.key,c)}return false}}return true},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:"hsId"+hs.idCounter++}))},addSlideshow:function(a){var b=a.slideshowGroup;if(typeof b=="object")for(var c=0;c<b.length;c++){var d={};for(var e in a)d[e]=a[e];d.slideshowGroup=b[c];hs.push(hs.slideshows,d)}else hs.push(hs.slideshows,a)},getWrapperKey:function(c,f){var a,e=/^highslide-wrapper-([0-9]+)$/;a=c;while(a.parentNode){if(a.hsKey!==undefined)return a.hsKey;if(a.id&&e.test(a.id))return a.id.replace(e,"$1");a=a.parentNode}if(!f){a=c;while(a.parentNode){if(a.tagName&&hs.isHsAnchor(a))for(var b=0;b<hs.expanders.length;b++){var d=hs.expanders[b];if(d&&d.a==a)return b}a=a.parentNode}}return null},getExpander:function(a,b){if(typeof a=="undefined")return hs.expanders[hs.focusKey]||null;if(typeof a=="number")return hs.expanders[a]||null;if(typeof a=="string")a=hs.$(a);return hs.expanders[hs.getWrapperKey(a,b)]||null},isHsAnchor:function(a){return a.onclick&&a.onclick.toString().replace(/\s/g," ").match(/hs.(htmlE|e)xpand/)},reOrder:function(){for(var a=0;a<hs.expanders.length;a++)if(hs.expanders[a]&&hs.expanders[a].isExpanded)hs.focusTopmost()},mouseClickHandler:function(a){if(!a)a=window.event;if(a.button>1)return true;if(!a.target)a.target=a.srcElement;var c=a.target;while(c.parentNode&&!/highslide-(image|move|html|resize)/.test(c.className))c=c.parentNode;var b=hs.getExpander(c);if(b&&(b.isClosing||!b.isExpanded))return true;if(b&&a.type=="mousedown"){if(a.target.form)return true;var e=c.className.match(/highslide-(image|move|resize)/);if(e){hs.dragArgs={exp:b,type:e[1],left:b.x.pos,width:b.x.size,top:b.y.pos,height:b.y.size,clickX:a.clientX,clickY:a.clientY};hs.addEventListener(document,"mousemove",hs.dragHandler);if(a.preventDefault)a.preventDefault();if(/highslide-(image|html)-blur/.test(b.content.className)){b.focus();hs.hasFocused=true}return false}}else if(a.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.dragHandler);if(hs.dragArgs){if(hs.styleRestoreCursor&&hs.dragArgs.type=="image")hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor;var d=hs.dragArgs.hasDragged;if(!d&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type))b.close();else if(d||!d&&hs.hasHtmlExpanders)hs.dragArgs.exp.doShowHide("hidden");hs.hasFocused=false;hs.dragArgs=null}else if(/highslide-image-blur/.test(c.className))c.style.cursor=hs.styleRestoreCursor}return false},dragHandler:function(b){if(!hs.dragArgs)return true;if(!b)b=window.event;var a=hs.dragArgs,c=a.exp;a.dX=b.clientX-a.clickX;a.dY=b.clientY-a.clickY;var d=Math.sqrt(Math.pow(a.dX,2)+Math.pow(a.dY,2));if(!a.hasDragged)a.hasDragged=a.type!="image"&&d>0||d>(hs.dragSensitivity||5);if(a.hasDragged&&b.clientX>5&&b.clientY>5)if(a.type=="resize")c.resize(a);else{c.moveTo(a.left+a.dX,a.top+a.dY);if(a.type=="image")c.content.style.cursor="move"}return false},wrapperMouseHandler:function(a){try{if(!a)a=window.event;var c=/mouseover/i.test(a.type);if(!a.target)a.target=a.srcElement;if(hs.ie)a.relatedTarget=c?a.fromElement:a.toElement;var b=hs.getExpander(a.target);if(!b.isExpanded)return;if(!b||!a.relatedTarget||hs.getExpander(a.relatedTarget,true)==b||hs.dragArgs)return;for(var d=0;d<b.overlays.length;d++)(function(){var a=hs.$("hsId"+b.overlays[d]);if(a&&a.hideOnMouseOut){if(c)hs.setStyles(a,{visibility:"visible",display:""});hs.animate(a,{opacity:c?a.opacity:0},a.dur)}})()}catch(e){}},addEventListener:function(c,a,b){if(c==document&&a=="ready")hs.push(hs.onReady,b);try{c.addEventListener(a,b,false)}catch(d){try{c.detachEvent("on"+a,b);c.attachEvent("on"+a,b)}catch(e){c["on"+a]=b}}},removeEventListener:function(b,a,c){try{b.removeEventListener(a,c,false)}catch(d){try{b.detachEvent("on"+a,c)}catch(e){b["on"+a]=null}}},preloadFullImage:function(a){if(hs.continuePreloading&&hs.preloadTheseImages[a]&&hs.preloadTheseImages[a]!="undefined"){var b=document.createElement("img");b.onload=function(){b=null;hs.preloadFullImage(a+1)};b.src=hs.preloadTheseImages[a]}},preloadImages:function(b){if(b&&typeof b!="object")hs.numberOfImagesToPreload=b;var c=hs.getAnchors();for(var a=0;a<c.images.length&&a<hs.numberOfImagesToPreload;a++)hs.push(hs.preloadTheseImages,hs.getSrc(c.images[a]));if(hs.outlineType)new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});else hs.preloadFullImage(0);if(hs.restoreCursor)var d=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},init:function(){if(!hs.container){hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;for(var a in hs.langDefaults)if(typeof hs[a]!="undefined")hs.lang[a]=hs[a];else if(typeof hs.lang[a]=="undefined"&&typeof hs.langDefaults[a]!="undefined")hs.lang[a]=hs.langDefaults[a];hs.container=hs.createElement("div",{className:"highslide-container"},{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter,direction:"ltr"},document.body,true);hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:"javascript:;"},{position:"absolute",top:"-9999px",opacity:hs.loadingOpacity,zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);hs.viewport=hs.createElement("div",{className:"highslide-viewport highslide-viewport-size"},{visibility:hs.safari&&hs.uaVersion<525?"visible":"hidden"},hs.container,1);Math.linearTween=function(d,a,b,c){return b*d/c+a};Math.easeInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Math.easeOutQuad=function(a,b,c,d){return -c*(a/=d)*(a-2)+b};hs.hideSelects=hs.ieLt7;hs.hideIframes=window.opera&&hs.uaVersion<9||navigator.vendor=="KDE"||hs.ie&&hs.uaVersion<5.5}},ready:function(){if(hs.isReady)return;hs.isReady=true;for(var a=0;a<hs.onReady.length;a++)hs.onReady[a]()},updateAnchors:function(){var a,c,i=[],h=[],b={},d;for(var f=0;f<hs.openerTagNames.length;f++){c=document.getElementsByTagName(hs.openerTagNames[f]);for(var g=0;g<c.length;g++){a=c[g];d=hs.isHsAnchor(a);if(d){hs.push(i,a);if(d[0]=="hs.expand")hs.push(h,a);var e=hs.getParam(a,"slideshowGroup")||"none";if(!b[e])b[e]=[];hs.push(b[e],a)}}}hs.anchors={all:i,groups:b,images:h};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(b){var a=hs.getExpander(b);if(a)a.close();return false}};hs.fx=function(b,a,c){this.options=a;this.elem=b;this.prop=c;if(!a.orig)a.orig={}};hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._default)(this);if(this.options.step)this.options.step.call(this.elem,this.now,this)},custom:function(b,e,d){this.startTime=(new Date).getTime();this.start=b;this.end=e;this.unit=d;this.now=this.start;this.pos=this.state=0;var c=this;function a(a){return c.step(a)}a.elem=this.elem;if(a()&&hs.timers.push(a)==1)hs.timerId=setInterval(function(){var a=hs.timers;for(var b=0;b<a.length;b++)if(!a[b]())a.splice(b--,1);if(!a.length)clearInterval(hs.timerId)},13)},step:function(d){var c=(new Date).getTime();if(d||c>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var a=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)a=false;if(a)if(this.options.complete)this.options.complete.call(this.elem);return false}else{var b=c-this.startTime;this.state=b/this.options.duration;this.pos=this.options.easing(b,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};hs.extend(hs.fx,{step:{opacity:function(a){hs.setStyles(a.elem,{opacity:a.now})},_default:function(a){try{if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=a.now+a.unit;else a.elem[a.prop]=a.now}catch(b){}}}});hs.Outline=function(b,c){this.onLoad=c;this.outlineType=b;var e=hs.uaVersion,d;this.hasAlphaImageLoader=hs.ie&&e>=5.5&&e<7;if(!b){if(c)c();return}hs.init();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse",width:0},hs.container,true);var g=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var a=0;a<=8;a++){if(a%3==0)d=hs.createElement("tr",null,{height:"auto"},g,true);this.td[a]=hs.createElement("td",null,null,d,true);var f=a!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[a],f)}this.td[4].className=b+" highslide-outline";this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var c=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png",a=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",top:"-9999px"},a,true);var b=this;this.graphic.onload=function(){b.onGraphicLoad()};this.graphic.src=c},onGraphicLoad:function(){var b=this.offset=this.graphic.width/4,c=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],d={height:2*b+"px",width:2*b+"px"};for(var a=0;a<=8;a++)if(c[a]){if(this.hasAlphaImageLoader){var f=a==1||a==7?"100%":this.graphic.width+"px",e=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[a],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:f,height:this.graphic.height+"px",left:c[a][0]*b+"px",top:c[a][1]*b+"px"},e,true)}else hs.setStyles(this.td[a],{background:"url("+this.graphic.src+") "+c[a][0]*b+"px "+c[a][1]*b+"px"});if(window.opera&&(a==3||a==5))hs.createElement("div",null,d,this.td[a],true);hs.setStyles(this.td[a],d)}this.graphic=null;if(hs.pendingOutlines[this.outlineType])hs.pendingOutlines[this.outlineType].destroy();hs.pendingOutlines[this.outlineType]=this;if(this.onLoad)this.onLoad()},setPosition:function(a,b,d){var c=this.exp,g=c.wrapper.style,b=b||0,a=a||{x:c.x.pos+b,y:c.y.pos+b,w:c.x.get("wsize")-2*b,h:c.y.get("wsize")-2*b};if(d)this.table.style.visibility=a.h>=4*this.offset?"visible":"hidden";hs.setStyles(this.table,{left:a.x-this.offset+"px",top:a.y-this.offset+"px",width:a.w+2*this.offset+"px"});a.w-=2*this.offset;a.h-=2*this.offset;hs.setStyles(this.td[4],{width:a.w>=0?a.w+"px":0,height:a.h>=0?a.h+"px":0});if(this.hasAlphaImageLoader)this.td[3].style.height=this.td[5].style.height=this.td[4].style.height},destroy:function(a){if(a)this.table.style.visibility="hidden";else hs.discardElement(this.table)}};hs.Dimension=function(b,a){this.exp=b;this.dim=a;this.ucwh=a=="x"?"Width":"Height";this.wh=this.ucwh.toLowerCase();this.uclt=a=="x"?"Left":"Top";this.lt=this.uclt.toLowerCase();this.ucrb=a=="x"?"Right":"Bottom";this.rb=this.ucrb.toLowerCase();this.p1=this.p2=0};hs.Dimension.prototype={"get":function(a){switch(a){case "loadingPos":return this.tpos+this.tb+(this.t-hs.loading["offset"+this.ucwh])/2;case "loadingPosXfade":return this.pos+this.cb+this.p1+(this.size-hs.loading["offset"+this.ucwh])/2;case "wsize":return this.size+2*this.cb+this.p1+this.p2;case "fitsize":return this.clientSize-this.marginMin-this.marginMax;case "maxsize":return this.get("fitsize")-2*this.cb-this.p1-this.p2;case "opos":return this.pos-(this.exp.outline?this.exp.outline.offset:0);case "osize":return this.get("wsize")+(this.exp.outline?2*this.exp.outline.offset:0);case "imgPad":return this.imgSize?Math.round((this.size-this.imgSize)/2):0}},calcBorders:function(){this.cb=(this.exp.content["offset"+this.ucwh]-this.t)/2;this.marginMax=hs["margin"+this.ucrb]},calcThumb:function(){this.t=this.exp.el[this.wh]?parseInt(this.exp.el[this.wh]):this.exp.el["offset"+this.ucwh];this.tpos=this.exp.tpos[this.dim];this.tb=(this.exp.el["offset"+this.ucwh]-this.t)/2;if(this.tpos==0||this.tpos==-1)this.tpos=hs.page[this.wh]/2+hs.page["scroll"+this.uclt]},calcExpanded:function(){var a=this.exp;this.justify="auto";if(a.align=="center")this.justify="center";else if((new RegExp(this.lt)).test(a.anchor))this.justify=null;else if((new RegExp(this.rb)).test(a.anchor))this.justify="max";this.pos=this.tpos-this.cb+this.tb;if(this.dim=="x")a.maxWidth=Math.min(a.maxWidth||this.full,a.maxHeight*this.full/a.y.full);this.size=Math.min(this.full,a["max"+this.ucwh]||this.full);this.minSize=a.allowSizeReduction?Math.min(a["min"+this.ucwh],this.full):this.full;if(a.isImage&&a.useBox){this.size=a[this.wh];this.imgSize=this.full}if(this.dim=="x"&&hs.padToMinWidth)this.minSize=a.minWidth;this.target=a["target"+this.dim.toUpperCase()];this.marginMin=hs["margin"+this.uclt];this.scroll=hs.page["scroll"+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(b){var a=this.exp;if(a.isImage&&(a.useBox||hs.padToMinWidth)){this.imgSize=b;this.size=Math.max(this.size,this.imgSize);a.content.style[this.lt]=this.get("imgPad")+"px"}else this.size=b;a.content.style[this.wh]=b+"px";a.wrapper.style[this.wh]=this.get("wsize")+"px";if(a.outline)a.outline.setPosition();if(this.dim=="x"&&a.overlayBox)a.sizeOverlayBox(true);if(this.dim=="x"&&a.slideshow&&a.isImage)if(b==this.full)a.slideshow.disable("full-expand");else a.slideshow.enable("full-expand")},setPos:function(a){this.pos=a;this.exp.wrapper.style[this.lt]=a+"px";if(this.exp.outline)this.exp.outline.setPosition()}};hs.Expander=function(d,b,i,h){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,"ready",function(){new hs.Expander(d,b,i,h)});return}this.a=d;this.custom=i;this.contentType=h||"image";this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();var g=this.key=hs.expanders.length;for(var a=0;a<hs.overrides.length;a++){var e=hs.overrides[a];this[e]=b&&typeof b[e]!="undefined"?b[e]:hs[e]}if(!this.src)this.src=d.href;var c=b&&b.thumbnailId?hs.$(b.thumbnailId):d;c=this.thumb=c.getElementsByTagName("img")[0]||c;this.thumbsUserSetId=c.id||d.id;for(var a=0;a<hs.expanders.length;a++)if(hs.expanders[a]&&hs.expanders[a].a==d&&!(this.last&&this.transitions[1]=="crossfade")){hs.expanders[a].focus();return false}if(!hs.allowSimultaneousLoading)for(var a=0;a<hs.expanders.length;a++)if(hs.expanders[a]&&hs.expanders[a].thumb!=c&&!hs.expanders[a].onLoadStarted)hs.expanders[a].cancelLoading();hs.expanders[g]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[g-1])hs.expanders[g-1].close();if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey])hs.expanders[hs.focusKey].close()}this.el=c;this.tpos=hs.getPosition(c);hs.getPageSize();var j=this.x=new hs.Dimension(this,"x");j.calcThumb();var k=this.y=new hs.Dimension(this,"y");k.calcThumb();this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:"highslide-wrapper "+this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter+=2},null,true);this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler;if(this.contentType=="image"&&this.outlineWhileAnimating==2)this.outlineWhileAnimating=0;if(!this.outlineType||this.last&&this.isImage&&this.transitions[1]=="crossfade")this[this.contentType+"Create"]();else if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{this.showLoading();var f=this;new hs.Outline(this.outlineType,function(){f.connectOutline();f[f.contentType+"Create"]()})}return true};hs.Expander.prototype={error:function(){window.location.href=this.src},connectOutline:function(){var a=this.outline=hs.pendingOutlines[this.outlineType];a.exp=this;a.table.style.zIndex=this.wrapper.style.zIndex-1;hs.pendingOutlines[this.outlineType]=null},showLoading:function(){if(this.onLoadStarted||this.loading)return;this.loading=hs.loading;var b=this;this.loading.onclick=function(){b.cancelLoading()};var b=this,c=this.x.get("loadingPos")+"px",d=this.y.get("loadingPos")+"px";if(!a&&this.last&&this.transitions[1]=="crossfade")var a=this.last;if(a){c=a.x.get("loadingPosXfade")+"px";d=a.y.get("loadingPosXfade")+"px";this.loading.style.zIndex=hs.zIndexCounter++}setTimeout(function(){if(b.loading)hs.setStyles(b.loading,{left:c,top:d,zIndex:hs.zIndexCounter++})},100)},imageCreate:function(){var b=this,a=document.createElement("img");this.content=a;a.onload=function(){if(hs.expanders[b.key])b.contentLoaded()};if(hs.blockRightClick)a.oncontextmenu=function(){return false};a.className="highslide-image";hs.setStyles(a,{visibility:"hidden",display:"block",position:"absolute",maxWidth:"9999px",zIndex:3});a.title=hs.lang.restoreTitle;if(hs.safari)hs.container.appendChild(a);if(hs.ie&&hs.flushImgSize)a.src=null;a.src=this.src;this.showLoading()},contentLoaded:function(){try{if(!this.content)return;this.content.onload=null;if(this.onLoadStarted)return;else this.onLoadStarted=true;var b=this.x,c=this.y;if(this.loading){hs.setStyles(this.loading,{top:"-9999px"});this.loading=null}b.full=this.content.width;c.full=this.content.height;hs.setStyles(this.content,{width:b.t+"px",height:c.t+"px"});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper);b.calcBorders();c.calcBorders();hs.setStyles(this.wrapper,{left:b.tpos+b.tb-b.cb+"px",top:c.tpos+b.tb-c.cb+"px"});this.initSlideshow();this.getOverlays();var g=b.full/c.full;b.calcExpanded();this.justify(b);c.calcExpanded();this.justify(c);if(this.overlayBox)this.sizeOverlayBox(0,1);if(this.allowSizeReduction){this.correctRatio(g);var e=this.slideshow;if(e&&this.last&&e.controls&&e.fixedControls){var h=e.overlayOptions.position||"",a;for(var d in hs.oPos)for(var f=0;f<5;f++){a=this[d];if(h.match(hs.oPos[d][f])){a.pos=this.last[d].pos+(this.last[d].p1-a.p1)+(this.last[d].size-a.size)*([0,0,.5,1,1])[f];if(e.fixedControls=="fit"){if(a.pos+a.size+a.p1+a.p2>a.scroll+a.clientSize-a.marginMax)a.pos=a.scroll+a.clientSize-a.size-a.marginMin-a.marginMax-a.p1-a.p2;if(a.pos<a.scroll+a.marginMin)a.pos=a.scroll+a.marginMin}}}}if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1)this.sizeOverlayBox()}}this.show()}catch(i){this.error(i)}},justify:function(a,e){var c,b=a.target,f=a==this.x?"x":"y";if(b&&b.match(/ /)){c=b.split(" ");b=c[0]}if(b&&hs.$(b)){a.pos=hs.getPosition(hs.$(b))[f];if(c&&c[1]&&c[1].match(/^[-]?[0-9]+px$/))a.pos+=parseInt(c[1]);if(a.size<a.minSize)a.size=a.minSize}else if(a.justify=="auto"||a.justify=="center"){var g=false,d=a.exp.allowSizeReduction;if(a.justify=="center")a.pos=Math.round(a.scroll+(a.clientSize+a.marginMin-a.marginMax-a.get("wsize"))/2);else a.pos=Math.round(a.pos-(a.get("wsize")-a.t)/2);if(a.pos<a.scroll+a.marginMin){a.pos=a.scroll+a.marginMin;g=true}if(!e&&a.size<a.minSize){a.size=a.minSize;d=false}if(a.pos+a.get("wsize")>a.scroll+a.clientSize-a.marginMax)if(!e&&g&&d)a.size=Math.min(a.size,a.get(f=="y"?"fitsize":"maxsize"));else if(a.get("wsize")<a.get("fitsize"))a.pos=a.scroll+a.clientSize-a.marginMax-a.get("wsize");else{a.pos=a.scroll+a.marginMin;if(!e&&d)a.size=a.get(f=="y"?"fitsize":"maxsize")}if(!e&&a.size<a.minSize){a.size=a.minSize;d=false}}else if(a.justify=="max")a.pos=Math.floor(a.pos-a.size+a.t);if(a.pos<a.marginMin){var h=a.pos;a.pos=a.marginMin;if(d&&!e)a.size=a.size-(a.pos-h)}},correctRatio:function(d){var b=this.x,a=this.y,f=false,c=Math.min(b.full,b.size),e=Math.min(a.full,a.size),g=this.useBox||hs.padToMinWidth;if(c/e>d){c=e*d;if(c<b.minSize){c=b.minSize;e=c/d}f=true}else if(c/e<d){e=c/d;f=true}if(hs.padToMinWidth&&b.full<b.minSize){b.imgSize=b.full;a.size=a.imgSize=a.full}else if(this.useBox){b.imgSize=c;a.imgSize=e}else{b.size=c;a.size=e}f=this.fitOverlayBox(g?null:d,f);if(g&&a.size<a.imgSize){a.imgSize=a.size;b.imgSize=a.size*d}if(f||g){b.pos=b.tpos-b.cb+b.tb;b.minSize=b.size;this.justify(b,true);a.pos=a.tpos-a.cb+a.tb;a.minSize=a.size;this.justify(a,true);if(this.overlayBox)this.sizeOverlayBox()}},fitOverlayBox:function(c,b){var d=this.x,a=this.y;if(this.overlayBox)while(a.size>this.minHeight&&d.size>this.minWidth&&a.get("wsize")>a.get("fitsize")){a.size-=10;if(c)d.size=a.size*c;this.sizeOverlayBox(0,1);b=true}return b},show:function(){var a=this.x,b=this.y;this.doShowHide("hidden");if(this.slideshow&&this.slideshow.thumbstrip)this.slideshow.thumbstrip.selectThumb();this.changeSize(1,{wrapper:{width:a.get("wsize"),height:b.get("wsize"),left:a.pos,top:b.pos},content:{left:a.p1+a.get("imgPad"),top:b.p1+b.get("imgPad"),width:a.imgSize||a.size,height:b.imgSize||b.size}},hs.expandDuration)},changeSize:function(a,g,j){var f=this.transitions,i=a?this.last?this.last.a:null:hs.upcoming,h=f[1]&&i&&hs.getParam(i,"transitions")[1]==f[1]?f[1]:f[0];if(this[h]&&h!="expand"){this[h](a,g);return}if(this.outline&&!this.outlineWhileAnimating)if(a)this.outline.setPosition();else this.outline.destroy();if(!a)this.destroyOverlays();var b=this,c=b.x,d=b.y,e=this.easing;if(!a)e=this.easingClose||e;var k=a?function(){if(b.outline)b.outline.table.style.visibility="visible";setTimeout(function(){b.afterExpand()},50)}:function(){b.afterClose()};if(a)hs.setStyles(this.wrapper,{width:c.t+"px",height:d.t+"px"});if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:a?0:1});hs.extend(g.wrapper,{opacity:a})}hs.animate(this.wrapper,g.wrapper,{duration:j,easing:e,step:function(h,f){if(b.outline&&b.outlineWhileAnimating&&f.prop=="top"){var e=a?f.pos:1-f.pos,g={w:c.t+(c.get("wsize")-c.t)*e,h:d.t+(d.get("wsize")-d.t)*e,x:c.tpos+(c.pos-c.tpos)*e,y:d.tpos+(d.pos-d.tpos)*e};b.outline.setPosition(g,0,1)}}});hs.animate(this.content,g.content,j,e,k);if(a){this.wrapper.style.visibility="visible";this.content.style.visibility="visible";this.a.className+=" highslide-active-anchor"}},fade:function(b,i){this.outlineWhileAnimating=false;var a=this,d=b?hs.expandDuration:0;if(b){hs.animate(this.wrapper,i.wrapper,0);hs.setStyles(this.wrapper,{opacity:0,visibility:"visible"});hs.animate(this.content,i.content,0);this.content.style.visibility="visible";hs.animate(this.wrapper,{opacity:1},d,null,function(){a.afterExpand()})}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var e=b||-1,h=this.outline.offset,f=b?3:h,g=b?h:3;for(var c=f;e*c<=e*g;c+=e,d+=25)(function(){var e=b?g-c:f-c;setTimeout(function(){a.outline.setPosition(0,e,1)},d)})()}if(!b)setTimeout(function(){if(a.outline)a.outline.destroy(a.preserveContent);a.destroyOverlays();hs.animate(a.wrapper,{opacity:0},hs.restoreDuration,null,function(){a.afterClose()})},d)},crossfade:function(n){if(!n)return;var f=this,e=this.last,a=this.x,b=this.y,c=e.x,d=e.y,i=this.wrapper,j=this.content,g=this.overlayBox;hs.removeEventListener(document,"mousemove",hs.dragHandler);hs.setStyles(j,{width:(a.imgSize||a.size)+"px",height:(b.imgSize||b.size)+"px"});if(g)g.style.overflow="visible";this.outline=e.outline;if(this.outline)this.outline.exp=f;e.outline=null;var h=hs.createElement("div",{className:"highslide-image"},{position:"absolute",zIndex:4,overflow:"hidden",display:"none"}),m={oldImg:e,newImg:this};for(var k in m){this[k]=m[k].content.cloneNode(1);hs.setStyles(this[k],{position:"absolute",border:0,visibility:"visible"});h.appendChild(this[k])}i.appendChild(h);if(g){g.className="";i.appendChild(g)}h.style.display="";e.content.style.display="none";if(hs.safari){var l=navigator.userAgent.match(/Safari\/([0-9]{3})/);if(l&&parseInt(l[1])<525)this.wrapper.style.visibility="visible"}hs.animate(i,{width:a.size},{duration:hs.transitionDuration,step:function(r,p){var l=p.pos,n=1-l,m,k={},o=["pos","size","p1","p2"];for(var q in o){m=o[q];k["x"+m]=n*c[m]+l*a[m];k["y"+m]=n*d[m]+l*b[m];k.ximgSize=n*(c.imgSize||c.size)+l*(a.imgSize||a.size);k.ximgPad=n*c.get("imgPad")+l*a.get("imgPad");k.yimgSize=n*(d.imgSize||d.size)+l*(b.imgSize||b.size);k.yimgPad=n*d.get("imgPad")+l*b.get("imgPad")}if(f.outline)f.outline.setPosition({x:k.xpos,y:k.ypos,w:k.xsize+k.xp1+k.xp2+2*a.cb,h:k.ysize+k.yp1+k.yp2+2*b.cb});e.wrapper.style.clip="rect("+(k.ypos-d.pos)+"px, "+(k.xsize+k.xp1+k.xp2+k.xpos+2*c.cb-c.pos)+"px, "+(k.ysize+k.yp1+k.yp2+k.ypos+2*d.cb-d.pos)+"px, "+(k.xpos-c.pos)+"px)";hs.setStyles(j,{top:k.yp1+b.get("imgPad")+"px",left:k.xp1+a.get("imgPad")+"px",marginTop:b.pos-k.ypos+"px",marginLeft:a.pos-k.xpos+"px"});hs.setStyles(i,{top:k.ypos+"px",left:k.xpos+"px",width:k.xp1+k.xp2+k.xsize+2*a.cb+"px",height:k.yp1+k.yp2+k.ysize+2*b.cb+"px"});hs.setStyles(h,{width:(k.ximgSize||k.xsize)+"px",height:(k.yimgSize||k.ysize)+"px",left:k.xp1+k.ximgPad+"px",top:k.yp1+k.yimgPad+"px",visibility:"visible"});hs.setStyles(f.oldImg,{top:d.pos-k.ypos+d.p1-k.yp1+d.get("imgPad")-k.yimgPad+"px",left:c.pos-k.xpos+c.p1-k.xp1+c.get("imgPad")-k.ximgPad+"px"});hs.setStyles(f.newImg,{opacity:l,top:b.pos-k.ypos+b.p1-k.yp1+b.get("imgPad")-k.yimgPad+"px",left:a.pos-k.xpos+a.p1-k.xp1+a.get("imgPad")-k.ximgPad+"px"});if(g)hs.setStyles(g,{width:k.xsize+"px",height:k.ysize+"px",left:k.xp1+a.cb+"px",top:k.yp1+b.cb+"px"})},complete:function(){i.style.visibility=j.style.visibility="visible";j.style.display="block";h.style.display="none";f.a.className+=" highslide-active-anchor";f.afterExpand();e.afterClose();f.last=null}})},reuseOverlay:function(c){if(!this.last)return false;for(var a=0;a<this.last.overlays.length;a++){var b=hs.$("hsId"+this.last.overlays[a]);if(b&&b.hsId==c.hsId){this.genOverlayBox();b.reuse=this.key;hs.push(this.overlays,this.last.overlays[a]);return true}}return false},afterExpand:function(){this.isExpanded=true;this.focus();if(this.dimmingOpacity)hs.dim(this);if(hs.upcoming&&hs.upcoming==this.a)hs.upcoming=null;this.prepareNextOutline();var c=hs.page,a=hs.mouse.x+c.scrollLeft,b=hs.mouse.y+c.scrollTop;this.mouseIsOver=this.x.pos<a&&a<this.x.pos+this.x.get("wsize")&&this.y.pos<b&&b<this.y.pos+this.y.get("wsize");if(this.overlayBox)this.showOverlays()},prepareNextOutline:function(){var b=this.key,a=this.outlineType;new hs.Outline(a,function(){try{hs.expanders[b].preloadNext()}catch(a){}})},preloadNext:function(){var a=this.getAdjacentAnchor(1);if(a&&a.onclick.toString().match(/hs\.expand/))var b=hs.createElement("img",{src:hs.getSrc(a)})},getAdjacentAnchor:function(b){var c=this.getAnchorIndex(),a=hs.anchors.groups[this.slideshowGroup||"none"];if(!a[c+b]&&this.slideshow&&this.slideshow.repeat)if(b==1)return a[0];else if(b==-1)return a[a.length-1];return a[c+b]||null},getAnchorIndex:function(){var b=hs.getAnchors().groups[this.slideshowGroup||"none"];if(b)for(var a=0;a<b.length;a++)if(b[a]==this.a)return a;return null},getNumber:function(){if(this[this.numberPosition]){var a=hs.anchors.groups[this.slideshowGroup||"none"];if(a){var b=hs.lang.number.replace("%1",this.getAnchorIndex()+1).replace("%2",a.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+b+"</div>"+this[this.numberPosition].innerHTML}}},initSlideshow:function(){if(!this.last)for(var c=0;c<hs.slideshows.length;c++){var a=hs.slideshows[c],b=a.slideshowGroup;if(typeof b=="undefined"||b===null||b===this.slideshowGroup)this.slideshow=new hs.Slideshow(this.key,a)}else this.slideshow=this.last.slideshow;var a=this.slideshow;if(!a)return;var e=a.expKey=this.key;a.checkFirstAndLast();a.disable("full-expand");if(a.controls){var d=a.overlayOptions||{};d.overlayId=a.controls;d.hsId="controls";this.createOverlay(d)}if(a.thumbstrip)a.thumbstrip.add(this);if(!this.last&&this.autoplay)a.play(true);if(a.autoplay)a.autoplay=setTimeout(function(){hs.next(e)},a.interval||500)},cancelLoading:function(){hs.discardElement(this.wrapper);hs.expanders[this.key]=null;if(hs.upcoming==this.a)hs.upcoming=null;hs.undim(this.key);if(this.loading)hs.loading.style.left="-9999px"},writeCredits:function(){if(this.credits)return;this.credits=hs.createElement("a",{href:hs.creditsHref,target:hs.creditsTarget,className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:this.creditsPosition||"top left",hsId:"credits"})},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if(!this[type+"Id"]&&this.thumbsUserSetId)this[type+"Id"]=type+"-for-"+this.thumbsUserSetId;if(this[type+"Id"])this[type]=hs.getNode(this[type+"Id"]);if(!this[type]&&!this[type+"Text"]&&this[type+"Eval"])try{s=eval(this[type+"Eval"])}catch(a){}if(!this[type]&&this[type+"Text"])s=this[type+"Text"];if(!this[type]&&!s){this[type]=hs.getNode(this.a["_"+type+"Id"]);if(!this[type]){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if((new RegExp("highslide-"+type)).test(next.className||null)){if(!next.id)this.a["_"+type+"Id"]=next.id="hsId"+hs.idCounter++;this[type]=hs.getNode(next.id);break}next=next.nextSibling}}}if(!this[type]&&!s&&this.numberPosition==type)s="\n";if(!this[type]&&s)this[type]=hs.createElement("div",{className:"highslide-"+type,innerHTML:s});if(addOverlay&&this[type]){var o={position:type=="heading"?"above":"below"};for(var x in this[type+"Overlay"])o[x]=this[type+"Overlay"][x];o.overlayId=this[type];this.createOverlay(o)}}},doShowHide:function(a){if(hs.hideSelects)this.showHideElements("SELECT",a);if(hs.hideIframes)this.showHideElements("IFRAME",a);if(hs.geckoMac)this.showHideElements("*",a)},showHideElements:function(h,g){var b=document.getElementsByTagName(h),e=h=="*"?"overflow":"visibility";for(var a=0;a<b.length;a++)if(e=="visibility"||(document.defaultView.getComputedStyle(b[a],"").getPropertyValue("overflow")=="auto"||b[a].getAttribute("hidden-by")!=null)){var c=b[a].getAttribute("hidden-by");if(g=="visible"&&c){c=c.replace("["+this.key+"]","");b[a].setAttribute("hidden-by",c);if(!c)b[a].style[e]=b[a].origProp}else if(g=="hidden"){var d=hs.getPosition(b[a]);d.w=b[a].offsetWidth;d.h=b[a].offsetHeight;if(!this.dimmingOpacity)var i=d.x+d.w<this.x.get("opos")||d.x>this.x.get("opos")+this.x.get("osize"),j=d.y+d.h<this.y.get("opos")||d.y>this.y.get("opos")+this.y.get("osize");var f=hs.getWrapperKey(b[a]);if(!i&&!j&&f!=this.key){if(!c){b[a].setAttribute("hidden-by","["+this.key+"]");b[a].origProp=b[a].style[e];b[a].style[e]="hidden"}else if(c.indexOf("["+this.key+"]")==-1)b[a].setAttribute("hidden-by",c+"["+this.key+"]")}else if((c=="["+this.key+"]"||hs.focusKey==f)&&f!=this.key){b[a].setAttribute("hidden-by","");b[a].style[e]=b[a].origProp||""}else if(c&&c.indexOf("["+this.key+"]")>-1)b[a].setAttribute("hidden-by",c.replace("["+this.key+"]",""))}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var a=0;a<hs.expanders.length;a++)if(hs.expanders[a]&&a==hs.focusKey){var b=hs.expanders[a];b.content.className+=" highslide-"+b.contentType+"-blur";b.content.style.cursor=hs.ie?"hand":"pointer";b.content.title=hs.lang.focusTitle}if(this.outline)this.outline.table.style.zIndex=this.wrapper.style.zIndex-1;this.content.className="highslide-"+this.contentType;this.content.title=hs.lang.restoreTitle;if(hs.restoreCursor){hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer";if(hs.ie&&hs.uaVersion<6)hs.styleRestoreCursor="hand";this.content.style.cursor=hs.styleRestoreCursor}hs.focusKey=this.key;hs.addEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler)},moveTo:function(a,b){this.x.setPos(a);this.y.setPos(b)},resize:function(c){var a,b,d=c.width/c.height;a=Math.max(c.width+c.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(a-this.x.full)<12)a=this.x.full;b=a/d;if(b<Math.min(this.minHeight,this.y.full)){b=Math.min(this.minHeight,this.y.full);if(this.isImage)a=b*d}this.resizeTo(a,b)},resizeTo:function(b,a){this.y.setSize(a);this.x.setSize(b);this.wrapper.style.height=this.y.get("wsize")+"px"},close:function(){if(this.isClosing||!this.isExpanded)return;if(this.transitions[1]=="crossfade"&&hs.upcoming){hs.getExpander(hs.upcoming).cancelLoading();hs.upcoming=null}this.isClosing=true;if(this.slideshow&&!hs.upcoming)this.slideshow.pause();hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{this.content.style.cursor="default";this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(a){this.afterClose()}},createOverlay:function(a){var c=a.overlayId,d=a.relativeTo=="viewport"&&!/panel$/.test(a.position);if(typeof c=="string")c=hs.getNode(c);if(a.html)c=hs.createElement("div",{innerHTML:a.html});if(!c||typeof c=="string")return;c.style.display="block";a.hsId=a.hsId||a.overlayId;if(this.transitions[1]=="crossfade"&&this.reuseOverlay(a,c))return;this.genOverlayBox();var e=a.width&&/^[0-9]+(px|%)$/.test(a.width)?a.width:"auto";if(/^(left|right)panel$/.test(a.position)&&!/^[0-9]+px$/.test(a.width))e="200px";var b=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:a.hsId},{position:"absolute",visibility:"hidden",width:e,direction:hs.lang.cssDirection||"",opacity:0},d?hs.viewport:this.overlayBox,true);if(d)b.hsKey=this.key;b.appendChild(c);hs.extend(b,{opacity:1,offsetX:0,offsetY:0,dur:a.fade===0||a.fade===false||a.fade==2&&hs.ie?0:250});hs.extend(b,a);if(this.gotOverlays){this.positionOverlay(b);if(!b.hideOnMouseOut||this.mouseIsOver)hs.animate(b,{opacity:b.opacity},b.dur)}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(a){var b=a.position||"middle center",e=a.relativeTo=="viewport",c=a.offsetX,d=a.offsetY;if(e){hs.viewport.style.display="block";a.hsKey=this.key;if(a.offsetWidth>a.parentNode.offsetWidth)a.style.width="100%"}else if(a.parentNode!=this.overlayBox)this.overlayBox.appendChild(a);if(/left$/.test(b))a.style.left=c+"px";if(/center$/.test(b))hs.setStyles(a,{left:"50%",marginLeft:c-Math.round(a.offsetWidth/2)+"px"});if(/right$/.test(b))a.style.right=-c+"px";if(/^leftpanel$/.test(b)){hs.setStyles(a,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p1=a.offsetWidth}else if(/^rightpanel$/.test(b)){hs.setStyles(a,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p2=a.offsetWidth}var f=a.parentNode.offsetHeight;a.style.height="auto";if(e&&a.offsetHeight>f)a.style.height=hs.ieLt7?f+"px":"100%";if(/^top/.test(b))a.style.top=d+"px";if(/^middle/.test(b))hs.setStyles(a,{top:"50%",marginTop:d-Math.round(a.offsetHeight/2)+"px"});if(/^bottom/.test(b))a.style.bottom=-d+"px";if(/^above$/.test(b)){hs.setStyles(a,{left:-this.x.p1-this.x.cb+"px",right:-this.x.p2-this.x.cb+"px",bottom:"100%",marginBottom:this.y.cb+"px",width:"auto"});this.y.p1=a.offsetHeight}else if(/^below$/.test(b)){hs.setStyles(a,{position:"relative",left:-this.x.p1-this.x.cb+"px",right:-this.x.p2-this.x.cb+"px",top:"100%",marginTop:this.y.cb+"px",width:"auto"});this.y.p2=a.offsetHeight;a.style.position="absolute"}},getOverlays:function(){this.getInline(["heading","caption"],true);this.getNumber();if(this.heading&&this.dragByHeading)this.heading.className+=" highslide-move";if(hs.showCredits)this.writeCredits();for(var a=0;a<hs.overlays.length;a++){var b=hs.overlays[a],c=b.thumbnailId,e=b.slideshowGroup;if(!c&&!e||c&&c==this.thumbsUserSetId||e&&e===this.slideshowGroup)this.createOverlay(b)}var d=[];for(var a=0;a<this.overlays.length;a++){var b=hs.$("hsId"+this.overlays[a]);if(/panel$/.test(b.position))this.positionOverlay(b);else hs.push(d,b)}for(var a=0;a<d.length;a++)this.positionOverlay(d[a]);this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox)this.overlayBox=hs.createElement("div",{className:this.wrapperClassName},{position:"absolute",width:(this.x.size||(this.useBox?this.width:null)||this.x.full)+"px",height:(this.y.size||this.y.full)+"px",visibility:"hidden",overflow:"hidden",zIndex:hs.ie?4:"auto"},hs.container,true)},sizeOverlayBox:function(f,h){var c=this.overlayBox,d=this.x,b=this.y;hs.setStyles(c,{width:d.size+"px",height:b.size+"px"});if(f||h)for(var e=0;e<this.overlays.length;e++){var a=hs.$("hsId"+this.overlays[e]),g=hs.ieLt7||document.compatMode=="BackCompat";if(a&&/^(above|below)$/.test(a.position)){if(g)a.style.width=c.offsetWidth+2*d.cb+d.p1+d.p2+"px";b[a.position=="above"?"p1":"p2"]=a.offsetHeight}if(a&&g&&/^(left|right)panel$/.test(a.position))a.style.height=c.offsetHeight+2*b.cb+"px"}if(f){hs.setStyles(this.content,{top:b.p1+"px"});hs.setStyles(c,{top:b.p1+b.cb+"px"})}},showOverlays:function(){var b=this.overlayBox;b.className="";hs.setStyles(b,{top:this.y.p1+this.y.cb+"px",left:this.x.p1+this.x.cb+"px",overflow:"visible"});if(hs.safari)b.style.visibility="visible";this.wrapper.appendChild(b);for(var c=0;c<this.overlays.length;c++){var a=hs.$("hsId"+this.overlays[c]);a.style.zIndex=a.hsId=="controls"?5:4;if(!a.hideOnMouseOut||this.mouseIsOver){a.style.visibility="visible";hs.setStyles(a,{visibility:"visible",display:""});hs.animate(a,{opacity:a.opacity},a.dur)}}},destroyOverlays:function(){if(!this.overlays.length)return;if(this.slideshow){var a=this.slideshow.controls;if(a&&hs.getExpander(a)==this)a.parentNode.removeChild(a)}for(var c=0;c<this.overlays.length;c++){var b=hs.$("hsId"+this.overlays[c]);if(b&&b.parentNode==hs.viewport&&hs.getExpander(b)==this)hs.discardElement(b)}hs.discardElement(this.overlayBox)},createFullExpand:function(){if(this.slideshow&&this.slideshow.controls){this.slideshow.enable("full-expand");return}this.fullExpandLabel=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.lang.fullExpandTitle,className:"highslide-full-expand"});this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity})},doFullExpand:function(){try{if(this.fullExpandLabel)hs.discardElement(this.fullExpandLabel);this.focus();var b=this.x.size;this.resizeTo(this.x.full,this.y.full);var a=this.x.pos-(this.x.size-b)/2;if(a<hs.marginLeft)a=hs.marginLeft;this.moveTo(a,this.y.pos);this.doShowHide("hidden")}catch(c){this.error(c)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");this.doShowHide("visible");if(this.outline&&this.outlineWhileAnimating)this.outline.destroy();hs.discardElement(this.wrapper);this.destroyOverlays();if(!hs.viewport.childNodes.length)hs.viewport.style.display="none";if(this.dimmingOpacity)hs.undim(this.key);hs.expanders[this.key]=null;hs.reOrder()}};hs.Slideshow=function(c,a){if(hs.dynamicallyUpdateAnchors!==false)hs.updateAnchors();this.expKey=c;for(var b in a)this[b]=a[b];if(this.useControls)this.getControls();if(this.thumbstrip)this.thumbstrip=hs.Thumbstrip(this)};hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement("div",{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var b=["play","pause","previous","next","move","full-expand","close"];this.btn={};var c=this;for(var a=0;a<b.length;a++){this.btn[b[a]]=hs.getElementByClass(this.controls,"li","highslide-"+b[a]);this.enable(b[a])}this.btn.pause.style.display="none"},checkFirstAndLast:function(){if(this.repeat||!this.controls)return;var b=hs.expanders[this.expKey],a=b.getAnchorIndex(),c=/disabled$/;if(a==0)this.disable("previous");else if(c.test(this.btn.previous.getElementsByTagName("a")[0].className))this.enable("previous");if(a+1==hs.anchors.groups[b.slideshowGroup||"none"].length){this.disable("next");this.disable("play")}else if(c.test(this.btn.next.getElementsByTagName("a")[0].className)){this.enable("next");this.enable("play")}},enable:function(b){if(!this.btn)return;var d=this,a=this.btn[b].getElementsByTagName("a")[0],c=/disabled$/;a.onclick=function(){d[b]();return false};if(c.test(a.className))a.className=a.className.replace(c,"")},disable:function(b){if(!this.btn)return;var a=this.btn[b].getElementsByTagName("a")[0];a.onclick=function(){return false};if(!/disabled$/.test(a.className))a.className+=" disabled"},hitSpace:function(){if(this.autoplay)this.pause();else this.play()},play:function(a){if(this.btn){this.btn.play.style.display="none";this.btn.pause.style.display=""}this.autoplay=true;if(!a)hs.next(this.expKey)},pause:function(){if(this.btn){this.btn.pause.style.display="none";this.btn.play.style.display=""}clearTimeout(this.autoplay);this.autoplay=null},previous:function(){this.pause();hs.previous(this.btn.previous)},next:function(){this.pause();hs.next(this.btn.next)},move:function(){},"full-expand":function(){hs.getExpander().doFullExpand()},close:function(){hs.close(this.btn.close)}};hs.Thumbstrip=function(i){function t(a){hs.extend(d||{},{overlayId:c,hsId:"thumbstrip",className:"highslide-thumbstrip-"+h+"-overlay "+(d.className||"")});if(hs.ieLt7)d.fade=0;a.createOverlay(d);hs.setStyles(c.parentNode,{overflow:"hidden"})}function j(b){l(undefined,Math.round(b*c[a?"offsetWidth":"offsetHeight"]*.7))}function l(d,w){if(d===undefined)for(var e=0;e<g.length;e++)if(g[e]==hs.expanders[i.expKey].a){d=e;break}if(d===undefined)return;var h=c.getElementsByTagName("a"),x=h[d],j=x.parentNode,z=a?"Left":"Top",B=a?"Right":"Bottom",y=a?"Width":"Height",l="offset"+z,f="offset"+y,q=r.parentNode.parentNode[f],s=q-k[f],n=parseInt(k.style[a?"left":"top"])||0,b=n,A=20;if(w!==undefined){b=n-w;if(b>0)b=0;if(b<s)b=s}else{for(var e=0;e<h.length;e++)h[e].className="";x.className="highslide-active-anchor";var u=d>0?h[d-1].parentNode[l]:j[l],t=j[l]+j[f]+(h[d+1]?h[d+1].parentNode[f]:0);if(t>q-n)b=q-t;else if(u<-n)b=-u}var v=j[l]+(j[f]-p[f])/2+b;hs.animate(k,a?{left:b}:{top:b},null,"easeOutQuad");hs.animate(p,a?{left:v}:{top:v},null,"easeOutQuad");o.style.display=b<0?"block":"none";m.style.display=b>s?"block":"none"}var g=hs.anchors.groups[hs.expanders[i.expKey].slideshowGroup||"none"],d=i.thumbstrip,h=d.mode||"horizontal",n=h=="float",b=n?["div","ul","li","span"]:["table","tbody","tr","td"],a=h=="horizontal",c=hs.createElement("div",{className:"highslide-thumbstrip highslide-thumbstrip-"+h,innerHTML:'<div class="highslide-thumbstrip-inner"><'+b[0]+"><"+b[1]+"></"+b[1]+"></"+b[0]+"></div>"+'<div class="highslide-scroll-up"><div></div></div>'+'<div class="highslide-scroll-down"><div></div></div>'+'<div class="highslide-marker"><div></div></div>'},{display:"none"},hs.container),f=c.childNodes,r=f[0],o=f[1],m=f[2],p=f[3],k=r.firstChild,q=c.getElementsByTagName(b[1])[0],s;for(var e=0;e<g.length;e++){if(e==0||!a)s=hs.createElement(b[2],null,null,q);(function(){var a=g[e],c=hs.createElement(b[3],null,null,s),d=e;hs.createElement("a",{href:a.href,onclick:function(){hs.getExpander(this).focus();return hs.transit(a)},innerHTML:hs.stripItemFormatter?hs.stripItemFormatter(a):a.innerHTML},null,c)})()}if(!n){o.onclick=function(){j(-1)};m.onclick=function(){j(1)};hs.addEventListener(q,document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll",function(a){var b=0;a=a||window.event;if(a.wheelDelta){b=a.wheelDelta/120;if(hs.opera)b=-b}else if(a.detail)b=-a.detail/3;if(b)j(-b*.2);if(a.preventDefault)a.preventDefault();a.returnValue=false})}return {add:t,selectThumb:l}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;if(hs.ie)(function(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,50);return}hs.ready()})();hs.addEventListener(document,"DOMContentLoaded",hs.ready);hs.addEventListener(window,"load",hs.ready);hs.addEventListener(document,"ready",function(){if(hs.expandCursor||hs.dimmingOpacity){var c=hs.createElement("style",{type:"text/css"},null,document.getElementsByTagName("HEAD")[0]);function b(d,b){if(!hs.ie)c.appendChild(document.createTextNode(d+" {"+b+"}"));else{var a=document.styleSheets[document.styleSheets.length-1];if(typeof a.addRule=="object")a.addRule(d,b)}}function a(a){return "expression( ( ( ignoreMe = document.documentElement."+a+" ? document.documentElement."+a+" : document.body."+a+" ) ) + 'px' );"}if(hs.expandCursor)b(".highslide img","cursor: url("+hs.graphicsDir+hs.expandCursor+"), pointer !important;");b(".highslide-viewport-size",hs.ieLt7||hs.ie&&document.compatMode=="BackCompat"?"position: absolute; left:"+a("scrollLeft")+"top:"+a("scrollTop")+"width:"+a("clientWidth")+"height:"+a("clientHeight"):"position: fixed; width: 100%; height: 100%; left: 0; top: 0")}});hs.addEventListener(window,"resize",function(){hs.getPageSize();if(hs.viewport)for(var b=0;b<hs.viewport.childNodes.length;b++){var a=hs.viewport.childNodes[b],c=hs.getExpander(a);c.positionOverlay(a);if(a.hsId=="thumbstrip")c.slideshow.thumbstrip.selectThumb()}});hs.addEventListener(document,"mousemove",function(a){hs.mouse={x:a.clientX,y:a.clientY}});hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(document,"ready",hs.getAnchors);hs.addEventListener(window,"load",hs.preloadImages)}