/**
 * @id lightbox 
 * @version 1.4
 * @object for src see [filename].unpacked.js packed at http://shrinksafe.dojotoolkit.org/ 
 */
jQuery.lightbox={version:1.4,options:{loadingWidth:126,flashWidth:340,loadingSCR:"/global/lib/map/lightbox/loading.gif",loadingHTML:"<img id=\"lightBoxImageLoading\" width=\"126\" src=\"/global/lib/map/lightbox/loading.gif\">",closeHTML:"<img id=\"lightBoxImageClose\" src=\"/global/lib/map/lightbox/close.png\" title=\"close\" alt=\"close\">",closeHTMLB:"<img id=\"lightBoxImageCloseB\" src=\"/global/lib/map/lightbox/close.png\" title=\"close\" alt=\"close\">",cssURL:"/global/lib/map/lightbox/lightbox.css",flashTmplURL:"/global/lib/map/lightbox/templateflash.html",IDimg:"lightBoxImageLoading",IDclose:"lightBoxImageClose",IDcover:"lightBoxCover",IDcontent:"lightBoxContent",IDcontentI:"LightBoxContentInner",IDcontentO:"lightBoxContentOuter",imgTrigger:"lightbox",mpgTrigger:".mpg",bodyClassOpen:"lightBoxOpen",bufferTop:50,bufferMiddle:20},active:false,open:false,loaded:false,init:function(){if(jQuery.lightbox.loaded){return;}jQuery.lightbox.loaded=true;if(window.map&&map.jsSupportLevel<2){return;}var _1=document.createElement("div");_1.id=jQuery.lightbox.options.IDcover;var _2=document.createElement("div");_2.id=jQuery.lightbox.options.IDcontent;var _3=document.createElement("div");_3.id=jQuery.lightbox.options.IDcontentO;_3.appendChild(_2);$("head").append("<link rel=\"stylesheet\" href=\""+jQuery.lightbox.options.cssURL+"\" type=\"text/css\" />");$("body").append(_1);$("body").append(_3);(new Image).src=jQuery.lightbox.options.loadingSCR;$("a[href*='"+jQuery.lightbox.options.imgTrigger+"']").click(function(){$.lightbox.activatelink(this);return false;});$("a[href*='"+jQuery.lightbox.options.mpgTrigger+"']").click(function(){$.lightbox.activateflash(this);return false;});},activateflash:function(_4){if(jQuery.lightbox.active){return;}jQuery.lightbox.active=true;$("body").addClass(jQuery.lightbox.options.bodyClassOpen);var h=$(document).height();$("#"+jQuery.lightbox.options.IDcover).addClass("active").css({"height":h,"opacity":"0"}).fadeTo("fast",0.7,function(){$.lightbox.loadflash(_4);});},loadflash:function(_6,_7){$("#"+jQuery.lightbox.options.IDcontent).load(jQuery.lightbox.options.flashTmplURL,function(){$("#"+jQuery.lightbox.options.IDcontent).css({"left":jQuery.lightbox.position.getLeftPx(null,jQuery.lightbox.options.flashWidth),"top":jQuery.lightbox.position.getMiddlePx(),"width":jQuery.lightbox.options.flashWidth+"px","backgroundColor":"#fff"});});},activatelink:function(_8){if(jQuery.lightbox.active){return;}jQuery.lightbox.active=true;$("body").addClass(jQuery.lightbox.options.bodyClassOpen);var h=$(document).height();$("#"+jQuery.lightbox.options.IDcover).addClass("active").css({"height":h,"opacity":"0"}).fadeTo("fast",0.7,function(){$.lightbox.ready(_8);});$("#"+jQuery.lightbox.options.IDcontent).fadeIn();},ready:function(_a){$("#"+jQuery.lightbox.options.IDcontent).append(jQuery.lightbox.options.loadingHTML).css({"left":jQuery.lightbox.position.getLeftPx("#"+jQuery.lightbox.options.IDimg),"top":jQuery.lightbox.position.getMiddlePx(),"width":jQuery.lightbox.options.loadingWidth+"px"});$("#"+jQuery.lightbox.options.IDcover).click(jQuery.lightbox.close);jQuery.lightbox.pause(2000,function(){jQuery.lightbox.loadimage(_a);});},loadimage:function(_b){var _c=new Image;var _d=$(_b).find("img").eq(0);_c.alt=$(_d).attr("alt");_c.title=$(_d).attr("title");_c.longdesc=$(_d).attr("longdesc");_c.isready=false;$(_c).load(function(){if(_c.isready){return;}_c.isready=true;jQuery.lightbox.apendimage(_c,_b);});_c.src=_b.href;},apendimage:function(_e,_f){var _10=$(_e).clone().css({"position":"absolute","left":-9999,"top":-9999});$("body").append(_10);$("#"+jQuery.lightbox.options.IDcontent).find("img").eq(0).fadeOut("def",function(){jQuery.lightbox.displayimage(_e,_f);});},displayimage:function(img,_12){$("#"+jQuery.lightbox.options.IDcontent).empty().append(img).css({"left":jQuery.lightbox.position.getLeft(img),"top":jQuery.lightbox.position.getTopPx(),"width":img.offsetWidth+"px"});$(img).css({"opacity":1}).hide().fadeIn("def",function(){jQuery.lightbox.displayimagedetail(img);});jQuery.lightbox.active=false;},displayimagedetail:function(img){if((img.longdesc&&img.longdesc!="")||(img.title&&img.title!="")||(img.alt&&img.alt!="")){var _14="<div id=\""+jQuery.lightbox.options.IDcontentI+"\"><a class=\"close\">close</a><div class=\"content\"/></div>";$("#"+jQuery.lightbox.options.IDcontent).append(_14).find("a.close").click(jQuery.lightbox.close);if(img.longdesc&&img.longdesc!=""){$("#"+jQuery.lightbox.options.IDcontentI).hide();$("#"+jQuery.lightbox.options.IDcontent).find("div.content").load(img.longdesc,function(){$("#"+jQuery.lightbox.options.IDcontentI).fadeIn("slow",jQuery.lightbox.onopen);});}else{$("#"+jQuery.lightbox.options.IDcontentI).hide();$("#"+jQuery.lightbox.options.IDcontent).find("div.content").text(img.title||img.alt);$("#"+jQuery.lightbox.options.IDcontentI).fadeIn("def",jQuery.lightbox.onopen);}}else{jQuery.lightbox.onopen();}jQuery.lightbox.active=false;},onopen:function(){$("#"+jQuery.lightbox.options.IDcover).css({"height":$(document).height()+"px"});$("#"+jQuery.lightbox.options.IDcontent).append(jQuery.lightbox.options.closeHTML);$("#"+jQuery.lightbox.options.IDclose).hide().fadeIn().click(jQuery.lightbox.close);},close:function(){if(jQuery.lightbox.active){return;}jQuery.lightbox.active=true;$("#"+jQuery.lightbox.options.IDcontent).fadeOut("fast",function(){$("#"+jQuery.lightbox.options.IDcontent).empty();$("#"+jQuery.lightbox.options.IDcover).removeClass("active").fadeOut("def",jQuery.lightbox.onclose);});},onclose:function(){$("body").removeClass(jQuery.lightbox.options.bodyClassOpen);jQuery.lightbox.active=false;},pause:function(_15,fn){jQuery.lightbox.timer=null;clearTimeout(jQuery.lightbox.timer);jQuery.lightbox.timer=setTimeout(fn,_15);},position:{getLeft:function(_17,_18){var ew=(_17)?$(_17).width():0;var bw=$("body").innerWidth();var w=Math.floor((bw/2)-(ew/2));return w;},getLeftPx:function(_1c,_1d){return this.getLeft(_1c,_1d)+"px";},getTop:function(){var t=0;if(document.documentElement){t=document.documentElement.scrollTop;}else{if(self&&self.pageYOffset){t=self.pageYOffset;}}return Math.floor((t+jQuery.lightbox.options.bufferTop));},getTopPx:function(){return this.getTop()+"px";},getMiddle:function(){var bh=$(window).height();if($.browser.opera){bh=document.getElementsByTagName("html")[0].clientHeight;}var bm=jQuery.lightbox.options.bufferMiddle+jQuery.lightbox.options.bufferTop;return Math.floor(((bh/2)-bm)+this.getTop());},getMiddlePx:function(){return this.getMiddle()+"px";}}};$(document).ready(function(){jQuery.lightbox.init();});