/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.image.LightboxNano"],["require","dojo.fx"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.image.LightboxNano"]){_4._hasResource["dojox.image.LightboxNano"]=true;_4.provide("dojox.image.LightboxNano");_4.require("dojo.fx");var _7="absolute",_8="visibility",_9=function(){var _a=(_4.doc.compatMode=="BackCompat")?_4.body():_4.doc.documentElement,_b=_4._docScroll();return {w:_a.clientWidth,h:_a.clientHeight,l:_b.x,t:_b.y};};_4.declare("dojox.image.LightboxNano",null,{href:"",duration:500,preloadDelay:5000,constructor:function(p,n){var _c=this;_4.mixin(_c,p);n=_c._node=_4.byId(n);if(n){if(!/a/i.test(n.tagName)){var a=_4.create("a",{href:_c.href,"class":n.className},n,"after");n.className="";a.appendChild(n);n=a;}_4.style(n,"position","relative");_c._createDiv("dojoxEnlarge",n);_4.setSelectable(n,false);_c._onClickEvt=_4.connect(n,"onclick",_c,"_load");}if(_c.href){setTimeout(function(){(new Image()).src=_c.href;_c._hideLoading();},_c.preloadDelay);}},destroy:function(){var a=this._connects||[];a.push(this._onClickEvt);_4.forEach(a,_4.disconnect);_4.destroy(this._node);},_createDiv:function(_d,_e,_f){return _4.create("div",{"class":_d,style:{position:_7,display:_f?"":"none"}},_e);},_load:function(e){var _10=this;e&&_4.stopEvent(e);if(!_10._loading){_10._loading=true;_10._reset();var i=_10._img=_4.create("img",{style:{visibility:"hidden",cursor:"pointer",position:_7,top:0,left:0,zIndex:9999999}},_4.body()),ln=_10._loadingNode,n=_4.query("img",_10._node)[0]||_10._node,a=_4.position(n,true),c=_4.contentBox(n),b=_4._getBorderExtents(n);if(ln==null){_10._loadingNode=ln=_10._createDiv("dojoxLoading",_10._node,true);var l=_4.marginBox(ln);_4.style(ln,{left:parseInt((c.w-l.w)/2)+"px",top:parseInt((c.h-l.h)/2)+"px"});}c.x=a.x-10+b.l;c.y=a.y-10+b.t;_10._start=c;_10._connects=[_4.connect(i,"onload",_10,"_show")];i.src=_10.href;}},_hideLoading:function(){if(this._loadingNode){_4.style(this._loadingNode,"display","none");}this._loadingNode=false;},_show:function(){var _11=this,vp=_9(),w=_11._img.width,h=_11._img.height,vpw=parseInt((vp.w-20)*0.9),vph=parseInt((vp.h-20)*0.9),dd=_4.doc,bg=_11._bg=_4.create("div",{style:{backgroundColor:"#000",opacity:0,position:_7,zIndex:9999998}},_4.body()),ln=_11._loadingNode;if(_11._loadingNode){_11._hideLoading();}_4.style(_11._img,{border:"10px solid #fff",visibility:"visible"});_4.style(_11._node,_8,"hidden");_11._loading=false;_11._connects=_11._connects.concat([_4.connect(dd,"onmousedown",_11,"_hide"),_4.connect(dd,"onkeypress",_11,"_key"),_4.connect(window,"onresize",_11,"_sizeBg")]);if(w>vpw){h=h*vpw/w;w=vpw;}if(h>vph){w=w*vph/h;h=vph;}_11._end={x:(vp.w-20-w)/2+vp.l,y:(vp.h-20-h)/2+vp.t,w:w,h:h};_11._sizeBg();_4.fx.combine([_11._anim(_11._img,_11._coords(_11._start,_11._end)),_11._anim(bg,{opacity:0.5})]).play();},_sizeBg:function(){var dd=_4.doc.documentElement;_4.style(this._bg,{top:0,left:0,width:dd.scrollWidth+"px",height:dd.scrollHeight+"px"});},_key:function(e){_4.stopEvent(e);this._hide();},_coords:function(s,e){return {left:{start:s.x,end:e.x},top:{start:s.y,end:e.y},width:{start:s.w,end:e.w},height:{start:s.h,end:e.h}};},_hide:function(){var _12=this;_4.forEach(_12._connects,_4.disconnect);_12._connects=[];_4.fx.combine([_12._anim(_12._img,_12._coords(_12._end,_12._start),"_reset"),_12._anim(_12._bg,{opacity:0})]).play();},_reset:function(){_4.style(this._node,_8,"visible");_4.destroy(this._img);_4.destroy(this._bg);this._img=this._bg=null;this._node.focus();},_anim:function(_13,_14,_15){return _4.animateProperty({node:_13,duration:this.duration,properties:_14,onEnd:_15?_4.hitch(this,_15):null});},show:function(_16){_16=_16||{};this.href=_16.href||this.href;var n=_4.byId(_16.origin),vp=_9();this._node=n||_4.create("div",{style:{position:_7,width:0,hieght:0,left:(vp.l+(vp.w/2))+"px",top:(vp.t+(vp.h/2))+"px"}},_4.body());this._load();if(!n){_4.destroy(this._node);}}});}}};});