/** DOM utility methods */
HD.util.DOM = {
	/**
	 * Attaches a callback to fire when the DOM is ready
	 * @param {function} callback The callback to fire
	 */
	onDOMReady : function(callback) {
		YAHOO.util.Event.onDOMReady(callback);
	},
	
	/**
	 * Attaches a callback to fire when an element is ready
	 * @param {string} element The ID of the element to poll
	 * @param {function} callback The callback to fire
	 */
	onAvailable : function(element, callback) {
		YAHOO.util.Event.onAvailable(element, callback);
	},
	
	/**
	 * Attaches a callback to fire when an element's child content is ready
	 * @param {HTMLElement|string} element The ID or reference of the element track
	 * @param {function} callback The callback to fire
	 */
	onContentReady : function(element, callback) {
		YAHOO.util.Event.onContentReady(element, callback);
	},
	
	/**
	 * Hides an element (adds class "hdHidden")
	 * @param {HTMLElement|string} element The ID or reference of the element
	 */
	hide : function(element) {
		HD.addClass(element, HD.CSS_CLASSES.HIDDEN);
	},
	
	/**
	 * Shows an element (removes class "hdHidden")
	 * @param {HTMLElement|string} element The ID or reference of the element
	 */
	show : function(element) {
		HD.removeClass(element, HD.CSS_CLASSES.HIDDEN);
	}
};
