var hs={lang:{cssDirection:'ltr',loadingText:'',loadingTitle:'Click to cancel',restoreTitle:''},graphicsDir:'img/highslide/',expandCursor:'zoomin.cur',restoreCursor:'zoomout.cur',expandDuration:250,restoreDuration:250,marginLeft:10,marginRight:10,marginTop:10,marginBottom:10,zIndexCounter:1001,loadingOpacity:0.75,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,openerTagNames:['a'],transitions:[],transitionDuration:500,dimmingOpacity:0.93,dimmingDuration:100,anchor:'auto',align:'center',targetX:null,targetY:null,minWidth:200,minHeight:200,outlineType:'rounded-white',wrapperClassName:'highslide-wrapper',preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:['anchor','align','targetX','targetY','outlineType','outlineWhileAnimating','transitions','dimmingOpacity','wrapperClassName','minWidth','minHeight','maxWidth','maxHeight','slideshowGroup','easing','easingClose','fadeInOut','src'],timers:[],pendingOutlines:{},clones:{},onReady:[],uaVersion: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(id){if(id)return document.getElementById(id)},push:function(arr,val){arr[arr.length]=val},createElement:function(tag,attribs,styles,parent,nopad){var el=document.createElement(tag);if(attribs)hs.extend(el,attribs);if(nopad)hs.setStyles(el,{padding:0,border:'none',margin:0});if(styles)hs.setStyles(el,styles);if(parent)parent.appendChild(el);return el},extend:function(el,attribs){for(var x in attribs)el[x]=attribs[x];return el},setStyles:function(el,styles){for(var x in styles){if(hs.ie&&x=='opacity'){if(styles[x]>0.99)el.style.removeAttribute('filter');else el.style.filter='alpha(opacity='+(styles[x]*100)+')'}else el.style[x]=styles[x]}},animate:function(el,prop,opt){var start,end,unit;if(typeof opt!='object'||opt===null){var args=arguments;opt={duration:args[2],easing:args[3],complete:args[4]}}if(typeof opt.duration!='number')opt.duration=250;opt.easing=Math[opt.easing]||Math.easeInQuad;opt.curAnim=hs.extend({},prop);for(var name in prop){var e=new hs.fx(el,opt,name);start=parseFloat(hs.css(el,name))||0;end=parseFloat(prop[name]);unit=name!='opacity'?'px':'';e.custom(start,end,unit)}},css:function(el,prop){if(document.defaultView){return document.defaultView.getComputedStyle(el,null).getPropertyValue(prop)}else{if(prop=='opacity')prop='filter';var val=el.currentStyle[prop.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()})];if(prop=='filter')val=val.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100});return val===''?1:val}},getPageSize:function(){var d=document,w=window,iebody=d.compatMode&&d.compatMode!='BackCompat'?d.documentElement:d.body;var b=d.body;var xScroll=(w.innerWidth&&w.scrollMaxX)?w.innerWidth+w.scrollMaxX:Math.max(b.scrollWidth,b.offsetWidth),yScroll=(w.innerHeight&&window.scrollMaxY)?w.innerHeight+w.scrollMaxY:Math.max(b.scrollHeight,b.offsetHeight),pageWidth=hs.ie?iebody.scrollWidth:(d.documentElement.clientWidth||self.innerWidth),pageHeight=hs.ie?Math.max(iebody.scrollHeight,iebody.clientHeight):(d.documentElement.clientHeight||self.innerHeight);var width=hs.ie?iebody.clientWidth:(d.documentElement.clientWidth||self.innerWidth),height=hs.ie?iebody.clientHeight:self.innerHeight;return{pageWidth:Math.max(pageWidth,xScroll),pageHeight:Math.max(pageHeight,yScroll),width:width,height:height,scrollLeft:hs.ie?iebody.scrollLeft:pageXOffset,scrollTop:hs.ie?iebody.scrollTop:pageYOffset}},getPosition:function(el){var p={x:el.offsetLeft,y:el.offsetTop};while(el.offsetParent){el=el.offsetParent;p.x+=el.offsetLeft;p.y+=el.offsetTop;if(el!=document.body&&el!=document.documentElement){p.x-=el.scrollLeft;p.y-=el.scrollTop}}return p},expand:function(a,params,custom,type){if(!a)a=hs.createElement('a',null,{display:'none'},hs.container);if(typeof a.getParams=='function')return params;try{new hs.Expander(a,params,custom);return false}catch(e){return true}},getParam:function(a,param){a.getParams=a.onclick;var p=a.getParams?a.getParams():null;a.getParams=null;return(p&&typeof p[param]!='undefined')?p[param]:(typeof hs[param]!='undefined'?hs[param]:null)},getSrc:function(a){var src=hs.getParam(a,'src');if(src)return src;return a.href},discardElement:function(d){hs.garbageBin.appendChild(d);hs.garbageBin.innerHTML=''},dim:function(exp){if(!hs.dimmer){hs.dimmer=hs.createElement('div',{className:'highslide-dimming',owner:'',onclick:function(){hs.close()}},{position:'absolute',visibility:'visible',left:0,opacity:0},hs.container,true);hs.addEventListener(window,'resize',hs.setDimmerSize)}hs.dimmer.style.display='';hs.setDimmerSize();hs.dimmer.owner+='|'+exp.key;if(hs.geckoMac&&hs.dimmingGeckoFix)hs.setStyles(hs.dimmer,{background:'url('+hs.graphicsDir+'geckodimmer.png)',opacity:1});else hs.animate(hs.dimmer,{opacity:exp.dimmingOpacity},hs.dimmingDuration)},undim:function(key){if(!hs.dimmer)return;if(typeof key!='undefined')hs.dimmer.owner=hs.dimmer.owner.replace('|'+key,'');if((typeof key!='undefined'&&hs.dimmer.owner!='')||(hs.upcoming&&hs.getParam(hs.upcoming,'dimmingOpacity')))return;if(hs.geckoMac&&hs.dimmingGeckoFix)hs.setStyles(hs.dimmer,{background:'none',width:0,height:0});else hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.setStyles(hs.dimmer,{display:'none',width:0,height:0})})},setDimmerSize:function(exp){if(!hs.dimmer)return;var h=(hs.ie&&exp&&exp.wrapper)?parseInt(exp.wrapper.style.top)+parseInt(exp.wrapper.style.height)+(exp.outline?exp.outline.offset:0):0;hs.setStyles(hs.dimmer,{width:hs.page.pageWidth+'px',height:Math.max(hs.page.pageHeight,h)+'px'})},getWrapperKey:function(element,expOnly){var el,re=/^highslide-wrapper-([0-9]+)$/;el=element;while(el.parentNode){if(el.id&&re.test(el.id))return el.id.replace(re,"$1");el=el.parentNode}if(!expOnly){el=element;while(el.parentNode){if(el.tagName&&hs.isHsAnchor(el)){for(var key=0;key<hs.expanders.length;key++){var exp=hs.expanders[key];if(exp&&exp.a==el)return key}}el=el.parentNode}}return null},getExpander:function(el,expOnly){if(typeof el=='undefined')return hs.expanders[hs.focusKey]||null;if(typeof el=='number')return hs.expanders[el]||null;if(typeof el=='string')el=hs.$(el);return hs.expanders[hs.getWrapperKey(el,expOnly)]||null},isHsAnchor:function(a){return(a.onclick&&a.onclick.toString().replace(/\s/g,' ').match(/hs.(htmlE|e)xpand/))},addEventListener:function(el,event,func){if(el==document&&event=='ready')hs.push(hs.onReady,func);try{el.addEventListener(event,func,false)}catch(e){try{el.detachEvent('on'+event,func);el.attachEvent('on'+event,func)}catch(e){el['on'+event]=func}}},removeEventListener:function(el,event,func){try{el.removeEventListener(event,func,false)}catch(e){try{el.detachEvent('on'+event,func)}catch(e){el['on'+event]=null}}},preloadFullImage:function(i){if(hs.continuePreloading&&hs.preloadTheseImages[i]&&hs.preloadTheseImages[i]!='undefined'){var img=document.createElement('img');img.onload=function(){img=null;hs.preloadFullImage(i+1)};img.src=hs.preloadTheseImages[i]}},preloadImages:function(number){if(number&&typeof number!='object')hs.numberOfImagesToPreload=number;var arr=hs.getAnchors();for(var i=0;i<arr.images.length&&i<hs.numberOfImagesToPreload;i++){hs.push(hs.preloadTheseImages,hs.getSrc(arr.images[i]))}if(hs.outlineType)new hs.Outline(hs.outlineType,function(){hs.preloadFullImage(0)});else hs.preloadFullImage(0);if(hs.restoreCursor)var cur=hs.createElement('img',{src:hs.graphicsDir+hs.restoreCursor})},init:function(){if(!hs.container){hs.page=hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;for(var x in hs.langDefaults){if(typeof hs[x]!='undefined')hs.lang[x]=hs[x];else if(typeof hs.lang[x]=='undefined'&&typeof hs.langDefaults[x]!='undefined')hs.lang[x]=hs.langDefaults[x]}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(t,b,c,d){return c*t/d+b};Math.easeInQuad=function(t,b,c,d){return c*(t/=d)*t+b}}},ready:function(){if(hs.isReady)return;hs.isReady=true;for(var i=0;i<hs.onReady.length;i++)hs.onReady[i]()},updateAnchors:function(){var el,els,all=[],images=[],groups={},re;for(var i=0;i<hs.openerTagNames.length;i++){els=document.getElementsByTagName(hs.openerTagNames[i]);for(var j=0;j<els.length;j++){el=els[j];re=hs.isHsAnchor(el);if(re){hs.push(all,el);if(re[0]=='hs.expand')hs.push(images,el);var g=hs.getParam(el,'slideshowGroup')||'none';if(!groups[g])groups[g]=[];hs.push(groups[g],el)}}}hs.anchors={all:all,groups:groups,images:images};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(el){var exp=hs.getExpander(el);if(exp)exp.close();return false}};hs.fx=function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={}};hs.fx.prototype={update:function(){(hs.fx.step[this.prop]||hs.fx.step._default)(this);if(this.options.step)this.options.step.call(this.elem,this.now,this)},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit;this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&hs.timers.push(t)==1){hs.timerId=setInterval(function(){var timers=hs.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(hs.timerId)}},13)}},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.complete)this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=this.options.easing(n,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(fx){hs.setStyles(fx.elem,{opacity:fx.now})},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null)fx.elem.style[fx.prop]=fx.now+fx.unit;else fx.elem[fx.prop]=fx.now}}});hs.Outline=function(outlineType,onLoad){this.onLoad=onLoad;this.outlineType=outlineType;var v=hs.uaVersion,tr;this.hasAlphaImageLoader=hs.ie&&v>=5.5&&v<7;if(!outlineType){if(onLoad)onLoad();return}hs.init();this.table=hs.createElement('table',{cellSpacing:0},{visibility:'hidden',position:'absolute',borderCollapse:'collapse',width:0},hs.container,true);var tbody=hs.createElement('tbody',null,null,this.table,1);this.td=[];for(var i=0;i<=8;i++){if(i%3==0)tr=hs.createElement('tr',null,{height:'auto'},tbody,true);this.td[i]=hs.createElement('td',null,null,tr,true);var style=i!=4?{lineHeight:0,fontSize:0}:{position:'relative'};hs.setStyles(this.td[i],style)}this.td[4].className=outlineType+' highslide-outline';this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var src=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var appendTo=hs.safari?hs.container:null;this.graphic=hs.createElement('img',null,{position:'absolute',top:'-9999px'},appendTo,true);var pThis=this;this.graphic.onload=function(){pThis.onGraphicLoad()};this.graphic.src=src},onGraphicLoad:function(){var o=this.offset=this.graphic.width/4,pos=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],dim={height:(2*o)+'px',width:(2*o)+'px'};for(var i=0;i<=8;i++){if(pos[i]){if(this.hasAlphaImageLoader){var w=(i==1||i==7)?'100%':this.graphic.width+'px';var div=hs.createElement('div',null,{width:'100%',height:'100%',position:'relative',overflow:'hidden'},this.td[i],true);hs.createElement('div',null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:'absolute',width:w,height:this.graphic.height+'px',left:(pos[i][0]*o)+'px',top:(pos[i][1]*o)+'px'},div,true)}else{hs.setStyles(this.td[i],{background:'url('+this.graphic.src+') '+(pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'})}if(window.opera&&(i==3||i==5))hs.createElement('div',null,dim,this.td[i],true);hs.setStyles(this.td[i],dim)}}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(pos,offset,vis,dur,easing){var exp=this.exp,stl=exp.wrapper.style,offset=offset||0,pos=pos||{x:exp.x.pos+offset,y:exp.y.pos+offset,w:exp.x.get('wsize')-2*offset,h:exp.y.get('wsize')-2*offset};if(vis)this.table.style.visibility=(pos.h>=4*this.offset)?'visible':'hidden';hs.setStyles(this.table,{left:(pos.x-this.offset)+'px',top:(pos.y-this.offset)+'px',width:(pos.w+2*this.offset)+'px'});pos.w-=2*this.offset;pos.h-=2*this.offset;hs.setStyles(this.td[4],{width:pos.w>=0?pos.w+'px':0,height:pos.h>=0?pos.h+'px':0});if(this.hasAlphaImageLoader)this.td[3].style.height=this.td[5].style.height=this.td[4].style.height},destroy:function(hide){if(hide)this.table.style.visibility='hidden';else hs.discardElement(this.table)}};hs.Dimension=function(exp,dim){this.exp=exp;this.dim=dim;this.ucwh=dim=='x'?'Width':'Height';this.wh=this.ucwh.toLowerCase();this.uclt=dim=='x'?'Left':'Top';this.lt=this.uclt.toLowerCase();this.ucrb=dim=='x'?'Right':'Bottom';this.rb=this.ucrb.toLowerCase()};hs.Dimension.prototype={get:function(key){switch(key){case'loadingPos':return this.tpos+this.tb+(this.t-hs.loading['offset'+this.ucwh])/2;case'loadingPosXfade':return this.pos+this.cb+(this.size-hs.loading['offset'+this.ucwh])/2;case'wsize':return this.size+2*this.cb;case'fitsize':return this.clientSize-this.marginMin-this.marginMax;case'maxsize':return this.get('fitsize')-2*this.cb;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)}},calcBorders:function(){this.cb=(this.exp.content['offset'+this.ucwh]-this.t)/2;this.marginMax=hs['margin'+this.ucrb]+2*this.cb},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=(hs.page[this.wh]/2)+hs.page['scroll'+this.uclt]}},calcExpanded:function(){var exp=this.exp;this.justify='auto';if(exp.align=='center')this.justify='center';else if(new RegExp(this.lt).test(exp.anchor))this.justify=null;else if(new RegExp(this.rb).test(exp.anchor))this.justify='max';this.pos=this.tpos-this.cb+this.tb;this.size=Math.min(this.full,exp['max'+this.ucwh]||this.full);this.minSize=this.full;this.target=exp['target'+this.dim.toUpperCase()];this.marginMin=hs['margin'+this.uclt];this.scroll=hs.page['scroll'+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(i){var exp=this.exp;this.size=i;exp.content.style[this.wh]=i+'px';exp.wrapper.style[this.wh]=this.get('wsize')+'px';if(exp.outline)exp.outline.setPosition()},setPos:function(i){this.pos=i;this.exp.wrapper.style[this.lt]=i+'px';if(this.exp.outline)this.exp.outline.setPosition()}};hs.Expander=function(a,params,custom,contentType){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,'ready',function(){new hs.Expander(a,params,custom,contentType)});return}this.a=a;this.custom=custom;this.contentType=contentType||'image';this.isImage=!this.isHtml;hs.continuePreloading=false;this.last=hs.last;hs.last=null;hs.init();var key=this.key=hs.expanders.length;for(var i=0;i<hs.overrides.length;i++){var name=hs.overrides[i];this[name]=params&&typeof params[name]!='undefined'?params[name]:hs[name]}if(!this.src)this.src=a.href;var el=(params&&params.thumbnailId)?hs.$(params.thumbnailId):a;el=this.thumb=el.getElementsByTagName('img')[0]||el;this.thumbsUserSetId=el.id||a.id;for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].a==a&&!(this.last&&this.transitions[1]=='crossfade')){hs.expanders[i].focus();return false}}for(var i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=el&&!hs.expanders[i].onLoadStarted){hs.expanders[i].cancelLoading()}}hs.expanders[this.key]=this;if(hs.expanders[key-1])hs.expanders[key-1].close();if(typeof hs.focusKey!='undefined'&&hs.expanders[hs.focusKey])hs.expanders[hs.focusKey].close();this.el=el;this.tpos=hs.getPosition(el);hs.page=hs.getPageSize();var x=this.x=new hs.Dimension(this,'x');x.calcThumb();var y=this.y=new hs.Dimension(this,'y');y.calcThumb();this.wrapper=hs.createElement('div',{id:'highslide-wrapper-'+this.key,className:this.wrapperClassName},{visibility:'hidden',position:'absolute',zIndex:hs.zIndexCounter++},null,true);if(this.contentType=='image'&&this.outlineWhileAnimating==2)this.outlineWhileAnimating=0;if(!this.outlineType||(this.last&&this.isImage&&this.transitions[1]=='crossfade')){this[this.contentType+'Create']()}else if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+'Create']()}else{this.showLoading();var exp=this;new hs.Outline(this.outlineType,function(){exp.connectOutline();exp[exp.contentType+'Create']()})}return true};hs.Expander.prototype={error:function(e){window.location.href=this.src},connectOutline:function(){var outline=this.outline=hs.pendingOutlines[this.outlineType];outline.exp=this;outline.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 exp=this;this.loading.onclick=function(){exp.cancelLoading()};var exp=this,l=this.x.get('loadingPos')+'px',t=this.y.get('loadingPos')+'px';if(!tgt&&this.last&&this.transitions[1]=='crossfade')var tgt=this.last;if(tgt){l=tgt.x.get('loadingPosXfade')+'px';t=tgt.y.get('loadingPosXfade')+'px';this.loading.style.zIndex=hs.zIndexCounter++}setTimeout(function(){if(exp.loading)hs.setStyles(exp.loading,{left:l,top:t,zIndex:hs.zIndexCounter++})},100)},imageCreate:function(){var exp=this;var img=document.createElement('img');this.content=img;img.onload=function(){if(hs.expanders[exp.key])exp.contentLoaded()};img.onclick=function(){try{exp.close()}catch(e){}};if(hs.blockRightClick)img.oncontextmenu=function(){return false};img.className='highslide-image';hs.setStyles(img,{visibility:'hidden',display:'block',position:'absolute',maxWidth:'9999px',zIndex:3});img.title=hs.lang.restoreTitle;if(hs.safari)hs.container.appendChild(img);if(hs.ie)img.src='res://';img.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 x=this.x,y=this.y;if(this.loading){hs.setStyles(this.loading,{top:'-9999px'});this.loading=null}x.full=this.content.width;y.full=this.content.height;hs.setStyles(this.content,{width:x.t+'px',height:y.t+'px'});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper);x.calcBorders();y.calcBorders();hs.setStyles(this.wrapper,{left:(x.tpos+x.tb-x.cb)+'px',top:(y.tpos+x.tb-y.cb)+'px'});var ratio=x.full/y.full;x.calcExpanded();this.justify(x);y.calcExpanded();this.justify(y);this.show()}catch(e){this.error(e)}},justify:function(p,moveOnly){var tgtArr,tgt=p.target,dim=p==this.x?'x':'y';if(tgt&&tgt.match(/ /)){tgtArr=tgt.split(' ');tgt=tgtArr[0]}if(tgt&&hs.$(tgt)){p.pos=hs.getPosition(hs.$(tgt))[dim];if(tgtArr&&tgtArr[1]&&tgtArr[1].match(/^[-]?[0-9]+px$/))p.pos+=parseInt(tgtArr[1]);if(p.size<p.minSize)p.size=p.minSize}else if(p.justify=='auto'||p.justify=='center'){var hasMovedMin=false;if(p.justify=='center')p.pos=Math.round(p.scroll+(p.clientSize+p.marginMin-p.marginMax-p.get('wsize'))/2);else p.pos=Math.round(p.pos-((p.get('wsize')-p.t)/2));if(p.pos<p.scroll+p.marginMin){p.pos=p.scroll+p.marginMin;hasMovedMin=true}if(p.pos+p.get('wsize')>p.scroll+p.clientSize-p.marginMax){if(!moveOnly&&hasMovedMin){}else if(p.get('wsize')<p.get('fitsize')){p.pos=p.scroll+p.clientSize-p.marginMax-p.get('wsize')}else{p.pos=p.scroll+p.marginMin}}}else if(p.justify=='max'){p.pos=Math.floor(p.pos-p.size+p.t)}if(p.pos<p.marginMin){var tmpMin=p.pos;p.pos=p.marginMin}},show:function(){var x=this.x,y=this.y;this.changeSize(1,{wrapper:{width:x.get('wsize'),height:y.get('wsize'),left:x.pos,top:y.pos},content:{width:x.size,height:y.size}},hs.expandDuration)},changeSize:function(up,to,dur){var trans=this.transitions,other=up?(this.last?this.last.a:null):hs.upcoming,t=(trans[1]&&other&&hs.getParam(other,'transitions')[1]==trans[1])?trans[1]:trans[0];if(this[t]&&t!='expand'){this[t](up,to);return}if(this.outline&&!this.outlineWhileAnimating){if(up)this.outline.setPosition();else this.outline.destroy()}var exp=this,x=exp.x,y=exp.y,easing=this.easing;if(!up)easing=this.easingClose||easing;var after=up?function(){if(exp.outline)exp.outline.table.style.visibility="visible";setTimeout(function(){exp.afterExpand()},50)}:function(){exp.afterClose()};if(up)hs.setStyles(this.wrapper,{width:x.t+'px',height:y.t+'px'});if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:up?0:1});hs.extend(to.wrapper,{opacity:up})}hs.animate(this.wrapper,to.wrapper,{duration:dur,easing:easing,step:function(val,args){if(exp.outline&&exp.outlineWhileAnimating&&args.prop=='top'){var fac=up?args.pos:1-args.pos;var pos={w:x.t+(x.get('wsize')-x.t)*fac,h:y.t+(y.get('wsize')-y.t)*fac,x:x.tpos+(x.pos-x.tpos)*fac,y:y.tpos+(y.pos-y.tpos)*fac};exp.outline.setPosition(pos,0,1)}}});hs.animate(this.content,to.content,dur,easing,after);if(up){this.wrapper.style.visibility='visible';this.content.style.visibility='visible';this.a.className+=' highslide-active-anchor'}},fade:function(up,to){this.outlineWhileAnimating=false;var exp=this,t=up?hs.expandDuration:0;if(up){hs.animate(this.wrapper,to.wrapper,0);hs.setStyles(this.wrapper,{opacity:0,visibility:'visible'});hs.animate(this.content,to.content,0);this.content.style.visibility='visible';hs.animate(this.wrapper,{opacity:1},t,null,function(){exp.afterExpand()})}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var dir=up||-1,offset=this.outline.offset,startOff=up?3:offset,endOff=up?offset:3;for(var i=startOff;dir*i<=dir*endOff;i+=dir,t+=25){(function(){var o=up?endOff-i:startOff-i;setTimeout(function(){exp.outline.setPosition(0,o,1)},t)})()}}if(up){}else{setTimeout(function(){if(exp.outline)exp.outline.destroy(exp.preserveContent);hs.animate(exp.wrapper,{opacity:0},null,null,function(){exp.afterClose()})},t)}},crossfade:function(up,to){if(!up)return;var exp=this,dur=hs.transitionDuration,last=exp.last,x=exp.x,y=exp.y,lastX=last.x,lastY=last.y,overlayBox=exp.overlayBox,wrapper=this.wrapper,content=this.content;this.outline=last.outline;if(this.outline)this.outline.exp=exp;last.outline=null;last.wrapper.style.overflow='hidden';hs.setStyles(wrapper,{left:lastX.pos+'px',top:lastY.pos+'px',width:lastX.get('wsize')+'px',height:lastY.get('wsize')+'px'});hs.setStyles(content,{display:'none',width:(x.imgSize||x.size)+'px',height:(y.imgSize||y.size)+'px',left:(x.p1+x.get('imgPad'))+'px',top:(y.p1+y.get('imgPad'))+'px'});var fadeBox=hs.createElement('div',{className:'highslide-image'},{position:'absolute',zIndex:4,overflow:'hidden',display:'none',left:(lastX.p1+lastX.get('imgPad'))+'px',top:(lastY.p1+lastY.get('imgPad'))+'px',width:(lastX.imgSize||lastX.size)+'px',height:(lastY.imgSize||lastY.size)+'px'});var names={oldImg:last,newImg:this};for(var n in names){this[n]=names[n].content.cloneNode(1);hs.setStyles(this[n],{position:'absolute',border:0,visibility:'visible'});fadeBox.appendChild(this[n])}hs.setStyles(this.oldImg,{left:0,top:0});hs.setStyles(this.newImg,{display:'block',opacity:0,left:(x.pos-lastX.pos+x.p1-lastX.p1+x.get('imgPad')-lastX.get('imgPad'))+'px',top:(y.pos-lastY.pos+y.p1-lastY.p1+y.get('imgPad')-lastY.get('imgPad'))+'px'});wrapper.appendChild(fadeBox);fadeBox.style.display='';last.content.style.display='none';if(hs.safari){var match=navigator.userAgent.match(/Safari\/([0-9]{3})/);if(match&&parseInt(match[1])<525)wrapper.style.visibility='visible'}function end(){wrapper.style.visibility=content.style.visibility='visible';content.style.display='block';fadeBox.style.display='none';exp.a.className+=' highslide-active-anchor';exp.afterExpand();last.afterClose();exp.last=null}hs.animate(last.wrapper,{left:x.pos,top:y.pos,width:x.get('wsize'),height:y.get('wsize')},dur);hs.animate(fadeBox,{width:x.imgSize||x.size,height:y.imgSize||y.size,left:x.p1+x.get('imgPad'),top:y.p1+y.get('imgPad')},dur);hs.animate(this.oldImg,{left:(lastX.pos-x.pos+lastX.p1-x.p1+lastX.get('imgPad')-x.get('imgPad')),top:(lastY.pos-y.pos+lastY.p1-y.p1+lastY.get('imgPad')-y.get('imgPad'))},dur);hs.animate(this.newImg,{opacity:1,left:0,top:0},dur);if(this.outline)var wrapStep=function(val,args){if(args.prop=='top'){var stl=exp.wrapper.style;var pos={w:parseInt(stl.width),h:parseInt(stl.height),x:parseInt(stl.left),y:parseInt(stl.top)};exp.outline.setPosition(pos)}};hs.animate(wrapper,to.wrapper,{duration:dur,complete:end,step:wrapStep});fadeBox.style.visibility='visible'},reuseOverlay:function(o,el){if(!this.last)return false;for(var i=0;i<this.last.overlays.length;i++){var oDiv=hs.$('hsId'+this.last.overlays[i]);if(oDiv&&oDiv.hsId==o.hsId){this.genOverlayBox();oDiv.reuse=this.key;hs.push(this.overlays,this.last.overlays[i]);return true}}return false},afterExpand:function(){this.isExpanded=true;this.focus();if(this.dimmingOpacity)hs.dim(this);this.prepareNextOutline()},prepareNextOutline:function(){var key=this.key;var outlineType=this.outlineType;new hs.Outline(outlineType,function(){try{hs.expanders[key].preloadNext()}catch(e){}})},preloadNext:function(){var next=this.getAdjacentAnchor(1);if(next&&next.onclick.toString().match(/hs\.expand/))var img=hs.createElement('img',{src:hs.getSrc(next)})},getAdjacentAnchor:function(op){var current=this.getAnchorIndex(),as=hs.anchors.groups[this.slideshowGroup||'none'];if(!as[current+op]&&this.slideshow&&this.slideshow.repeat){if(op==1)return as[0];else if(op==-1)return as[as.length-1]}return as[current+op]||null},getAnchorIndex:function(){var arr=hs.getAnchors().groups[this.slideshowGroup||'none'];if(arr)for(var i=0;i<arr.length;i++){if(arr[i]==this.a)return i}return null},cancelLoading:function(){hs.expanders[this.key]=null;if(hs.upcoming==this.a)hs.upcoming=null;hs.undim(this.key);if(this.loading)hs.loading.style.left='-9999px'},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter++;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},close:function(){if(this.isClosing||!this.isExpanded)return;if(this.transitions[1]=='crossfade'&&hs.upcoming){hs.getExpander(hs.upcoming).cancelLoading();hs.upcoming=null}this.isClosing=true;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:{width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(e){this.afterClose()}},afterClose:function(){this.a.className=this.a.className.replace('highslide-active-anchor','');if(this.outline&&this.outlineWhileAnimating)this.outline.destroy();hs.discardElement(this.wrapper);if(this.dimmingOpacity)hs.undim(this.key);hs.expanders[this.key]=null}};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.langDefaults=hs.lang;var HsExpander=hs.Expander;hs.addEventListener(window,'load',function(){if(hs.expandCursor){var sel='.highslide img',dec='cursor: url('+hs.graphicsDir+hs.expandCursor+'), pointer !important;';var style=hs.createElement('style',{type:'text/css'},null,document.getElementsByTagName('HEAD')[0]);if(!hs.ie){style.appendChild(document.createTextNode(sel+" {"+dec+"}"))}else{var last=document.styleSheets[document.styleSheets.length-1];if(typeof(last.addRule)=="object")last.addRule(sel,dec)}}});hs.addEventListener(window,'resize',function(){hs.page=hs.getPageSize()});hs.addEventListener(document,'ready',hs.getAnchors);hs.addEventListener(window,'load',hs.preloadImages);