function initForteMenu() {
	jquery("ul li.yuimenubaritem:first-child").addClass('first-of-type');
	jquery("ul li.yuimenubaritem:last-child").addClass('last-of-type');
	jquery("ul li.yuimenubaritem:nth-child(even)").addClass('even');
	jquery("ul li.yuimenubaritem:nth-child(odd)").addClass('odd');
	
	jquery("ul li.yuimenuitem:first-child").addClass('first-of-type');
	jquery("ul li.yuimenuitem:last-child").addClass('last-of-type');
	jquery("ul li.yuimenuitem:nth-child(even)").addClass('even');
	jquery("ul li.yuimenuitem:nth-child(odd)").addClass('odd');
	
	jquery("ul.menuItemCt li:nth-child(even)").addClass('even');
	jquery("ul.menuItemCt li:nth-child(odd)").addClass('odd');
	jquery("ul.menuItemCt li:first-child").addClass('first');
	jquery("ul.menuItemCt li:last-child").addClass('last');
	jquery("li.menuItem-selected:first").addClass('menuItem-active').parents("li:first").addClass('menuItem-active').parents("li:first").addClass('menuItem-active');
	jquery("ul.menuItemCt li.menuItem-active").find("a:first").addClass('menuItemLabel-active');	
}

function initForteTables() {
	jquery("table tr:nth-child(even)").addClass('tr-even');
	jquery("table tr:nth-child(odd)").addClass('tr-odd');
	jquery("table tr:first-child").addClass('tr-first');
	jquery("table tr:last-child").addClass('tr-last');
	jquery("table td:nth-child(even)").addClass('td-even');
	jquery("table td:nth-child(odd)").addClass('td-odd');
	jquery("table td:first-child").addClass('td-first');
	jquery("table td:last-child").addClass('td-last');
}

function initForteVideos() {
	jquery("a.forteVideoPlayer").each(function(index) {
    	var objId = jquery(this).attr('id');
		var objWidth = jquery(this).width();
		var objHeight = jquery(this).height();
		var iconLeft = parseInt((objWidth / 2) - (83 / 2));
		var iconTop = parseInt((objHeight / 2) - (83 / 2));
		jquery(this).css('position','relative');
		jquery(this).append('<img src="/common_scripts/images/play_large.png" border="0" style="position:absolute;top:' + iconTop + 'px;left:' + iconLeft + 'px;"/>')
	});
	jquery("a.forteVideoPlayer").click(function(event) {
		event.preventDefault();
		var objId = jquery(this).attr('id');
		var vidSt = jquery(this).attr('href');
		flowplayer(objId, { src:'http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf', wmode:'transparent' },{
			clip: { url:vidSt, autoPlay:false, autoBuffering: true, bufferLength: 5, scaling: 'scale' }
		}).ipad().play();
		return false;
	});
}

function onStateMainNavigation(MenuId) {
	jquery("li#yui-item" + MenuId).addClass('yuimenubaritem-onstate').find("a:first").addClass('yuimenubaritemlabel-onstate');
}

jquery(document).ready(function(){
	initForteMenu();
	initForteTables();
	initForteVideos();
});
