var Class={create:function(){
return function(){
this.initialize.apply(this,arguments);
};
}};
Object.extend=function(_1,_2){
for(property in _2){
_1[property]=_2[property];
}
return _1;
};
Function.prototype.bind=function(_3){
var _4=this;
return function(){
return _4.apply(_3,arguments);
};
};
Function.prototype.bindAsEventListener=function(_5){
var _6=this;
return function(_7){
_6.call(_5,_7||window.event);
};
};
function $(){
if(arguments.length==1){
return get$(arguments[0]);
}
var _8=[];
$c(arguments).each(function(el){
_8.push(get$(el));
});
return _8;
function get$(el){
if(typeof el=="string"){
el=document.getElementById(el);
}
return el;
}
}
if(!window.Element){
var Element=new Object();
}
Object.extend(Element,{remove:function(_b){
_b=$(_b);
_b.parentNode.removeChild(_b);
},hasClassName:function(_c,_d){
_c=$(_c);
if(!_c){
return;
}
var _e=false;
_c.className.split(" ").each(function(cn){
if(cn==_d){
_e=true;
}
});
return _e;
},addClassName:function(_10,_11){
_10=$(_10);
Element.removeClassName(_10,_11);
_10.className+=" "+_11;
},removeClassName:function(_12,_13){
_12=$(_12);
if(!_12){
return;
}
var _14="";
_12.className.split(" ").each(function(cn,i){
if(cn!=_13){
if(i>0){
_14+=" ";
}
_14+=cn;
}
});
_12.className=_14;
},cleanWhitespace:function(_17){
_17=$(_17);
$c(_17.childNodes).each(function(_18){
if(_18.nodeType==3&&!/\S/.test(_18.nodeValue)){
Element.remove(_18);
}
});
},find:function(_19,_1a){
_19=$(_19)[_1a];
while(_19.nodeType!=1){
_19=_19[_1a];
}
return _19;
}});
var Position={cumulativeOffset:function(_1b){
var _1c=0,_1d=0;
do{
_1c+=_1b.offsetTop||0;
_1d+=_1b.offsetLeft||0;
_1b=_1b.offsetParent;
}while(_1b);
return [_1d,_1c];
}};
document.getElementsByClassName=function(_1e){
var _1f=document.getElementsByTagName("*")||document.all;
var _20=[];
$c(_1f).each(function(_21){
if(Element.hasClassName(_21,_1e)){
_20.push(_21);
}
});
return _20;
};
Array.prototype.iterate=function(_22){
for(var i=0;i<this.length;i++){
_22(this[i],i);
}
};
if(!Array.prototype.each){
Array.prototype.each=Array.prototype.iterate;
}
function $c(_24){
var _25=[];
for(var i=0;i<_24.length;i++){
_25.push(_24[i]);
}
return _25;
}
var fx=new Object();
fx.Base=function(){
};
fx.Base.prototype={setOptions:function(_27){
this.options={duration:500,onComplete:"",transition:fx.sinoidal};
Object.extend(this.options,_27||{});
},step:function(){
var _28=(new Date).getTime();
if(_28>=this.options.duration+this.startTime){
this.now=this.to;
clearInterval(this.timer);
this.timer=null;
if(this.options.onComplete){
setTimeout(this.options.onComplete.bind(this),10);
}
}else{
var _29=(_28-this.startTime)/(this.options.duration);
this.now=this.options.transition(_29)*(this.to-this.from)+this.from;
}
this.increase();
},custom:function(_2a,to){
if(this.timer!=null){
return;
}
this.from=_2a;
this.to=to;
this.startTime=(new Date).getTime();
this.timer=setInterval(this.step.bind(this),13);
},hide:function(){
this.now=0;
this.increase();
},clearTimer:function(){
clearInterval(this.timer);
this.timer=null;
}};
fx.Layout=Class.create();
fx.Layout.prototype=Object.extend(new fx.Base(),{initialize:function(el,_2d){
this.el=$(el);
this.el.style.overflow="hidden";
this.iniWidth=this.el.offsetWidth;
this.iniHeight=this.el.offsetHeight;
this.setOptions(_2d);
}});
fx.Height=Class.create();
Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase:function(){
this.el.style.height=this.now+"px";
},toggle:function(){
if(this.el.offsetHeight>0){
this.custom(this.el.offsetHeight,0);
}else{
this.custom(0,this.el.scrollHeight);
}
}});
fx.Width=Class.create();
Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase:function(){
this.el.style.width=this.now+"px";
},toggle:function(){
if(this.el.offsetWidth>0){
this.custom(this.el.offsetWidth,0);
}else{
this.custom(0,this.iniWidth);
}
}});
fx.Opacity=Class.create();
fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize:function(el,_2f){
this.el=$(el);
this.now=1;
this.increase();
this.setOptions(_2f);
},increase:function(){
if(this.now==1&&(/Firefox/.test(navigator.userAgent))){
this.now=0.9999;
}
this.setOpacity(this.now);
},setOpacity:function(_30){
if(_30==0&&this.el.style.visibility!="hidden"){
this.el.style.visibility="hidden";
}else{
if(this.el.style.visibility!="visible"){
this.el.style.visibility="visible";
}
}
if(window.ActiveXObject){
this.el.style.filter="alpha(opacity="+_30*100+")";
}
this.el.style.opacity=_30;
},toggle:function(){
if(this.now>0){
this.custom(1,0);
}else{
this.custom(0,1);
}
}});
fx.sinoidal=function(pos){
return ((-Math.cos(pos*Math.PI)/2)+0.5);
};
fx.linear=function(pos){
return pos;
};
fx.cubic=function(pos){
return Math.pow(pos,3);
};
fx.circ=function(pos){
return Math.sqrt(pos);
};    
var resizeSpeed=6;
var borderSize=10;
var imageArray=new Array;
var activeImage;
if(resizeSpeed>10){
resizeSpeed=10;
}
if(resizeSpeed<1){
resizeSpeed=1;
}
resizeDuration=(11-resizeSpeed)*100;
Object.extend(Element,{hide:function(){
for(var i=0;i<arguments.length;i++){
var _36=$(arguments[i]);
_36.style.display="none";
}
},show:function(){
for(var i=0;i<arguments.length;i++){
var _38=$(arguments[i]);
_38.style.display="";
}
},getWidth:function(_39){
_39=$(_39);
return _39.offsetWidth;
},setWidth:function(_3a,w){
_3a=$(_3a);
_3a.style.width=w+"px";
},getHeight:function(_3c){
_3c=$(_3c);
return _3c.offsetHeight;
},setHeight:function(_3d,h){
_3d=$(_3d);
_3d.style.height=h+"px";
},setTop:function(_3f,t){
_3f=$(_3f);
_3f.style.top=t+"px";
},setSrc:function(_41,src){
_41=$(_41);
_41.src=src;
},setInnerHTML:function(_43,_44){
_43=$(_43);
_43.innerHTML=_44;
}});
Array.prototype.removeDuplicates=function(){
for(i=1;i<this.length;i++){
if(this[i][0]==this[i-1][0]){
this.splice(i,1);
}
}
};
Array.prototype.empty=function(){
for(i=0;i<=this.length;i++){
this.shift();
}
};
var Lightbox=Class.create();
Lightbox.prototype={initialize:function(){
if(!document.getElementsByTagName){
return;
}
var _45=document.getElementsByTagName("a");
for(var i=0;i<_45.length;i++){
var _47=_45[i];
var _48=String(_47.getAttribute("rel"));
if(_47.getAttribute("href")&&(_48.toLowerCase().match("lightbox"))){
_47.onclick=function(){
myLightbox.start(this);
return false;
};
}
}
var _49=document.getElementsByTagName("body").item(0);
var _4a=document.createElement("div");
_4a.setAttribute("id","overlay");
_4a.onclick=function(){
myLightbox.end();
return false;
};
_49.appendChild(_4a);
var _4b=document.createElement("div");
_4b.setAttribute("id","lightbox");
_4b.style.display="none";
_49.appendChild(_4b);
var _4c=document.createElement("div");
_4c.setAttribute("id","outerImageContainer");
_4b.appendChild(_4c);
var _4d=document.createElement("div");
_4d.setAttribute("id","imageContainer");
_4c.appendChild(_4d);
var _4e=document.createElement("img");
_4e.setAttribute("id","lightboxImage");
_4d.appendChild(_4e);
var _4f=document.createElement("div");
_4f.setAttribute("id","hoverNav");
_4d.appendChild(_4f);
var _50=document.createElement("a");
_50.setAttribute("id","prevLink");
_50.setAttribute("href","#");
_4f.appendChild(_50);
var _51=document.createElement("a");
_51.setAttribute("id","nextLink");
_51.setAttribute("href","#");
_4f.appendChild(_51);
var _52=document.createElement("div");
_52.setAttribute("id","loading");
_4d.appendChild(_52);
var _53=document.createElement("a");
_53.setAttribute("id","loadingLink");
_53.setAttribute("href","#");
_53.onclick=function(){
myLightbox.end();
return false;
};
_52.appendChild(_53);
var _54=document.createElement("img");
_54.setAttribute("src",fileLoadingImage);
_53.appendChild(_54);
var _55=document.createElement("div");
_55.setAttribute("id","imageDataContainer");
_55.className="clearfix";
_4b.appendChild(_55);
var _56=document.createElement("div");
_56.setAttribute("id","imageData");
_55.appendChild(_56);
var _57=document.createElement("div");
_57.setAttribute("id","imageDetails");
_56.appendChild(_57);
var _58=document.createElement("span");
_58.setAttribute("id","caption");
_57.appendChild(_58);
var _59=document.createElement("span");
_59.setAttribute("id","numberDisplay");
_57.appendChild(_59);
var _5a=document.createElement("div");
_5a.setAttribute("id","bottomNav");
_56.appendChild(_5a);
var _5b=document.createElement("a");
_5b.setAttribute("id","bottomNavClose");
_5b.setAttribute("href","#");
_5b.onclick=function(){
myLightbox.end();
return false;
};
_5a.appendChild(_5b);
var _5c=document.createElement("img");
_5c.setAttribute("src",fileBottomNavCloseImage);
_5b.appendChild(_5c);
overlayEffect=new fx.Opacity(_4a,{duration:300});
overlayEffect.hide();
imageEffect=new fx.Opacity(_4e,{duration:350,onComplete:function(){
imageDetailsEffect.custom(0,1);
}});
imageEffect.hide();
imageDetailsEffect=new fx.Opacity("imageDataContainer",{duration:400,onComplete:function(){
navEffect.custom(0,1);
}});
imageDetailsEffect.hide();
navEffect=new fx.Opacity("hoverNav",{duration:100});
navEffect.hide();
},start:function(_5d){
hideSelectBoxes();
var _5e=getPageSize();
Element.setHeight("overlay",_5e[1]);
overlayEffect.custom(0,0.8);
imageArray=[];
imageNum=0;
if(!document.getElementsByTagName){
return;
}
var _5f=document.getElementsByTagName("a");
if((_5d.getAttribute("rel")=="lightbox")){
imageArray.push(new Array(_5d.getAttribute("href"),_5d.getAttribute("title")));
}else{
for(var i=0;i<_5f.length;i++){
var _61=_5f[i];
if(_61.getAttribute("href")&&(_61.getAttribute("rel")==_5d.getAttribute("rel"))){
imageArray.push(new Array(_61.getAttribute("href"),_61.getAttribute("title")));
}
}
imageArray.removeDuplicates();
while(imageArray[imageNum][0]!=_5d.getAttribute("href")){
imageNum++;
}
}
var _5e=getPageSize();
var _62=getPageScroll();
var _63=_62[1]+(_5e[3]/15);
Element.setTop("lightbox",_63);
Element.show("lightbox");
this.changeImage(imageNum);
},changeImage:function(_64){
activeImage=_64;
Element.show("loading");
imageDetailsEffect.hide();
imageEffect.hide();
navEffect.hide();
Element.hide("prevLink");
Element.hide("nextLink");
Element.hide("numberDisplay");
imgPreloader=new Image();
imgPreloader.onload=function(){
Element.setSrc("lightboxImage",imageArray[activeImage][0]);
myLightbox.resizeImageContainer(imgPreloader.width,imgPreloader.height);
};
imgPreloader.src=imageArray[activeImage][0];
},resizeImageContainer:function(_65,_66){
this.wCur=Element.getWidth("outerImageContainer");
this.hCur=Element.getHeight("outerImageContainer");
wDiff=(this.wCur-borderSize*2)-_65;
hDiff=(this.hCur-borderSize*2)-_66;
reHeight=new fx.Height("outerImageContainer",{duration:resizeDuration});
reHeight.custom(Element.getHeight("outerImageContainer"),_66+(borderSize*2));
reWidth=new fx.Width("outerImageContainer",{duration:resizeDuration,onComplete:function(){
imageEffect.custom(0,1);
}});
reWidth.custom(Element.getWidth("outerImageContainer"),_65+(borderSize*2));
if((hDiff==0)&&(wDiff==0)){
if(navigator.appVersion.indexOf("MSIE")!=-1){
pause(250);
}else{
pause(100);
}
}
Element.setHeight("prevLink",_66);
Element.setHeight("nextLink",_66);
Element.setWidth("imageDataContainer",_65+(borderSize*2));
Element.setWidth("hoverNav",_65+(borderSize*2));
this.showImage();
},showImage:function(){
Element.hide("loading");
myLightbox.updateDetails();
this.preloadNeighborImages();
},updateDetails:function(){
Element.show("caption");
Element.setInnerHTML("caption",imageArray[activeImage][1]);
if(imageArray.length>1){
Element.show("numberDisplay");
Element.setInnerHTML("numberDisplay","Image "+eval(activeImage+1)+" of "+imageArray.length);
}
myLightbox.updateNav();
},updateNav:function(){
if(activeImage!=0){
Element.show("prevLink");
document.getElementById("prevLink").onclick=function(){
myLightbox.changeImage(activeImage-1);
return false;
};
}
if(activeImage!=(imageArray.length-1)){
Element.show("nextLink");
document.getElementById("nextLink").onclick=function(){
myLightbox.changeImage(activeImage+1);
return false;
};
}
this.enableKeyboardNav();
},enableKeyboardNav:function(){
document.onkeydown=this.keyboardAction;
},disableKeyboardNav:function(){
document.onkeydown="";
},keyboardAction:function(e){
if(e==null){
keycode=event.keyCode;
}else{
keycode=e.which;
}
key=String.fromCharCode(keycode).toLowerCase();
if((key=="x")||(key=="o")||(key=="c")){
myLightbox.end();
}else{
if(key=="p"){
if(activeImage!=0){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage-1);
}
}else{
if(key=="n"){
if(activeImage!=(imageArray.length-1)){
myLightbox.disableKeyboardNav();
myLightbox.changeImage(activeImage+1);
}
}
}
}
},preloadNeighborImages:function(){
if((imageArray.length-1)>activeImage){
preloadNextImage=new Image();
preloadNextImage.src=imageArray[activeImage+1][0];
}
if(activeImage>0){
preloadPrevImage=new Image();
preloadPrevImage.src=imageArray[activeImage-1][0];
}
},end:function(){
this.disableKeyboardNav();
Element.hide("lightbox");
imageEffect.toggle();
overlayEffect.custom(0.8,0);
showSelectBoxes();
}};
function getPageScroll(){
var _68;
if(self.pageYOffset){
_68=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
_68=document.documentElement.scrollTop;
}else{
if(document.body){
_68=document.body.scrollTop;
}
}
}
arrayPageScroll=new Array("",_68);
return arrayPageScroll;
}
function getPageSize(){
var _69,_6a;
if(window.innerHeight&&window.scrollMaxY){
_69=document.body.scrollWidth;
_6a=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_69=document.body.scrollWidth;
_6a=document.body.scrollHeight;
}else{
_69=document.body.offsetWidth;
_6a=document.body.offsetHeight;
}
}
var _6b,_6c;
if(self.innerHeight){
_6b=self.innerWidth;
_6c=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_6b=document.documentElement.clientWidth;
_6c=document.documentElement.clientHeight;
}else{
if(document.body){
_6b=document.body.clientWidth;
_6c=document.body.clientHeight;
}
}
}
if(_6a<_6c){
pageHeight=_6c;
}else{
pageHeight=_6a;
}
if(_69<_6b){
pageWidth=_6b;
}else{
pageWidth=_69;
}
arrayPageSize=new Array(pageWidth,pageHeight,_6b,_6c);
return arrayPageSize;
}
function getKey(e){
if(e==null){
keycode=event.keyCode;
}else{
keycode=e.which;
}
key=String.fromCharCode(keycode).toLowerCase();
if(key=="x"){
}
}
function listenKey(){
document.onkeypress=getKey;
}
function showSelectBoxes(){
selects=document.getElementsByTagName("select");
for(i=0;i!=selects.length;i++){
selects[i].style.visibility="visible";
}
}
function hideSelectBoxes(){
selects=document.getElementsByTagName("select");
for(i=0;i!=selects.length;i++){
selects[i].style.visibility="hidden";
}
}
function pause(_6e){
var now=new Date();
var _70=now.getTime()+_6e;
while(true){
now=new Date();
if(now.getTime()>_70){
return;
}
}
}
function initLightbox(){
myLightbox=new Lightbox();
}
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;
var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;
var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
function ControlVersion(){
var _71;
var axo;
var e;
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
_71=axo.GetVariable("$version");
}
catch(e){
}
if(!_71){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_71="WIN 6,0,21,0";
axo.AllowScriptAccess="always";
_71=axo.GetVariable("$version");
}
catch(e){
}
}
if(!_71){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
_71=axo.GetVariable("$version");
}
catch(e){
}
}
if(!_71){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
_71="WIN 3,0,18,0";
}
catch(e){
}
}
if(!_71){
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
_71="WIN 2,0,0,11";
}
catch(e){
_71=-1;
}
}
return _71;
}
function GetSwfVer(){
var _74=-1;
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _75=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _76=navigator.plugins["Shockwave Flash"+_75].description;
var _77=_76.split(" ");
var _78=_77[2].split(".");
var _79=_78[0];
var _7a=_78[1];
var _7b=_77[3];
if(_7b==""){
_7b=_77[4];
}
if(_7b[0]=="d"){
_7b=_7b.substring(1);
}else{
if(_7b[0]=="r"){
_7b=_7b.substring(1);
if(_7b.indexOf("d")>0){
_7b=_7b.substring(0,_7b.indexOf("d"));
}
}
}
var _74=_79+"."+_7a+"."+_7b;
}
}else{
if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){
_74=4;
}else{
if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){
_74=3;
}else{
if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){
_74=2;
}else{
if(isIE&&isWin&&!isOpera){
_74=ControlVersion();
}
}
}
}
}
return _74;
}
function DetectFlashVer(_7c,_7d,_7e){
versionStr=GetSwfVer();
if(versionStr==-1){
return false;
}else{
if(versionStr!=0){
if(isIE&&isWin&&!isOpera){
tempArray=versionStr.split(" ");
tempString=tempArray[1];
versionArray=tempString.split(",");
}else{
versionArray=versionStr.split(".");
}
var _7f=versionArray[0];
var _80=versionArray[1];
var _81=versionArray[2];
if(_7f>parseFloat(_7c)){
return true;
}else{
if(_7f==parseFloat(_7c)){
if(_80>parseFloat(_7d)){
return true;
}else{
if(_80==parseFloat(_7d)){
if(_81>=parseFloat(_7e)){
return true;
}
}
}
}
}
return false;
}
}
}
function AC_AddExtension(src,ext){
if(src.indexOf("?")!=-1){
return src.replace(/\?/,ext+"?");
}else{
return src+ext;
}
}
function AC_Generateobj(_84,_85,_86){
var str="";
if(isIE&&isWin&&!isOpera){
str+="<object ";
for(var i in _84){
str+=i+"=\""+_84[i]+"\" ";
}
str+=">";
for(var i in _85){
str+="<param name=\""+i+"\" value=\""+_85[i]+"\" /> ";
}
str+="</object>";
}else{
str+="<embed ";
for(var i in _86){
str+=i+"=\""+_86[i]+"\" ";
}
str+="> </embed>";
}
document.write(str);
}
function AC_FL_RunContent(){
var ret=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");
AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);
}
function AC_SW_RunContent(){
var ret=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);
AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);
}
function AC_GetArgs(_8b,ext,_8d,_8e,_8f){
var ret=new Object();
ret.embedAttrs=new Object();
ret.params=new Object();
ret.objAttrs=new Object();
for(var i=0;i<_8b.length;i=i+2){
var _92=_8b[i].toLowerCase();
switch(_92){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[_8b[i]]=_8b[i+1];
break;
case "src":
case "movie":
_8b[i+1]=AC_AddExtension(_8b[i+1],ext);
ret.embedAttrs["src"]=_8b[i+1];
ret.params[_8d]=_8b[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblclick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
case "id":
ret.objAttrs[_8b[i]]=_8b[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[_8b[i]]=ret.objAttrs[_8b[i]]=_8b[i+1];
break;
default:
ret.embedAttrs[_8b[i]]=ret.params[_8b[i]]=_8b[i+1];
}
}
ret.objAttrs["classid"]=_8e;
if(_8f){
ret.embedAttrs["type"]=_8f;
}
return ret;
}
