/******************************************************************************
Name:    Highslide JS
Version: 4.0.0 (August 6 2008)
Config:  default +packed
Author:  Torstein Hшnsi
Support: http://highslide.com/support

Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).

You are free:
	* to copy, distribute, display, and perform the work
	* to make derivative works

Under the following conditions:
	* Attribution. You must attribute the work in the manner  specified by  the
	  author or licensor.
	* Noncommercial. You may not use this work for commercial purposes.

* For  any  reuse  or  distribution, you  must make clear to others the license
  terms of this work.
* Any  of  these  conditions  can  be  waived  if  you  get permission from the 
  copyright holder.

Your fair use and other rights are in no way affected by the above.
******************************************************************************/
var hs={lang:{loadingText:"Загрузка...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size",creditsText:"Powered by <i>Highslide JS</i>",creditsTitle:"",restoreTitle:"Клик закрывает картинку, левой кнопкой мыши можно перемещать её по экрану"},graphicsDir:"js/graphics/",restoreCursor:"zoomout.cur",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,fullExpandPosition:"bottom right",fullExpandOpacity:1,padToMinWidth:false,showCredits:true,creditsHref:false,enableKeyListener:true,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:"highslide-wrapper",preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","dragByHeading","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"]},headingOverlay:{},captionOverlay:{},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){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]}}},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}},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,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()}},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)}},discardElement:function(A){hs.garbageBin.appendChild(A);hs.garbageBin.innerHTML=""},previousOrNext:function(B,E){var D=hs.last=hs.getExpander(B);try{var A=hs.upcoming=D.getAdjacentAnchor(E);A.onclick()}catch(C){hs.last=hs.upcoming=null}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 C=null;switch(A.keyCode){case 32: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){hs.removeEventListener(document,"keydown",hs.keyHandler);if(!hs.enableKeyListener){return true}if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}var B=hs.getExpander();if(B){if(C==0){B.close();return false}else{return hs.previousOrNext(B.key,C)}}}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){if(A.type=="resize"){C.resize(A)}else{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.hideOnMouseOut){var G=B?0:D.opacity,F=B?D.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(C){if(C&&typeof C!="object"){hs.numberOfImagesToPreload=C}var A=hs.getAnchors();for(var B=0;B<A.images.length&&B<hs.numberOfImagesToPreload;B++){hs.push(hs.preloadTheseImages,hs.getSrc(A.images[B]))}if(hs.outlineType){new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)})}else{hs.preloadFullImage(0)}var D=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},init: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.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:"javascript:;"},{position:"absolute",opacity:hs.loadingOpacity,left:"-9999px",zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);Math.linearTween=function(C,B,E,D){return E*C/D+B};Math.easeInQuad=function(C,B,E,D){return E*(C/=D)*C+B};for(var A in hs.langDefaults){hs.lang[A]=hs[A]||hs.lang[A]||hs.langDefaults[A]}hs.getAnchors()}},updateAnchors:function(){var D=document.getElementsByTagName("*"),F=[],B=[],A={},E;for(var C=0;C<D.length;C++){E=hs.isHsAnchor(D[C]);if(E){hs.push(F,D[C]);if(E[0]=="hs.expand"){hs.push(B,D[C])}var G=hs.getParam(D[C],"slideshowGroup")||"none";if(!A[G]){A[G]=[]}hs.push(A[G],D[C])}}hs.anchors={all:F,groups:A,images:B};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},fade:function(E,H,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>H?1:-1;var G=(25/(D-D%25))*Math.abs(H-C)}H=parseFloat(H);var F=(E.fade===0||E.fade===false||(E.fade==2&&hs.ie));E.style.visibility=((F?C:H)<=0)?"hidden":"visible";if(F||H<0||(A==1&&H>C)){return }if(E.fading&&E.fading.i!=B){clearTimeout(hs.faders[E.fading.i]);H=E.fading.o}E.fading={i:B,o:H,step:(G||E.fading.step)};E.style.visibility=(H<=0)?"hidden":"visible";hs.setStyles(E,{opacity:H});hs.faders[B]=setTimeout(function(){hs.fade(E,H+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.init();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"};hs.discardElement(this.graphic);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)}}if(hs.pendingOutlines[this.outlineType]){hs.pendingOutlines[this.outlineType].destroy()}hs.pendingOutlines[this.outlineType]=this;if(this.onLoad){this.onLoad()}},setPosition:function(B,C,A){C=C||{x:B.x.min,y:B.y.min,w:B.x.span+B.x.p1+B.x.p2,h:B.y.span+B.y.p1+B.y.p2};if(A){this.table.style.visibility=(C.h>=4*this.offset)?"visible":"hidden"}hs.setStyles(this.table,{left:(C.x-this.offset)+"px",top:(C.y-this.offset)+"px",width:(C.w+2*(B.x.cb+this.offset))+"px"});C.w+=2*(B.x.cb-this.offset);C.h+=+2*(B.y.cb-this.offset);hs.setStyles(this.td[4],{width:C.w>=0?C.w+"px":0,height:C.h>=0?C.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.Expander=function(J,E,A,K){this.a=J;this.custom=A;this.contentType=K||"image";this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];hs.init();var L=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]}if(!this.src){this.src=J.href}var C=(E&&E.thumbnailId)?hs.$(E.thumbnailId):J;C=this.thumb=C.getElementsByTagName("img")[0]||C;this.thumbsUserSetId=C.id||J.id;for(var F=0;F<hs.expanders.length;F++){if(hs.expanders[F]&&hs.expanders[F].a==J){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[L-1]){hs.expanders[L-1].close()}if(typeof hs.focusKey!="undefined"&&hs.expanders[hs.focusKey]){hs.expanders[hs.focusKey].close()}}var H=hs.getPosition(C);var I=this.x={};I.t=C.width?parseInt(C.width):C.offsetWidth;I.tpos=H.x;I.tb=(C.offsetWidth-I.t)/2;var G=this.y={};G.t=C.height?parseInt(C.height):C.offsetHeight;G.tpos=H.y;G.tb=(C.offsetHeight-G.t)/2;I.p1=I.p2=G.p1=G.p2=0;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(!this.outlineType){this[this.contentType+"Create"]()}else{if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{this.showLoading();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=this.outline=hs.pendingOutlines[this.outlineType];B.table.style.zIndex=this.wrapper.style.zIndex;hs.pendingOutlines[this.outlineType]=null},showLoading:function(){if(this.onLoadStarted||this.loading){return }this.loading=hs.loading;var C=this;this.loading.onclick=function(){C.cancelLoading()};var C=this,A=(this.x.tpos+this.x.tb+(this.x.t-this.loading.offsetWidth)/2)+"px",B=(this.y.tpos+(this.y.t-this.loading.offsetHeight)/2)+"px";setTimeout(function(){if(C.loading){hs.setStyles(C.loading,{left:A,top:B})}},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";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 H=this.x,G=this.y;if(this.loading){hs.setStyles(this.loading,{left:"-9999px",top:"-9999px"});this.loading=null}this.marginBottom=hs.marginBottom;H.full=this.content.width;G.full=this.content.height;hs.setStyles(this.content,{width:this.x.t+"px",height:this.y.t+"px"});this.wrapper.appendChild(this.content);this.content.style.position="relative";hs.setStyles(this.wrapper,{left:this.x.tpos+"px",top:this.y.tpos+"px"});hs.container.appendChild(this.wrapper);H.cb=(this.content.offsetWidth-this.x.t)/2;G.cb=(this.content.offsetHeight-this.y.t)/2;var B=hs.marginRight+2*H.cb;this.marginBottom+=2*G.cb;this.getOverlays();var F=H.full/G.full;var A=this.allowSizeReduction?this.minWidth:H.full;var I=this.allowSizeReduction?this.minHeight:G.full;var C={x:"auto",y:"auto"};var E=hs.getPageSize();H.min=H.tpos-H.cb+H.tb;H.span=Math.min(H.full,this.maxWidth||H.full);H.minSpan=Math.min(H.full,A);H.marginMin=hs.marginLeft;H.marginMax=B;H.scroll=E.scrollLeft;H.clientSpan=E.width;this.justify(H);G.min=G.tpos-G.cb+G.tb;G.span=Math.min(G.full,this.maxHeight||G.full);G.minSpan=Math.min(G.full,I);G.marginMin=hs.marginTop;G.marginMax=this.marginBottom;G.scroll=E.scrollTop;G.clientSpan=E.height;this.justify(G);if(this.overlayBox){this.sizeOverlayBox(0,1)}if(this.allowSizeReduction){this.correctRatio(F);if(this.isImage&&this.x.full>this.x.span){this.createFullExpand()}}this.show()}catch(D){window.location.href=this.src}},justify:function(E,B){var F,D=E==this.x?"x":"y";var C=false;var A=true;E.min=Math.round(E.min-((E.span+E.p1+E.p2-E.t)/2));if(E.min<E.scroll+E.marginMin){E.min=E.scroll+E.marginMin;C=true}if(!B&&E.span<E.minSpan){E.span=E.minSpan;A=false}if(E.min+E.span+E.p1+E.p2>E.scroll+E.clientSpan-E.marginMax){if(!B&&C&&A){E.span=E.clientSpan-E.marginMin-E.marginMax}else{if(E.span+E.p1+E.p2<E.clientSpan-E.marginMin-E.marginMax){E.min=E.scroll+E.clientSpan-E.span-E.marginMin-E.marginMax-E.p1-E.p2}else{E.min=E.scroll+E.marginMin;if(!B&&A){E.span=E.clientSpan-E.marginMin-E.marginMax}}}}if(!B&&E.span<E.minSpan){E.span=E.minSpan;A=false}if(E.min<E.marginMin){tmpMin=E.min;E.min=E.marginMin;if(A&&!B){E.span=E.span-(E.min-tmpMin)}}},correctRatio:function(B){var A=this.x,F=this.y;var E=false;if(A.span/F.span>B){A.span=F.span*B;if(A.span<A.minSpan){A.span=A.minSpan;F.span=A.span/B}E=true}else{if(A.span/F.span<B){var C=F.span;F.span=A.span/B;E=true}}if(this.overlayBox){while(F.span>this.minHeight&&A.span>this.minWidth&&F.marginMin+F.p1+F.span+F.p2+F.marginMax>F.clientSpan){var D;F.span-=10;A.span=F.span*B;this.sizeOverlayBox(0,1)}}if(E){A.min=A.tpos-A.cb+A.tb;A.minSpan=A.span;this.justify(A,true);F.min=F.tpos-F.cb+F.tb;F.minSpan=F.span;this.justify(F,true);this.sizeOverlayBox()}},show:function(){var A={x:this.x.min-20,y:this.y.min-20,w:this.x.span+40,h:this.y.span+40};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)}this.changeSize(1,{xmin:this.x.tpos+this.x.tb-this.x.cb,ymin:this.y.tpos+this.y.tb-this.y.cb,xspan:this.x.t,yspan:this.y.t,xp1:0,xp2:0,yp1:0,yp2:0,o:hs.outlineStartOffset},{xmin:this.x.min,ymin:this.y.min,xspan:this.x.span,yspan:this.y.span,xp1:this.x.p1,yp1:this.y.p1,xp2:this.x.p2,yp2:this.y.p2,o:this.outline?this.outline.offset:0},hs.expandDuration,hs.expandSteps)},changeSize:function(D,G,H,A,F){if(this.outline&&!this.outlineWhileAnimating){if(D){this.outline.setPosition(this)}else{this.outline.destroy()}}if(!D&&this.overlayBox){hs.discardElement(this.overlayBox)}if(this.fadeInOut){G.op=D?0:1;H.op=D}var I,B=this,E=Math[this.easing]||Math.easeInQuad;if(!D){E=Math[this.easingClose]||E}for(var C=1;C<=F;C++){I=Math.round(C*(A/F));(function(){var L=C,K={};for(var J in G){K[J]=E(I,G[J],H[J]-G[J],A);if(!/^op$/.test(J)){K[J]=Math.round(K[J])}}setTimeout(function(){if(D&&L==1){B.content.style.visibility="visible";B.a.className+=" highslide-active-anchor"}B.setSize(K)},I)})()}if(D){setTimeout(function(){if(B.outline){B.outline.table.style.visibility="visible"}},I);setTimeout(function(){B.afterExpand()},I+50)}else{setTimeout(function(){B.afterClose()},I)}},setSize:function(C){try{if(C.op){hs.setStyles(this.wrapper,{opacity:C.op})}hs.setStyles(this.wrapper,{width:(C.xspan+C.xp1+C.xp2+2*this.x.cb)+"px",height:(C.yspan+C.yp1+C.yp2+2*this.y.cb)+"px",left:C.xmin+"px",top:C.ymin+"px"});hs.setStyles(this.content,{top:C.yp1+"px",left:C.xp1+"px",width:C.xspan+"px",height:C.yspan+"px"});if(this.outline&&this.outlineWhileAnimating){var B=this.outline.offset-C.o;this.outline.setPosition(this,{x:C.xmin+B,y:C.ymin+B,w:C.xspan+C.xp1+C.xp2+-2*B,h:C.yspan+C.yp1+C.yp2+-2*B},1)}this.wrapper.style.visibility="visible"}catch(A){window.location.href=this.src}},afterExpand:function(){this.isExpanded=true;this.focus();this.prepareNextOutline();if(this.overlayBox){this.showOverlays()}},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=this.getAdjacentAnchor(1);if(B&&B.onclick.toString().match(/hs\.expand/)){var A=hs.createElement("img",{src:hs.getSrc(B)})}},getAdjacentAnchor:function(C){var B=this.getAnchorIndex(),A=hs.anchors.groups[this.slideshowGroup||"none"];if(!A[B+C]&&this.slideshow&&this.slideshow.repeat){if(C==1){return A[0]}else{if(C==-1){return A[A.length-1]}}}return A[B+C]||null},getAnchorIndex:function(){var A=hs.anchors.groups[this.slideshowGroup||"none"];for(var B=0;B<A.length;B++){if(A[B]==this.a){return B}}return null},cancelLoading:function(){hs.expanders[this.key]=null;if(this.loading){hs.loading.style.left="-9999px"}},writeCredits:function(){if(hs.creditsHref){this.credits=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle})}else{this.credits=hs.createElement("span",{className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:"top left"})}},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(e){}}if(!this[type]&&this[type+"Text"]){s=this[type+"Text"]}if(!this[type]&&!s){var next=this.a.nextSibling;while(next&&!hs.isHsAnchor(next)){if((new RegExp("highslide-"+type)).test(next.className||null)){this[type]=next.cloneNode(1);break}next=next.nextSibling}}if(!this[type]&&s!==null){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)}}},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.getPosition(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";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}this.content.className="highslide-"+this.contentType;this.content.title=hs.lang.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.outline){this.outline.setPosition(this)}},resize:function(E){var A,C,D=E.width/E.height;A=Math.max(E.width+E.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(A-this.x.full)<12){A=this.x.full}C=A/D;if(C<Math.min(this.minHeight,this.y.full)){C=Math.min(this.minHeight,this.y.full);if(this.isImage){A=C*D}}this.x.span=A;this.y.span=C;var B={width:this.x.span+"px",height:this.y.span+"px"};hs.setStyles(this.content,B);if(this.overlayBox){this.sizeOverlayBox(true)}hs.setStyles(this.wrapper,{width:(this.x.p1+this.x.p2+2*this.x.cb+this.x.span)+"px",height:(this.y.p1+this.y.p2+2*this.y.cb+this.y.span)+"px"});if(this.outline){this.outline.setPosition(this)}},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,{xmin:this.x.min,ymin:this.y.min,xspan:this.x.span,yspan:parseInt(this.content.style.height),xp1:this.x.p1,yp1:this.y.p1,xp2:this.x.p2,yp2:this.y.p2,o:this.outline?this.outline.offset:0},{xmin:this.x.tpos-this.x.cb+this.x.tb,ymin:this.y.tpos-this.y.cb+this.y.tb,xspan:this.x.t,yspan:this.y.t,xp1:0,yp1:0,xp2:0,yp2:0,o:hs.outlineStartOffset},hs.restoreDuration,hs.restoreSteps)}catch(A){this.afterClose()}},createOverlay:function(D){var C=D.overlayId;if(typeof C=="string"){C=hs.getNode(C)}if(!C||typeof C=="string"){return }C.style.display="block";this.genOverlayBox();var B=D.width&&/^[0-9]+(px|%)$/.test(D.width)?D.width:"auto";if(/^(left|right)panel$/.test(D.position)&&!/^[0-9]+px$/.test(D.width)){B="200px"}var A=hs.createElement("div",{id:"hsId"+hs.idCounter++,hsId:D.hsId},{position:"absolute",width:B},this.overlayBox,true);A.appendChild(C);if(D.hideOnMouseOut){A.hideOnMouseOut=true}A.opacity=D.opacity||1;A.hsPos=D.position;A.fade=D.fade;if(this.gotOverlays){this.positionOverlay(A)}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(A){var B=A.hsPos||"middle center";if(/left$/.test(B)){A.style.left=0}if(/center$/.test(B)){hs.setStyles(A,{left:"50%",marginLeft:"-"+Math.round(A.offsetWidth/2)+"px"})}if(/right$/.test(B)){A.style.right=0}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}}if(/^top/.test(B)){A.style.top=0}if(/^middle/.test(B)){hs.setStyles(A,{top:"50%",marginTop:"-"+Math.round(A.offsetHeight/2)+"px"})}if(/^bottom/.test(B)){A.style.bottom=0}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,{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}}},getOverlays:function(){this.getInline(["heading","caption"],true);if(this.heading&&this.dragByHeading){this.heading.className+=" highslide-move"}if(hs.showCredits){this.writeCredits()}for(var B=0;B<hs.overlays.length;B++){var E=hs.overlays[B],F=E.thumbnailId,C=E.slideshowGroup;if((!F&&!C)||(F&&F==this.thumbsUserSetId)||(C&&C===this.slideshowGroup)){this.createOverlay(E)}}var D=[];for(var B=0;B<this.overlays.length;B++){var E=hs.$("hsId"+this.overlays[B]);if(/panel$/.test(E.hsPos)){this.positionOverlay(E)}else{hs.push(D,E)}}var A=this.x.p1+this.x.full+this.x.p2;if(hs.padToMinWidth&&A<hs.minWidth){this.x.p1+=(hs.minWidth-A)/2;this.x.p2+=(hs.minWidth-A)/2}for(var B=0;B<D.length;B++){this.positionOverlay(D[B])}this.gotOverlays=true},genOverlayBox:function(){if(!this.overlayBox){this.overlayBox=hs.createElement("div",null,{position:"absolute",width:this.x.span?this.x.span+"px":this.x.full+"px",height:0,visibility:"hidden",overflow:"hidden",zIndex:5},hs.container,true)}},sizeOverlayBox:function(C,A){hs.setStyles(this.overlayBox,{width:this.x.span+"px",height:this.y.span+"px"});if(C||A){for(var B=0;B<this.overlays.length;B++){var D=hs.$("hsId"+this.overlays[B]);if(D&&/^(above|below)$/.test(D.hsPos)){if(hs.ie&&hs.ieVersion()<=6){D.style.width=(this.overlayBox.offsetWidth-this.x.p1-this.x.cb-this.x.p2-this.x.cb)+"px"}this.y[D.hsPos=="above"?"p1":"p2"]=D.offsetHeight}}}if(C){hs.setStyles(this.content,{top:this.y.p1+"px"});hs.setStyles(this.overlayBox,{top:(this.y.p1+this.y.cb)+"px"})}},showOverlays:function(){hs.setStyles(this.overlayBox,{top:(this.y.p1+this.y.cb)+"px",left:(this.x.p1+this.x.cb)+"px",overflow:"visible"});this.wrapper.appendChild(this.overlayBox);if(hs.safari){var B=this.content.style;B.display="inline";setTimeout(function(){B.display="block"},50)}var D=hs.getPageSize(),E=hs.mouse.x+D.scrollLeft,C=hs.mouse.y+D.scrollTop;this.mouseIsOver=this.x.min<E&&E<this.x.min+this.x.p1+this.x.span+this.x.p2&&this.y.min<C&&C<this.y.min+this.y.p1+this.y.span+this.y.p2;for(var A=0;A<this.overlays.length;A++){var F=hs.$("hsId"+this.overlays[A]);if(!F.hideOnMouseOut||this.mouseIsOver){hs.fade(F,0,F.opacity)}}},createFullExpand:function(){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();this.x.min=parseInt(this.wrapper.style.left)-(this.x.full-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.x.full+"px",height:this.y.full+"px"});this.x.span=this.x.full;this.y.span=this.y.full;if(this.overlayBox){this.sizeOverlayBox(true)}hs.setStyles(this.wrapper,{width:(this.x.p1+2*this.x.cb+this.x.span+this.x.p2)+"px",height:(this.y.p1+2*this.y.cb+this.y.span+this.y.p2)+"px"});if(this.outline){this.outline.setPosition(this)}this.redoShowHide()}catch(A){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};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.outline&&this.outlineWhileAnimating){this.outline.destroy()}hs.discardElement(this.wrapper);hs.expanders[this.key]=null;hs.reOrder()}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;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(window,"load",hs.preloadImages);