hs.showCredits=false;hs.dimmingOpacity=0.80;hs.dimmingDuration=300;hs.fadeInOut=true;hs.transitionDuration=500;hs.align='center';hs.allowMultipleInstances=false;hs.blockRightClick=true;hs.captionEval='this.a.title';hs.outlineType='rounded-white';hs.minWidth=750;hs.marginBottom=30;var swplay=false;hs.Expander.prototype.onShowLoading=function(a){if($(a.a).parents(".WPHSGalleryContainer").length>0&&hs.getExpander()==null){var b=$("img",a.a);if(b.length>0){if($(b[0]).width()>100){$(hs.loading).css("margin-left",-1*($(b[0]).width()-100)/2)}else{$(hs.loading).css("margin-left",0)}if($(b[0]).height()>100){$(hs.loading).css("margin-top",-1*($(b[0]).height()-100)/2)}else{$(hs.loading).css("margin-top",0)}}}else{$(hs.loading).css("margin-left",0);$(hs.loading).css("margin-top",0)}};hs.onKeyDown=function(a,e){if(e.keyCode==32){swplay=!swplay}else if(e.keyCode==34||e.keyCode==39||e.keyCode==40||e.keyCode==33||e.keyCode==37||e.keyCode==38||e.keyCode==27||e.keyCode==13){swplay=false}return true};hs.Expander.prototype.onAfterGetCaption=function(a){var b=a.custom.lnk;if(b.length>0){var c="?wphsgatt=1";if(b.indexOf("?")!=-1){c="&wphsgatt=1"}var d="<div class='WPHSGCaption'><strong>Current photo:</strong> "+a.caption.innerHTML;if(wphsAttLnk){d=d+" <a href='"+this.custom.lnk+"' class='WPHSGCaptionLink' title='Permalink to this image (use to share)' target='_blank'>Permalink</a>"}d=d+"</div>";if(!swplay&&wphsAttLnk){d+="<iframe width='100%' height='350' scrolling='no' frameborder='0' marginheight='0' marginwidth='0' src='"+this.custom.lnk+c+"' ></iframe>";hs.minWidth=750}else hs.minWidth=200;a.caption.innerHTML=d}$("li.highslide-play").click(function(){swplay=true});$("li.highslide-pause").click(function(){swplay=false});$("li.highslide-previous").click(function(){swplay=false});$("li.highslide-next").click(function(){swplay=false});$("li.highslide-close").click(function(){swplay=false})};hs.Expander.prototype.onImageClick=function(a){swplay=false;return true};hs.onDimmerClick=function(){swplay=false;return true};hs.addEventListener(window,'resize',function(){var i,exp;hs.getPageSize();for(i=0;i<hs.expanders.length;i++){exp=hs.expanders[i];if(exp){var x=exp.x,y=exp.y;exp.tpos=hs.getPosition(exp.el);x.calcThumb();y.calcThumb();x.pos=x.tpos-x.cb+x.tb;x.scroll=hs.page.scrollLeft;x.clientSize=hs.page.width;y.pos=y.tpos-y.cb+y.tb;y.scroll=hs.page.scrollTop;y.clientSize=hs.page.height;exp.justify(x,true);exp.justify(y,true);exp.moveTo(x.pos,y.pos)}}});function SetupWPHSImages(){var a=$("a",".WPHSGallery");for(x=0;x<a.length;x++){var b=$("img",a[x]);if(b.length>0&&!$(a[x]).hasClass("highslide")&&$(a[x]).attr("href").indexOf(".jpg")!=-1){$(a[x]).addClass("highslide");$(a[x]).click(function(){return hs.expand(this,{align:'auto',captionEval:'this.thumb.title'},{lnk:''})})}}}
