/******************************************************************************
Name:    Highslide JS
Version: 4.1.8 (October 27 2009)
Config:  default
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.
******************************************************************************/
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',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:300,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:false,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:'bottom right',fullExpandOpacity:1,showCredits:true,creditsHref:'http://highslide.com/',creditsTarget:'_1',enableKeyListener:true,openerTagNames:['a'],dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:'drop-shadow',preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:['allowSizeReduction','useBox','outlineType','outlineWhileAnimating','captionId','captionText','captionEval','captionOverlay','headingId','headingText','headingEval','headingOverlay','creditsPosition','dragByHeading','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:[],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(c){if(c)return document.getElementById(c)},push:function(c,d){c[c.length]=d},createElement:function(c,d,f,g,h){var i=document.createElement(c);if(d)hs.extend(i,d);if(h)hs.setStyles(i,{padding:0,border:'none',margin:0});if(f)hs.setStyles(i,f);if(g)g.appendChild(i);return i},extend:function(c,d){for(var f in d)c[f]=d[f];return c},setStyles:function(c,d){for(var f in d){if(hs.ie&&f=='opacity'){if(d[f]>0.99)c.style.removeAttribute('filter');else c.style.filter='alpha(opacity='+(d[f]*100)+')'}else c.style[f]=d[f]}},animate:function(c,d,f){var g,h,i;if(typeof f!='object'||f===null){var j=arguments;f={duration:j[2],easing:j[3],complete:j[4]}}if(typeof f.duration!='number')f.duration=250;f.easing=Math[f.easing]||Math.easeInQuad;f.curAnim=hs.extend({},d);for(var k in d){var l=new hs.fx(c,f,k);g=parseFloat(hs.css(c,k))||0;h=parseFloat(d[k]);i=k!='opacity'?'px':'';l.custom(g,h,i)}},css:function(f,g){if(document.defaultView){return document.defaultView.getComputedStyle(f,null).getPropertyValue(g)}else{if(g=='opacity')g='filter';var h=f.currentStyle[g.replace(/\-(\w)/g,function(c,d){return d.toUpperCase()})];if(g=='filter')h=h.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100});return h===''?1:h}},getPageSize:function(){var c=document,d=window,f=c.compatMode&&c.compatMode!='BackCompat'?c.documentElement:c.body;var g=hs.ie?f.clientWidth:(c.documentElement.clientWidth||self.innerWidth),h=hs.ie?f.clientHeight:self.innerHeight;hs.page={width:g,height:h,scrollLeft:hs.ie?f.scrollLeft:pageXOffset,scrollTop:hs.ie?f.scrollTop:pageYOffset}},getPosition:function(c){var d={x:c.offsetLeft,y:c.offsetTop};while(c.offsetParent){c=c.offsetParent;d.x+=c.offsetLeft;d.y+=c.offsetTop;if(c!=document.body&&c!=document.documentElement){d.x-=c.scrollLeft;d.y-=c.scrollTop}}return d},expand:function(c,d,f,g){if(!c)c=hs.createElement('a',null,{display:'none'},hs.container);if(typeof c.getParams=='function')return d;try{new hs.Expander(c,d,f);return false}catch(e){return true}},focusTopmost:function(){var c=0,d=-1,f=hs.expanders,g,h;for(var i=0;i<f.length;i++){g=f[i];if(g){h=g.wrapper.style.zIndex;if(h&&h>c){c=h;d=i}}}if(d==-1)hs.focusKey=-1;else f[d].focus()},getParam:function(c,d){c.getParams=c.onclick;var f=c.getParams?c.getParams():null;c.getParams=null;return(f&&typeof f[d]!='undefined')?f[d]:(typeof hs[d]!='undefined'?hs[d]:null)},getSrc:function(c){var d=hs.getParam(c,'src');if(d)return d;return c.href},getNode:function(c){var d=hs.$(c),f=hs.clones[c],g={};if(!d&&!f)return null;if(!f){f=d.cloneNode(true);f.id='';hs.clones[c]=f;return d}else{return f.cloneNode(true)}},discardElement:function(c){if(c)hs.garbageBin.appendChild(c);hs.garbageBin.innerHTML=''},transit:function(c,d){var f=d=d||hs.getExpander();if(hs.upcoming)return false;else hs.last=f;try{hs.upcoming=c;c.onclick()}catch(e){hs.last=hs.upcoming=null}try{d.close()}catch(e){}return false},previousOrNext:function(c,d){var f=hs.getExpander(c);if(f)return hs.transit(f.getAdjacentAnchor(d),f);else return false},previous:function(c){return hs.previousOrNext(c,-1)},next:function(c){return hs.previousOrNext(c,1)},keyHandler:function(c){if(!c)c=window.event;if(!c.target)c.target=c.srcElement;if(typeof c.target.form!='undefined')return true;var d=hs.getExpander();var f=null;switch(c.keyCode){case 70:if(d)d.doFullExpand();return true;case 32:case 34:case 39:case 40:f=1;break;case 8:case 33:case 37:case 38:f=-1;break;case 27:case 13:f=0}if(f!==null){hs.removeEventListener(document,window.opera?'keypress':'keydown',hs.keyHandler);if(!hs.enableKeyListener)return true;if(c.preventDefault)c.preventDefault();else c.returnValue=false;if(d){if(f==0){d.close()}else{hs.previousOrNext(d.key,f)}return false}}return true},registerOverlay:function(c){hs.push(hs.overlays,hs.extend(c,{hsId:'hsId'+hs.idCounter++}))},getWrapperKey:function(c,d){var f,g=/^highslide-wrapper-([0-9]+)$/;f=c;while(f.parentNode){if(f.id&&g.test(f.id))return f.id.replace(g,"$1");f=f.parentNode}if(!d){f=c;while(f.parentNode){if(f.tagName&&hs.isHsAnchor(f)){for(var h=0;h<hs.expanders.length;h++){var i=hs.expanders[h];if(i&&i.a==f)return h}}f=f.parentNode}}return null},getExpander:function(c,d){if(typeof c=='undefined')return hs.expanders[hs.focusKey]||null;if(typeof c=='number')return hs.expanders[c]||null;if(typeof c=='string')c=hs.$(c);return hs.expanders[hs.getWrapperKey(c,d)]||null},isHsAnchor:function(c){return(c.onclick&&c.onclick.toString().replace(/\s/g,' ').match(/hs.(htmlE|e)xpand/))},reOrder:function(){for(var c=0;c<hs.expanders.length;c++)if(hs.expanders[c]&&hs.expanders[c].isExpanded)hs.focusTopmost()},mouseClickHandler:function(c){if(!c)c=window.event;if(c.button>1)return true;if(!c.target)c.target=c.srcElement;var d=c.target;while(d.parentNode&&!(/highslide-(image|move|html|resize)/.test(d.className))){d=d.parentNode}var f=hs.getExpander(d);if(f&&(f.isClosing||!f.isExpanded))return true;if(f&&c.type=='mousedown'){if(c.target.form)return true;var g=d.className.match(/highslide-(image|move|resize)/);if(g){hs.dragArgs={exp:f,type:g[1],left:f.x.pos,width:f.x.size,top:f.y.pos,height:f.y.size,clickX:c.clientX,clickY:c.clientY};hs.addEventListener(document,'mousemove',hs.dragHandler);if(c.preventDefault)c.preventDefault();if(/highslide-(image|html)-blur/.test(f.content.className)){f.focus();hs.hasFocused=true}return false}}else if(c.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 h=hs.dragArgs.hasDragged;if(!h&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){f.close()}else if(h||(!h&&hs.hasHtmlExpanders)){hs.dragArgs.exp.doShowHide('hidden')}hs.hasFocused=false;hs.dragArgs=null}else if(/highslide-image-blur/.test(d.className)){d.style.cursor=hs.styleRestoreCursor}}return false},dragHandler:function(c){if(!hs.dragArgs)return true;if(!c)c=window.event;var d=hs.dragArgs,f=d.exp;d.dX=c.clientX-d.clickX;d.dY=c.clientY-d.clickY;var g=Math.sqrt(Math.pow(d.dX,2)+Math.pow(d.dY,2));if(!d.hasDragged)d.hasDragged=(d.type!='image'&&g>0)||(g>(hs.dragSensitivity||5));if(d.hasDragged&&c.clientX>5&&c.clientY>5){if(d.type=='resize')f.resize(d);else{f.moveTo(d.left+d.dX,d.top+d.dY);if(d.type=='image')f.content.style.cursor='move'}}return false},wrapperMouseHandler:function(d){try{if(!d)d=window.event;var f=/mouseover/i.test(d.type);if(!d.target)d.target=d.srcElement;if(hs.ie)d.relatedTarget=f?d.fromElement:d.toElement;var g=hs.getExpander(d.target);if(!g.isExpanded)return;if(!g||!d.relatedTarget||hs.getExpander(d.relatedTarget,true)==g||hs.dragArgs)return;for(var h=0;h<g.overlays.length;h++)(function(){var c=hs.$('hsId'+g.overlays[h]);if(c&&c.hideOnMouseOut){if(f)hs.setStyles(c,{visibility:'visible',display:''});hs.animate(c,{opacity:f?c.opacity:0},c.dur)}})()}catch(d){}},addEventListener:function(c,d,f){if(c==document&&d=='ready')hs.push(hs.onReady,f);try{c.addEventListener(d,f,false)}catch(e){try{c.detachEvent('on'+d,f);c.attachEvent('on'+d,f)}catch(e){c['on'+d]=f}}},removeEventListener:function(c,d,f){try{c.removeEventListener(d,f,false)}catch(e){try{c.detachEvent('on'+d,f)}catch(e){c['on'+d]=null}}},preloadFullImage:function(c){if(hs.continuePreloading&&hs.preloadTheseImages[c]&&hs.preloadTheseImages[c]!='undefined'){var d=document.createElement('img');d.onload=function(){d=null;hs.preloadFullImage(c+1)};d.src=hs.preloadTheseImages[c]}},preloadImages:function(c){if(c&&typeof c!='object')hs.numberOfImagesToPreload=c;var d=hs.getAnchors();for(var f=0;f<d.images.length&&f<hs.numberOfImagesToPreload;f++){hs.push(hs.preloadTheseImages,hs.getSrc(d.images[f]))}if(hs.outlineType)new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});else hs.preloadFullImage(0);if(hs.restoreCursor)var g=hs.createElement('img',{src:hs.graphicsDir+hs.restoreCursor})},init:function(){if(!hs.container){hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;for(var h in hs.langDefaults){if(typeof hs[h]!='undefined')hs.lang[h]=hs[h];else if(typeof hs.lang[h]=='undefined'&&typeof hs.langDefaults[h]!='undefined')hs.lang[h]=hs.langDefaults[h]}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);Math.linearTween=function(c,d,f,g){return f*c/g+d};Math.easeInQuad=function(c,d,f,g){return f*(c/=g)*c+d};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 c=0;c<hs.onReady.length;c++)hs.onReady[c]()},updateAnchors:function(){var c,d,f=[],g=[],h={},i;for(var j=0;j<hs.openerTagNames.length;j++){d=document.getElementsByTagName(hs.openerTagNames[j]);for(var k=0;k<d.length;k++){c=d[k];i=hs.isHsAnchor(c);if(i){hs.push(f,c);if(i[0]=='hs.expand')hs.push(g,c);var l=hs.getParam(c,'slideshowGroup')||'none';if(!h[l])h[l]=[];hs.push(h[l],c)}}}hs.anchors={all:f,groups:h,images:g};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(c){var d=hs.getExpander(c);if(d)d.close();return false}};hs.fx=function(c,d,f){this.options=d;this.elem=c;this.prop=f;if(!d.orig)d.orig={}};hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._0)(this);if(this.options.step)this.options.step.call(this.elem,this.now,this)},custom:function(f,g,h){this.startTime=(new Date()).getTime();this.start=f;this.end=g;this.unit=h;this.now=this.start;this.pos=this.state=0;var i=this;function j(c){return i.step(c)}j.elem=this.elem;if(j()&&hs.timers.push(j)==1){hs.timerId=setInterval(function(){var c=hs.timers;for(var d=0;d<c.length;d++)if(!c[d]())c.splice(d--,1);if(!c.length){clearInterval(hs.timerId)}},13)}},step:function(c){var d=(new Date()).getTime();if(c||d>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var f=true;for(var g in this.options.curAnim)if(this.options.curAnim[g]!==true)f=false;if(f){if(this.options.complete)this.options.complete.call(this.elem)}return false}else{var h=d-this.startTime;this.state=h/this.options.duration;this.pos=this.options.easing(h,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(c){hs.setStyles(c.elem,{opacity:c.now})},_0:function(c){try{if(c.elem.style&&c.elem.style[c.prop]!=null)c.elem.style[c.prop]=c.now+c.unit;else c.elem[c.prop]=c.now}catch(e){}}}});hs.Outline=function(c,d){this.onLoad=d;this.outlineType=c;var f=hs.uaVersion,g;this.hasAlphaImageLoader=hs.ie&&f>=5.5&&f<7;if(!c){if(d)d();return}hs.init();this.table=hs.createElement('table',{cellSpacing:0},{visibility:'hidden',position:'absolute',borderCollapse:'collapse',width:0},hs.container,true);var h=hs.createElement('tbody',null,null,this.table,1);this.td=[];for(var i=0;i<=8;i++){if(i%3==0)g=hs.createElement('tr',null,{height:'auto'},h,true);this.td[i]=hs.createElement('td',null,null,g,true);var j=i!=4?{lineHeight:0,fontSize:0}:{position:'relative'};hs.setStyles(this.td[i],j)}this.td[4].className=c+' highslide-outline';this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var c=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var d=hs.safari?hs.container:null;this.graphic=hs.createElement('img',null,{position:'absolute',top:'-9999px'},d,true);var f=this;this.graphic.onload=function(){f.onGraphicLoad()};this.graphic.src=c},onGraphicLoad:function(){var c=this.offset=this.graphic.width/4,d=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],f={height:(2*c)+'px',width:(2*c)+'px'};for(var g=0;g<=8;g++){if(d[g]){if(this.hasAlphaImageLoader){var h=(g==1||g==7)?'100%':this.graphic.width+'px';var i=hs.createElement('div',null,{width:'100%',height:'100%',position:'relative',overflow:'hidden'},this.td[g],true);hs.createElement('div',null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:'absolute',width:h,height:this.graphic.height+'px',left:(d[g][0]*c)+'px',top:(d[g][1]*c)+'px'},i,true)}else{hs.setStyles(this.td[g],{background:'url('+this.graphic.src+') '+(d[g][0]*c)+'px '+(d[g][1]*c)+'px'})}if(window.opera&&(g==3||g==5))hs.createElement('div',null,f,this.td[g],true);hs.setStyles(this.td[g],f)}}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(c,d,f,g,h){var i=this.exp,j=i.wrapper.style,d=d||0,c=c||{x:i.x.pos+d,y:i.y.pos+d,w:i.x.get('wsize')-2*d,h:i.y.get('wsize')-2*d};if(f)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*this.offset)+'px'});c.w-=2*this.offset;c.h-=2*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(c){if(c)this.table.style.visibility='hidden';else hs.discardElement(this.table)}};hs.Dimension=function(c,d){this.exp=c;this.dim=d;this.ucwh=d=='x'?'Width':'Height';this.wh=this.ucwh.toLowerCase();this.uclt=d=='x'?'Left':'Top';this.lt=this.uclt.toLowerCase();this.ucrb=d=='x'?'Right':'Bottom';this.rb=this.ucrb.toLowerCase();this.p1=this.p2=0};hs.Dimension.prototype={get:function(c){switch(c){case'loadingPos':return this.tpos+this.tb+(this.t-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 c=this.exp;this.justify='auto';this.pos=this.tpos-this.cb+this.tb;if(this.maxHeight&&this.dim=='x')c.maxWidth=Math.min(c.maxWidth||this.full,c.maxHeight*this.full/c.y.full);this.size=Math.min(this.full,c['max'+this.ucwh]||this.full);this.minSize=c.allowSizeReduction?Math.min(c['min'+this.ucwh],this.full):this.full;if(c.isImage&&c.useBox){this.size=c[this.wh];this.imgSize=this.full}if(this.dim=='x'&&hs.padToMinWidth)this.minSize=c.minWidth;this.marginMin=hs['margin'+this.uclt];this.scroll=hs.page['scroll'+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(c){var d=this.exp;if(d.isImage&&(d.useBox||hs.padToMinWidth)){this.imgSize=c;this.size=Math.max(this.size,this.imgSize);d.content.style[this.lt]=this.get('imgPad')+'px'}else this.size=c;d.content.style[this.wh]=c+'px';d.wrapper.style[this.wh]=this.get('wsize')+'px';if(d.outline)d.outline.setPosition();if(this.dim=='x'&&d.overlayBox)d.sizeOverlayBox(true)},setPos:function(c){this.pos=c;this.exp.wrapper.style[this.lt]=c+'px';if(this.exp.outline)this.exp.outline.setPosition()}};hs.Expander=function(c,d,f,g){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,'ready',function(){new hs.Expander(c,d,f,g)});return}this.a=c;this.custom=f;this.contentType=g||'image';this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];hs.init();var h=this.key=hs.expanders.length;for(var i=0;i<hs.overrides.length;i++){var j=hs.overrides[i];this[j]=d&&typeof d[j]!='undefined'?d[j]:hs[j]}if(!this.src)this.src=c.href;var k=(d&&d.thumbnailId)?hs.$(d.thumbnailId):c;k=this.thumb=k.getElementsByTagName('img')[0]||k;this.thumbsUserSetId=k.id||c.id;for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].a==c){hs.expanders[i].focus();return false}}if(!hs.allowSimultaneousLoading)for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=k&&!hs.expanders[i].onLoadStarted){hs.expanders[i].cancelLoading()}}hs.expanders[h]=this;if(!hs.allowMultipleInstances&&!hs.upcoming){if(hs.expanders[h-1])hs.expanders[h-1].close();if(typeof hs.focusKey!='undefined'&&hs.expanders[hs.focusKey])hs.expanders[hs.focusKey].close()}this.el=k;this.tpos=hs.getPosition(k);hs.getPageSize();var l=this.x=new hs.Dimension(this,'x');l.calcThumb();var m=this.y=new hs.Dimension(this,'y');m.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[this.contentType+'Create']()}else if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+'Create']()}else{this.showLoading();var n=this;new hs.Outline(this.outlineType,function(){n.connectOutline();n[n.contentType+'Create']()})}return true};hs.Expander.prototype={error:function(c){window.location.href=this.src},connectOutline:function(){var c=this.outline=hs.pendingOutlines[this.outlineType];c.exp=this;c.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 c=this;this.loading.onclick=function(){c.cancelLoading()};var c=this,d=this.x.get('loadingPos')+'px',f=this.y.get('loadingPos')+'px';setTimeout(function(){if(c.loading)hs.setStyles(c.loading,{left:d,top:f,zIndex:hs.zIndexCounter++})},100)},imageCreate:function(){var c=this;var d=document.createElement('img');this.content=d;d.onload=function(){if(hs.expanders[c.key])c.contentLoaded()};if(hs.blockRightClick)d.oncontextmenu=function(){return false};d.className='highslide-image';hs.setStyles(d,{visibility:'hidden',display:'block',position:'absolute',maxWidth:'9999px',zIndex:3});d.title=hs.lang.restoreTitle;if(hs.safari)hs.container.appendChild(d);if(hs.ie&&hs.flushImgSize)d.src=null;d.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 c=this.x,d=this.y;if(this.loading){hs.setStyles(this.loading,{top:'-9999px'});this.loading=null}c.full=this.content.width;d.full=this.content.height;hs.setStyles(this.content,{width:c.t+'px',height:d.t+'px'});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper);c.calcBorders();d.calcBorders();hs.setStyles(this.wrapper,{left:(c.tpos+c.tb-c.cb)+'px',top:(d.tpos+c.tb-d.cb)+'px'});this.getOverlays();var f=c.full/d.full;c.calcExpanded();this.justify(c);d.calcExpanded();this.justify(d);if(this.overlayBox)this.sizeOverlayBox(0,1);if(this.allowSizeReduction){this.correctRatio(f);if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1)this.sizeOverlayBox()}}this.show()}catch(e){this.error(e)}},justify:function(c,d){var f,g=c.target,h=c==this.x?'x':'y';var i=false;var j=c.exp.allowSizeReduction;c.pos=Math.round(c.pos-((c.get('wsize')-c.t)/2));if(c.pos<c.scroll+c.marginMin){c.pos=c.scroll+c.marginMin;i=true}if(!d&&c.size<c.minSize){c.size=c.minSize;j=false}if(c.pos+c.get('wsize')>c.scroll+c.clientSize-c.marginMax){if(!d&&i&&j){c.size=Math.min(c.size,c.get(h=='y'?'fitsize':'maxsize'))}else if(c.get('wsize')<c.get('fitsize')){c.pos=c.scroll+c.clientSize-c.marginMax-c.get('wsize')}else{c.pos=c.scroll+c.marginMin;if(!d&&j)c.size=c.get(h=='y'?'fitsize':'maxsize')}}if(!d&&c.size<c.minSize){c.size=c.minSize;j=false}if(c.pos<c.marginMin){var k=c.pos;c.pos=c.marginMin;if(j&&!d)c.size=c.size-(c.pos-k)}},correctRatio:function(c){var d=this.x,f=this.y,g=false,h=Math.min(d.full,d.size),i=Math.min(f.full,f.size),j=(this.useBox||hs.padToMinWidth);if(h/i>c){h=i*c;if(h<d.minSize){h=d.minSize;i=h/c}g=true}else if(h/i<c){i=h/c;g=true}if(hs.padToMinWidth&&d.full<d.minSize){d.imgSize=d.full;f.size=f.imgSize=f.full}else if(this.useBox){d.imgSize=h;f.imgSize=i}else{d.size=h;f.size=i}g=this.fitOverlayBox(j?null:c,g);if(j&&f.size<f.imgSize){f.imgSize=f.size;d.imgSize=f.size*c}if(g||j){d.pos=d.tpos-d.cb+d.tb;d.minSize=d.size;this.justify(d,true);f.pos=f.tpos-f.cb+f.tb;f.minSize=f.size;this.justify(f,true);if(this.overlayBox)this.sizeOverlayBox()}},fitOverlayBox:function(c,d){var f=this.x,g=this.y;if(this.overlayBox){while(g.size>this.minHeight&&f.size>this.minWidth&&g.get('wsize')>g.get('fitsize')){g.size-=10;if(c)f.size=g.size*c;this.sizeOverlayBox(0,1);d=true}}return d},show:function(){var c=this.x,d=this.y;this.doShowHide('hidden');this.changeSize(1,{wrapper:{width:c.get('wsize'),height:d.get('wsize'),left:c.pos,top:d.pos},content:{left:c.p1+c.get('imgPad'),top:d.p1+d.get('imgPad'),width:c.imgSize||c.size,height:d.imgSize||d.size}},hs.expandDuration)},changeSize:function(h,i,j){if(this.outline&&!this.outlineWhileAnimating){if(h)this.outline.setPosition();else this.outline.destroy()}if(!h)this.destroyOverlays();var k=this,l=k.x,m=k.y,n=this.easing;if(!h)n=this.easingClose||n;var o=h?function(){if(k.outline)k.outline.table.style.visibility="visible";setTimeout(function(){k.afterExpand()},50)}:function(){k.afterClose()};if(h)hs.setStyles(this.wrapper,{width:l.t+'px',height:m.t+'px'});if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:h?0:1});hs.extend(i.wrapper,{opacity:h})}hs.animate(this.wrapper,i.wrapper,{duration:j,easing:n,step:function(c,d){if(k.outline&&k.outlineWhileAnimating&&d.prop=='top'){var f=h?d.pos:1-d.pos;var g={w:l.t+(l.get('wsize')-l.t)*f,h:m.t+(m.get('wsize')-m.t)*f,x:l.tpos+(l.pos-l.tpos)*f,y:m.tpos+(m.pos-m.tpos)*f};k.outline.setPosition(g,0,1)}}});hs.animate(this.content,i.content,j,n,o);if(h){this.wrapper.style.visibility='visible';this.content.style.visibility='visible';this.a.className+=' highslide-active-anchor'}},afterExpand:function(){this.isExpanded=true;this.focus();if(hs.upcoming&&hs.upcoming==this.a)hs.upcoming=null;this.prepareNextOutline();var c=hs.page,d=hs.mouse.x+c.scrollLeft,f=hs.mouse.y+c.scrollTop;this.mouseIsOver=this.x.pos<d&&d<this.x.pos+this.x.get('wsize')&&this.y.pos<f&&f<this.y.pos+this.y.get('wsize');if(this.overlayBox)this.showOverlays()},prepareNextOutline:function(){var c=this.key;var d=this.outlineType;new hs.Outline(d,function(){try{hs.expanders[c].preloadNext()}catch(e){}})},preloadNext:function(){var c=this.getAdjacentAnchor(1);if(c&&c.onclick.toString().match(/hs\.expand/))var d=hs.createElement('img',{src:hs.getSrc(c)})},getAdjacentAnchor:function(c){var d=this.getAnchorIndex(),f=hs.anchors.groups[this.slideshowGroup||'none'];if(!f[d+c]&&this.slideshow&&this.slideshow.repeat){if(c==1)return f[0];else if(c==-1)return f[f.length-1]}return f[d+c]||null},getAnchorIndex:function(){var c=hs.getAnchors().groups[this.slideshowGroup||'none'];if(c)for(var d=0;d<c.length;d++){if(c[d]==this.a)return d}return null},cancelLoading:function(){hs.discardElement(this.wrapper);hs.expanders[this.key]=null;if(this.loading)hs.loading.style.left='-9999px'},writeCredits:function(){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'})},getInline:function(c,d){for(var f=0;f<c.length;f++){var g=c[f],h=null;if(!this[g+'Id']&&this.thumbsUserSetId)this[g+'Id']=g+'-for-'+this.thumbsUserSetId;if(this[g+'Id'])this[g]=hs.getNode(this[g+'Id']);if(!this[g]&&!this[g+'Text']&&this[g+'Eval'])try{h=eval(this[g+'Eval'])}catch(e){}if(!this[g]&&this[g+'Text']){h=this[g+'Text']}if(!this[g]&&!h){this[g]=hs.getNode(this.a['_'+g+'Id']);if(!this[g]){var i=this.a.nextSibling;while(i&&!hs.isHsAnchor(i)){if((new RegExp('highslide-'+g)).test(i.className||null)){if(!i.id)this.a['_'+g+'Id']=i.id='hsId'+hs.idCounter++;this[g]=hs.getNode(i.id);break}i=i.nextSibling}}}if(!this[g]&&h)this[g]=hs.createElement('div',{className:'highslide-'+g,innerHTML:h});if(d&&this[g]){var j={position:(g=='heading')?'above':'below'};for(var k in this[g+'Overlay'])j[k]=this[g+'Overlay'][k];j.overlayId=this[g];this.createOverlay(j)}}},doShowHide:function(c){if(hs.hideSelects)this.showHideElements('SELECT',c);if(hs.hideIframes)this.showHideElements('IFRAME',c);if(hs.geckoMac)this.showHideElements('*',c)},showHideElements:function(c,d){var f=document.getElementsByTagName(c);var g=c=='*'?'overflow':'visibility';for(var h=0;h<f.length;h++){if(g=='visibility'||(document.defaultView.getComputedStyle(f[h],"").getPropertyValue('overflow')=='auto'||f[h].getAttribute('hidden-by')!=null)){var i=f[h].getAttribute('hidden-by');if(d=='visible'&&i){i=i.replace('['+this.key+']','');f[h].setAttribute('hidden-by',i);if(!i)f[h].style[g]=f[h].origProp}else if(d=='hidden'){var j=hs.getPosition(f[h]);j.w=f[h].offsetWidth;j.h=f[h].offsetHeight;var k=(j.x+j.w<this.x.get('opos')||j.x>this.x.get('opos')+this.x.get('osize'));var l=(j.y+j.h<this.y.get('opos')||j.y>this.y.get('opos')+this.y.get('osize'));var m=hs.getWrapperKey(f[h]);if(!k&&!l&&m!=this.key){if(!i){f[h].setAttribute('hidden-by','['+this.key+']');f[h].origProp=f[h].style[g];f[h].style[g]='hidden'}else if(i.indexOf('['+this.key+']')==-1){f[h].setAttribute('hidden-by',i+'['+this.key+']')}}else if((i=='['+this.key+']'||hs.focusKey==m)&&m!=this.key){f[h].setAttribute('hidden-by','');f[h].style[g]=f[h].origProp||''}else if(i&&i.indexOf('['+this.key+']')>-1){f[h].setAttribute('hidden-by',i.replace('['+this.key+']',''))}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter+=2;for(var c=0;c<hs.expanders.length;c++){if(hs.expanders[c]&&c==hs.focusKey){var d=hs.expanders[c];d.content.className+=' highslide-'+d.contentType+'-blur';d.content.style.cursor=hs.ie?'hand':'pointer';d.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(c,d){this.x.setPos(c);this.y.setPos(d)},resize:function(c){var d,f,g=c.width/c.height;d=Math.max(c.width+c.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(d-this.x.full)<12)d=this.x.full;f=d/g;if(f<Math.min(this.minHeight,this.y.full)){f=Math.min(this.minHeight,this.y.full);if(this.isImage)d=f*g}this.resizeTo(d,f)},resizeTo:function(c,d){this.y.setSize(d);this.x.setSize(c);this.wrapper.style.height=this.y.get('wsize')+'px'},close:function(){if(this.isClosing||!this.isExpanded)return;this.isClosing=true;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(e){this.afterClose()}},createOverlay:function(c){var d=c.overlayId;if(typeof d=='string')d=hs.getNode(d);if(c.html)d=hs.createElement('div',{innerHTML:c.html});if(!d||typeof d=='string')return;d.style.display='block';this.genOverlayBox();var f=c.width&&/^[0-9]+(px|%)$/.test(c.width)?c.width:'auto';if(/^(left|right)panel$/.test(c.position)&&!/^[0-9]+px$/.test(c.width))f='200px';var g=hs.createElement('div',{id:'hsId'+hs.idCounter++,hsId:c.hsId},{position:'absolute',visibility:'hidden',width:f,direction:hs.lang.cssDirection||'',opacity:0},this.overlayBox,true);g.appendChild(d);hs.extend(g,{opacity:1,offsetX:0,offsetY:0,dur:(c.fade===0||c.fade===false||(c.fade==2&&hs.ie))?0:250});hs.extend(g,c);if(this.gotOverlays){this.positionOverlay(g);if(!g.hideOnMouseOut||this.mouseIsOver)hs.animate(g,{opacity:g.opacity},g.dur)}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(c){var d=c.position||'middle center',f=c.offsetX,g=c.offsetY;if(c.parentNode!=this.overlayBox)this.overlayBox.appendChild(c);if(/left$/.test(d))c.style.left=f+'px';if(/center$/.test(d))hs.setStyles(c,{left:'50%',marginLeft:(f-Math.round(c.offsetWidth/2))+'px'});if(/right$/.test(d))c.style.right=-f+'px';if(/^leftpanel$/.test(d)){hs.setStyles(c,{right:'100%',marginRight:this.x.cb+'px',top:-this.y.cb+'px',bottom:-this.y.cb+'px',overflow:'auto'});this.x.p1=c.offsetWidth}else if(/^rightpanel$/.test(d)){hs.setStyles(c,{left:'100%',marginLeft:this.x.cb+'px',top:-this.y.cb+'px',bottom:-this.y.cb+'px',overflow:'auto'});this.x.p2=c.offsetWidth}if(/^top/.test(d))c.style.top=g+'px';if(/^middle/.test(d))hs.setStyles(c,{top:'50%',marginTop:(g-Math.round(c.offsetHeight/2))+'px'});if(/^bottom/.test(d))c.style.bottom=-g+'px';if(/^above$/.test(d)){hs.setStyles(c,{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=c.offsetHeight}else if(/^below$/.test(d)){hs.setStyles(c,{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=c.offsetHeight;c.style.position='absolute'}},getOverlays:function(){this.getInline(['heading','caption'],true);if(this.heading&&this.dragByHeading)this.heading.className+=' highslide-move';if(hs.showCredits)this.writeCredits();for(var c=0;c<hs.overlays.length;c++){var d=hs.overlays[c],f=d.thumbnailId,g=d.slideshowGroup;if((!f&&!g)||(f&&f==this.thumbsUserSetId)||(g&&g===this.slideshowGroup)){this.createOverlay(d)}}var h=[];for(var c=0;c<this.overlays.length;c++){var d=hs.$('hsId'+this.overlays[c]);if(/panel$/.test(d.position))this.positionOverlay(d);else hs.push(h,d)}for(var c=0;c<h.length;c++)this.positionOverlay(h[c]);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(c,d){var f=this.overlayBox,g=this.x,h=this.y;hs.setStyles(f,{width:g.size+'px',height:h.size+'px'});if(c||d){for(var i=0;i<this.overlays.length;i++){var j=hs.$('hsId'+this.overlays[i]);var k=(hs.ieLt7||document.compatMode=='BackCompat');if(j&&/^(above|below)$/.test(j.position)){if(k){j.style.width=(f.offsetWidth+2*g.cb+g.p1+g.p2)+'px'}h[j.position=='above'?'p1':'p2']=j.offsetHeight}if(j&&k&&/^(left|right)panel$/.test(j.position)){j.style.height=(f.offsetHeight+2*h.cb)+'px'}}}if(c){hs.setStyles(this.content,{top:h.p1+'px'});hs.setStyles(f,{top:(h.p1+h.cb)+'px'})}},showOverlays:function(){var c=this.overlayBox;c.className='';hs.setStyles(c,{top:(this.y.p1+this.y.cb)+'px',left:(this.x.p1+this.x.cb)+'px',overflow:'visible'});if(hs.safari)c.style.visibility='visible';this.wrapper.appendChild(c);for(var d=0;d<this.overlays.length;d++){var f=hs.$('hsId'+this.overlays[d]);f.style.zIndex=4;if(!f.hideOnMouseOut||this.mouseIsOver){f.style.visibility='visible';hs.setStyles(f,{visibility:'visible',display:''});hs.animate(f,{opacity:f.opacity},f.dur)}}},destroyOverlays:function(){if(!this.overlays.length)return;hs.discardElement(this.overlayBox)},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();var c=this.x.size;this.resizeTo(this.x.full,this.y.full);var d=this.x.pos-(this.x.size-c)/2;if(d<hs.marginLeft)d=hs.marginLeft;this.moveTo(d,this.y.pos);this.doShowHide('hidden')}catch(e){this.error(e)}},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);hs.expanders[this.key]=null;hs.reOrder()}};hs.langDefaults=hs.lang;var HsExpander=hs.Expander;if(hs.ie){(function(){try{document.documentElement.doScroll('left')}catch(e){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){var g=hs.createElement('style',{type:'text/css'},null,document.getElementsByTagName('HEAD')[0]);function h(c,d){if(!hs.ie){g.appendChild(document.createTextNode(c+" {"+d+"}"))}else{var f=document.styleSheets[document.styleSheets.length-1];if(typeof(f.addRule)=="object")f.addRule(c,d)}}function i(c){return'expression( ( ( ignoreMe = document.documentElement.'+c+' ? document.documentElement.'+c+' : document.body.'+c+' ) ) + \'px\' );'}if(hs.expandCursor)h('.highslide img','cursor: url('+hs.graphicsDir+hs.expandCursor+'), pointer !important;')}});hs.addEventListener(window,'resize',function(){hs.getPageSize()});hs.addEventListener(document,'mousemove',function(c){hs.mouse={x:c.clientX,y:c.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)}

