//	Video
//	initialize Partner Recirc feeds; uses Global PartnerRecirc function
	var initializeVideoRecirc = function() {
		if (!document.getElementById) return;
		if (!document.getElementsByTagName) return;
		var recircArray = {
			'recircs' : [ 
				{
					'id'		: 'rightcolumnrecirc',
					'feed' 		: [ 
						{
							'name'		: 'TodayShow.com',
							'json' 		: 'http://www.people.com/people/static/json/msnbc/feed.js',
							'site' 		: 'http://today.msnbc.msn.com/',
							'image' 	: 'http://img2.timeinc.net/people/static/i/video/logoMSNBC.gif',
							'cta' 		: 'More Video at TodayShow.com'
						}
					]
				}
			]
		};
		pushToMasterArray(recircArray);
	}
	initializeVideoRecirc();
//	toggles hover affect
	var toggleHover = function(el,hoverClass) {
		var el = document.getElementById(el);
			el.onmouseover = function(){
				var oldClass = this.className;
					this.className = oldClass+' '+hoverClass;
			};
			el.onmouseout = function(){
				var oldClass = this.className;
				if (oldClass.indexOf(' ') > 0) {
					this.className = oldClass.replace(' '+hoverClass,'');
				} else {
					this.className = oldClass.replace(hoverClass,'');
				};
			};
	};
//	People TV tout slider
	var peopletvslider = {
		slide : function() {
			this.UL.left = Number(this.UL.style.left.replace('px',''));
			if (this.UL.left <= (this.firstLI.width * -1)) {
				this.moveHeadline();
				this.UL.left = 0;
			};
			this.UL.style.left = (this.UL.left - 1) + 'px';
		},
		moveHeadline : function() {
			this.UL.removeChild(this.firstLI);
			this.UL.appendChild(this.firstLI);
			this.firstLI = this.UL.getElementsByTagName('li')[0];
		},
		init : function() {
			peopletvslider.UL = document.getElementById('HP_Banner_All').getElementsByTagName('ul')[0];
			var w = Number(peopletvslider.UL.style.left.replace('px',''));
			var LIs = document.getElementById('HP_Banner_All').getElementsByTagName('li');
			peopletvslider.firstLI = this.UL.getElementsByTagName('li')[0];
			for (i = 0; i < LIs.length; i++) {
				LIs[i].width = LIs[i].clientWidth;
				w += LIs[i].clientWidth;
			};
			peopletvslider.UL.width = Number(w + 1000);
			peopletvslider.UL.style.width = peopletvslider.UL.width + 'px';
			setInterval('peopletvslider.slide()',50);
		}
	};
//	can list as many functions as you want and the loader below will load them as soon as the page is loaded
	var pageLoadFunctions = function() {
		if (document.getElementById('HP_Banner_All')) {
			document.getElementById('HP_Banner_All').className = 'active';
			toggleHover('HP_Banner_All','hover');
			peopletvslider.init();
		};
	}
	tii_callFunctionOnWindowLoad(pageLoadFunctions);









