Lightbox.addMethods({start:function(d){hideSelectBoxes();hideFlash();var c=getPageSize();Element.setWidth("overlay",c[0]);Element.setHeight("overlay",c[1]);if(userAgent.indexOf("mac")!=-1&&userAgent.indexOf("firefox")!=-1||userAgent.indexOf("camino")!=-1){Element.show("overlay")}else{new Effect.Appear("overlay",{duration:overlayDuration,from:0,to:overlayOpacity})}elementArray=[];elementNum=0;if(!document.getElementsByTagName){return}var g=document.getElementsByTagName(d.tagName);if((d.getAttribute("rel")=="lightbox")){if(d.getAttribute("href").endsWith("swf")){elementArray.push(new Array(d.getAttribute("href"),d.getAttribute("title"),d.getAttribute("width"),d.getAttribute("height"),d.getAttribute("rev"),d.getAttribute("target"),d.getAttribute("preview"),d.getAttribute("startvideo")))}else{elementArray.push(new Array(d.getAttribute("href"),d.getAttribute("title")))}}else{for(var e=0;e<g.length;e++){var b=g[e];if(b.getAttribute("href")&&(b.getAttribute("rel")==d.getAttribute("rel"))){if(b.getAttribute("href").endsWith("swf")){elementArray.push(new Array(b.getAttribute("href"),b.getAttribute("title"),b.getAttribute("width"),b.getAttribute("height"),d.getAttribute("preview"),d.getAttribute("startvideo")))}else{elementArray.push(new Array(b.getAttribute("href"),b.getAttribute("title")))}}}elementArray.removeDuplicates();while(elementArray[elementNum][0]!=d.getAttribute("href")){elementNum++}}var a=getPageScroll();var h=a[1]+(c[3]/10);var f=a[0];Element.setTop("lightbox",h);Element.setLeft("lightbox",f);Element.show("lightbox");this.changeElement(elementNum)},showElement:function(){Element.hide("loading");if(elementArray[activeElement][0].endsWith("swf")){$("lightboximage").style.display="none";var e=$("lightboxswf");var f="";var d=elementArray[activeElement][2];var a=elementArray[activeElement][3];if(elementArray[activeElement][0].indexOf("videogallery")>0){f="<div id='containerVideoLightBox'></div>";d=485;a=40}e.innerHTML=f+'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'"><param name="movie" value="'+elementArray[activeElement][0]+'"/><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><param name="FlashVars" value="'+elementArray[activeElement][4]+'" /><param name="allowscriptaccess" value="always" /><param name="bgcolor" value="#ffffff" /><embed allowFullScreen="true" allowscriptaccess="always" bgcolor="#ffffff" src="'+elementArray[activeElement][0]+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="'+elementArray[activeElement][4]+'" width="'+d+'" height="'+a+'"></embed></object>';var c="";var b="";if(elementArray[activeElement][6]){c=elementArray[activeElement][6]}if(elementArray[activeElement][7]){b=elementArray[activeElement][7]}if(elementArray[activeElement][0].indexOf("videogallery")>0){createplayer(b,472,357,c,"containerVideoLightBox")}new Effect.Appear("lightboxswf",{duration:resizeDuration,queue:"end",from:0,to:100,afterFinish:function(){myLightbox.updateDetails()}})}else{$("lightboxswf").style.display="none";new Effect.Appear("lightboximage",{duration:resizeDuration,queue:"end",afterFinish:function(){myLightbox.updateDetails()}});this.preloadNeighborImages()}}});