/*
	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.widget.UpgradeBar"],["require","dojo.window"],["require","dojo.fx"],["require","dojo.cookie"],["require","dijit._Widget"],["require","dijit._Templated"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.widget.UpgradeBar"]){_4._hasResource["dojox.widget.UpgradeBar"]=true;_4.provide("dojox.widget.UpgradeBar");_4.require("dojo.window");_4.require("dojo.fx");_4.require("dojo.cookie");_4.require("dijit._Widget");_4.require("dijit._Templated");_4.experimental("dojox.widget.UpgradeBar");_4.declare("dojox.widget.UpgradeBar",[_5._Widget,_5._Templated],{notifications:[],buttonCancel:"Close for now",noRemindButton:"Don't Remind Me Again",templateString:_4.cache("dojox.widget","UpgradeBar/UpgradeBar.html","<div class=\"dojoxUpgradeBar\">\r\n\t<div class=\"dojoxUpgradeBarMessage\" dojoAttachPoint=\"messageNode\">message</div>\r\n\t<div class=\"dojoxUpgradeBarReminderButton\" dojoAttachPoint=\"dontRemindButtonNode\" dojoAttachEvent=\"onclick:_onDontRemindClick\">${noRemindButton}</div>\r\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dojoxUpgradeBarCloseIcon\" dojoAttachEvent=\"onclick: hide, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave\" title=\"${buttonCancel}\"></span>\r\n</div>\r\n"),constructor:function(_7,_8){if(!_7.notifications&&_8){_4.forEach(_8.childNodes,function(n){if(n.nodeType==1){var _9=_4.attr(n,"validate");this.notifications.push({message:n.innerHTML,validate:function(){var _a=true;try{_a=_4.eval(_9);}catch(e){}return _a;}});}},this);}},checkNotifications:function(){if(!this.notifications.length){return;}for(var i=0;i<this.notifications.length;i++){var _b=this.notifications[i].validate();if(_b){this.notify(this.notifications[i].message);break;}}},postCreate:function(){this.inherited(arguments);if(this.domNode.parentNode){_4.style(this.domNode,"display","none");}_4.mixin(this.attributeMap,{message:{node:"messageNode",type:"innerHTML"}});if(!this.noRemindButton){_4.destroy(this.dontRemindButtonNode);}if(_4.isIE==6){var _c=this;var _d=function(){var v=_4.window.getBox();_4.style(_c.domNode,"width",v.w+"px");};this.connect(window,"resize",function(){_d();});_d();}_4.addOnLoad(this,"checkNotifications");},notify:function(_e){if(_4.cookie("disableUpgradeReminders")){return;}if(!this.domNode.parentNode||!this.domNode.parentNode.innerHTML){document.body.appendChild(this.domNode);}_4.style(this.domNode,"display","");if(_e){this.set("message",_e);}},show:function(){this._bodyMarginTop=_4.style(_4.body(),"marginTop");this._size=_4.contentBox(this.domNode).h;_4.style(this.domNode,{display:"block",height:0,opacity:0});if(!this._showAnim){this._showAnim=_4.fx.combine([_4.animateProperty({node:_4.body(),duration:500,properties:{marginTop:this._bodyMarginTop+this._size}}),_4.animateProperty({node:this.domNode,duration:500,properties:{height:this._size,opacity:1}})]);}this._showAnim.play();},hide:function(){if(!this._hideAnim){this._hideAnim=_4.fx.combine([_4.animateProperty({node:_4.body(),duration:500,properties:{marginTop:this._bodyMarginTop}}),_4.animateProperty({node:this.domNode,duration:500,properties:{height:0,opacity:0}})]);_4.connect(this._hideAnim,"onEnd",this,function(){_4.style(this.domNode,"display","none");});}this._hideAnim.play();},_onDontRemindClick:function(){_4.cookie("disableUpgradeReminders",true,{expires:3650});this.hide();},_onCloseEnter:function(){_4.addClass(this.closeButtonNode,"dojoxUpgradeBarCloseIcon-hover");},_onCloseLeave:function(){_4.removeClass(this.closeButtonNode,"dojoxUpgradeBarCloseIcon-hover");}});}}};});