/** 
* @alias oldPages
* @projectDescription France 2 & France 3, versions 2.0
* @author	[FTVI] Guyllaume Doyer
*/

// ---------------------------------------------------------------------------------------------- \\
// Jquery init event
// ---------------------------------------------------------------------------------------------- \\

$(document).ready(function()
{
	fixLayout();
});

// ----------------------------------------------------- \\
// This function fixes some of the old pages content layout
// properties to fit to the new pages arch
// ----------------------------------------------------- \\
function fixLayout()
{
	var parentContainer = $("#oldPagesContent");

	// If The second table is 1000px width, wet set it to 870px
	if ( parentContainer.length > 0)
	{
		var mainTable = $("#eSiteContent > table", parentContainer).slice(1,2);
		if ( mainTable.is("table[width=1000]") ) { mainTable.css({width:"870px", margin:"0 auto", textAlign: "left"}); $("#eSiteContent").css("text-align","center"); }
	}

	// Remove the top red border of the contents where class = aFondPortail
	if ( parentContainer.length > 0)
	{
		var mainContentTopBorder = $("#eSiteContent > table", parentContainer).slice(0,1);
		if ( mainContentTopBorder.is("table.aFondPortail") ) { mainContentTopBorder.remove(); }
	}

	// Remove the breadcrumbs line
	if ( parentContainer.length > 0)
	{
		var breadcrumbs = $("#eSiteContent > table .aTxtPathBarOn", parentContainer).slice(0,1);
		breadcrumbs.parent("td").parent("tr").remove();
	}

}
