/*
	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","dijit._CssStateMixin"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit._CssStateMixin"]){_4._hasResource["dijit._CssStateMixin"]=true;_4.provide("dijit._CssStateMixin");_4.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);_4.forEach(["onmouseenter","onmouseleave","onmousedown"],function(e){this.connect(this.domNode,e,"_cssMouseEvent");},this);_4.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(_7){this.watch(_7,_4.hitch(this,"_setStateClass"));},this);for(var ap in this.cssStateNodes){this._trackMouseState(this[ap],this.cssStateNodes[ap]);}this._setStateClass();},_cssMouseEvent:function(_8){if(!this.disabled){switch(_8.type){case "mouseenter":case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":this._set("active",true);this._mouseDown=true;var _9=this.connect(_4.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(_9);});break;}}},_setStateClass:function(){var _a=this.baseClass.split(" ");function _b(_c){_a=_a.concat(_4.map(_a,function(c){return c+_c;}),"dijit"+_c);};if(!this.isLeftToRight()){_b("Rtl");}if(this.checked){_b("Checked");}if(this.state){_b(this.state);}if(this.selected){_b("Selected");}if(this.disabled){_b("Disabled");}else{if(this.readOnly){_b("ReadOnly");}else{if(this.active){_b("Active");}else{if(this.hovering){_b("Hover");}}}}if(this._focused){_b("Focused");}var tn=this.stateNode||this.domNode,_d={};_4.forEach(tn.className.split(" "),function(c){_d[c]=true;});if("_stateClasses" in this){_4.forEach(this._stateClasses,function(c){delete _d[c];});}_4.forEach(_a,function(c){_d[c]=true;});var _e=[];for(var c in _d){_e.push(c);}tn.className=_e.join(" ");this._stateClasses=_a;},_trackMouseState:function(_f,_10){var _11=false,_12=false,_13=false;var _14=this,cn=_4.hitch(this,"connect",_f);function _15(){var _16=("disabled" in _14&&_14.disabled)||("readonly" in _14&&_14.readonly);_4.toggleClass(_f,_10+"Hover",_11&&!_12&&!_16);_4.toggleClass(_f,_10+"Active",_12&&!_16);_4.toggleClass(_f,_10+"Focused",_13&&!_16);};cn("onmouseenter",function(){_11=true;_15();});cn("onmouseleave",function(){_11=false;_12=false;_15();});cn("onmousedown",function(){_12=true;_15();});cn("onmouseup",function(){_12=false;_15();});cn("onfocus",function(){_13=true;_15();});cn("onblur",function(){_13=false;_15();});this.watch("disabled",_15);this.watch("readOnly",_15);}});}}};});