/*===========================================================================
	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 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;
	};
};

/* Allows correct styling for abbr tag in IE6
===========================================================================*/
document.createElement("abbr");

/* Browser compatible logging
===========================================================================*/
function log(message) {
	if (window.console) {
		console.log(message);
	}
}
