(function(){var b=function(){var k="/images/loading.gif",i="/images/close.gif",j=10,q="Image",r="of",e=[],g,n,u,p,s,c,d,o,f,t,h,m,l={};l.resizeImageContainer=function(x,v,A){s.style.width=x+"px";s.style.height=v+"px";c.width=x;c.height=v;var z=x+2*j,y=v+2*j,w=n.style.width,B=n.style.height;p.style.width=z+"px";p.style.height=y+"px";o.style.height=y+"px";f.style.height=y+"px";f.style.height=y+"px";d.style.width=z+"px";if(z>w.substring(0,(w.length-2))){n.style.width=z+"px"}if((y+A)>B.substring(0,(B.length-2))){n.style.height=(y+A+100)+"px"}};l.out=function(){n.style.display="none";u.style.display="none"};l.initialize=function(){l.updateImageList();var L=document.createElement("div"),H=document.createElement("div"),G=document.createElement("div"),O=document.createElement("div"),A=document.createElement("img"),B=document.createElement("div"),C=document.createElement("a"),K=document.createElement("a"),z=document.createElement("div"),F=document.createElement("img"),w=document.createElement("div"),J=document.createElement("div"),N=document.createElement("div"),M=document.createElement("span"),E=document.createElement("span"),x=document.createElement("div"),D=document.createElement("a"),v=document.createElement("img"),I=Math.max(Math.max(document.body.clientHeight,document.documentElement.clientHeight),Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),Math.max(document.body.offsetHeight,document.documentElement.offsetHeight)),y=Math.max(Math.max(document.body.clientWidth,document.documentElement.clientWidth),Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),Math.max(document.body.offsetWidth,document.documentElement.offsetWidth));L.id="overlay";L.onclick=function(){l.out();return false};L.style.display="none";document.body.appendChild(L);n=L;H.id="anabox";H.style.display="none";document.body.appendChild(H);u=H;G.id="outerImageContainer";H.appendChild(G);p=G;O.id="imageContainer";G.appendChild(O);s=O;O.style.padding=j+"px";A.id="anaboxImage";O.appendChild(A);c=A;B.id="hoverNav";O.appendChild(B);C.id="prevLink";C.href="#";B.appendChild(C);o=C;K.id="nextLink";K.href="#";B.appendChild(K);f=K;z.id="loading";O.appendChild(z);t=z;F.src=k;z.appendChild(F);w.id="imageDataContainer";H.appendChild(w);d=w;J.id="imageData";w.appendChild(J);N.id="imageDetails";J.appendChild(N);M.id="caption";N.appendChild(M);M.appendChild(document.createTextNode(""));m=M;E.id="numberDisplay";N.appendChild(E);E.appendChild(document.createTextNode(""));h=E;x.id="bottomNav";J.appendChild(x);D.id="bottomNavClose";D.href="#";D.onclick=function(){l.out();return false};x.appendChild(D);v.src=i;D.appendChild(v);n.style.height=I+"px";n.style.width=y+"px"};l.updateImageList=function(){var w=document.getElementsByTagName("a"),v;for(v=0;v<w.length;v+=1){if(w[v].rel.match(/^anabox(\[([a-zA-Z 0-9\-_]*)\])?$/)){w[v].onclick=function(){l.popup(this);return false}}}};l.popup=function(A){var y=A.rel,w=A.href,z=A.title,v=0,B,x;n.style.display="block";u.style.display="block";g=undefined;e=[];if(y.length>6){g=y.substr(7);g=g.substr(0,(g.length-1));B=document.getElementsByTagName("a");for(x=0;x<B.length;x+=1){if(B[x].rel===y){e.push([B[x].href,B[x].title])}}while(e[v][0]!==w){v+=1}}else{e.push([w,z])}l.displayImage(v)};l.displayImage=function(y){var v,A,x,z,w;if(window.pageYOffset){v=window.pageYOffset;A=window.pageXOffset}else{v=Math.max(document.documentElement.scrollTop,document.body.scrollTop);A=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)}if(window.innerHeight){x=window.innerHeight}else{x=Math.max(document.documentElement.clientHeight,document.body.clientHeight)}z=v+(x/10);u.style.top=z+"px";u.style.top=z+"px";n.style.left=A+"px";u.style.left=A+"px";c.style.display="none";t.style.display="block";if(y===0){o.style.display="none"}else{o.onclick=function(){l.displayImage(y-1);return false};o.style.display="block"}if(y===(e.length-1)){f.style.display="none"}else{f.onclick=function(){l.displayImage(y+1);return false};f.style.display="block"}w=new Image();w.onload=function(){c.src=w.src;l.resizeImageContainer(w.width,w.height,z);c.style.display="inline";t.style.display="none"};w.src=e[y][0];if(e[y][1]){m.firstChild.data=e[y][1]}else{m.firstChild.data=""}if(e.length>1){h.firstChild.data=q+" "+(y+1)+" "+r+" "+e.length}else{h.firstChild.data=""}};return l};window.anabox=b();var a=function(){var g="/images/loading.gif",f=/(^|\/)oileide\.js\?auto$/,h=/^oileide\[([a-zA-Z 0-9\-_]*)\]$/,c={},e=false,d=null;c.sail=function(){var k=null,n=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],l,j;if(window.XMLHttpRequest){k=new XMLHttpRequest()}else{j=n.length;for(l=0;l<j;l+=1){try{k=new ActiveXObject(n[l]);break}catch(m){}}}return k};c.callForAchilleus=function(q,i,o,p,n,j,k){if(q!=="JSON"&&q!=="XML"&&q!=="HTML"&&q!=="Text"){throw ("Unsupported Data Type")}if(p===undefined){p=true}if(n===undefined){n="GET"}if(j===undefined){j=null}var l=c.sail(),m;if(l!==null){if(p===true){l.onreadystatechange=function(){if(l.readyState===4&&(l.status===200||l.status===304)){switch(q){case"HTML":m=c.getBodyFromHtml(l.responseText);break;case"XML":m=l.responseXML;break;case"JSON":m=l.responseText;break;case"Text":m=l.responseText;break}o(m,k)}}}l.open(n,i,p);l.send(j);if(p===false){if(l.status===200||l.status===304){switch(q){case"HTML":m=c.getBodyFromHtml(l.responseText);break;case"XML":m=l.responseXML;break;case"JSON":m=l.responseText;break;case"Text":m=l.responseText;break}o(m,k);return true}else{return false}}else{return true}}else{return false}};c.loadJson=function(m,l,k,n,j,i){return c.callForAchilleus("JSON",m,l,k,n,j,i)};c.loadText=function(m,l,k,n,j,i){return c.callForAchilleus("Text",m,l,k,n,j,i)};c.loadXml=function(m,l,k,n,j,i){return c.callForAchilleus("XML",m,l,k,n,j)};c.loadHtml=function(m,l,k,n,j,i){return c.callForAchilleus("HTML",m,l,k,n,j,i)};c.getBodyFromHtml=function(k){var j,l,i;l=k.indexOf("<body");l=k.indexOf(">",l);i=k.lastIndexOf("</body>");k=k.slice(l+1,i);j=document.createElement("div");j.innerHTML=k;return j};c.writeHtml=function(p,l){var o=document.getElementById(l),k,n,m,j;if(o){p=c.removeOlympics(p);k=o.childNodes;for(m=k.length-1;m>=0;m-=1){n=k[m];if(n.nodeType===1||n.nodeType===3){o.removeChild(n)}}k=p.childNodes;for(m=0,j=k.length;m<j;m+=1){n=k[m].cloneNode(true);if(n.nodeType===1||n.nodeType===3){o.appendChild(n)}}if(e===true){c.launchSpear(o)}}};c.insertHtml=function(l,j,k,m,i){c.showVeil(j);return c.loadHtml(l,c.writeHtml,k,m,i,j)};c.autoInsert=function(o,l){var k=o.getAttribute("href"),n=o.getAttribute("id"),m=h.exec(o.getAttribute("rel")),j=m[1],i=false;i=c.insertHtml(k,j,l);if(l===true&&n){c.appendToLocation(n)}return i};c.showVeil=function(j){var l=document.getElementById(j),k,i;if(l!==null){k=d.cloneNode(true);i=c.getElementPosition(l);k.style.left=i[0];k.style.top=i[1];k.style.width=i[2];k.style.height=i[3];k.style.display="block";l.appendChild(k)}};c.getElementPosition=function(j){var n=0,m=0,k="100%",i="100%",l;if(j.offsetParent){k=j.offsetWidth+"px";i=j.offsetHeight+"px";do{l=c.getElementPositioning(j);if(l==="relative"||l==="absolute"||l==="fixed"){break}n+=j.offsetLeft;m+=j.offsetTop;j=j.offsetParent}while(j)}n+="px";m+="px";return[n,m,k,i]};c.getElementPositioning=function(i){if(i.currentStyle){return i.currentStyle.position}else{if(document.defaultView){return document.defaultView.getComputedStyle(i,"").getPropertyValue("position")}else{return i.style.position}}};c.launchSpear=function(l){var m=l.getElementsByTagName("a"),k,j;for(k=0,j=m.length;k<j;k+=1){if(h.test(m[k].rel)){m[k].onclick=function(){var i=window.oileide.autoInsert(this,true);if(i===true){return false}else{return true}}}}};c.removeOlympics=function(m){var l,k,j;if(m.getElementsByClassName===undefined){l=m.getElementsByTagName("*");for(k=l.length-1;k>=0;k-=1){j=l[k].className;if(/\bolympic\b/.test(j)===true){l[k].parentNode.removeChild(l[k])}}}else{l=m.getElementsByClassName("olympic");for(k=l.length-1;k>=0;k-=1){l[k].parentNode.removeChild(l[k])}}return m};c.appendToLocation=function(i){if(window.location.hash===""){window.location.hash=i}else{window.location.hash+=","+i}};c.readFromLocation=function(){var l=window.location.hash.substr(1).split(","),k,m,j;for(k=0,j=l.length;k<j;k+=1){m=document.getElementById(l[k]);if(m!==null){c.autoInsert(m,false)}}};c.createCassandrasVeil=function(){d=document.createElement("div");d.className="cassandras-veil";d.style.display="none";var i=document.createElement("img");i.src=g;d.appendChild(i)};c.run=function(){e=true;c.createCassandrasVeil();var i=document.getElementsByTagName("body");c.launchSpear(i[0]);c.readFromLocation()};c.getParam=function(){var m=document.getElementsByTagName("head")[0].getElementsByTagName("script"),k,l,j;for(k=0,j=m.length;k<j;k+=1){l=m[k].src;if(l.match(f)){c.run()}}};return c};window.oileide=a();if(window.addEventListener){window.addEventListener("load",function(){window.anabox.initialize();window.oileide.createCassandrasVeil()},false)}else{if(window.attachEvent){window.attachEvent("onload",function(){window.anabox.initialize();window.oileide.createCassandrasVeil()})}else{if(typeof window.onload==="undefined"){window.onload=function(){window.anabox.initialize();window.oileide.createCassandrasVeil()}}else{window.onload=window.onload&&function(){window.anabox.initialize();window.oileide.createCassandrasVeil()}}}}}());