text: dojo.provide("dojo.fx.Toggler");
  
  dojo.declare("dojo.fx.Toggler", null, {
  	// summary:
  	//		class constructor for an animation toggler. It accepts a packed
  	//		set of arguments about what type of animation to use in each
  	//		direction, duration, etc.
  	//
  	// example:
  	//	|	var t = new dojo.fx.Toggler({
  	//	|		node: "nodeId",
  	//	|		showDuration: 500,
  	//	|		// hideDuration will default to "200"
  	//	|		showFunc: dojo.wipeIn, 
  	//	|		// hideFunc will default to "fadeOut"
  	//	|	});
  	//	|	t.show(100); // delay showing for 100ms
  	//	|	// ...time passes...
  	//	|	t.hide();
  
  	// FIXME: need a policy for where the toggler should "be" the next
  	// time show/hide are called if we're stopped somewhere in the
  	// middle.
  
  	constructor: function(args){
  		var _t = this;
  
  		dojo.mixin(_t, args);
  		_t.node = args.node;
  		_t._showArgs = dojo.mixin({}, args);
  		_t._showArgs.node = _t.node;
  		_t._showArgs.duration = _t.showDuration;
  		_t.showAnim = _t.showFunc(_t._showArgs);
  
  		_t._hideArgs = dojo.mixin({}, args);
  		_t._hideArgs.node = _t.node;
  		_t._hideArgs.duration = _t.hideDuration;
  		_t.hideAnim = _t.hideFunc(_t._hideArgs);
  
  		dojo.connect(_t.showAnim, "beforeBegin", dojo.hitch(_t.hideAnim, "stop", true));
  		dojo.connect(_t.hideAnim, "beforeBegin", dojo.hitch(_t.showAnim, "stop", true));
  	},
  
  	// node: DomNode
  	//	the node to toggle
  	node: null,
  
  	// showFunc: Function
  	//	The function that returns the dojo._Animation to show the node
  	showFunc: dojo.fadeIn,
  
  	// hideFunc: Function	
  	//	The function that returns the dojo._Animation to hide the node
  	hideFunc: dojo.fadeOut,
  
  	// showDuration:
  	//	Time in milliseconds to run the show Animation
  	showDuration: 200,
  
  	// hideDuration:
  	//	Time in milliseconds to run the hide Animation
  	hideDuration: 200,
  
  	/*=====
  	_showArgs: null,
  	_showAnim: null,
  
  	_hideArgs: null,
  	_hideAnim: null,
  
  	_isShowing: false,
  	_isHiding: false,
  	=====*/
  
  	show: function(delay){
  		// summary: Toggle the node to showing
  		return this.showAnim.play(delay || 0);
  	},
  
  	hide: function(delay){
  		// summary: Toggle the node to hidden
  		return this.hideAnim.play(delay || 0);
  	}
  });
  