shutterOnload=function(){shutterReloaded.init("sh")};if(typeof shutterOnload=="function"){if("undefined"!=typeof jQuery){jQuery(document).ready(function(){shutterOnload()})}else{if(typeof window.onload!="function"){window.onload=shutterOnload}else{oldonld=window.onload;window.onload=function(){if(oldonld){oldonld()}shutterOnload()}}}}shutterReloaded={I:function(b){return document.getElementById(b)},settings:function(){var a=this,b=shutterSettings;a.imageCount=b.imageCount||0;a.msgLoading=b.msgLoading||"L O A D I N G";a.msgClose=b.msgClose||"Click to Close"},init:function(l){var n=this,j,e,b,g,c,q,p,h,o,d,f;shutterLinks={},shutterSets={};if("object"!=typeof shutterSettings){shutterSettings={}}for(g=0;g<document.links.length;g++){j=document.links[g];b=(j.href.indexOf("?")==-1)?j.href.slice(-4).toLowerCase():j.href.substring(0,j.href.indexOf("?")).slice(-4).toLowerCase();if(b!=".jpg"&&b!=".png"&&b!=".gif"&&b!="jpeg"){continue}if(l=="sh"&&j.className.toLowerCase().indexOf("shutter")==-1){continue}if(l=="lb"&&j.rel.toLowerCase().indexOf("lightbox")==-1){continue}if(j.className.toLowerCase().indexOf("shutterset")!=-1){q=j.className.replace(/\s/g,"_")}else{if(j.rel.toLowerCase().indexOf("lightbox[")!=-1){q=j.rel.replace(/\s/g,"_")}else{q=0,p=-1}}if(q){if(!shutterSets[q]){shutterSets[q]=[]}p=shutterSets[q].push(g)}h=j.href.slice(j.href.lastIndexOf("/")+1);e=(j.title&&j.title!=h)?j.title:"";shutterLinks[g]={link:j.href,num:p,set:q,title:e};j.onclick=new Function('shutterReloaded.make("'+g+'");return false;')}n.settings()},make:function(p,o){var q=this,g,l,e="",m="",n,f,a,j,d,c=-1,h,k;if(!q.Top){if(typeof window.pageYOffset!="undefined"){q.Top=window.pageYOffset}else{q.Top=(document.documentElement.scrollTop>0)?document.documentElement.scrollTop:document.body.scrollTop}}if(typeof q.pgHeight=="undefined"){q.pgHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)}if(o){q.FS=(o>0)?1:0}else{q.FS=shutterSettings.FS||0}if(q.resizing){q.resizing=null}window.onresize=new Function('shutterReloaded.resize("'+p+'");');document.documentElement.style.overflowX="hidden";if(!q.VP){q._viewPort();q.VP=true}if(!(j=q.I("shShutter"))){j=document.createElement("div");j.setAttribute("id","shShutter");document.getElementsByTagName("body")[0].appendChild(j);q.hideTags()}if(!(a=q.I("shDisplay"))){a=document.createElement("div");a.setAttribute("id","shDisplay");a.style.top=q.Top+"px";document.getElementsByTagName("body")[0].appendChild(a)}j.style.height=q.pgHeight+"px";var b=q.textBtns?" | ":"";if(shutterLinks[p].num>1){g=shutterSets[shutterLinks[p].set][shutterLinks[p].num-2];e='<a href="#" onclick="shutterReloaded.make('+g+');return false">&lt;&lt;</a>'+b;n=new Image();n.src=shutterLinks[g].link}else{e=""}if(shutterLinks[p].num!=-1&&shutterLinks[p].num<(shutterSets[shutterLinks[p].set].length)){l=shutterSets[shutterLinks[p].set][shutterLinks[p].num];m='<a href="#" onclick="shutterReloaded.make('+l+');return false">&gt;&gt;</a>'+b;f=new Image();f.src=shutterLinks[l].link}else{m=""}h=((shutterLinks[p].num>0)&&q.imageCount)?'<div id="shCount">&nbsp;(&nbsp;'+shutterLinks[p].num+"&nbsp;/&nbsp;"+shutterSets[shutterLinks[p].set].length+"&nbsp;)&nbsp;</div>":"";k='<div id="shTitle"><div id="shPrev">'+e+'</div><div id="shNext">'+m+'</div><div id="shName">'+shutterLinks[p].title+"</div>"+h+"</div>";a.innerHTML='<div id="shWrap"><img src="'+shutterLinks[p].link+'" id="shTopImg" title="'+q.msgClose+'" onload="shutterReloaded.showImg();" onclick="shutterReloaded.hideShutter();" />'+k+"</div>";window.setTimeout(function(){shutterReloaded.loading()},2000)},loading:function(){var c=this,b,d,a;if((a=c.I("shWrap"))&&a.style.visibility=="visible"){return}if(!(b=c.I("shShutter"))){return}if(c.I("shWaitBar")){return}d=document.createElement("div");d.setAttribute("id","shWaitBar");d.style.top=c.Top+"px";d.innerHTML=c.msgLoading;b.appendChild(d)},hideShutter:function(){var b=this,c,a;if(c=b.I("shDisplay")){c.parentNode.removeChild(c)}if(a=b.I("shShutter")){a.parentNode.removeChild(a)}b.hideTags(true);window.scrollTo(0,b.Top);window.onresize=b.FS=b.Top=b.VP=null;document.documentElement.style.overflowX=""},resize:function(c){var b=this;if(b.resizing){return}if(!b.I("shShutter")){return}var a=b.I("shWrap");if(a){a.style.visibility="hidden"}window.setTimeout(function(){shutterReloaded.resizing=null},500);window.setTimeout(new Function('shutterReloaded.VP = null;shutterReloaded.make("'+c+'");'),100);b.resizing=true},_viewPort:function(){var d=this;var b=window.innerHeight?window.innerHeight:0;var f=document.body.clientHeight?document.body.clientHeight:0;var c=document.documentElement?document.documentElement.clientHeight:0;if(b>0){d.wHeight=((b-f)>1&&(b-f)<30)?f:b;d.wHeight=((d.wHeight-c)>1&&(d.wHeight-c)<30)?c:d.wHeight}else{d.wHeight=(c>0)?c:f}var a=document.documentElement?document.documentElement.clientWidth:0;var e=window.innerWidth?window.innerWidth:document.body.clientWidth;d.wWidth=(a>1)?a:e},showImg:function(){var o=this,g=o.I("shShutter"),a=o.I("shDisplay"),j=o.I("shTopImg"),e=o.I("shTitle"),p=o.I("shNavBar"),b,n,k,f,m,l,d,c,h=0;if(!g){return}if((b=o.I("shWrap"))&&b.style.visibility=="visible"){return}if(n=o.I("shWaitBar")){n.parentNode.removeChild(n)}g.style.width=a.style.width="";e.style.width=(j.width-4)+"px";m=o.wHeight-7;if(o.FS){if(j.width>(o.wWidth-10)){g.style.width=a.style.width=j.width+10+"px"}document.documentElement.style.overflowX=""}else{window.scrollTo(0,o.Top);if(j.height>m){j.width=j.width*(m/j.height);j.height=m;h=1}if(j.width>(o.wWidth-16)){j.height=j.height*((o.wWidth-16)/j.width);j.width=o.wWidth-16;h=1}e.style.width=(j.width-4)+"px"}l=o.Top+j.height+10;if(l>o.pgHeight){g.style.height=l+"px"}window.scrollTo(0,o.Top);d=(m-j.height)*0.45;c=(d>3)?Math.floor(d):3;a.style.top=o.Top+c+"px";b.style.visibility="visible"},hideTags:function(a){var d=document.getElementsByTagName("select");var e=document.getElementsByTagName("object");var b=document.getElementsByTagName("embed");var f=document.getElementsByTagName("iframe");var c=(a)?"visible":"hidden";for(i=0;i<d.length;i++){d[i].style.visibility=c}for(i=0;i<e.length;i++){e[i].style.visibility=c}for(i=0;i<b.length;i++){b[i].style.visibility=c}for(i=0;i<f.length;i++){f[i].style.visibility=c}}};