/*===========================================================================
	Library
	
	This JavaScript executes dynamic behaviors such as:
	* URL configuration
	* Vendor code configuration
	* Patching missing JavaScript features for certain browser versions.
	* Defines commonly used functions and variables.
===========================================================================*/

/* Configuration
===========================================================================*/

var WEB_ROOT        = "../";
var BEHAVIOR_ROOT   = "../_behavior/";
var ENCLOSURES_ROOT = "../_enclosures/";
var MEDIA_ROOT      = "../_media/";
var STYLE_ROOT      = "../_style/";
var VENDOR_ROOT     = "../_vendor/";

/* Fix background-image Flickering for a:hover in Internet Explorer
===========================================================================*/

/*
	No More IE6 Background Flicker - Cristi Balan
	http://evil.che.lu/2006/9/25/no-more-ie6-background-flicker
*/

try {
	document.execCommand("BackgroundImageCache", false, true);
} catch(e) {}

/* Fix abbr in Internet Explorer
===========================================================================*/
// http://intertwingly.net/blog/2008/01/22/Best-Standards-Support#c1201006277

document.createElement("abbr");

/* Fix Array Object for IE 5.0
===========================================================================*/

/*
	Based on code from sIFR
	http://www.mikeindustries.com/sifr/
*/

if (Array.prototype.push == null) {
	Array.prototype.push = function() {
		var i = 0, index = this.length, limit = arguments.length;
		
		while (i < limit) {
			this[index++] = arguments[i++];
		};
		
		return this.length;
	};
};

/* YUI Shortcuts ("Yawho?")
===========================================================================*/

/**
 * By including this code before loading yahoo.js, you will get global
 * scope references to YUI's main classes as they are loaded.
 * 
 * Object lookups (a.b..n) can hurt performance, and be annoying to type.
 * This code creates shortcuts for the main classes as they are registered.
 * YAHOO.util.Dom would be available as simply Dom. Same with Event.
 * Other classes such as YAHOO.util.KeyListener would remain the same.
 * 
 * Handle with care, YUI creates a single global variable intentionally.
 * Be sure that by using this you are not clashing with any other library.
 * 
 * @requires YAHOO 2.2.0+
 */

var YAHOO_config = {
	listener: function(module) {
		if (module.mainClass) {
			window[module.name.charAt(0).toUpperCase() + module.name.substr(1).toLowerCase()] = module.mainClass;
		}
	}//,
};
