Date.prototype.getAPStyleMonth = function() {
	switch(this.getMonth()) {
		case  0: return 'Jan.';
		case  1: return 'Feb.';
		case  2: return 'March';
		case  3: return 'April';
		case  4: return 'May';
		case  5: return 'June';
		case  6: return 'July';
		case  7: return 'Aug.';
		case  8: return 'Sept.';
		case  9: return 'Oct.';
		case 10: return 'Nov.';
		case 11: return 'Dec.';
	}
};
Date.prototype.getAPStyleTime = function() {
	var h, m, a;
	h = this.getHours();
	a = (h > 11) ? ' p.m.' : ' a.m.';
	if (h === 0) { return 'midnight'; }
	else if (h === 12) { return 'noon';}
	else if (h > 11) { h -= 12;}
	m = this.getMinutes();
	if (m === 0) { m = ''}
	else if (m < 10) { m = ':0' + m;}
	else { m = ':' + m;}
	return h + m + a;
};
Date.prototype.getDayName = function() { return (["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"])[this.getDay()];}
Element.addMethods({getOuterHTML: function(element){ if(element.outerHTML){ return element.outerHTML}; var parent = element.parentNode; var el = document.createElement(parent.tagName); el.appendChild(element);var shtml = el.innerHTML; parent.appendChild(element); return shtml;}});
Object.extend(String, {truncateAtLastWord: function(intLength){try{ var tStr = (new String(this)).truncate(intLength); if(tStr.endsWith('...')){ return (new String(this)).truncate(((tStr.lastIndexOf(' ')+1)+3));}else{return this;}}catch(e){nfl.log(e.message)}}});
Object.extend(Prototype.Browser,{Version: (navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1]});
Function.prototype.defaults = function(origArgs) { for (var i = 0, j = 1; j < arguments.length; i++, j++) { if (typeof origArgs[i] == 'undefined') origArgs[i] = arguments[j];}}
document.cookies	= function(){
	return {
		getValue: function(offset){ var endstr = document.cookie.indexOf (";", offset); if (endstr == -1){endstr = document.cookie.length;}; return unescape(document.cookie.substring(offset, endstr));},
		get: function(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) { return document.cookies.getValue(j); }; i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return "";},
		set: function(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");},
		remove: function(name,path,domain) { if (document.cookies.get(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";}},
		getExipiry: function(days, hours, minutes) {var expDate = new Date( ); if(typeof days == "number" && typeof hours == "number" && typeof hours == "number") {expDate.setDate(expDate.getDate( ) + parseInt(days));expDate.setHours(expDate.getHours( ) + parseInt(hours));expDate.setMinutes(expDate.getMinutes( ) + parseInt(minutes));return expDate.toGMTString( );}}
	}
}()
document.insertAfter=function(new_node, existing_node){try{if(existing_node.next()){ existing_node.parentNode.insertBefore(new_node,existing_node.next());}else{ existing_node.parentNode.appendChild(new_node); }}catch(err){console.log("insertAfter Error: "+ err.message);}}		
document.include=function(path){var curScriptsRoot=""; var curScriptName=path; curScriptName='imported-js-'+ curScriptName.substring(curScriptName.lastIndexOf('/')+1,curScriptName.lastIndexOf('.js')).replace('.','-'); if(path.indexOf('http://') === -1){	var curScripts = document.getElementsByTagName("script"); for(s=1;s<curScripts.length;s++){try{ if(curScripts[s].src !== ''){ var curScriptsRootTemp = (curScripts[s].src); if(curScriptsRootTemp.indexOf("/scripts")){ curScriptsRoot = curScriptsRootTemp; curScriptsRoot = curScriptsRoot.substring(0,curScriptsRoot.indexOf("/scripts")); break; }}}catch(e){}}}; var headEle	= document.getElementsByTagName("head")[0]; var scriptEle = document.createElement('script'); scriptEle.id = curScriptName; scriptEle.type = 'text/javascript'; scriptEle.src = (curScriptsRoot + path); headEle.appendChild(scriptEle);};
/*
 * Creates a cross browser "window:hashchange" event
 * using the document object. 
 * patches in the native support for IE8's 'window.hashchange' event.
 * simulates native 'window.hashchange' event for dom compliant browsers.
 *
 * usage:
 * document.observe('window:hashchange',func);
 */
Event.observe(window,'hashchange',function(event){ document.fire('window:hashchange'); });
document.observe('dom:loaded',function(){
	if(!((!!(window.attachEvent && !window.opera)) && parseInt((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1]) >= 8)){
		window.__hash = location.hash;	
		setInterval((function(){ if(window.__hash != location.hash){
			window.__hash = location.hash;
			var event;
			if (document.createEvent && window.dispatchEvent) {
				event = document.createEvent("UIEvents");
				event.initUIEvent('hashchange', true, true,window,window.__hash);
				event.eventName = 'hashchange';
				event.memo = {};
				window.dispatchEvent(event);
			}else{
				document.fire('window:hashchange');
			}
		}}), 200);
	}
});
window.location.hashparams = function(){
	return {
		getStringFromHash: function(hashObj){
			var retStr = '';
			hashObj.each(function(pair){
				if(hashObj.keys().sort().indexOf(pair.key) > -1){
					if(pair.key != pair.value){
						retStr += (pair.key+':'+pair.value +'/');
					}else{
						retStr += (pair.value +'/');
					}
				}
			});
			return (retStr.substring(0,retStr.length - 1));
		},
		getHashFromString: function(stringObj){
			nfl.log("getHashFromString: type of stringObj = "+(typeof stringObj));
			if(stringObj.strip() == ''){ return null; }
			var hashParams	= stringObj.split('/');
			var actParams	= new Hash();
			for(ap=0; ap < hashParams.length; ap++){
				if(hashParams[ap].indexOf(':') > -1){
					paramSet	= hashParams[ap].split(':');
					actParams.set(paramSet[0],paramSet[1]);
				}else{
					actParams.set(hashParams[ap],hashParams[ap]);
				}
			}
			return actParams
		},
		get: function(){ return window.location.hashparams.getHashFromString(location.hash.replace('#',''));},
		set: function(hashParams){ location.hash	= ("#"+ (window.location.hashparams.getStringFromHash(hashParams))); location = location;}
	}
}()
if (!window.console || !console.firebug){
	if(document.cookies.get('debug') == 'true'){ 
		document.include('http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js');
	}else{
		var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
		window.console = {}; for (var i = 0; i < names.length; ++i){ window.console[names[i]] = function() {}}
	}
}
document.observe("dom:ready",function(){
	if(!document.ready){ document.ready = true; document.fire("dom:beforeloaded");}
	if(!document.loaded){ document.loaded = true; document.fire("dom:loaded");}
});

if(typeof nfl=="undefined"){ var nfl={}; } 
if(typeof nfl.created=="undefined"){ nfl.created=false; }
if(!nfl.created){
	/**
	 * Creates new namespaces under the nfl namespace
	 * @param {String} The name of the new namespace
	 */
	nfl.namespace=function(){ var a=arguments,o=null,i,j,d;for(i=0;i<a.length;++i){d=a[i].split(".");o=nfl;for(j=(d[0]=="nfl")?1:0;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}} return o;};
	nfl.namespace("ui","util","global");

	/**
	 * Loads in the enviromental variables defined in the commons_js
	 */
	nfl.global.imagepath			= n_imagepath;
	nfl.global.scriptpath			= n_scriptpath;
	nfl.global.flashpath			= n_flashpath;
	nfl.global.debugenabled			= ((new String(location.hostname).indexOf('localhost')) > -1 || (new String(location.hostname).indexOf('local.nfl.com')) > -1)? true : false;
	nfl.global.ENV					= n_environment;
	nfl.global.SITELIFE_URL			= typeof n_sitelife === 'undefined' ? 'http://pluck.nfl.com' : n_sitelife;
	if(typeof n_searchdomain != 'undefined'){
		nfl.global.searchdomain			= (n_searchdomain.indexOf(':') > -1)? n_searchdomain.substring(0,n_searchdomain.indexOf(':')):n_searchdomain;
	}else{
		nfl.global.searchdomain			= 'search.nfl.com'; /*just hardcode to prod search */
	}
	
	/**
	 * document.domain is required for third-party integration (sitelife)
	 * Sets any sub-domain of nfl.com to nfl.com, but does not affect localhost
	 **/
	document.domain = window.location.hostname.match(/([^\.\/]*\.?[^\.\/]+)$/)[1];
	
	/**
	 * Holds information about the users browser
	 * @returns {Object}  
	 */
	nfl.util.Browser				= { IE: !!(window.attachEvent && !window.opera), Opera: !!window.opera, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1}
	/**
	 * holds information about the clients user agent
	 * @returns {String}  
	 */
	nfl.util.Agent					= navigator.userAgent.toLowerCase();
	/**
	 * holds information about the clients Platform
	 * @returns {Object}  
	 */
	nfl.util.Platform				= { Apple: nfl.util.Agent.indexOf("mac")!=-1, Win: nfl.util.Agent.indexOf("win")!=-1}
	/**
	 */
	nfl.util.Server					= {Protocol: window.location.protocol, Host: window.location.hostname, Port: window.location.port, Path: window.location.pathname}
	/**
	 * Writes a message to the console(if available)
	 * @param {String} message The message to write
	 */
	nfl.log							= function(message,type){ try{ console.log(message); }catch(err){ }};
	nfl.log("loading nfl.js..");
	/**
	 * Checks a string against null, and if
	 * the string is null returns an empty string. Otherwise
	 * returns the string 
	 * @param {String} str The string to compare
	 * @returns {String}
	 */
	nfl.util.isNull					= function(str){ return (str === null) ? '' : str;}

	/**
	 * Initialize nfl.util.cookies namespace 
	 * Functions in this namespace are for cookie manipulation.
	 */
	nfl.namespace("util.cookies"); nfl.util.cookies.getCookieVal = document.cookies.getValue; nfl.util.cookies.getExpDate = document.cookies.getExipiry; nfl.util.cookies.getCookie = document.cookies.get; nfl.util.cookies.setCookie = document.cookies.set; nfl.util.cookies.deleteCookie = document.cookies.remove; var getExpDate = document.cookies.getExipiry; var getCookieVal = document.cookies.getValue; var getCookie = document.cookies.get; var setCookie = document.cookies.set; var deleteCookie = document.cookies.remove;
	nfl.namespace('nfl.events');
	/**
	 * functions and properties for manipulating ads
	 * @author arianna.winters
	 * @namespace nfl
	 * @requires nfl
	 */
	nfl.namespace("nfl.ads");
	nfl.ads.collection	= [];
	nfl.ads.visibleAds	= 0;
	nfl.ads.hasRotating = false;
	nfl.ads.rotationInterval = 30;
	nfl.ads.internal	= (typeof n_internal_ads !== 'undefined')?n_internal_ads:false;
	/**
	 * ad object
	 * @author arianna.winters
	 * @namespace nfl.ads
	 * @class nfl.ads.Ad
	 * @requires nfl.ads
	 */
	nfl.ads.Ad	= Class.create();
	nfl.ads.Ad.prototype	= {
		initialize: function(div, params, options) {
			this.pathOnly = (options.pathOnly)?true:false;
			this.params	= params;
			this.options = (typeof options === 'undefined')?{}:options;
			this.tile	= (nfl.ads.collection.length + 1)
			this.rotate	= (typeof options.rotating == 'undefined')? false:options.rotating;
			this.onload	= (options.onload)?' onload="'+options.onload+'"':'';
			this.url	= (typeof this.options.url !== 'undefined')?this.options.url:this.getUrl();
			this.options.write	= (typeof this.options.write === 'undefined')?true:this.options.write;
			
			if(!this.pathOnly){
				this.adClassInt	= (nfl.ads.visibleAds + 1);
				var el, count, url;
				if(!div.id){ div, this.tile }
				el			= $(div);
				el.addClassName('ad'+this.adClassInt);
				this.id		= (el.id + '-iframe') || ("ad" + this.adClassInt +'-iframe');
				if(this.options.write){el.innerHTML = this.getIframeHTML();}
				nfl.ads.add(this);
				el = null;
			}else{
				this.adClassInt	= false;
				nfl.ads.add(this);
				return (this.params.replace('#{tile}',this.tile) +';ord=' + adRandom + '?');
			}
		},
		getInternal: function(){
			if(typeof nfl.ads.internal !== 'undefined'){
				for(var adi=0,adl=nfl.ads.internal.length; adi < adl; adi++){
					var matchesAll	= (nfl.ads.internal[adi].length > 0)?true:false;
					for(var adifl=0; adifl < nfl.ads.internal[adi].length; adifl++){
						var match	= nfl.ads.internal[adi][adifl];
						//console.log('getInternal doing a crit match on '+ match.id+' '+match.type+' for '+match.match);
						if(match.type == 'global'){
							//console.log(window.location.domain +'!=='+ match.match +'?'+(window.location.domain !== match.match));
							if(window.location.domain !== match.match){ matchesAll = false; break; }
						}	
						if(match.type == 'url'){
							//console.log(window.location.pathname +'!=='+ match.match +'?'+(window.location.pathname !== match.match));
							if(window.location.pathname !== match.match){ matchesAll = false; break; }
						}
						if(match.type == 'section'){
							//console.log(window.location.pathname +'.indexOf('+ match.match +') !== 0?'+(window.location.pathname.indexOf(match.match) !== 0));
							if(window.location.pathname.indexOf(match.match) !== 0){ matchesAll = false; break; }
						}
						if(match.type == 'slot'){
							//console.log(this.options.slot +'!=='+ match.match +'?'+(this.options.slot !== match.match));
							if(this.options.slot !== match.match){ matchesAll = false; break; }
						}
					}
					if(matchesAll){
						/* this guy matches the subset criteria, replace him */
						return ('http://www.nfl.com/widgets/ads-served-by-nfl/' + this.options.width + 'x' + + this.options.height + '?template=basic-html-structure&confirm=true');
						//break;
					}
				}
			}
			return false
		},
		getUrl: function(){
			var mInt	= this.getInternal();
			if (mInt) {
				/* do something funny */
				this.url		= mInt;
				this.getInternal	= function(){return mInt};
			}else{
				if(this.tile == 1 && this.options.slot != 'inpage' && this.options.slot != 'videogallery') { 
					var path = window.location.pathname;
					/* if (path != "/" && path != "/home") this.params += ";dcopt=ist"; */ // the homepage 728x90 should not have the dcopt value
					this.params += ";dcopt=ist"; /* applying this to the homepage because OAO said it should be site wide.  i'll keep the above line commented out in case we need it. */
				}
				this.url		= 'http://ad.doubleclick.net/adi/'+ this.params.replace('#{tile}',this.tile) +';ord=' + adRandom + '?';
			}
			return this.url;
		},
		update: function() {
			//nfl.log("reload #"+ this.adClassInt);
			this.url	= this.getUrl(); /* we do this to grab a different ad url */
			this.write();
		},
		write: function(){
			$(this.id).up().update(this.getIframeHTML());
		},
		getIframeHTML: function(){
			var retStr		= (this.options.transparent != true)?'<iframe src="'+ this.url +'" id="' + this.id + '" name="' + this.id + '" width="' + this.options.width + '" height="' + this.options.height + '" frameborder="0" scrolling="no"'+ this.onload +'></iframe>':'<iframe src="'+ this.url +'" id="' + this.id + '" name="' + this.id + '" width="' + this.options.width + '" height="' + this.options.height + '" allowTransparency="true" frameborder="0" scrolling="no"'+ this.onload +'></iframe>';
			return retStr
		}
	}
	nfl.ads.rotation	= new (Class.create({
		initialize:function(){
			this.elapsor	= null;
			this.rotator	= null;
			this.interval	= 30; /* we assign a default of 30 just in case */
			this.useElapsed = false;
		},
		rotate: function(){
			//console.info('nfl.ads.rotate');
			var __log	= '';
			nfl.ads.random(); //first update the adRandom var
			nfl.ads.collection.each(function(Ad){if(Ad.rotate){ Ad.update(Ad); __log +='#'+Ad.adClassInt+' "'+ Ad.id+'" rotated.\n'; /* this is a rotating ad, rotate it */ }else{ __log +='#'+Ad.adClassInt+' "'+ Ad.id+'" not rotated.\n'; }});
			console.log('nfl.ads.rotate ('+ this.interval +' secs)\n'+ __log);
			this.elapsed = 0;
			/* start elapsor when useElapsed changed to true without a rotator restart */
			if(this.useElapsed && this.elapsor == null){ this.elapsor	= new PeriodicalExecuter(this.countElapsed, 1);}
		},
		start: function(){
			/* make sure this thing is stopped first */
			if(this.rotator !== null){ this.stop(); }
			if(this.useElapsed){
				var __elapsed	= (typeof this.elapsed !== 'undefined')?this.elapsed:0;
				if(__elapsed > 0 && nfl.ads.rotationInterval > __elapsed){
					/* start from last spot */
					var sp	= (nfl.ads.rotationInterval - __elapsed);
					setTimeout(function(){ this.elapsed = 0; this.start(); }.bind(this),sp);
					return;
				}
				/* start elapsed counter */
				this.elapsor	= new PeriodicalExecuter(this.countElapsed.bind(this), 1);
			}
			/* start rotator */
			this.rotator = new PeriodicalExecuter(this.rotate.bind(this), this.interval);
		},
		stop: function(){
			if(this.rotator !== null){this.rotator.stop(); this.rotator = null; }
			if(this.useElapsed && this.elapsor !== null){this.elapsor.stop(); this.elapsor = null;}
			this.elapsed = 0;
		},
		pause: function(){
			/* leave elapsed */
			if(this.rotator !== null){this.rotator.stop(); this.rotator = null; }
			if(this.useElapsed && this.elapsor !== null){this.elapsor.stop(); this.elapsor = null;}
		},
		countElapsed: function(){
			this.elapsed++;
			if(this.elapsed === this.interval){this.elapsed = 0;}
		}
	}))();

	nfl.ads.add	= function(Ad){
		var adIndex	= nfl.ads.collection.length;
		nfl.ads.collection.each(function(Adi,ind){
			if(Adi.id == Ad.id){adIndex = ind; throw $break;}
		}.bind(this));
		
		if(!Ad.pathOnly){
			if(Ad.rotate == true){ 
				nfl.log("ad #"+ Ad.adClassInt +" is a rotating ad"); 
			}else{
				nfl.log("ad #"+ Ad.adClassInt +" is not a rotating ad"); 
			}
			if(Ad.rotate == true && nfl.ads.hasRotating == false){
				/* has not had any previous rotating ads */
				nfl.ads.hasRotating	= true;
				if(document.loaded){ nfl.ads.rotation.start(); }else{ document.observe("dom:loaded",function(){ nfl.ads.rotation.start(); }); }
			}
			if(adIndex === nfl.ads.collection.length){ nfl.ads.visibleAds++; }
		}
		nfl.ads.collection[adIndex] = Ad;
	}
	/**
	 * Generates new random number 
	 * for use in creating sets of ads.
	 * @return {Integer}
	 */
	nfl.ads.random	= function(){ adRandom	= (Math.random() * 1000); return adRandom; };
	nfl.ads.random();
	
	/**
	 * Image Preloading functions.
	 */
	nfl.namespace("nfl.util.images.preloader");
	nfl.util.images.preloader.notFoundImg	= null;
	nfl.util.images.preloader.checks		= {generic: function(image){ image.src = notFoundImg.src; }};
	nfl.util.images.preloader.loadImages	= function(){ 
		var imagesToPreload = arguments; var preloadedImages = [];
		for(var i = 0; i < imagesToPreload.length; i++) { preloadedImages[i] = document.createElement('img'); preloadedImages[i].src = imagesToPreload[i];} return preloadedImages;
	};
	nfl.util.images.preloader.loadImages2	= function(){
		var imagesToPreload = arguments[0]; var preloadedImages = [];
		for(var i = 0; i < imagesToPreload.length; i++) { preloadedImages[i] = new Image(); preloadedImages[i].src = imagesToPreload[i]; } return preloadedImages;
	};
	nfl.util.images.preloader.loadImages3	= function() {
		var imagesToPreload = arguments[0]; var preloadedImages = [];
		for(var i = 0; i < imagesToPreload.length; i++) { var c = i + 1; $('sr_image' + c).src = imagesToPreload[i]; } return preloadedImages;
	};
	var preloadImages		= nfl.util.images.preloader.loadImages; var preloadImages2	= nfl.util.images.preloader.loadImages2; var preloadImages3	= nfl.util.images.preloader.loadImages3;

	/**
	 * Open a new pop up window.
	 * @param {string} url the url of the window.
	 * @param {string} panelName the name of the window.
	 * @param [{object}] an object containing key-value pairs of window attributes to overide the defaults
	 */
	nfl.util.openPopWindow	= function(url, name){
		var win_args		= '';
		var win_options		= {width:800,height:600,toolbar:0,scrollbar:'auto'}
		if(typeof arguments[2] == 'object'){
			for(var argName in arguments[2]) { win_options[argName] = arguments[2][argName]; }
			for(var argName in win_options) { win_args += (argName+"="+win_options[argName]+","); }
			win_args		= win_args.substring(0,(win_args.length - 1));
		}
		if(typeof arguments[2] == 'number' && typeof arguments[3] == 'number'){
			win_args		= 'width='+ arguments[2] +',height='+ arguments[3] +',toolbar=0,scrollbar=auto';
		}
		if(typeof arguments[2] == 'string'){
			win_args		= arguments[2];
		}
		var win				= window.open(url,name,win_args);
		win.focus();
	};
	var $openWindow			= nfl.util.openPopWindow; //shorthand pointer
	/**
	 * Sends a Micro Level call to Omniture to track links.  Originally created for use by the Scorestrip.
	 * @param {string} linkName: the name of the link to track via Omniture.
	 * @param {string} propValue: the value of prop35.  this can be different form linkName.
	 */
	nfl.util.omnitureLinkTracking = function(linkName, propValue){
		var s_analytics = s_gi(s_account);
		s_analytics.linkTrackVars = "prop35";
		s_analytics.prop35 = propValue;
		s_analytics.tl(true,'o',linkName);
	};
	/** 
	 * create simple 'nfl.ui.tabs' namespace for tab methods 
	 */
	nfl.namespace("ui.tabs");
	
	/**
	 * Find all html tags that match "<include/>"
	 * and replace them with the content specified 
	 * in their path attribute
	 */
	nfl.namespace("nfl.tags.include");
	nfl.tags.include.initialize	= function(){
		nfl.log("nfl.tags.include.initialize: called");
		var includes	= document.getElementsByTagName("include");
		nfl.log("nfl.tags.include.initialize: includes = "+ includes +" | includes.length = "+ includes.length);
		for(inc=0; inc < includes.length; inc++){
			var includeEle	= $(includes[inc]);
			var path		= includeEle.getAttribute("path");
			var width		= includeEle.getAttribute("width")? includeEle.getAttribute("width"):0;
			var height		= includeEle.getAttribute("height")? includeEle.getAttribute("height"):0;
			if(path.indexOf(".jpg") >= 0 || path.indexOf(".gif") >= 0 || path.indexOf(".png") >= 0){
				/* image content */
				includeEle.replace("<img src=\""+ path +"\"/>");
			}else{
				if(path.indexOf(".swf")){
					/* flash content */
					var wmode				= includeEle.getAttribute("wmode")? includeEle.getAttribute("wmode"):"opaque";
					var allowScriptAccess	= includeEle.getAttribute("allowScriptAccess")? includeEle.getAttribute("allowScriptAccess"):"always";
					
					var sbObj = new SWFObject(path, "fo_probowlballot", width, height, "8.0", "#ffffff", true);
					sbObj.addParam("allowScriptAccess", allowScriptAccess);
					sbObj.addParam("wmode", wmode);
					/* get variables */
					var flashvars			= includeEle.getAttribute("variables");
					if(flashvars.strip() != ''){
						flashvars			= flashvars.split(',');
						flashvars.each(function(flashvar){
							var _tVar		= flashvar.split(':');
							sbObj.addVariable(_tVar[0], _tVar[1]);
						});
					}
					sbObj.write(includeEle);
				}else{
					/* html content */
					new Ajax.Updater(includeEle,path,{method: 'get', evalScripts: true});
				}
			}
		}
		nfl.log("nfl.tags.include.initialize: finished");
	}
	document.observe("dom:loaded",nfl.tags.include.initialize);

	/** 
	 * fire off custom events for subscribers
	 */
	Event.observe(document, 'unload', Event.unloadCache);
	nfl.created = true;
	//document.fire('script:libNflLoaded');
}
nfl.global.Scorestrip = Class.create();
nfl.global.Scorestrip.prototype = {
	/**
	 * Adds the scorestrip to the page
	 * @param {String} weekColor Hex numer for the text color of the current week defaults to "FFFFFF
	 * @param {String} scheduleColor Hex numer for the text color of the schedules link
	 * @param {String} ssID ID of the element to write the scoretrip to, defaults to 'fo_scorestrip'
	 * @param {Hash} options Overwrites any default options.
	 * @returns {String} The ID of the element to which the scorestrip was written.
	 */
	initialize: function(divID, options) {
		this.ssID 	= 'fo_scorestrip';
		this.opts	= $H(options || {});
		this.write();
	},
	write: function(){
	 	var o = $H({
	 		id: this.ssID,
			width: '870',
			height: '115',
			version: "8",
			background: "#FFFFFF"
		}).merge(this.opts);
		
		o.set('flashVars', ($H({}).merge($H(this.opts.get('flashVars') || {})))) // no defaults
		o.set('params',	($H({ allowScriptAccess: 'always', wmode: "transparent" }).merge($H(this.opts.get('params') || {}))));
		
		var f = new SWFObject(nfl.global.imagepath + '/flash/scorestrip.swf', o.get('id'), o.get('width'), o.get('height'), o.get('version'), o.get('background'));
		o.get('flashVars').each(function(pair) { f.addVariable(pair.key, pair.value) });
		o.get('params').each(function(pair) { f.addParam(pair.key, pair.value) });
		this.flash = f;
		this.flash.write("header-scorestrip");
	},
	getID: function() { return this.ssID },
	getFlash: function() { return this.flash },
	reload: function() {
		$("header-scorestrip").update();
		this.write();
	}
};
/**
 * Provides constants for observing and firing authentication events
 * Authentication events should be fired with a "component"
 * 
 * @namespace nfl.events
 * @class AuthenticationEvent
*/
nfl.events.AuthenticationEvent = function () {
	var AE, prefix;
	prefix = 'nfl:authentication:';
	AE = { SIGN_IN: prefix + 'signin', SIGN_OUT: prefix + 'signout', AUTH_FAILURE: 'authfailure' };
	// monitor events
	if (window.console) {
		function logger(event) { console.log('AuthenticationEvent: ' + event.eventName); console.log(event.memo); }
		for (var i in AE) { document.observe(AE[i], logger);}
	}
	return AE;
}();
/**
 * The Authentication class provides static methods to get/set/clear cookies 
 * associated with a user. Fires an AuthenticationEvent when either 
 * set or clear is called. e.g.:
 * 
 * document.observe(nfl.events.AuthenticationEvent.SIGN_IN, doSomething);
 *
 * In order to be logged in, you must have all three NFL cookie: userId, at & ptnr.
 * 
 * @namespace nfl.global
 * @class Authentication
 */
nfl.global.Authentication = function () {
	var AuthenticationEvent = nfl.events.AuthenticationEvent,
	    Cookies			= { USER: 'userId', SITELIFE: 'at', PARTNER: 'ptnr' },
	    COMPONENT		= 'AuthenticationEvent',
	    DOMAIN			= document.domain,
	    PATH			= '/',
	    COOKIE_SIGN_IN	= 'CookieSignIn',
	    nflCookie       = document.cookies.get(Cookies.USER).toQueryParams(),
	    pluckCookie     = document.cookies.get(Cookies.SITELIFE).toQueryParams(),
	    partnerCookie   = document.cookies.get(Cookies.PARTNER).toQueryParams(),
	    team, username;
	
	if (nflCookie.u) {
		team			= decodeURIComponent(nflCookie.t);
		username		= decodeURIComponent(nflCookie.u);
	}
	// if these values don't match, don't consider us logged out
	if ( ! ( isUser(partnerCookie) && isUser(pluckCookie) ) ) {
		onSignOut();
	}
	
	document.observe('dom:loaded', initialize);
	document.observe(AuthenticationEvent.SIGN_OUT, onSignOut);
	document.observe(AuthenticationEvent.SIGN_IN, onSignIn);

	// Listens for dom:loaded event
	function initialize (e) {
		if (is_authenticated()) {
			document.fire(AuthenticationEvent.SIGN_IN, { component: COOKIE_SIGN_IN, username: username, team: team });
		}
	}
	
	// Returns bool if the cookie's user matches the supplied value
	function isUser(_cookie) {
		return _cookie && _cookie.u && decodeURIComponent(partnerCookie.u) === username;
	}

	// Returns bool if user is authenticated or not
	function is_authenticated() { 
		return !! username;
	}

	// Listener for a SIGN_OUT event
	function onSignOut(e) {
		username = team = null;
		/* delete cookies for site */
		document.cookies.remove(Cookies.USER, PATH, DOMAIN);
		document.cookies.remove(Cookies.SITELIFE, PATH, DOMAIN);
		document.cookies.remove(Cookies.PARTNER, PATH, DOMAIN);
	}
	
	function onSignIn(e) {
		if ( e.memo.component === COOKIE_SIGN_IN ) { return; }
		username = e.memo.username;
		team     = e.memo.team;
	}

	return {
		signOut: function() { document.fire(AuthenticationEvent.SIGN_OUT, { component: COMPONENT });},
		isAuthenticated: function() { return is_authenticated();},
		getUser: function() { return is_authenticated() ? { username: username, team: team } : null; }
	};
}();
/**
 * The Header class observes AuthenticationEvents and updates the
 * login/logout buttons that appear in most site headers.
 *
 * @namespace nfl.global
 * @class Header
 * @requires nfl.global.Authentication
 */
nfl.global.Header = function(){
	var AuthenticationEvent = nfl.events.AuthenticationEvent;
	var ID = {
		LIST:		'hd-micro-nav-list',
		SIGN_IN:	'link-user-sign-in',
		SIGN_OUT:	'link-user-sign-out',
		REGISTER:	'link-user-register',
		PROFILE:	'link-user-profile'
	};
	// Retrieves the last section of the url before a query string
	var USER_REGEXP = /\/([^\/\?#]*)(([#\?][^#\?]*){0,2})$/;
	var initialized = false;

	document.observe(AuthenticationEvent.SIGN_IN, onSignIn);
	document.observe(AuthenticationEvent.SIGN_OUT, onSignOut);
	document.observe('dom:loaded', initialize);

	function initialize() {
		if (! $(ID.LIST)) { return killHeaderLinks();}

		// Hide the sign out info if it hasn't yet been addressed
		if (! initialized) { onSignOut(); }
		initialized = true;
	}
	function onSignIn(e) {
		try {
			var profile, profileLink;
			profile				= $(ID.PROFILE);
			profileLink			= profile.select('a').first();
			profileLink.href	= profileLink.href.replace(USER_REGEXP, "/" + e.memo.username + "$1");

			initialized = true;

			$(ID.SIGN_IN, ID.REGISTER).invoke('hide');
			$(ID.SIGN_OUT, profile).invoke('show');
		}
		catch(e) { killHeaderLinks(e);}
	}

	function onSignOut() {
		try {
			var profile, profileLink;
			profile				= $(ID.PROFILE);
			profileLink			= profile.select('a').first();
			profileLink.href	= profileLink.href.replace(USER_REGEXP, "/$1");

			$(ID.SIGN_IN, ID.REGISTER).invoke('show');
			$(ID.SIGN_OUT, profile).invoke('hide');
		}
		catch(e) { killHeaderLinks(e); }
	}
	function killHeaderLinks(e) {
		nfl.log("nfl.global.Header could not locate loginButtons");
		nfl.log(e);
		document.stopObserving(AuthenticationEvent.SIGN_IN, onSignIn);
		document.stopObserving(AuthenticationEvent.SIGN_OUT, onSignOut);
	}
	function replace_return(path) {
		return function (el) {
			el.href = el.href.replace(/returnTo=([^#&]*)/, 'returnTo=' + encodeURIComponent(path));
		}
	}
	return {
		setReturnToURLs: function(path) {
			$$('#' + ID.LIST + ' li a').each(replace_return(path));
		}
	}
}();

/**
 * nfl.bandages: IE-specific hacks.
 */
nfl.namespace("nfl.bandages");
nfl.bandages.IE6BackgroundImageFix = (function(){
	if (Prototype.Browser.IE && navigator.appVersion.indexOf('MSIE 6.0')!=-1) {
		try { document.execCommand("BackgroundImageCache", false, true); }
		catch(err) { return false; }
		return true;
	}
	else return false;
})();
nfl.bandages.IEDoesNotSupportABBRUntilThis = function () { document.createElement('abbr');}();
nfl.bandages.IE6HeaderFixes = Class.create();
nfl.bandages.IE6HeaderFixes.prototype = {
	initialize: function (options) {
		if (navigator.appVersion.indexOf('MSIE 6.0')==-1) { return }
		try{
			/*	<iframe id="DivShim" scrolling="no" frameborder="0"></iframe> */
			var iframe = document.createElement('iframe');
			iframe.id = "DivShim";
			iframe.setAttribute("scrolling","no");
			iframe.setAttribute("frameborder","0");
			nfl.bandages.IE6NavigationId = (typeof options['navId'] == 'undefined')?'nav':options['navId']; 	
			var nav = document.getElementById(nfl.bandages.IE6NavigationId);
			nav.parentNode.insertBefore(iframe, nav);
			var sfEls = nav.getElementsByTagName("LI");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover=onRollOver;
				sfEls[i].onmouseout=onRollOut;
			}
		} catch(err){}
		Event.observe(window, 'unload', cleanup);
		iframe = nav = sfEls = null;
		function cleanup(e) {
			var sfEls = document.getElementById(nfl.bandages.IE6NavigationId).getElementsByTagName("LI");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover = null;
				sfEls[i].onmouseout = null;
			}
			sfELs = null;
		}
		function ie6CoverDropDowns(menuButton, newState) {
			if(newState == 'mouseover') {
			   var DivRef = menuButton.getElementsByTagName("UL")[0];
			   var IfrRef = document.getElementById('DivShim');
			    DivRef.style.display = "block";
			    IfrRef.style.top = DivRef.offsetTop;
			    IfrRef.style.left = DivRef.offsetLeft;
			    IfrRef.style.width = DivRef.offsetWidth;
			    IfrRef.style.height = DivRef.offsetHeight;
			    IfrRef.style.zIndex = DivRef.style.zIndex + 1;
			    IfrRef.style.display = "block";
				if ( menuButton.getElementsByTagName("UL").length > 1 ) //for the teams drop down which is two ULs
				{
				   var DivRef2 = menuButton.getElementsByTagName("UL")[1];
				    DivRef2.style.display = "block";
				    // the second UL for teams overflaps the first one, so the -16 removes
					// a not so pretty white line next to the that dropdown in ie6
					// @todo: use Prototype Regions
				    IfrRef.style.width = ((DivRef.offsetWidth + DivRef2.offsetWidth) - 16) + 'px';
				}
		
			} else {
			   var DivRef = menuButton.getElementsByTagName("UL")[0];
			   var IfrRef = document.getElementById('DivShim');
			    DivRef.style.display = "none";
			    IfrRef.style.display = "none";
				if ( menuButton.getElementsByTagName("UL").length > 1 ) //for the teams drop down which is two ULs
				{
				   var DivRef2 = menuButton.getElementsByTagName("UL")[1];
				    DivRef2.style.display = "none";
				}
			}
		}
		function onRollOver(e) {
			if(!($(this).hasClassName("sfhover"))){ $(this).addClassName("sfhover"); }
			if((this.parentNode.id==nfl.bandages.IE6NavigationId) && (this.getElementsByTagName("UL").length != 0) ){ ie6CoverDropDowns(this, 'mouseover'); }
		}
		function onRollOut(e){
			if($(this).hasClassName("sfhover")){ $(this).removeClassName("sfhover"); }
			if((this.parentNode.id==nfl.bandages.IE6NavigationId) && (this.getElementsByTagName("UL").length != 0) ){ ie6CoverDropDowns(this, 'mouseout'); }
		}
	}
};
nfl.bandages.IE6FooterFixes = function(){
	if (Prototype.Browser.IE && navigator.appVersion.indexOf('MSIE 6.0')!==-1) {
		function getAlphaImageLoader(path) {
			return "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + nfl.global.imagepath + path + "')";
		}
		try {
			$('ft-teams-afc-mark').style.filter = getAlphaImageLoader('/img/global/ft-teams-marks-ie6-afc.png');
			$('ft-teams-nfc-mark').style.filter = getAlphaImageLoader('/img/global/ft-teams-marks-ie6-nfc.png');
			$('ft-teams-afc-mark-container').select('div.ft-teams-parenthesis').first().style.filter = getAlphaImageLoader('/img/global/ft-teams-marks-ie6-brace.png');
			$('ft-teams-nfc-mark-container').select('div.ft-teams-parenthesis').first().style.filter = getAlphaImageLoader('/img/global/ft-teams-marks-ie6-brace.png');
		}
		catch(e) {}
	}
};
/** 
 * Audio Panel/Window 
 */
nfl.namespace('nfl.media.audio');
nfl.media.audio.open	= function(){ 
	if(window.opener){
		try{ window.opener.top.$openWindow('/audio','_new',0,0); }catch(e){}
	}else{
		$openWindow('/audio','_new',0,0);
	}
};
var openAudioPopup = nfl.media.audio.open;
nfl.media.audio.player = function(contentId){ // this function is in nfl.global.js too
	var pageToOpen = "/audioplayer?id=" + contentId; // http://www.nfl.com/audioplayer?id=09000d5d802c2ec8
	$openWindow(pageToOpen, 'audioPlayer', {width:760,height:410,toolbar:0,scrollbar:'auto'});
}
