var hs={graphicsDir:"highslide/graphics/",restoreCursor:"zoomout.cur",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous.",loadingText:"Loading...",loadingTitle:"Click to cancel",loadingOpacity:0.75,focusTitle:"Click to bring to front",allowMultipleInstances:true,numberOfImagesToPreload:5,captionSlideSpeed:1,padToMinWidth:false,outlineWhileAnimating:2,outlineStartOffset:3,fullExpandTitle:"Expand to actual size",fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:true,creditsText:"Powered by <i>Highslide JS</i>",creditsHref:"http://vikjavev.no/highslide/",creditsTitle:"Go to the Highslide JS homepage",enableKeyListener:true,captionId:null,spaceForCaption:30,slideshowGroup:null,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:"highslide-wrapper",preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","outlineType","outlineWhileAnimating","spaceForCaption","captionId","captionText","captionEval","wrapperClassName","minWidth","minHeight","slideshowGroup","easing","easingClose","fadeInOut"],overlays:[],idCounter:0,faders:[],pendingOutlines:{},clones:{},ie:(document.all&&!window.opera),safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(A){return document.getElementById(A)},push:function(A,B){A[A.length]=B},createElement:function(A,F,E,D,C){var B=document.createElement(A);if(F){hs.setAttribs(B,F)}if(C){hs.setStyles(B,{padding:0,border:"none",margin:0})}if(E){hs.setStyles(B,E)}if(D){D.appendChild(B)}return B},setAttribs:function(B,C){for(var A in C){B[A]=C[A]}},setStyles:function(B,C){for(var A in C){try{if(hs.ie&&A=="opacity"){if(C[A]>0.99){B.style.removeAttribute("filter")}else{B.style.filter="alpha(opacity="+(C[A]*100)+")"}}else{B.style[A]=C[A]}}catch(D){}}},ieVersion:function(){var A=navigator.appVersion.split("MSIE");return A[1]?parseFloat(A[1]):null},getPageSize:function(){var C=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;var B=hs.ie?C.clientWidth:(document.documentElement.clientWidth||self.innerWidth),A=hs.ie?C.clientHeight:self.innerHeight;return{width:B,height:A,scrollLeft:hs.ie?C.scrollLeft:pageXOffset,scrollTop:hs.ie?C.scrollTop:pageYOffset}},position: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,D,B){if(A.getParams){return D}try{new hs.Expander(A,D,B);return false}catch(C){return true}},focusTopmost:function(){var B=0,A=-1;for(var C=0;C<hs.expanders.length;C++){if(hs.expanders[C]){if(hs.expanders[C].wrapper.style.zIndex&&hs.expanders[C].wrapper.style.zIndex>B){B=hs.expanders[C].wrapper.style.zIndex;A=C}}}if(A==-1){hs.focusKey=-1}else{hs.expanders[A].focus()}},getAdjacentAnchor:function(E,G){var A=document.getElementsByTagName("A"),B={},F=-1,C=0;for(var D=0;D<A.length;D++){if(hs.isHsAnchor(A[D])&&((hs.expanders[E].slideshowGroup==hs.getParam(A[D],"slideshowGroup")))){B[C]=A[D];if(hs.expanders[E]&&A[D]==hs.expanders[E].a){F=C}C++}}return B[F+G]||null},getParam:function(A,C){A.getParams=A.onclick;var B=A.getParams?A.getParams():null;A.getParams=null;return(B&&typeof B[C]!="undefined")?B[C]:(typeof hs[C]!="undefined"?hs[C]:null)},getSrc:function(A){var B=hs.getParam(A,"src");if(B){return B}return A.href},getNode:function(D){var B=hs.$(D),C=hs.clones[D],A={};if(!B&&!C){return null}if(!C){C=B.cloneNode(true);C.id="";hs.clones[D]=C;return B}else{return C.cloneNode(true)}},purge:function(D){var B=D.attributes,C,A,E;if(B){A=B.length;for(var C=0;C<A;C+=1){E=B[C].name;if(typeof D[E]==="function"){D[E]=null}}}B=D.childNodes;if(B){A=B.length;for(var C=0;C<A;C+=1){hs.purge(D.childNodes[C])}}},discardElement:function(A){if(hs.ie){hs.purge(A)}hs.garbageBin.appendChild(A);hs.garbageBin.innerHTML=""},previousOrNext:function(B,E){var D=hs.last=hs.getExpander(B);try{var A=hs.upcoming=hs.getAdjacentAnchor(D.key,E);A.onclick()}catch(C){}try{D.close()}catch(C){}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(A.target.form){return true}var B=null;switch(A.keyCode){case 32:case 34:case 39:case 40:B=1;break;case 8:case 33:case 37:case 38:B=-1;break;case 27:case 13:B=0}if(B!==null){hs.removeEventListener(document,"keydown",hs.keyHandler);if(!hs.enableKeyListener){return true}if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}if(B==0){try{hs.getExpander().close()}catch(A){}return false}else{return hs.previousOrNext(hs.focusKey,B)}}return true},registerOverlay:function(A){hs.push(hs.overlays,A)},getWrapperKey:function(B){var D,C=/^highslide-wrapper-([0-9]+)$/;D=B;while(D.parentNode){if(D.id&&C.test(D.id)){return D.id.replace(C,"$1")}D=D.parentNode}D=B;while(D.parentNode){if(D.tagName&&hs.isHsAnchor(D)){for(var A=0;A<hs.expanders.length;A++){var E=hs.expanders[A];if(E&&E.a==D){return A}}}D=D.parentNode}return null},getExpander:function(A){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)]||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(D){if(!D){D=window.event}if(D.button>1){return true}if(!D.target){D.target=D.srcElement}var B=D.target;while(B.parentNode&&!(/highslide-(image|move|html|resize)/.test(B.className))){B=B.parentNode}var E=hs.getExpander(B);if(E&&(E.isClosing||!E.isExpanded)){return true}if(E&&D.type=="mousedown"){if(D.target.form){return true}var A=B.className.match(/highslide-(image|move|resize)/);if(A){hs.dragArgs={exp:E,type:A[1],left:E.x.min,width:E.x.span,top:E.y.min,height:E.y.span,clickX:D.clientX,clickY:D.clientY};hs.addEventListener(document,"mousemove",hs.dragHandler);if(D.preventDefault){D.preventDefault()}if(/highslide-(image|html)-blur/.test(E.content.className)){E.focus();hs.hasFocused=true}return false}}else{if(D.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.dragHandler);if(hs.dragArgs){if(hs.dragArgs.type=="image"){hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor}var C=hs.dragArgs.hasDragged;if(!C&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){E.close()}else{if(C||(!C&&hs.hasHtmlexpanders)){hs.dragArgs.exp.redoShowHide()}}hs.hasFocused=false;hs.dragArgs=null}else{if(/highslide-image-blur/.test(B.className)){B.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){C.move(A)}return false},wrapperMouseHandler:function(C){try{if(!C){C=window.event}var B=/mouseover/i.test(C.type);if(!C.target){C.target=C.srcElement}if(hs.ie){C.relatedTarget=B?C.fromElement:C.toElement}var E=hs.getExpander(C.target);if(!E||!C.relatedTarget||hs.getExpander(C.relatedTarget)==E||hs.dragArgs){return }for(var A=0;A<E.overlays.length;A++){var D=hs.$("hsId"+E.overlays[A]);if(D&&D.getAttribute("hideOnMouseOut")){var G=B?0:D.getAttribute("opacity"),F=B?D.getAttribute("opacity"):0;hs.fade(D,G,F)}}}catch(C){}},addEventListener:function(A,C,B){try{A.addEventListener(C,B,false)}catch(D){try{A.detachEvent("on"+C,B);A.attachEvent("on"+C,B)}catch(D){A["on"+C]=B}}},removeEventListener:function(A,C,B){try{A.removeEventListener(C,B,false)}catch(D){try{A.detachEvent("on"+C,B)}catch(D){A["on"+C]=null}}},preloadFullImage:function(B){if(hs.continuePreloading&&hs.preloadTheseImages[B]&&hs.preloadTheseImages[B]!="undefined"){var A=document.createElement("img");A.onload=function(){A=null;hs.preloadFullImage(B+1)};A.src=hs.preloadTheseImages[B]}},preloadImages:function(E){if(E&&typeof E!="object"){hs.numberOfImagesToPreload=E}var A,D,B=0;var G=document.getElementsByTagName("A");for(var C=0;C<G.length;C++){A=G[C];D=hs.isHsAnchor(A);if(D&&D[0]=="hs.expand"){if(B<hs.numberOfImagesToPreload){hs.preloadTheseImages[B]=hs.getSrc(A);B++}}}new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});var F=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},genContainer:function(){if(!hs.container){hs.container=hs.createElement("div",null,{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter},document.body,true);hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.loadingTitle,innerHTML:hs.loadingText,href:"javascript:void(0)"},{position:"absolute",opacity:hs.loadingOpacity,left:"-9999px",zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);Math.linearTween=function(B,A,D,C){return D*B/C+A};Math.easeInQuad=function(B,A,D,C){return D*(B/=C)*B+A}}},fade:function(E,G,C,D,B,A){if(typeof B=="undefined"){if(typeof D!="number"){D=250}if(D<25){hs.setStyles(E,{opacity:C});return }B=hs.faders.length;A=C>G?1:-1;var F=(25/(D-D%25))*Math.abs(G-C)}G=parseFloat(G);E.style.visibility=(G<=0)?"hidden":"visible";if(G<0||(A==1&&G>C)){return }if(E.fading&&E.fading.i!=B){clearTimeout(hs.faders[E.fading.i]);G=E.fading.o}E.fading={i:B,o:G,step:(F||E.fading.step)};E.style.visibility=(G<=0)?"hidden":"visible";hs.setStyles(E,{opacity:G});hs.faders[B]=setTimeout(function(){hs.fade(E,G+E.fading.step*A,C,null,B,A)},25)},close:function(A){var B=hs.getExpander(A);if(B){B.close()}return false}};hs.Outline=function(G,E){this.onLoad=E;this.outlineType=G;var A=hs.ieVersion(),F;this.hasAlphaImageLoader=hs.ie&&A>=5.5&&A<7;if(!G){if(E){E()}return }hs.genContainer();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse"},hs.container,true);var B=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var C=0;C<=8;C++){if(C%3==0){F=hs.createElement("tr",null,{height:"auto"},B,true)}this.td[C]=hs.createElement("td",null,null,F,true);var D=C!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[C],D)}this.td[4].className=G;this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var B=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var A=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",left:"-9999px",top:"-9999px"},A,true);var C=this;this.graphic.onload=function(){C.onGraphicLoad()};this.graphic.src=B},onGraphicLoad:function(){var D=this.offset=this.graphic.width/4,F=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],C={height:(2*D)+"px",width:(2*D)+"px"};for(var B=0;B<=8;B++){if(F[B]){if(this.hasAlphaImageLoader){var A=(B==1||B==7)?"100%":this.graphic.width+"px";var E=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[B],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:A,height:this.graphic.height+"px",left:(F[B][0]*D)+"px",top:(F[B][1]*D)+"px"},E,true)}else{hs.setStyles(this.td[B],{background:"url("+this.graphic.src+") "+(F[B][0]*D)+"px "+(F[B][1]*D)+"px"})}if(window.opera&&(B==3||B==5)){hs.createElement("div",null,C,this.td[B],true)}hs.setStyles(this.td[B],C)}}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(E,A,F,B,C,D){if(D){this.table.style.visibility=(C>=4*this.offset)?"visible":"hidden"}this.table.style.left=(A-this.offset)+"px";this.table.style.top=(F-this.offset)+"px";this.table.style.width=(B+2*(E.offsetBorderW+this.offset))+"px";B+=2*(E.offsetBorderW-this.offset);C+=+2*(E.offsetBorderH-this.offset);this.td[4].style.width=B>=0?B+"px":0;this.td[4].style.height=C>=0?C+"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.Expander=function(H,E,A,I){this.a=H;this.custom=A;this.contentType=I||"image";this.isImage=!this.isHtml;hs.continuePreloading=false;hs.genContainer();var J=this.key=hs.expanders.length;for(var F=0;F<hs.overrides.length;F++){var B=hs.overrides[F];this[B]=E&&typeof E[B]!="undefined"?E[B]:hs[B]}var C=this.thumb=((E&&E.thumbnailId)?hs.$(E.thumbnailId):null)||H.getElementsByTagName("img")[0]||H;this.thumbsUserSetId=C.id||H.id;for(var F=0;F<hs.expanders.length;F++){if(hs.expanders[F]&&hs.expanders[F].a==H){hs.expanders[F].focus();return false}}for(var F=0;F<hs.expanders.length;F++){if(hs.expanders[F]&&hs.expanders[F].thumb!=C&&!hs.expanders[F].onLoadStarted){hs.expanders[F].cancelLoading()}}hs.expanders[this.key]=this;if(!hs.allowMultipleInstances){if(hs.expanders[J-1]){hs.expanders[J-1].close()}if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].close()}}var G=hs.position(C);this.thumbWidth=C.width?C.width:C.offsetWidth;this.thumbHeight=C.height?C.height:C.offsetHeight;this.thumbLeft=G.x;this.thumbTop=G.y;this.thumbOffsetBorderW=(this.thumb.offsetWidth-this.thumbWidth)/2;this.thumbOffsetBorderH=(this.thumb.offsetHeight-this.thumbHeight)/2;this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++},null,true);this.wrapper.onmouseover=this.wrapper.onmouseout=hs.wrapperMouseHandler;if(this.contentType=="image"&&this.outlineWhileAnimating==2){this.outlineWhileAnimating=0}if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{if(!this.outlineType){this[this.contentType+"Create"]()}else{this.displayLoading();var D=this;new hs.Outline(this.outlineType,function(){D.connectOutline();D[D.contentType+"Create"]()})}}return true};hs.Expander.prototype={connectOutline:function(A,C){var B=hs.pendingOutlines[this.outlineType];this.objOutline=B;B.table.style.zIndex=this.wrapper.style.zIndex;hs.pendingOutlines[this.outlineType]=null},displayLoading:function(){if(this.onLoadStarted||this.loading){return }this.originalCursor=this.a.style.cursor;this.a.style.cursor="wait";this.loading=hs.loading;var B=this;this.loading.onclick=function(){B.cancelLoading()};this.loading.style.top=(this.thumbTop+(this.thumbHeight-this.loading.offsetHeight)/2)+"px";var B=this,A=(this.thumbLeft+this.thumbOffsetBorderW+(this.thumbWidth-this.loading.offsetWidth)/2)+"px";setTimeout(function(){if(B.loading){B.loading.style.left=A}},100)},imageCreate:function(){var B=this;var 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";A.style.visibility="hidden";A.style.display="block";A.style.position="absolute";A.style.maxWidth="none";A.style.zIndex=3;A.title=hs.restoreTitle;if(hs.safari){hs.container.appendChild(A)}if(hs.ie&&hs.flushImgSize){A.src=null}A.src=hs.getSrc(this.a);this.displayLoading()},contentLoaded:function(){try{if(!this.content){return }this.content.onload=null;if(this.onLoadStarted){return }else{this.onLoadStarted=true}if(this.loading){hs.setStyles(this.loading,{left:"-9999px",top:"-9999px"});this.loading=null;this.a.style.cursor=this.originalCursor||""}this.marginBottom=hs.marginBottom;this.newWidth=this.content.width;this.newHeight=this.content.height;this.fullExpandWidth=this.newWidth;this.fullExpandHeight=this.newHeight;this.content.style.width=this.thumbWidth+"px";this.content.style.height=this.thumbHeight+"px";this.getCaption();this.wrapper.appendChild(this.content);this.content.style.position="relative";if(this.caption){this.wrapper.appendChild(this.caption)}this.wrapper.style.left=this.thumbLeft+"px";this.wrapper.style.top=this.thumbTop+"px";hs.container.appendChild(this.wrapper);this.offsetBorderW=(this.content.offsetWidth-this.thumbWidth)/2;this.offsetBorderH=(this.content.offsetHeight-this.thumbHeight)/2;var D=hs.marginRight+2*this.offsetBorderW;this.marginBottom+=2*this.offsetBorderH;var H=this.newWidth/this.newHeight;var B=this.allowSizeReduction?this.minWidth:this.newWidth;var K=this.allowSizeReduction?this.minHeight:this.newHeight;var E={x:"auto",y:"auto"};var G=hs.getPageSize();this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:(this.newWidth<B&&!hs.padToMinWidth)?this.newWidth:B,marginMin:hs.marginLeft,marginMax:D,scroll:G.scrollLeft,clientSpan:G.width,thumbSpan:this.thumbWidth};var C=this.x.min+parseInt(this.thumbWidth);this.x=this.justify(this.x);this.y={min:parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH,span:this.newHeight,minSpan:this.newHeight<K?this.newHeight:K,marginMin:hs.marginTop,marginMax:this.marginBottom,scroll:G.scrollTop,clientSpan:G.height,thumbSpan:this.thumbHeight};var A=this.y.min+parseInt(this.thumbHeight);this.y=this.justify(this.y);this.correctRatio(H);var J=this.x;var I=this.y;this.show()}catch(F){window.location.href=hs.getSrc(this.a)}},justify:function(D){var E,C=D==this.x?"x":"y";var B=false;var A=true;D.min=Math.round(D.min-((D.span-D.thumbSpan)/2));if(D.min<D.scroll+D.marginMin){D.min=D.scroll+D.marginMin;B=true}if(D.span<D.minSpan){D.span=D.minSpan;A=false}if(D.min+D.span>D.scroll+D.clientSpan-D.marginMax){if(B&&A){D.span=D.clientSpan-D.marginMin-D.marginMax}else{if(D.span<D.clientSpan-D.marginMin-D.marginMax){D.min=D.scroll+D.clientSpan-D.span-D.marginMin-D.marginMax}else{D.min=D.scroll+D.marginMin;if(A){D.span=D.clientSpan-D.marginMin-D.marginMax}}}}if(D.span<D.minSpan){D.span=D.minSpan;A=false}if(D.min<D.marginMin){tmpMin=D.min;D.min=D.marginMin;if(A){D.span=D.span-(D.min-tmpMin)}}return D},correctRatio:function(C){var B=this.x;var F=this.y;var E=false;if(B.span/F.span>C){var A=B.span;B.span=F.span*C;if(B.span<B.minSpan){if(hs.padToMinWidth){B.imgSpan=B.span}B.span=B.minSpan;if(!B.imgSpan){F.span=B.span/C}}E=true}else{if(B.span/F.span<C){var D=F.span;F.span=B.span/C;E=true}}if(E){B.min=parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW;B.minSpan=B.span;this.x=this.justify(B);F.min=parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH;F.minSpan=F.span;this.y=this.justify(F)}},show:function(){var A={x:this.x.min-20,y:this.y.min-20,w:this.x.span+40,h:this.y.span+40+this.spaceForCaption};hs.hideSelects=(hs.ie&&hs.ieVersion()<7);if(hs.hideSelects){this.showHideElements("SELECT","hidden",A)}hs.hideIframes=((window.opera&&navigator.appVersion<9)||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));if(hs.hideIframes){this.showHideElements("IFRAME","hidden",A)}if(hs.geckoMac){this.showHideElements("*","hidden",A)}if(this.x.imgSpan){this.content.style.margin="0 auto"}this.overlays=[];this.changeSize(1,{x:this.thumbLeft+this.thumbOffsetBorderW-this.offsetBorderW,y:this.thumbTop+this.thumbOffsetBorderH-this.offsetBorderH,w:this.thumbWidth,h:this.thumbHeight,imgW:this.thumbWidth,o:hs.outlineStartOffset},{x:this.x.min,y:this.y.min,w:this.x.span,h:this.y.span,imgW:this.x.imgSpan,o:this.objOutline?this.objOutline.offset:0},hs.expandDuration,hs.expandSteps)},changeSize:function(F,I,J,A,H){if(F&&this.objOutline&&!this.outlineWhileAnimating){this.objOutline.setPosition(this,this.x.min,this.y.min,this.x.span,this.y.span)}else{if(!F&&this.objOutline){if(this.outlineWhileAnimating){this.objOutline.setPosition(this,I.x,I.y,I.w,I.h)}else{this.objOutline.destroy()}}}if(!F){var C=this.wrapper.childNodes.length;for(var E=C-1;E>=0;E--){var B=this.wrapper.childNodes[E];if(B!=this.content){hs.discardElement(B)}}}if(this.fadeInOut){I.op=F?0:1;J.op=F}var K,D=this,G=Math[this.easing]||Math.easeInQuad;if(!F){G=Math[this.easingClose]||G}for(var E=1;E<=H;E++){K=Math.round(E*(A/H));(function(){var N=E,M={};for(var L in I){M[L]=G(K,I[L],J[L]-I[L],A);if(/[xywh]/.test(L)){M[L]=Math.round(M[L])}}setTimeout(function(){if(F&&N==1){D.content.style.visibility="visible";D.a.className+=" highslide-active-anchor"}D.setSize(M)},K)})()}if(F){setTimeout(function(){if(D.objOutline){D.objOutline.table.style.visibility="visible"}},K);setTimeout(function(){if(D.caption){D.writeCaption()}D.afterExpand()},K+50)}else{setTimeout(function(){D.afterClose()},K)}},setSize:function(C){try{this.wrapper.style.width=(C.w+2*this.offsetBorderW)+"px";this.content.style.width=((C.imgW&&!isNaN(C.imgW))?C.imgW:C.w)+"px";if(hs.safari){this.content.style.maxWidth=this.content.style.width}this.content.style.height=C.h+"px";if(C.op){hs.setStyles(this.wrapper,{opacity:C.op})}if(this.objOutline&&this.outlineWhileAnimating){var B=this.objOutline.offset-C.o;this.objOutline.setPosition(this,C.x+B,C.y+B,C.w-2*B,C.h-2*B,1)}hs.setStyles(this.wrapper,{visibility:"visible",left:C.x+"px",top:C.y+"px"})}catch(A){window.location.href=hs.getSrc(this.a)}},afterExpand:function(){this.isExpanded=true;this.focus();this.createOverlays();if(hs.showCredits){this.writeCredits()}if(this.isImage&&this.fullExpandWidth>this.x.span){this.createFullExpand()}if(!this.caption){this.prepareNextOutline()}},prepareNextOutline:function(){var A=this.key;var B=this.outlineType;new hs.Outline(B,function(){try{hs.expanders[A].preloadNext()}catch(C){}})},preloadNext:function(){var B=hs.getAdjacentAnchor(this.key,1);if(B.onclick.toString().match(/hs\.expand/)){var A=hs.createElement("img",{src:hs.getSrc(B)})}},cancelLoading:function(){hs.expanders[this.key]=null;this.a.style.cursor=this.originalCursor;if(this.loading){hs.loading.style.left="-9999px"}},writeCredits:function(){this.credits=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});this.createOverlay({overlayId:this.credits,position:"top left"})},getCaption:function(){if(!this.captionId&&this.thumbsUserSetId){this.captionId="caption-for-"+this.thumbsUserSetId}if(this.captionId){this.caption=hs.getNode(this.captionId)}if(!this.caption&&!this.captionText&&this.captionEval){try{this.captionText=eval(this.captionEval)}catch(e){}}if(!this.caption&&this.captionText){this.caption=hs.createElement("div",{className:"highslide-caption",innerHTML:this.captionText})}if(!this.caption){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if(/highslide-caption/.test(next.className||null)){this.caption=next.cloneNode(1);break}next=next.nextSibling}}if(this.caption){this.marginBottom+=this.spaceForCaption}},writeCaption:function(){try{hs.setStyles(this.wrapper,{width:this.wrapper.offsetWidth+"px",height:this.wrapper.offsetHeight+"px"});hs.setStyles(this.caption,{visibility:"hidden",marginTop:hs.safari?0:"-"+this.y.span+"px"});this.caption.className+=" highslide-display-block";var A,G=this;if(hs.ie&&(hs.ieVersion()<6||document.compatMode=="BackCompat")){A=this.caption.offsetHeight}else{var B=hs.createElement("div",{innerHTML:this.caption.innerHTML},null,null,true);this.caption.innerHTML="";this.caption.appendChild(B);A=this.caption.childNodes[0].offsetHeight;this.caption.innerHTML=this.caption.childNodes[0].innerHTML}hs.setStyles(this.caption,{overflow:"hidden",height:0,zIndex:2,marginTop:0});this.wrapper.style.height="auto";if(hs.captionSlideSpeed){var E=(Math.round(A/50)||1)*hs.captionSlideSpeed}else{this.placeCaption(A,1);return }for(var D=A%E,C=0;D<=A;D+=E,C+=10){(function(){var I=D,H=(D==A)?1:0;setTimeout(function(){G.placeCaption(I,H)},C)})()}}catch(F){}},placeCaption:function(A,B){if(!this.caption){return }this.caption.style.height=A+"px";this.caption.style.visibility="visible";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;var D=this.objOutline;if(D){var C=this.wrapper.offsetHeight-2*this.objOutline.offset;if(C>=0){D.td[4].style.height=C+"px"}if(D.hasAlphaImageLoader){D.td[3].style.height=D.td[5].style.height=D.td[4].style.height}}if(B){this.prepareNextOutline()}},showHideElements:function(C,B,G){var E=document.getElementsByTagName(C);var A=C=="*"?"overflow":"visibility";for(var F=0;F<E.length;F++){if(A=="visibility"||(document.defaultView.getComputedStyle(E[F],"").getPropertyValue("overflow")=="auto"||E[F].getAttribute("hidden-by")!=null)){var I=E[F].getAttribute("hidden-by");if(B=="visible"&&I){I=I.replace("["+this.key+"]","");E[F].setAttribute("hidden-by",I);if(!I){E[F].style[A]=E[F].origProp}}else{if(B=="hidden"){var K=hs.position(E[F]);K.w=E[F].offsetWidth;K.h=E[F].offsetHeight;var J=(K.x+K.w<G.x||K.x>G.x+G.w);var H=(K.y+K.h<G.y||K.y>G.y+G.h);var D=hs.getWrapperKey(E[F]);if(!J&&!H&&D!=this.key){if(!I){E[F].setAttribute("hidden-by","["+this.key+"]");E[F].origProp=E[F].style[A];E[F].style[A]="hidden"}else{if(!I.match("["+this.key+"]")){E[F].setAttribute("hidden-by",I+"["+this.key+"]")}}}else{if(I=="["+this.key+"]"||hs.focusKey==D){E[F].setAttribute("hidden-by","");E[F].style[A]=E[F].origProp||""}else{if(I&&I.match("["+this.key+"]")){E[F].setAttribute("hidden-by",I.replace("["+this.key+"]",""))}}}}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter++;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";if(B.caption){B.caption.className+=" highslide-caption-blur"}B.content.style.cursor=hs.ie?"hand":"pointer";B.content.title=hs.focusTitle}}if(this.objOutline){this.objOutline.table.style.zIndex=this.wrapper.style.zIndex}this.content.className="highslide-"+this.contentType;if(this.caption){this.caption.className=this.caption.className.replace(" highslide-caption-blur","")}this.content.title=hs.restoreTitle;hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer";if(hs.ie&&hs.ieVersion()<6){hs.styleRestoreCursor="hand"}this.content.style.cursor=hs.styleRestoreCursor;hs.focusKey=this.key;hs.addEventListener(document,"keydown",hs.keyHandler)},move:function(A){this.x.min=A.left+A.dX;this.y.min=A.top+A.dY;if(A.type=="image"){this.content.style.cursor="move"}hs.setStyles(this.wrapper,{left:this.x.min+"px",top:this.y.min+"px"});if(this.objOutline){this.objOutline.setPosition(this,this.x.min,this.y.min,this.x.span,this.y.span)}},close:function(){if(this.isClosing||!this.isExpanded){return }this.isClosing=true;hs.removeEventListener(document,"keydown",hs.keyHandler);try{this.content.style.cursor="default";this.changeSize(0,{x:this.x.min,y:this.y.min,w:this.x.span,h:parseInt(this.content.style.height),imgW:this.x.imgSpan,o:this.objOutline?this.objOutline.offset:0},{x:this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,y:this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,w:this.thumbWidth,h:this.thumbHeight,imgW:this.thumbWidth,o:hs.outlineStartOffset},hs.restoreDuration,hs.restoreSteps)}catch(A){this.afterClose()}},createOverlay:function(C){var B=C.overlayId;if(typeof B=="string"){B=hs.getNode(B)}if(!B||typeof B=="string"){return }var A=hs.createElement("div",{id:"hsId"+hs.idCounter++},{left:0,top:0,position:"absolute",zIndex:3,visibility:"hidden"},this.wrapper,true);if(C.opacity){hs.setStyles(B,{opacity:C.opacity})}B.style.styleFloat="none";B.className+=" highslide-display-block";A.appendChild(B);A.hsPos=C.position;this.positionOverlay(A);if(C.hideOnMouseOut){A.setAttribute("hideOnMouseOut",true)}if(!C.opacity){C.opacity=1}A.setAttribute("opacity",C.opacity);hs.fade(A,0,C.opacity);hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(D,B){var G=this.offsetBorderW,A=this.x.span-D.offsetWidth,F=this.offsetBorderH,C=(B||parseInt(this.content.style.height))-D.offsetHeight,E=D.hsPos||"center center";if(/^bottom/.test(E)){F+=C}if(/^center/.test(E)){F+=C/2}if(/right$/.test(E)){G+=A}if(/center$/.test(E)){G+=A/2}D.style.left=G+"px";D.style.top=F+"px"},createOverlays:function(){for(var A=0;A<hs.overlays.length;A++){var C=hs.overlays[A],D=C.thumbnailId,B=C.slideshowGroup;if((!D&&!B)||D==this.thumbsUserSetId||B===this.slideshowGroup){this.createOverlay(C)}}},createFullExpand:function(){this.fullExpandLabel=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.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();this.x.min=parseInt(this.wrapper.style.left)-(this.fullExpandWidth-this.content.width)/2;if(this.x.min<hs.marginLeft){this.x.min=hs.marginLeft}this.wrapper.style.left=this.x.min+"px";hs.setStyles(this.content,{width:this.fullExpandWidth+"px",maxWidth:this.fullExpandWidth+"px",height:this.fullExpandHeight+"px"});this.x.span=this.fullExpandWidth;this.wrapper.style.width=(this.x.span+2*this.offsetBorderW)+"px";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;if(this.objOutline){this.objOutline.setPosition(this,this.x.min,this.y.min,this.x.span,this.y.span)}for(var A=0;A<this.overlays.length;A++){this.positionOverlay(hs.$("hsId"+this.overlays[A]))}this.redoShowHide()}catch(B){window.location.href=this.content.src}},redoShowHide:function(){var A={x:parseInt(this.wrapper.style.left)-20,y:parseInt(this.wrapper.style.top)-20,w:this.content.offsetWidth+40,h:this.content.offsetHeight+40+this.spaceForCaption};if(hs.hideSelects){this.showHideElements("SELECT","hidden",A)}if(hs.hideIframes){this.showHideElements("IFRAME","hidden",A)}if(hs.geckoMac){this.showHideElements("*","hidden",A)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");if(hs.hideSelects){this.showHideElements("SELECT","visible")}if(hs.hideIframes){this.showHideElements("IFRAME","visible")}if(hs.geckoMac){this.showHideElements("*","visible")}if(this.objOutline&&this.outlineWhileAnimating){this.objOutline.destroy()}hs.discardElement(this.wrapper);hs.expanders[this.key]=null;hs.reOrder()}};var HsExpander=hs.Expander;hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(window,"load",hs.preloadImages);
