var hs={lang:{cssDirection:"ltr",loadingText:"Hleð...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size (f)",creditsText:"",creditsTitle:"",previousText:"Fyrri",nextText:"Næsta",moveText:"Move",closeText:"Loka glugga",closeTitle:"Loka glugga (esc)",resizeTitle:"Resize",playText:"Play",playTitle:"Play slideshow (spacebar)",pauseText:"Pause",pauseTitle:"Pause slideshow (spacebar)",previousTitle:"Fyrri (vinstri ör á lyklaborði)",nextTitle:"Næsta (hægri ör á lyklaborði)",moveTitle:"Move",fullExpandText:"1:1",number:"Image %1 of %2",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"highslide/graphics/",expandCursor:"zoomin.cur",restoreCursor:"zoomout.cur",expandDuration:250,restoreDuration:250,marginLeft:0,marginRight:0,marginTop:0,marginBottom:0,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,numberOfImagesToPreload:5,outlineWhileAnimating:2,outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:true,creditsHref:"http://highslide.com/",enableKeyListener:true,openerTagNames:["a","area"],transitions:["expand","crossfade"],transitionDuration:250,dimmingOpacity:0.5,dimmingDuration:50,allowWidthReduction:false,allowHeightReduction:true,preserveContent:true,objectLoadTime:"before",cacheAjax:true,anchor:"auto",align:"auto",targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:"highslide-wrapper",skin:{controls:'<div class="highslide-controls"><ul><li class="highslide-close"><a href="#" title="{hs.lang.closeTitle}" ><span>{hs.lang.closeText}</span></a></li></ul></div>',contentWrapper:'<div class="highslide-body someclass"></div><div class="highslide-header" style="margin:-24px 0px 0px 0px !important;"><ul><li class="highslide-close"><a href="#" title="Loka glugga" onclick="return hs.close(this)"><span>Loka glugga</span></a></li></ul></div><div class="highslide-footer"><div><span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span></div></div>',videoContentWrapper:'<div class="highslide-header" style="margin:0px 0px 0px 0px !important;"><ul><li class="highslide-close"><a href="#" title="Loka glugga" onclick="return hs.close(this)"><span>Loka glugga</span></a></li></ul></div><div class="highslide-body"></div><div class="highslide-footer"><div><span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span></div></div>'},preloadTheseImages:[],continuePreloading:true,expanders:[],overrides:["allowSizeReduction","useBox","anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","captionId","captionText","captionEval","captionOverlay","headingId","headingText","headingEval","headingOverlay","creditsPosition","dragByHeading","autoplay","numberPosition","transitions","dimmingOpacity","width","height","contentId","allowWidthReduction","allowHeightReduction","preserveContent","maincontentId","maincontentText","maincontentEval","objectType","cacheAjax","objectWidth","objectHeight","objectLoadTime","swfOptions","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:{},swfOptions:{flashvars:{},params:{},attributes:{}},timers:[],slideshows:[],pendingOutlines:{},sleeping:[],preloadTheseAjax:[],cacheBindings:[],cachedGets:{},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(a){if(a){return document.getElementById(a)}},push:function(b,a){b[b.length]=a},createElement:function(f,e,d,c,b){var a=document.createElement(f);if(e){hs.extend(a,e)}if(b){hs.setStyles(a,{padding:0,border:"none",margin:0})}if(d){hs.setStyles(a,d)}if(c){c.appendChild(a)}return a},extend:function(b,c){for(var a in c){b[a]=c[a]}return b},setStyles:function(c,b){for(var a in b){if(hs.ie&&a=="opacity"){if(b[a]>0.99){c.style.removeAttribute("filter")}else{c.style.filter="alpha(opacity="+(b[a]*100)+")"}}else{c.style[a]=b[a]}}},animate:function(a,i,h){var d,f,g;if(typeof h!="object"||h===null){var j=arguments;h={duration:j[2],easing:j[3],complete:j[4]}}if(typeof h.duration!="number"){h.duration=250}h.easing=Math[h.easing]||Math.easeInQuad;h.curAnim=hs.extend({},i);for(var b in i){var c=new hs.fx(a,h,b);d=parseFloat(hs.css(a,b))||0;f=parseFloat(i[b]);g=b!="opacity"?"px":"";c.custom(d,f,g)}},css:function(b,a){if(document.defaultView){return document.defaultView.getComputedStyle(b,null).getPropertyValue(a)}else{if(a=="opacity"){a="filter"}var c=b.currentStyle[a.replace(/\-(\w)/g,function(e,d){return d.toUpperCase()})];if(a=="filter"){c=c.replace(/alpha\(opacity=([0-9]+)\)/,function(e,d){return d/100})}return c===""?1:c}},getPageSize:function(){var h=document,g=window,j=h.compatMode&&h.compatMode!="BackCompat"?h.documentElement:h.body;var a=h.body;var f=(g.innerWidth&&g.scrollMaxX)?g.innerWidth+g.scrollMaxX:Math.max(a.scrollWidth,a.offsetWidth),i=(g.innerHeight&&window.scrollMaxY)?g.innerHeight+g.scrollMaxY:Math.max(a.scrollHeight,a.offsetHeight),l=hs.ie?j.scrollWidth:(h.documentElement.clientWidth||self.innerWidth),e=hs.ie?Math.max(j.scrollHeight,j.clientHeight):(h.documentElement.clientHeight||self.innerHeight);var c=hs.ie?j.clientWidth:(h.documentElement.clientWidth||self.innerWidth),k=hs.ie?j.clientHeight:self.innerHeight;return{pageWidth:Math.max(l,f),pageHeight:Math.max(e,i),width:c,height:k,scrollLeft:hs.ie?j.scrollLeft:pageXOffset,scrollTop:hs.ie?j.scrollTop:pageYOffset}},getPosition:function(d){if(/area/i.test(d.tagName)){var a=document.getElementsByTagName("img");for(var c=0;c<a.length;c++){var e=a[c].useMap;if(e&&e.replace(/^.*?#/,"")==d.parentNode.name){d=a[c];break}}}var b={x:d.offsetLeft,y:d.offsetTop};while(d.offsetParent){d=d.offsetParent;b.x+=d.offsetLeft;b.y+=d.offsetTop;if(d!=document.body&&d!=document.documentElement){b.x-=d.scrollLeft;b.y-=d.scrollTop}}return b},expand:function(b,d,h,f){if(!b){b=hs.createElement("a",null,{display:"none"},hs.container)}if(typeof b.getParams=="function"){return d}if(f=="html"){for(var g=0;g<hs.sleeping.length;g++){if(hs.sleeping[g]&&hs.sleeping[g].a==b){hs.sleeping[g].awake();hs.sleeping[g]=null;return false}}hs.hasHtmlExpanders=true}try{new hs.Expander(b,d,h,f);return false}catch(c){return true}},htmlExpand:function(d,b,c){return hs.expand(d,b,c,"html")},getSelfRendered:function(){return hs.createElement("div",{className:"highslide-html-content",innerHTML:hs.replaceLang(hs.skin.videoContentWrapper)})},getAjaxSelfRendered:function(){return hs.createElement("div",{className:"highslide-html-content",innerHTML:hs.replaceLang(hs.skin.contentWrapper)})},getElementByClass:function(c,a,b){var d=c.getElementsByTagName(a);for(var e=0;e<d.length;e++){if((new RegExp(b)).test(d[e].className)){return d[e]}}return null},replaceLang:function(a){a=a.replace(/\s/g," ");var b=/{hs\.lang\.([^}]+)\}/g,c=a.match(b),e;if(c){for(var d=0;d<c.length;d++){e=c[d].replace(b,"$1");if(typeof hs.lang[e]!="undefined"){a=a.replace(c[d],hs.lang[e])}}}return a},setClickEvents:function(){var c=document.getElementsByTagName("a");for(var b=0;b<c.length;b++){var a=hs.isUnobtrusiveAnchor(c[b]);if(a&&!c[b].hsHasSetClick){(function(){var d=a;if(hs.fireEvent(hs,"onSetClickEvent",{element:c[b],type:d})){c[b].onclick=(a=="image")?function(){return hs.expand(this)}:function(){return hs.htmlExpand(this,{objectType:d})}}})();c[b].hsHasSetClick=true}}hs.getAnchors()},isUnobtrusiveAnchor:function(a){if(a.rel=="highslide"){return"image"}else{if(a.rel=="highslide-ajax"){return"ajax"}else{if(a.rel=="highslide-iframe"){return"iframe"}else{if(a.rel=="highslide-swf"){return"swf"}}}}},getCacheBinding:function(e){for(var d=0;d<hs.cacheBindings.length;d++){if(hs.cacheBindings[d][0]==e){var b=hs.cacheBindings[d][1];hs.cacheBindings[d][1]=b.cloneNode(1);return b}}return null},preloadAjax:function(b){var c=hs.getAnchors();for(var d=0;d<c.htmls.length;d++){var f=c.htmls[d];if(hs.getParam(f,"objectType")=="ajax"&&hs.getParam(f,"cacheAjax")){hs.push(hs.preloadTheseAjax,f)}}hs.preloadAjaxElement(0)},preloadAjaxElement:function(d){if(!hs.preloadTheseAjax[d]){return}var e=hs.preloadTheseAjax[d];var c=hs.getNode(hs.getParam(e,"contentId"));if(!c){c=hs.getAjaxSelfRendered()}var b=new hs.Ajax(e,c,1);b.onError=function(){};b.onLoad=function(){hs.push(hs.cacheBindings,[e,c]);hs.preloadAjaxElement(d+1)};b.run()},focusTopmost:function(){var a=0,b=-1,e=hs.expanders,f,c;for(var d=0;d<e.length;d++){f=e[d];if(f){c=f.wrapper.style.zIndex;if(c&&c>a){a=c;b=d}}}if(b==-1){hs.focusKey=-1}else{e[b].focus()}},getParam:function(d,b){d.getParams=d.onclick;var c=d.getParams?d.getParams():null;d.getParams=null;return(c&&typeof c[b]!="undefined")?c[b]:(typeof hs[b]!="undefined"?hs[b]:null)},getSrc:function(c){var b=hs.getParam(c,"src");if(b){return b}return c.href},getNode:function(e){var b=hs.$(e),c=hs.clones[e],d={};if(!b&&!c){return null}if(!c){c=b.cloneNode(true);c.id="";hs.clones[e]=c;return b}else{return c.cloneNode(true)}},discardElement:function(a){hs.garbageBin.appendChild(a);hs.garbageBin.innerHTML=""},dim:function(a){if(!hs.dimmer){hs.dimmer=hs.createElement("div",{className:"highslide-dimming",owner:"",onclick:function(){if(hs.fireEvent(hs,"onDimmerClick")){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+="|"+a.key;if(hs.geckoMac&&hs.dimmingGeckoFix){hs.setStyles(hs.dimmer,{background:"url("+hs.graphicsDir+"geckodimmer.png)",opacity:1})}else{hs.animate(hs.dimmer,{opacity:a.dimmingOpacity},hs.dimmingDuration)}},undim:function(a){if(!hs.dimmer){return}if(typeof a!="undefined"){hs.dimmer.owner=hs.dimmer.owner.replace("|"+a,"")}if((typeof a!="undefined"&&hs.dimmer.owner!="")||(hs.upcoming&&hs.getParam(hs.upcoming,"dimmingOpacity"))){return}if(hs.geckoMac&&hs.dimmingGeckoFix){hs.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(a){if(!hs.dimmer){return}var b=(hs.ie&&a&&a.wrapper)?parseInt(a.wrapper.style.top)+parseInt(a.wrapper.style.height)+(a.outline?a.outline.offset:0):0;hs.setStyles(hs.dimmer,{width:hs.page.pageWidth+"px",height:Math.max(hs.page.pageHeight,b)+"px"})},transit:function(a,c){var b=c=c||hs.getExpander();if(hs.upcoming){return false}else{hs.last=b}try{hs.upcoming=a;a.onclick()}catch(d){hs.last=hs.upcoming=null}try{if(!a||c.transitions[1]!="crossfade"){c.close()}}catch(d){}return false},previousOrNext:function(b,a){var c=hs.getExpander(b);if(c){adj=c.getAdjacentAnchor(a);return hs.transit(adj,c)}else{return false}},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(a){if(!a){a=window.event}if(!a.target){a.target=a.srcElement}if(typeof a.target.form!="undefined"){return true}if(!hs.fireEvent(hs,"onKeyDown",a)){return true}var c=hs.getExpander();var b=null;switch(a.keyCode){case 70:if(c){c.doFullExpand()}return true;case 32:b=2;break;case 34:case 39:case 40:b=1;break;case 8:case 33:case 37:case 38:b=-1;break;case 27:case 13:b=0}if(b!==null){if(b!=2){hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler)}if(!hs.enableKeyListener){return true}if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(c){if(b==0){c.close()}else{if(b==2){if(c.slideshow){c.slideshow.hitSpace()}}else{if(c.slideshow){c.slideshow.pause()}hs.previousOrNext(c.key,b)}}return false}}return true},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:"hsId"+hs.idCounter++}))},addSlideshow:function(d){var a=d.slideshowGroup;if(typeof a=="object"){for(var c=0;c<a.length;c++){var b={};for(var e in d){b[e]=d[e]}b.slideshowGroup=a[c];hs.push(hs.slideshows,b)}}else{hs.push(hs.slideshows,d)}},getWrapperKey:function(f,d){var a,c=/^highslide-wrapper-([0-9]+)$/;a=f;while(a.parentNode){if(a.hsKey!==undefined){return a.hsKey}if(a.id&&c.test(a.id)){return a.id.replace(c,"$1")}a=a.parentNode}if(!d){a=f;while(a.parentNode){if(a.tagName&&hs.isHsAnchor(a)){for(var e=0;e<hs.expanders.length;e++){var b=hs.expanders[e];if(b&&b.a==a){return e}}}a=a.parentNode}}return null},getExpander:function(a,b){if(typeof a=="undefined"){return hs.expanders[hs.focusKey]||null}if(typeof a=="number"){return hs.expanders[a]||null}if(typeof a=="string"){a=hs.$(a)}return hs.expanders[hs.getWrapperKey(a,b)]||null},isHsAnchor:function(b){return(b.onclick&&b.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()}}},fireEvent:function(c,a,b){return c&&c[a]?(c[a](c,b)!==false):true},mouseClickHandler:function(a){if(!a){a=window.event}if(a.button>1){return true}if(!a.target){a.target=a.srcElement}var c=a.target;while(c.parentNode&&!(/highslide-(image|move|html|resize)/.test(c.className))){c=c.parentNode}var d=hs.getExpander(c);if(d&&(d.isClosing||!d.isExpanded)){return true}if(d&&a.type=="mousedown"){if(a.target.form){return true}var b=c.className.match(/highslide-(image|move|resize)/);if(b){hs.dragArgs={exp:d,type:b[1],left:d.x.pos,width:d.x.size,top:d.y.pos,height:d.y.size,clickX:a.clientX,clickY:a.clientY};hs.addEventListener(document,"mousemove",hs.dragHandler);if(a.preventDefault){a.preventDefault()}if(/highslide-(image|html)-blur/.test(d.content.className)){d.focus();hs.hasFocused=true}return false}else{if(/highslide-html/.test(c.className)&&hs.focusKey!=d.key){d.focus();d.doShowHide("hidden")}}}else{if(a.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.dragHandler);if(hs.dragArgs){if(hs.styleRestoreCursor&&hs.dragArgs.type=="image"){hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor}var f=hs.dragArgs.hasDragged;if(!f&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)){if(hs.fireEvent(d,"onImageClick")){d.close()}}else{if(f||(!f&&hs.hasHtmlExpanders)){hs.dragArgs.exp.doShowHide("hidden")}}if(hs.dragArgs.exp.releaseMask){hs.dragArgs.exp.releaseMask.style.display="none"}if(f){hs.fireEvent(hs.dragArgs.exp,"onDrop",hs.dragArgs)}if(f){hs.setDimmerSize(d)}hs.hasFocused=false;hs.dragArgs=null}else{if(/highslide-image-blur/.test(c.className)){c.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;if(f.iframe){if(!f.releaseMask){f.releaseMask=hs.createElement("div",null,{position:"absolute",width:f.x.size+"px",height:f.y.size+"px",left:f.x.cb+"px",top:f.y.cb+"px",zIndex:4,background:(hs.ie?"white":"none"),opacity:0.01},f.wrapper,true)}if(f.releaseMask.style.display=="none"){f.releaseMask.style.display=""}}d.dX=c.clientX-d.clickX;d.dY=c.clientY-d.clickY;var b=Math.sqrt(Math.pow(d.dX,2)+Math.pow(d.dY,2));if(!d.hasDragged){d.hasDragged=(d.type!="image"&&b>0)||(b>(hs.dragSensitivity||5))}if(d.hasDragged&&c.clientX>5&&c.clientY>5){if(!hs.fireEvent(f,"onDrag",d)){return false}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(a){try{if(!a){a=window.event}var b=/mouseover/i.test(a.type);if(!a.target){a.target=a.srcElement}if(hs.ie){a.relatedTarget=b?a.fromElement:a.toElement}var d=hs.getExpander(a.target);if(!d.isExpanded){return}if(!d||!a.relatedTarget||hs.getExpander(a.relatedTarget,true)==d||hs.dragArgs){return}hs.fireEvent(d,b?"onMouseOver":"onMouseOut",a);for(var c=0;c<d.overlays.length;c++){(function(){var e=hs.$("hsId"+d.overlays[c]);if(e&&e.hideOnMouseOut){if(b){hs.setStyles(e,{visibility:"visible"})}hs.animate(e,{opacity:b?e.opacity:0},e.dur)}})()}}catch(a){}},addEventListener:function(c,b,d){if(c==document&&b=="ready"){hs.push(hs.onReady,d)}try{c.addEventListener(b,d,false)}catch(a){try{c.detachEvent("on"+b,d);c.attachEvent("on"+b,d)}catch(a){c["on"+b]=d}}},removeEventListener:function(c,b,d){try{c.removeEventListener(b,d,false)}catch(a){try{c.detachEvent("on"+b,d)}catch(a){c["on"+b]=null}}},preloadFullImage:function(a){if(hs.continuePreloading&&hs.preloadTheseImages[a]&&hs.preloadTheseImages[a]!="undefined"){var b=document.createElement("img");b.onload=function(){b=null;hs.preloadFullImage(a+1)};b.src=hs.preloadTheseImages[a]}},preloadImages:function(d){if(d&&typeof d!="object"){hs.numberOfImagesToPreload=d}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)}if(hs.restoreCursor){var c=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})}},init:function(){if(!hs.container){hs.page=hs.getPageSize();hs.ieLt7=hs.ie&&hs.uaVersion<7;hs.ie6SSL=hs.ieLt7&&location.protocol=="https:";for(var a in hs.langDefaults){if(typeof hs[a]!="undefined"){hs.lang[a]=hs[a]}else{if(typeof hs.lang[a]=="undefined"&&typeof hs.langDefaults[a]!="undefined"){hs.lang[a]=hs.langDefaults[a]}}}hs.container=hs.createElement("div",{className:"highslide-container"},{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter,direction:"ltr"},document.body,true);hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.lang.loadingTitle,innerHTML:hs.lang.loadingText,href:"javascript:;"},{position:"absolute",top:"-9999px",opacity:hs.loadingOpacity,zIndex:1},hs.container);hs.garbageBin=hs.createElement("div",null,{display:"none"},hs.container);hs.viewport=hs.createElement("div",{className:"highslide-viewport"},null,hs.container,1);hs.clearing=hs.createElement("div",null,{clear:"both",paddingTop:"0px"},null,true);Math.linearTween=function(h,f,g,e){return g*h/e+f};Math.easeInQuad=function(h,f,g,e){return g*(h/=e)*h+f};Math.easeOutQuad=function(h,f,g,e){return -g*(h/=e)*(h-2)+f};hs.hideSelects=hs.ieLt7;hs.hideIframes=((window.opera&&hs.uaVersion<9)||navigator.vendor=="KDE"||(hs.ie&&hs.uaVersion<5.5));hs.fireEvent(this,"onActivate")}},ready:function(){if(hs.isReady){return}hs.isReady=true;for(var a=0;a<hs.onReady.length;a++){hs.onReady[a]()}},updateAnchors:function(){var b,a,k=[],m=[],e=[],c={},h;for(var l=0;l<hs.openerTagNames.length;l++){a=document.getElementsByTagName(hs.openerTagNames[l]);for(var f=0;f<a.length;f++){b=a[f];h=hs.isHsAnchor(b);if(h){hs.push(k,b);if(h[0]=="hs.expand"){hs.push(m,b)}else{if(h[0]=="hs.htmlExpand"){hs.push(e,b)}}var d=hs.getParam(b,"slideshowGroup")||"none";if(!c[d]){c[d]=[]}hs.push(c[d],b)}}}hs.anchors={all:k,groups:c,images:m,htmls:e};return hs.anchors},getAnchors:function(){return hs.anchors||hs.updateAnchors()},close:function(b){var a=hs.getExpander(b);if(a){a.close()}return false}};hs.fx=function(a,c,b){this.options=c;this.elem=a;this.prop=b;if(!c.orig){c.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(a,b,c){this.startTime=(new Date()).getTime();this.start=a;this.end=b;this.unit=c;this.now=this.start;this.pos=this.state=0;var d=this;function e(f){return d.step(f)}e.elem=this.elem;if(e()&&hs.timers.push(e)==1){hs.timerId=setInterval(function(){var g=hs.timers;for(var f=0;f<g.length;f++){if(!g[f]()){g.splice(f--,1)}}if(!g.length){clearInterval(hs.timerId)}},13)}},step:function(b){var e=(new Date()).getTime();if(b||e>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var a=true;for(var c in this.options.curAnim){if(this.options.curAnim[c]!==true){a=false}}if(a){if(this.options.complete){this.options.complete.call(this.elem)}}return false}else{var d=e-this.startTime;this.state=d/this.options.duration;this.pos=this.options.easing(d,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};hs.extend(hs.fx,{step:{opacity:function(a){hs.setStyles(a.elem,{opacity:a.now})},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});hs.Outline=function(b,e){this.onLoad=e;this.outlineType=b;var c=hs.uaVersion,d;this.hasAlphaImageLoader=hs.ie&&c>=5.5&&c<7;if(!b){if(e){e()}return}hs.init();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse",width:0},hs.container,true);var a=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var f=0;f<=8;f++){if(f%3==0){d=hs.createElement("tr",null,{height:"auto"},a,true)}this.td[f]=hs.createElement("td",null,null,d,true);var g=f!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[f],g)}this.td[4].className=b+" highslide-outline";this.preloadGraphic()};hs.Outline.prototype={preloadGraphic:function(){var b=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";var c=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",top:"-9999px"},c,true);var a=this;this.graphic.onload=function(){a.onGraphicLoad()};this.graphic.src=b},onGraphicLoad:function(){var e=this.offset=this.graphic.width/4,f=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],b={height:(2*e)+"px",width:(2*e)+"px"};for(var d=0;d<=8;d++){if(f[d]){if(this.hasAlphaImageLoader){var c=(d==1||d==7)?"100%":this.graphic.width+"px";var a=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[d],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:c,height:this.graphic.height+"px",left:(f[d][0]*e)+"px",top:(f[d][1]*e)+"px"},a,true)}else{hs.setStyles(this.td[d],{background:"url("+this.graphic.src+") "+(f[d][0]*e)+"px "+(f[d][1]*e)+"px"})}if(window.opera&&(d==3||d==5)){hs.createElement("div",null,b,this.td[d],true)}hs.setStyles(this.td[d],b)}}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(f,c,a,e,d){var g=this.exp,b=g.wrapper.style,c=c||0,f=f||{x:g.x.pos+c,y:g.y.pos+c,w:g.x.get("wsize")-2*c,h:g.y.get("wsize")-2*c};if(a){this.table.style.visibility=(f.h>=4*this.offset)?"visible":"hidden"}hs.setStyles(this.table,{left:(f.x-this.offset)+"px",top:(f.y-this.offset)+"px",width:(f.w+2*this.offset)+"px"});f.w-=2*this.offset;f.h-=2*this.offset;hs.setStyles(this.td[4],{width:f.w>=0?f.w+"px":0,height:f.h>=0?f.h+"px":0});if(this.hasAlphaImageLoader){this.td[3].style.height=this.td[5].style.height=this.td[4].style.height}},destroy:function(a){if(a){this.table.style.visibility="hidden"}else{hs.discardElement(this.table)}}};hs.Dimension=function(a,b){this.exp=a;this.dim=b;this.ucwh=b=="x"?"Width":"Height";this.wh=this.ucwh.toLowerCase();this.uclt=b=="x"?"Left":"Top";this.lt=this.uclt.toLowerCase();this.ucrb=b=="x"?"Right":"Bottom";this.rb=this.ucrb.toLowerCase();this.p1=this.p2=0};hs.Dimension.prototype={get:function(a){switch(a){case"loadingPos":return this.tpos+this.tb+(this.t-hs.loading["offset"+this.ucwh])/2;case"loadingPosXfade":return this.pos+this.cb+this.p1+(this.size-hs.loading["offset"+this.ucwh])/2;case"wsize":return this.size+2*this.cb+this.p1+this.p2;case"fitsize":return this.clientSize-this.marginMin-this.marginMax;case"maxsize":return this.get("fitsize")-2*this.cb-this.p1-this.p2;case"opos":return this.pos-(this.exp.outline?this.exp.outline.offset:0);case"osize":return this.get("wsize")+(this.exp.outline?2*this.exp.outline.offset:0);case"imgPad":return this.imgSize?Math.round((this.size-this.imgSize)/2):0}},calcBorders:function(){this.cb=(this.exp.content["offset"+this.ucwh]-this.t)/2;this.marginMax=hs["margin"+this.ucrb]+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 a=this.exp;this.justify="auto";if(a.align=="center"){this.justify="center"}else{if(new RegExp(this.lt).test(a.anchor)){this.justify=null}else{if(new RegExp(this.rb).test(a.anchor)){this.justify="max"}}}this.pos=this.tpos-this.cb+this.tb;this.size=Math.min(this.full,a["max"+this.ucwh]||this.full);this.minSize=a.allowSizeReduction?Math.min(a["min"+this.ucwh],this.full):this.full;if(a.isImage&&a.useBox){this.size=a[this.wh];this.imgSize=this.full}if(this.dim=="x"&&hs.padToMinWidth){this.minSize=a.minWidth}this.target=a["target"+this.dim.toUpperCase()];this.marginMin=hs["margin"+this.uclt];this.scroll=hs.page["scroll"+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(b){var c=this.exp;if(c.isImage&&(c.useBox||hs.padToMinWidth)){this.imgSize=b;this.size=Math.max(this.size,this.imgSize);c.content.style[this.lt]=this.get("imgPad")+"px"}else{this.size=b}c.content.style[this.wh]=b+"px";c.wrapper.style[this.wh]=this.get("wsize")+"px";if(c.outline){c.outline.setPosition()}if(c.releaseMask){c.releaseMask.style[this.wh]=b+"px"}if(c.isHtml){var a=c.scrollerDiv;if(this.sizeDiff===undefined){this.sizeDiff=c.innerContent["offset"+this.ucwh]-a["offset"+this.ucwh]}a.style[this.wh]=(this.size-this.sizeDiff)+"px";if(this.dim=="x"){c.mediumContent.style.width="auto"}if(c.body){c.body.style[this.wh]="auto"}}if(this.dim=="x"&&c.overlayBox){c.sizeOverlayBox(true)}if(this.dim=="x"&&c.slideshow&&c.isImage){if(b==this.full){c.slideshow.disable("full-expand")}else{c.slideshow.enable("full-expand")}}},setPos:function(a){this.pos=a;this.exp.wrapper.style[this.lt]=a+"px";if(this.exp.outline){this.exp.outline.setPosition()}}};hs.Expander=function(b,f,k,g){if(document.readyState&&hs.ie&&!hs.isReady){hs.addEventListener(document,"ready",function(){new hs.Expander(b,f,k,g)});return}this.a=b;this.custom=k;this.contentType=g||"image";this.isHtml=(g=="html");this.isImage=!this.isHtml;hs.continuePreloading=false;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();var h=this.key=hs.expanders.length;for(var j=0;j<hs.overrides.length;j++){var d=hs.overrides[j];this[d]=f&&typeof f[d]!="undefined"?f[d]:hs[d]}if(!this.src){this.src=b.href}var c=(f&&f.thumbnailId)?hs.$(f.thumbnailId):b;c=this.thumb=c.getElementsByTagName("img")[0]||c;this.thumbsUserSetId=c.id||b.id;if(!hs.fireEvent(this,"onInit")){return true}for(var j=0;j<hs.expanders.length;j++){if(hs.expanders[j]&&hs.expanders[j].a==b&&!(this.last&&this.transitions[1]=="crossfade")){hs.expanders[j].focus();return false}}for(var j=0;j<hs.expanders.length;j++){if(hs.expanders[j]&&hs.expanders[j].thumb!=c&&!hs.expanders[j].onLoadStarted){hs.expanders[j].cancelLoading()}}hs.expanders[this.key]=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=c;this.tpos=hs.getPosition(c);hs.page=hs.getPageSize();var l=this.x=new hs.Dimension(this,"x");l.calcThumb();var m=this.y=new hs.Dimension(this,"y");m.calcThumb();if(/area/i.test(c.tagName)){this.getImageMapAreaCorrection(c)}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.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 e=this;new hs.Outline(this.outlineType,function(){e.connectOutline();e[e.contentType+"Create"]()})}}return true};hs.Expander.prototype={error:function(a){window.location.href=this.src},connectOutline:function(){var a=this.outline=hs.pendingOutlines[this.outlineType];a.exp=this;a.table.style.zIndex=this.wrapper.style.zIndex;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()};if(!hs.fireEvent(this,"onShowLoading")){return}var c=this,d=this.x.get("loadingPos")+"px",b=this.y.get("loadingPos")+"px";if(!a&&this.last&&this.transitions[1]=="crossfade"){var a=this.last}if(a){d=a.x.get("loadingPosXfade")+"px";b=a.y.get("loadingPosXfade")+"px";this.loading.style.zIndex=hs.zIndexCounter++}setTimeout(function(){if(c.loading){hs.setStyles(c.loading,{left:d,top:b,zIndex:hs.zIndexCounter++})}},100)},imageCreate:function(){var a=this;var b=document.createElement("img");this.content=b;b.onload=function(){if(hs.expanders[a.key]){a.contentLoaded()}};if(hs.blockRightClick){b.oncontextmenu=function(){return false}}b.className="highslide-image";hs.setStyles(b,{visibility:"hidden",display:"block",position:"absolute",maxWidth:"9999px",zIndex:3});b.title=hs.lang.restoreTitle;if(hs.safari){hs.container.appendChild(b)}if(hs.ie){b.src="res://"}b.src=this.src;this.showLoading()},htmlCreate:function(){if(!hs.fireEvent(this,"onBeforeGetContent")){return}this.content=hs.getCacheBinding(this.a);if(!this.content){this.content=hs.getNode(this.contentId)}if(!this.content){this.content=hs.getSelfRendered()}this.getInline(["maincontent"]);if(this.maincontent){var c=hs.getElementByClass(this.content,"div","highslide-body");if(c){c.appendChild(this.maincontent)}this.maincontent.style.display="block"}hs.fireEvent(this,"onAfterGetContent");this.innerContent=this.content;if(/(swf|iframe)/.test(this.objectType)){this.setObjContainerSize(this.innerContent)}hs.container.appendChild(this.wrapper);hs.setStyles(this.wrapper,{position:"static",padding:"0 "+hs.marginRight+"px 0 "+hs.marginLeft+"px"});this.content=hs.createElement("div",{className:"highslide-html"},{position:"relative",zIndex:3,overflow:"hidden"},this.wrapper);this.mediumContent=hs.createElement("div",null,null,this.content,1);this.mediumContent.appendChild(this.innerContent);hs.setStyles(this.innerContent,{position:"relative",display:"block",direction:hs.lang.cssDirection||""});if(this.width){this.innerContent.style.width=this.width+"px"}if(this.height){this.innerContent.style.height=this.height+"px"}if(this.innerContent.offsetWidth<this.minWidth){this.innerContent.style.width=this.minWidth+"px"}if(this.objectType=="ajax"&&!hs.getCacheBinding(this.a)){this.showLoading();var b=new hs.Ajax(this.a,this.innerContent);var a=this;b.onLoad=function(){if(hs.expanders[a.key]){a.contentLoaded()}};b.onError=function(){location.href=a.src};b.run()}else{if(this.objectType=="iframe"&&this.objectLoadTime=="before"){this.writeExtendedContent()}else{this.contentLoaded()}}},contentLoaded:function(){try{if(!this.content){return}this.content.onload=null;if(this.onLoadStarted){return}else{this.onLoadStarted=true}var g=this.x,h=this.y;if(this.loading){hs.setStyles(this.loading,{top:"-9999px"});this.loading=null;hs.fireEvent(this,"onHideLoading")}if(this.isImage){g.full=this.content.width;h.full=this.content.height;hs.setStyles(this.content,{width:g.t+"px",height:h.t+"px"});this.wrapper.appendChild(this.content);hs.container.appendChild(this.wrapper)}else{if(this.htmlGetSize){this.htmlGetSize()}}g.calcBorders();h.calcBorders();hs.setStyles(this.wrapper,{left:(g.tpos+g.tb-g.cb)+"px",top:(h.tpos+g.tb-h.cb)+"px"});this.initSlideshow();this.getOverlays();var a=g.full/h.full;g.calcExpanded();this.justify(g);h.calcExpanded();this.justify(h);if(this.isHtml){this.htmlSizeOperations()}if(this.overlayBox){this.sizeOverlayBox(0,1)}if(this.allowSizeReduction){if(this.isImage){this.correctRatio(a)}else{this.fitOverlayBox()}var c=this.slideshow;if(c&&this.last&&c.controls&&c.fixedControls){var k=c.overlayOptions.position||"",b;for(var f in hs.oPos){for(var j=0;j<5;j++){b=this[f];if(k.match(hs.oPos[f][j])){b.pos=this.last[f].pos+(this.last[f].p1-b.p1)+(this.last[f].size-b.size)*[0,0,0.5,1,1][j];if(c.fixedControls=="fit"){if(b.pos+b.size+b.p1+b.p2>b.scroll+b.clientSize-b.marginMax){b.pos=b.scroll+b.clientSize-b.size-b.marginMin-b.marginMax-b.p1-b.p2}if(b.pos<b.scroll+b.marginMin){b.pos=b.scroll+b.marginMin}}}}}}if(this.isImage&&this.x.full>(this.x.imgSize||this.x.size)){this.createFullExpand();if(this.overlays.length==1){this.sizeOverlayBox()}}}this.show()}catch(d){this.error(d)}},setObjContainerSize:function(b,d){var a=hs.getElementByClass(b,"DIV","highslide-body");if(/(iframe|swf)/.test(this.objectType)){if(this.objectWidth){a.style.width=this.objectWidth+"px"}if(this.objectHeight){a.style.height=this.objectHeight+"px"}}},writeExtendedContent:function(){if(this.hasExtendedContent){return}var g=this;this.body=hs.getElementByClass(this.innerContent,"DIV","highslide-body");if(this.objectType=="iframe"){this.showLoading();var f=hs.clearing.cloneNode(1);this.body.appendChild(f);this.newWidth=this.innerContent.offsetWidth;if(!this.objectWidth){this.objectWidth=f.offsetWidth}var b=this.innerContent.offsetHeight-this.body.offsetHeight,e=this.objectHeight||hs.page.height-b-hs.marginTop-hs.marginBottom,d=this.objectLoadTime=="before"?' onload="if (hs.expanders['+this.key+"]) hs.expanders["+this.key+'].contentLoaded()" ':"";this.body.innerHTML+='<iframe name="hs'+(new Date()).getTime()+'" frameborder="0" key="'+this.key+'"  allowtransparency="true" style="width:'+this.objectWidth+"px; height:"+e+'px" '+d+' src="'+this.src+'"></iframe>';this.ruler=this.body.getElementsByTagName("div")[0];this.iframe=this.body.getElementsByTagName("iframe")[0];if(this.objectLoadTime=="after"){this.correctIframeSize()}}if(this.objectType=="swf"){this.body.id=this.body.id||"hs-flash-id-"+this.key;var c=this.swfOptions;if(typeof c.params.wmode=="undefined"){c.params.wmode="transparent"}if(swfobject){swfobject.embedSWF(this.src,this.body.id,this.objectWidth,this.objectHeight,c.version||"7",c.expressInstallSwfurl,c.flashvars,c.params,c.attributes)}}this.hasExtendedContent=true},htmlGetSize:function(){if(this.iframe&&!this.objectHeight){this.iframe.style.height=this.body.style.height=this.getIframePageHeight()+"px"}this.innerContent.appendChild(hs.clearing);if(!this.x.full){this.x.full=this.innerContent.offsetWidth}this.y.full=this.innerContent.offsetHeight;this.innerContent.removeChild(hs.clearing);if(hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height)}hs.setStyles(this.wrapper,{position:"absolute",padding:"0"});hs.setStyles(this.content,{width:this.x.t+"px",height:this.y.t+"px"})},getIframePageHeight:function(){var c;try{var d=this.iframe.contentDocument||this.iframe.contentWindow.document;var b=d.createElement("div");b.style.clear="both";d.body.appendChild(b);c=b.offsetTop;if(hs.ie){c+=parseInt(d.body.currentStyle.marginTop)+parseInt(d.body.currentStyle.marginBottom)-1}}catch(a){c=300}return c},correctIframeSize:function(){var a=this.innerContent.offsetWidth-this.ruler.offsetWidth;if(a<0){a=0}var b=this.innerContent.offsetHeight-this.iframe.offsetHeight;hs.setStyles(this.iframe,{width:Math.abs(this.x.size-a)+"px",height:Math.abs(this.y.size)+"px"});hs.setStyles(this.body,{width:this.iframe.style.width,height:this.iframe.style.height});this.scrollingContent=this.iframe;this.scrollerDiv=this.scrollingContent},htmlSizeOperations:function(){this.setObjContainerSize(this.innerContent);if(this.objectType=="swf"&&this.objectLoadTime=="before"){this.writeExtendedContent()}if(this.x.size<this.x.full&&!this.allowWidthReduction){this.x.size=this.x.full}if(this.y.size<this.y.full&&!this.allowHeightReduction){this.y.size=this.y.full}this.scrollerDiv=this.innerContent;hs.setStyles(this.mediumContent,{position:"relative",width:this.x.size+"px"});hs.setStyles(this.innerContent,{border:"none",width:"auto",height:"auto"});var a=hs.getElementByClass(this.innerContent,"DIV","highslide-body");if(a&&!/(iframe|swf)/.test(this.objectType)){var e=a;a=hs.createElement(e.nodeName,null,{overflow:"hidden"},null,true);e.parentNode.insertBefore(a,e);a.appendChild(hs.clearing);a.appendChild(e);var c=this.innerContent.offsetWidth-a.offsetWidth;var d=this.innerContent.offsetHeight-a.offsetHeight;a.removeChild(hs.clearing);var b=hs.safari||navigator.vendor=="KDE"?1:0;hs.setStyles(a,{width:(this.x.size-c-b)+"px",height:(this.y.size-d)+"px",overflow:"auto",position:"relative"});if(b&&e.offsetHeight>a.offsetHeight){a.style.width=(parseInt(a.style.width)+b)+"px"}this.scrollingContent=a;this.scrollerDiv=this.scrollingContent}if(this.iframe&&this.objectLoadTime=="before"){this.correctIframeSize()}if(!this.scrollingContent&&this.y.size<this.mediumContent.offsetHeight){this.scrollerDiv=this.content}if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&!/(iframe|swf)/.test(this.objectType)){this.x.size+=17}if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration)}},getImageMapAreaCorrection:function(h){var a=h.coords.split(",");for(var e=0;e<a.length;e++){a[e]=parseInt(a[e])}if(h.shape.toLowerCase()=="circle"){this.x.tpos+=a[0]-a[2];this.y.tpos+=a[1]-a[2];this.x.t=this.y.t=2*a[2]}else{var g,d,f=g=a[0],b=d=a[1];for(var e=0;e<a.length;e++){if(e%2==0){f=Math.min(f,a[e]);g=Math.max(g,a[e])}else{b=Math.min(b,a[e]);d=Math.max(d,a[e])}}this.x.tpos+=f;this.x.t=g-f;this.y.tpos+=b;this.y.t=d-b}},justify:function(b,a){var c,e=b.target,g=b==this.x?"x":"y";if(e&&e.match(/ /)){c=e.split(" ");e=c[0]}if(e&&hs.$(e)){b.pos=hs.getPosition(hs.$(e))[g];if(c&&c[1]&&c[1].match(/^[-]?[0-9]+px$/)){b.pos+=parseInt(c[1])}if(b.size<b.minSize){b.size=b.minSize}}else{if(b.justify=="auto"||b.justify=="center"){var d=false;var h=b.exp.allowSizeReduction;if(b.justify=="center"){b.pos=Math.round(b.scroll+(b.clientSize+b.marginMin-b.marginMax-b.get("wsize"))/2)}else{b.pos=Math.round(b.pos-((b.get("wsize")-b.t)/2))}if(b.pos<b.scroll+b.marginMin){b.pos=b.scroll+b.marginMin;d=true}if(!a&&b.size<b.minSize){b.size=b.minSize;h=false}if(b.pos+b.get("wsize")>b.scroll+b.clientSize-b.marginMax){if(!a&&d&&h){b.size=b.get(g=="y"?"fitsize":"maxsize")}else{if(b.get("wsize")<b.get("fitsize")){b.pos=b.scroll+b.clientSize-b.marginMax-b.get("wsize")}else{b.pos=b.scroll+b.marginMin;if(!a&&h){b.size=b.get(g=="y"?"fitsize":"maxsize")}}}}if(!a&&b.size<b.minSize){b.size=b.minSize;h=false}}else{if(b.justify=="max"){b.pos=Math.floor(b.pos-b.size+b.t)}}}if(b.pos<b.marginMin){var f=b.pos;b.pos=b.marginMin;if(h&&!a){b.size=b.size-(b.pos-f)}}},correctRatio:function(b){var e=this.x,f=this.y,a=false,d=Math.min(e.full,e.size),g=Math.min(f.full,f.size),c=(this.useBox||hs.padToMinWidth);if(d/g>b){d=g*b;if(d<e.minSize){d=e.minSize;g=d/b}a=true}else{if(d/g<b){g=d/b;a=true}}if(hs.padToMinWidth&&e.full<e.minSize){e.imgSize=e.full;f.size=f.imgSize=f.full}else{if(this.useBox){e.imgSize=d;f.imgSize=g}else{e.size=d;f.size=g}}this.fitOverlayBox(c?null:b);if(c&&f.size<f.imgSize){f.imgSize=f.size;e.imgSize=f.size*b}if(a||c){e.pos=e.tpos-e.cb+e.tb;e.minSize=e.size;this.justify(e,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){var a=this.x,b=this.y;if(this.overlayBox){while(b.size>this.minHeight&&a.size>this.minWidth&&b.get("wsize")>b.get("fitsize")){b.size-=10;if(c){a.size=b.size*c}this.sizeOverlayBox(0,1)}}},reflow:function(){if(this.scrollerDiv){var a=/iframe/i.test(this.scrollerDiv.tagName)?this.getIframePageHeight()+1+"px":"auto";if(this.body){this.body.style.height=a}this.scrollerDiv.style.height=a;this.y.setSize(this.innerContent.offsetHeight);hs.setDimmerSize(this)}},show:function(){var a=this.x,b=this.y;this.doShowHide("hidden");hs.fireEvent(this,"onBeforeExpand");if(this.slideshow&&this.slideshow.thumbstrip){this.slideshow.thumbstrip.selectThumb()}this.changeSize(1,{wrapper:{width:a.get("wsize"),height:b.get("wsize"),left:a.pos,top:b.pos},content:{left:a.p1+a.get("imgPad"),top:b.p1+b.get("imgPad"),width:a.imgSize||a.size,height:b.imgSize||b.size}},hs.expandDuration)},changeSize:function(j,a,i){var g=this.transitions,c=j?(this.last?this.last.a:null):hs.upcoming,e=(g[1]&&c&&hs.getParam(c,"transitions")[1]==g[1])?g[1]:g[0];if(this[e]&&e!="expand"){this[e](j,a);return}if(this.outline&&!this.outlineWhileAnimating){if(j){this.outline.setPosition()}else{this.outline.destroy((this.isHtml&&this.preserveContent))}}if(!j){this.destroyOverlays()}var k=this,h=k.x,b=k.y,d=this.easing;if(!j){d=this.easingClose||d}var f=j?function(){if(k.outline){k.outline.table.style.visibility="visible"}setTimeout(function(){k.afterExpand()},50)}:function(){k.afterClose()};if(j){hs.setStyles(this.wrapper,{width:h.t+"px",height:b.t+"px"})}if(j&&this.isHtml){hs.setStyles(this.wrapper,{left:(h.tpos-h.cb+h.tb)+"px",top:(b.tpos-b.cb+b.tb)+"px"})}if(this.fadeInOut){hs.setStyles(this.wrapper,{opacity:j?0:1});hs.extend(a.wrapper,{opacity:j})}hs.animate(this.wrapper,a.wrapper,{duration:i,easing:d,step:function(n,l){if(k.outline&&k.outlineWhileAnimating&&l.prop=="top"){var m=j?l.pos:1-l.pos;var o={w:h.t+(h.get("wsize")-h.t)*m,h:b.t+(b.get("wsize")-b.t)*m,x:h.tpos+(h.pos-h.tpos)*m,y:b.tpos+(b.pos-b.tpos)*m};k.outline.setPosition(o,0,1)}if(k.isHtml){if(l.prop=="left"){k.mediumContent.style.left=(h.pos-n)+"px"}if(l.prop=="top"){k.mediumContent.style.top=(b.pos-n)+"px"}}}});hs.animate(this.content,a.content,i,d,f);if(j){this.wrapper.style.visibility="visible";this.content.style.visibility="visible";if(this.isHtml){this.innerContent.style.visibility="visible"}this.a.className+=" highslide-active-anchor"}},fade:function(h,a){this.outlineWhileAnimating=false;var j=this,d=h?hs.expandDuration:0;if(h){hs.animate(this.wrapper,a.wrapper,0);hs.setStyles(this.wrapper,{opacity:0,visibility:"visible"});hs.animate(this.content,a.content,0);this.content.style.visibility="visible";hs.animate(this.wrapper,{opacity:1},d,null,function(){j.afterExpand()})}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;var c=h||-1,b=this.outline.offset,e=h?3:b,g=h?b:3;for(var f=e;c*f<=c*g;f+=c,d+=25){(function(){var i=h?g-f:e-f;setTimeout(function(){j.outline.setPosition(0,i,1)},d)})()}}if(h){}else{setTimeout(function(){if(j.outline){j.outline.destroy(j.preserveContent)}j.destroyOverlays();hs.animate(j.wrapper,{opacity:0},null,null,function(){j.afterClose()})},d)}},crossfade:function(k,q){if(!k){return}var a=this,h=hs.transitionDuration,c=a.last,f=a.x,g=a.y,w=c.x,v=c.y,u=a.overlayBox,e=this.wrapper,l=this.content;hs.removeEventListener(document,"mousemove",hs.dragHandler);this.outline=c.outline;if(this.outline){this.outline.exp=a}c.outline=null;c.wrapper.style.overflow="hidden";hs.setStyles(e,{left:w.pos+"px",top:v.pos+"px",width:w.get("wsize")+"px",height:v.get("wsize")+"px"});hs.setStyles(l,{display:"none",width:(f.imgSize||f.size)+"px",height:(g.imgSize||g.size)+"px",left:(f.p1+f.get("imgPad"))+"px",top:(g.p1+g.get("imgPad"))+"px"});var m=hs.createElement("div",{className:"highslide-image"},{position:"absolute",zIndex:4,overflow:"hidden",display:"none",left:(w.p1+w.get("imgPad"))+"px",top:(v.p1+v.get("imgPad"))+"px",width:(w.imgSize||w.size)+"px",height:(v.imgSize||v.size)+"px"});if(this.isHtml){hs.setStyles(this.mediumContent,{left:0,top:0})}for(var r=0;r<this.overlays.length;r++){var t=hs.$("hsId"+this.overlays[r]);if(t.style.visibility=="hidden"){t.style.display="none"}}if(u){hs.setStyles(u,{overflow:"visible",left:(w.p1+w.cb)+"px",top:(v.p1+v.cb)+"px",width:w.size+"px",height:v.size+"px"})}var d={oldImg:c,newImg:this};for(var s in d){this[s]=d[s].content.cloneNode(1);hs.setStyles(this[s],{position:"absolute",border:0,visibility:"visible"});m.appendChild(this[s])}hs.setStyles(this.oldImg,{left:0,top:0});hs.setStyles(this.newImg,{display:"block",opacity:0,left:(f.pos-w.pos+f.p1-w.p1+f.get("imgPad")-w.get("imgPad"))+"px",top:(g.pos-v.pos+g.p1-v.p1+g.get("imgPad")-v.get("imgPad"))+"px"});e.appendChild(m);if(u){u.className="";e.appendChild(u)}m.style.display="";c.content.style.display="none";if(hs.safari){var j=navigator.userAgent.match(/Safari\/([0-9]{3})/);if(j&&parseInt(j[1])<525){e.style.visibility="visible"}}function b(){e.style.visibility=l.style.visibility="visible";l.style.display="block";m.style.display="none";a.a.className+=" highslide-active-anchor";a.afterExpand();c.afterClose();a.last=null}hs.animate(c.wrapper,{left:f.pos,top:g.pos,width:f.get("wsize"),height:g.get("wsize")},h);hs.animate(m,{width:f.imgSize||f.size,height:g.imgSize||g.size,left:f.p1+f.get("imgPad"),top:g.p1+g.get("imgPad")},h);hs.animate(this.oldImg,{left:(w.pos-f.pos+w.p1-f.p1+w.get("imgPad")-f.get("imgPad")),top:(v.pos-g.pos+v.p1-g.p1+v.get("imgPad")-g.get("imgPad"))},h);hs.animate(this.newImg,{opacity:1,left:0,top:0},h);if(u){hs.animate(u,{left:f.p1+f.cb,top:g.p1+g.cb,width:f.size,height:g.size},h)}if(this.outline){var p=function(o,i){if(i.prop=="top"){var n=a.wrapper.style;var x={w:parseInt(n.width),h:parseInt(n.height),x:parseInt(n.left),y:parseInt(n.top)};a.outline.setPosition(x)}}}hs.animate(e,q.wrapper,{duration:h,complete:b,step:p});m.style.visibility="visible"},reuseOverlay:function(d,c){if(!this.last){return false}for(var b=0;b<this.last.overlays.length;b++){var a=hs.$("hsId"+this.last.overlays[b]);if(a&&a.hsId==d.hsId){this.genOverlayBox();a.reuse=this.key;hs.push(this.overlays,this.last.overlays[b]);return true}}return false},afterExpand:function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=="after"){this.writeExtendedContent()}if(this.iframe){try{var g=this,d=this.iframe.contentDocument||this.iframe.contentWindow.document;hs.addEventListener(d,"mousedown",function(){if(hs.focusKey!=g.key){g.focus()}})}catch(c){}if(hs.ie&&typeof this.isClosing!="boolean"){this.iframe.style.width=(this.objectWidth-1)+"px"}}if(this.dimmingOpacity){hs.dim(this)}if(hs.upcoming&&hs.upcoming==this.a){hs.upcoming=null}this.prepareNextOutline();var b=hs.page,a=hs.mouse.x+b.scrollLeft,f=hs.mouse.y+b.scrollTop;this.mouseIsOver=this.x.pos<a&&a<this.x.pos+this.x.get("wsize")&&this.y.pos<f&&f<this.y.pos+this.y.get("wsize");if(this.overlayBox){this.showOverlays()}hs.fireEvent(this,"onAfterExpand")},prepareNextOutline:function(){var b=this.key;var a=this.outlineType;new hs.Outline(a,function(){try{hs.expanders[b].preloadNext()}catch(c){}})},preloadNext:function(){var a=this.getAdjacentAnchor(1);if(a&&a.onclick.toString().match(/hs\.expand/)){var b=hs.createElement("img",{src:hs.getSrc(a)})}},getAdjacentAnchor:function(c){var a=this.getAnchorIndex(),b=hs.anchors.groups[this.slideshowGroup||"none"];if(!b[a+c]&&this.slideshow&&this.slideshow.repeat){if(c==1){return b[0]}else{if(c==-1){return b[b.length-1]}}}return b[a+c]||null},getAnchorIndex:function(){var b=hs.getAnchors().groups[this.slideshowGroup||"none"];if(b){for(var a=0;a<b.length;a++){if(b[a]==this.a){return a}}}return null},getNumber:function(){if(this[this.numberPosition]){var b=hs.anchors.groups[this.slideshowGroup||"none"];if(b){var a=hs.lang.number.replace("%1",this.getAnchorIndex()+1).replace("%2",b.length);this[this.numberPosition].innerHTML='<div class="highslide-number">'+a+"</div>"+this[this.numberPosition].innerHTML}}},initSlideshow:function(){if(!this.last){for(var c=0;c<hs.slideshows.length;c++){var d=hs.slideshows[c],a=d.slideshowGroup;if(typeof a=="undefined"||a===null||a===this.slideshowGroup){this.slideshow=new hs.Slideshow(this.key,d)}}}else{this.slideshow=this.last.slideshow}var d=this.slideshow;if(!d){return}var e=d.expKey=this.key;d.checkFirstAndLast();d.disable("full-expand");if(d.controls){var b=d.overlayOptions||{};b.overlayId=d.controls;b.hsId="controls";this.createOverlay(b)}if(d.thumbstrip){d.thumbstrip.add(this)}if(!this.last&&this.autoplay){d.play(true)}if(d.autoplay){d.autoplay=setTimeout(function(){hs.next(e)},(d.interval||500))}},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"}hs.fireEvent(this,"onHideLoading")},writeCredits:function(){if(this.credits){return}this.credits=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.lang.creditsText,title:hs.lang.creditsTitle});this.createOverlay({overlayId:this.credits,position:this.creditsPosition||"top left",hsId:"credits"})},getInline:function(types,addOverlay){for(var i=0;i<types.length;i++){var type=types[i],s=null;if(type=="caption"&&!hs.fireEvent(this,"onBeforeGetCaption")){return}else{if(type=="heading"&&!hs.fireEvent(this,"onBeforeGetHeading")){return}}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&&this.numberPosition==type){s="\n"}if(!this[type]&&s){this[type]=hs.createElement("div",{className:"highslide-"+type,innerHTML:s})}if(addOverlay&&this[type]){var o={position:(type=="heading")?"above":"below"};for(var x in this[type+"Overlay"]){o[x]=this[type+"Overlay"][x]}o.overlayId=this[type];this.createOverlay(o)}}},doShowHide:function(a){if(hs.hideSelects){this.showHideElements("SELECT",a)}if(hs.hideIframes){this.showHideElements("IFRAME",a)}if(hs.geckoMac){this.showHideElements("*",a)}},showHideElements:function(g,d){var b=document.getElementsByTagName(g);var j=g=="*"?"overflow":"visibility";for(var f=0;f<b.length;f++){if(j=="visibility"||(document.defaultView.getComputedStyle(b[f],"").getPropertyValue("overflow")=="auto"||b[f].getAttribute("hidden-by")!=null)){var e=b[f].getAttribute("hidden-by");if(d=="visible"&&e){e=e.replace("["+this.key+"]","");b[f].setAttribute("hidden-by",e);if(!e){b[f].style[j]=b[f].origProp}}else{if(d=="hidden"){var h=hs.getPosition(b[f]);h.w=b[f].offsetWidth;h.h=b[f].offsetHeight;if(!this.dimmingOpacity){var c=(h.x+h.w<this.x.get("opos")||h.x>this.x.get("opos")+this.x.get("osize"));var a=(h.y+h.h<this.y.get("opos")||h.y>this.y.get("opos")+this.y.get("osize"))}var k=hs.getWrapperKey(b[f]);if(!c&&!a&&k!=this.key){if(!e){b[f].setAttribute("hidden-by","["+this.key+"]");b[f].origProp=b[f].style[j];b[f].style[j]="hidden"}else{if(e.indexOf("["+this.key+"]")==-1){b[f].setAttribute("hidden-by",e+"["+this.key+"]")}}}else{if((e=="["+this.key+"]"||hs.focusKey==k)&&k!=this.key){b[f].setAttribute("hidden-by","");b[f].style[j]=b[f].origProp||""}else{if(e&&e.indexOf("["+this.key+"]")>-1){b[f].setAttribute("hidden-by",e.replace("["+this.key+"]",""))}}}}}}}},focus:function(){this.wrapper.style.zIndex=hs.zIndexCounter++;for(var a=0;a<hs.expanders.length;a++){if(hs.expanders[a]&&a==hs.focusKey){var b=hs.expanders[a];b.content.className+=" highslide-"+b.contentType+"-blur";if(b.isImage){b.content.style.cursor=hs.ie?"hand":"pointer";b.content.title=hs.lang.focusTitle}hs.fireEvent(b,"onBlur")}}if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex}this.content.className="highslide-"+this.contentType;if(this.isImage){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);hs.fireEvent(this,"onFocus")},moveTo:function(a,b){this.x.setPos(a);this.y.setPos(b)},resize:function(a){var c,b,d=a.width/a.height;c=Math.max(a.width+a.dX,Math.min(this.minWidth,this.x.full));if(this.isImage&&Math.abs(c-this.x.full)<12){c=this.x.full}b=this.isHtml?a.height+a.dY:c/d;if(b<Math.min(this.minHeight,this.y.full)){b=Math.min(this.minHeight,this.y.full);if(this.isImage){c=b*d}}this.resizeTo(c,b)},resizeTo:function(a,b){this.y.setSize(b);this.x.setSize(a)},close:function(){if(this.isClosing||!this.isExpanded){return}if(this.transitions[1]=="crossfade"&&hs.upcoming){hs.getExpander(hs.upcoming).cancelLoading();hs.upcoming=null}if(!hs.fireEvent(this,"onBeforeClose")){return}this.isClosing=true;if(this.slideshow&&!hs.upcoming){this.slideshow.pause()}hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{if(this.isHtml){this.htmlPrepareClose()}this.content.style.cursor="default";this.changeSize(0,{wrapper:{width:this.x.t,height:this.y.t,left:this.x.tpos-this.x.cb+this.x.tb,top:this.y.tpos-this.y.cb+this.y.tb},content:{left:0,top:0,width:this.x.t,height:this.y.t}},hs.restoreDuration)}catch(a){this.afterClose()}},htmlPrepareClose:function(){if(hs.geckoMac){if(!hs.mask){hs.mask=hs.createElement("div",null,{position:"absolute"},hs.container)}hs.setStyles(hs.mask,{width:this.x.size+"px",height:this.y.size+"px",left:this.x.pos+"px",top:this.y.pos+"px",display:"block"})}if(this.objectType=="swf"){try{hs.$(this.body.id).StopPlay()}catch(a){}}if(this.objectLoadTime=="after"&&!this.preserveContent){this.destroyObject()}if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent){this.scrollerDiv.style.overflow="hidden"}},destroyObject:function(){if(hs.ie&&this.iframe){try{this.iframe.contentWindow.document.body.innerHTML=""}catch(a){}}if(this.objectType=="swf"){swfobject.removeSWF(this.body.id)}this.body.innerHTML=""},sleep:function(){if(this.outline){this.outline.table.style.display="none"}this.releaseMask=null;this.wrapper.style.display="none";hs.push(hs.sleeping,this)},awake:function(){try{hs.expanders[this.key]=this;if(!hs.allowMultipleInstances&&hs.focusKey!=this.key){try{hs.expanders[hs.focusKey].close()}catch(a){}}var d=hs.zIndexCounter++,b={display:"",zIndex:d};hs.setStyles(this.wrapper,b);this.isClosing=false;var c=this.outline||0;if(c){if(!this.outlineWhileAnimating){b.visibility="hidden"}hs.setStyles(c.table,b)}if(this.slideshow){this.initSlideshow()}this.show()}catch(a){}},createOverlay:function(d){var c=d.overlayId,e=(d.relativeTo=="viewport"&&!/panel$/.test(d.position));if(typeof c=="string"){c=hs.getNode(c)}if(d.html){c=hs.createElement("div",{innerHTML:d.html})}if(!c||typeof c=="string"){return}if(!hs.fireEvent(this,"onCreateOverlay",{overlay:c})){return}c.style.display="block";d.hsId=d.hsId||d.overlayId;if(this.transitions[1]=="crossfade"&&this.reuseOverlay(d,c)){return}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",visibility:"hidden",width:b,direction:hs.lang.cssDirection||"",opacity:0},e?hs.viewport:this.overlayBox,true);if(e){a.hsKey=this.key}a.appendChild(c);hs.extend(a,{opacity:1,offsetX:0,offsetY:0,dur:(d.fade===0||d.fade===false||(d.fade==2&&hs.ie))?0:250});hs.extend(a,d);if(this.gotOverlays){this.positionOverlay(a);if(!a.hideOnMouseOut||this.mouseIsOver){hs.animate(a,{opacity:a.opacity},a.dur)}}hs.push(this.overlays,hs.idCounter-1)},positionOverlay:function(b){var c=b.position||"middle center",a=(b.relativeTo=="viewport"),e=b.offsetX,f=b.offsetY;if(a){hs.viewport.style.display="block";b.hsKey=this.key;if(b.offsetWidth>b.parentNode.offsetWidth){b.style.width="100%"}}else{if(b.parentNode!=this.overlayBox){this.overlayBox.appendChild(b)}}if(/left$/.test(c)){b.style.left=e+"px"}if(/center$/.test(c)){hs.setStyles(b,{left:"50%",marginLeft:(e-Math.round(b.offsetWidth/2))+"px"})}if(/right$/.test(c)){b.style.right=-e+"px"}if(/^leftpanel$/.test(c)){hs.setStyles(b,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p1=b.offsetWidth}else{if(/^rightpanel$/.test(c)){hs.setStyles(b,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"});this.x.p2=b.offsetWidth}}var d=b.parentNode.offsetHeight;b.style.height="auto";if(a&&b.offsetHeight>d){b.style.height=hs.ieLt7?d+"px":"100%"}if(/^top/.test(c)){b.style.top=f+"px"}if(/^middle/.test(c)){hs.setStyles(b,{top:"50%",marginTop:(f-Math.round(b.offsetHeight/2))+"px"})}if(/^bottom/.test(c)){b.style.bottom=-f+"px"}if(/^above$/.test(c)){hs.setStyles(b,{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=b.offsetHeight}else{if(/^below$/.test(c)){hs.setStyles(b,{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=b.offsetHeight;b.style.position="absolute"}}},getOverlays:function(){this.getInline(["heading","caption"],true);this.getNumber();if(this.caption){hs.fireEvent(this,"onAfterGetCaption")}if(this.heading){hs.fireEvent(this,"onAfterGetHeading")}if(this.heading&&this.dragByHeading){this.heading.className+=" highslide-move"}if(hs.showCredits){this.writeCredits()}for(var d=0;d<hs.overlays.length;d++){var e=hs.overlays[d],c=e.thumbnailId,a=e.slideshowGroup;if((!c&&!a)||(c&&c==this.thumbsUserSetId)||(a&&a===this.slideshowGroup)){if(this.isImage||(this.isHtml&&e.useOnHtml)){this.createOverlay(e)}}}var b=[];for(var d=0;d<this.overlays.length;d++){var e=hs.$("hsId"+this.overlays[d]);if(/panel$/.test(e.position)){this.positionOverlay(e)}else{hs.push(b,e)}}for(var d=0;d<b.length;d++){this.positionOverlay(b[d])}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:null},hs.container,true)}},sizeOverlayBox:function(f,a){var b=this.overlayBox,d=this.x,e=this.y;hs.setStyles(b,{width:d.size+"px",height:e.size+"px"});if(f||a){for(var g=0;g<this.overlays.length;g++){var h=hs.$("hsId"+this.overlays[g]);var c=(hs.ieLt7||document.compatMode=="BackCompat");if(h&&/^(above|below)$/.test(h.position)){if(c){h.style.width=(b.offsetWidth+2*d.cb+d.p1+d.p2)+"px"}e[h.position=="above"?"p1":"p2"]=h.offsetHeight}if(h&&c&&/^(left|right)panel$/.test(h.position)){h.style.height=(b.offsetHeight+2*e.cb)+"px"}}}if(f){hs.setStyles(this.content,{top:e.p1+"px"});hs.setStyles(b,{top:(e.p1+e.cb)+"px"})}},showOverlays:function(){var a=this.overlayBox;a.className="";hs.setStyles(a,{top:(this.y.p1+this.y.cb)+"px",left:(this.x.p1+this.x.cb)+"px",overflow:"visible"});if(hs.safari){a.style.visibility="visible"}this.wrapper.appendChild(a);for(var c=0;c<this.overlays.length;c++){var d=hs.$("hsId"+this.overlays[c]);d.style.zIndex=d.hsId=="controls"?5:4;if(!d.hideOnMouseOut||this.mouseIsOver){d.style.visibility="visible";hs.setStyles(d,{visibility:"visible",display:""});hs.animate(d,{opacity:d.opacity},d.dur)}}},destroyOverlays:function(){if(!this.overlays.length){return}for(var b=0;b<this.overlays.length;b++){var d=hs.$("hsId"+this.overlays[b]);if(d.parentNode==hs.viewport){hs.discardElement(d)}}if(this.slideshow){var a=this.slideshow.controls;if(a&&hs.getExpander(a)==this){a.parentNode.removeChild(a)}}if(this.isHtml&&this.preserveContent){this.overlayBox.style.top="-9999px";hs.container.appendChild(this.overlayBox)}else{hs.discardElement(this.overlayBox)}},createFullExpand:function(){if(this.slideshow&&this.slideshow.controls){this.slideshow.enable("full-expand");return}this.fullExpandLabel=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.lang.fullExpandTitle,className:"highslide-full-expand"});if(!hs.fireEvent(this,"onCreateFullExpand")){return}this.createOverlay({overlayId:this.fullExpandLabel,position:hs.fullExpandPosition,hideOnMouseOut:true,opacity:hs.fullExpandOpacity})},doFullExpand:function(){try{if(!hs.fireEvent(this,"onDoFullExpand")){return}if(this.fullExpandLabel){hs.discardElement(this.fullExpandLabel)}this.focus();var b=this.x.size;this.resizeTo(this.x.full,this.y.full);var c=this.x.pos-(this.x.size-b)/2;if(c<hs.marginLeft){c=hs.marginLeft}this.moveTo(c,this.y.pos);this.doShowHide("hidden");hs.setDimmerSize(this)}catch(a){this.error(a)}},afterClose:function(){this.a.className=this.a.className.replace("highslide-active-anchor","");this.doShowHide("visible");if(this.isHtml&&this.preserveContent&&this.transitions[1]!="crossfade"){this.sleep()}else{if(this.outline&&this.outlineWhileAnimating){this.outline.destroy()}hs.discardElement(this.wrapper)}if(hs.mask){hs.mask.style.display="none"}if(!hs.viewport.childNodes.length){hs.viewport.style.display="none"}if(this.dimmingOpacity){hs.undim(this.key)}hs.fireEvent(this,"onAfterClose");hs.expanders[this.key]=null;hs.reOrder()}};hs.Ajax=function(c,b,d){this.a=c;this.content=b;this.pre=d};hs.Ajax.prototype={run:function(){if(!this.src){this.src=hs.getSrc(this.a)}if(this.src.match("#")){var b=this.src.split("#");this.src=b[0];this.id=b[1]}if(hs.cachedGets[this.src]){this.cachedGet=hs.cachedGets[this.src];if(this.id){this.getElementContent()}else{this.loadHTML()}return}try{this.xmlHttp=new XMLHttpRequest()}catch(a){try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){this.onError()}}}var c=this;this.xmlHttp.onreadystatechange=function(){if(c.xmlHttp.readyState==4){if(c.id){c.getElementContent()}else{c.loadHTML()}}};this.xmlHttp.open("POST",this.src,true);this.xmlHttp.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlHttp.send("dummy=1")},getElementContent:function(){hs.init();var a=window.opera||hs.ie6SSL?{src:"about:blank"}:null;this.iframe=hs.createElement("iframe",a,{position:"absolute",top:"-9999px"},hs.container);this.loadHTML()},loadHTML:function(){var a=this.cachedGet||this.xmlHttp.responseText;if(this.pre){hs.cachedGets[this.src]=a}if(!hs.ie||hs.uaVersion>=5.5){a=a.replace(/\s/g," ").replace(new RegExp("<link[^>]*>","gi"),"").replace(new RegExp("<script[^>]*>.*?</script>","gi"),"");if(this.iframe){var d=this.iframe.contentDocument;if(!d&&this.iframe.contentWindow){d=this.iframe.contentWindow.document}if(!d){var b=this;setTimeout(function(){b.loadHTML()},25);return}d.open();d.write(a);d.close();try{a=d.getElementById(this.id).innerHTML}catch(f){try{a=this.iframe.document.getElementById(this.id).innerHTML}catch(f){}}}else{a=a.replace(new RegExp("^.*?<body[^>]*>(.*?)</body>.*?$","i"),"$1")}}hs.getElementByClass(this.content,"DIV","highslide-body").innerHTML=a;this.onLoad();for(var c in this){this[c]=null}}};hs.Slideshow=function(b,c){if(hs.dynamicallyUpdateAnchors!==false){hs.updateAnchors()}this.expKey=b;for(var a in c){this[a]=c[a]}if(this.useControls){this.getControls()}if(this.thumbstrip){this.thumbstrip=hs.Thumbstrip(this)}};hs.Slideshow.prototype={getControls:function(){this.controls=hs.createElement("div",{innerHTML:hs.replaceLang(hs.skin.controls)},null,hs.container);var b=["play","pause","previous","next","move","full-expand","close"];this.btn={};var a=this;for(var c=0;c<b.length;c++){this.btn[b[c]]=hs.getElementByClass(this.controls,"li","highslide-"+b[c]);this.enable(b[c])}this.btn.pause.style.display="none"},checkFirstAndLast:function(){if(this.repeat||!this.controls){return}var c=hs.expanders[this.expKey],b=c.getAnchorIndex(),a=/disabled$/;if(b==0){this.disable("previous")}else{if(a.test(this.btn.previous.getElementsByTagName("a")[0].className)){this.enable("previous")}}if(b+1==hs.anchors.groups[c.slideshowGroup||"none"].length){this.disable("next");this.disable("play")}else{if(a.test(this.btn.next.getElementsByTagName("a")[0].className)){this.enable("next");this.enable("play")}}},enable:function(c){if(!this.btn){return}var e=this,d=this.btn[c].getElementsByTagName("a")[0],b=/disabled$/;d.onclick=function(){e[c]();return false};if(b.test(d.className)){d.className=d.className.replace(b,"")}},disable:function(b){if(!this.btn){return}var c=this.btn[b].getElementsByTagName("a")[0];c.onclick=function(){return false};if(!/disabled$/.test(c.className)){c.className+=" disabled"}},hitSpace:function(){if(this.autoplay){this.pause()}else{this.play()}},play:function(a){if(this.btn){this.btn.play.style.display="none";this.btn.pause.style.display=""}this.autoplay=true;if(!a){hs.next(this.expKey)}},pause:function(){if(this.btn){this.btn.pause.style.display="none";this.btn.play.style.display=""}clearTimeout(this.autoplay);this.autoplay=null},previous:function(){this.pause();hs.previous(this.btn.previous)},next:function(){this.pause();hs.next(this.btn.next)},move:function(){},"full-expand":function(){hs.getExpander().doFullExpand()},close:function(){hs.close(this.btn.close)}};hs.Thumbstrip=function(s){function a(i){hs.extend(c||{},{overlayId:n,hsId:"thumbstrip"});if(hs.ieLt7){c.fade=0}i.createOverlay(c);hs.setStyles(n.parentNode,{overflow:"hidden"})}function o(i){f(undefined,Math.round(i*n[g?"offsetWidth":"offsetHeight"]*0.7))}function f(M,N){if(M===undefined){for(var J=0;J<j.length;J++){if(j[J]==hs.expanders[s.expKey].a){M=J;break}}}var I=n.getElementsByTagName("a"),H=I[M],B=H.parentNode,C=g?"Left":"Top",L=g?"Right":"Bottom",x=g?"Width":"Height",w="offset"+C,G="offset"+x,y=k.parentNode.parentNode[G],D=y-h[G],v=parseInt(h.style[g?"left":"top"])||0,A=v,E=20;if(N!==undefined){A=v-N;if(A>0){A=0}if(A<D){A=D}}else{for(var J=0;J<I.length;J++){I[J].className=""}H.className="highslide-active-anchor";var K=M>0?I[M-1].parentNode[w]:B[w],z=B[w]+B[G]+(I[M+1]?I[M+1].parentNode[G]:0);if(z>y-v){A=y-z}else{if(K<-v){A=-K}}}var F=B[w]+(B[G]-t[G])/2+A;hs.animate(h,g?{left:A}:{top:A},null,"easeOutQuad");hs.animate(t,g?{left:F}:{top:F},null,"easeOutQuad");d.style.display=A<0?"block":"none";p.style.display=(A>D)?"block":"none"}var j=hs.anchors.groups[hs.expanders[s.expKey].slideshowGroup||"none"],c=s.thumbstrip,l=c.mode||"horizontal",q=(l=="float"),e=q?["div","ul","li","span"]:["table","tbody","tr","td"],g=(l=="horizontal"),n=hs.createElement("div",{className:"highslide-thumbstrip highslide-thumbstrip-"+l,innerHTML:'<div class="highslide-thumbstrip-inner"><'+e[0]+"><"+e[1]+"></"+e[1]+"></"+e[0]+'></div><div class="highslide-scroll-up"><div></div></div><div class="highslide-scroll-down"><div></div></div><div class="highslide-marker"><div></div></div>'},{display:"none"},hs.container),u=n.childNodes,k=u[0],d=u[1],p=u[2],t=u[3],h=k.firstChild,r=n.getElementsByTagName(e[1])[0],b;for(var m=0;m<j.length;m++){if(m==0||!g){b=hs.createElement(e[2],null,null,r)}(function(){var w=j[m],v=hs.createElement(e[3],null,null,b),i=m;hs.createElement("a",{href:w.href,onclick:function(){return hs.transit(w)},innerHTML:hs.stripItemFormatter?hs.stripItemFormatter(w):w.innerHTML},null,v)})()}if(!q){d.onclick=function(){o(-1)};p.onclick=function(){o(1)};hs.addEventListener(r,document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll",function(i){var v=0;i=i||window.event;if(i.wheelDelta){v=i.wheelDelta/120;if(hs.opera){v=-v}}else{if(i.detail){v=-i.detail/3}}if(v){o(-v*0.2)}if(i.preventDefault){i.preventDefault()}i.returnValue=false})}return{add:a,selectThumb:f}};if(hs.ie){(function(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,50);return}hs.ready()})()}hs.addEventListener(document,"DOMContentLoaded",hs.ready);hs.addEventListener(window,"load",hs.ready);hs.langDefaults=hs.lang;var HsExpander=hs.Expander;hs.addEventListener(window,"load",function(){if(hs.expandCursor){var d=".highslide img",c="cursor: url("+hs.graphicsDir+hs.expandCursor+"), pointer !important;";var b=hs.createElement("style",{type:"text/css"},null,document.getElementsByTagName("HEAD")[0]);if(!hs.ie){b.appendChild(document.createTextNode(d+" {"+c+"}"))}else{var a=document.styleSheets[document.styleSheets.length-1];if(typeof(a.addRule)=="object"){a.addRule(d,c)}}}});hs.addEventListener(window,"resize",function(){hs.page=hs.getPageSize();if(hs.viewport){for(var b=0;b<hs.viewport.childNodes.length;b++){var a=hs.viewport.childNodes[b],c=hs.getExpander(a);c.positionOverlay(a);if(a.hsId=="thumbstrip"){c.slideshow.thumbstrip.selectThumb()}}}});hs.addEventListener(document,"mousemove",function(a){hs.mouse={x:a.clientX,y:a.clientY}});hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(document,"ready",hs.setClickEvents);hs.addEventListener(window,"load",hs.preloadImages);hs.addEventListener(window,"load",hs.preloadAjax);
