$(window).load(function() 
	{
	grossirTxt();
	generateVideo();

	$('.pictoGalerie a').lightBox();
	});



function grossirTxt()
	{
	var tailleTxt=11;
	
	$("#aPetit").click(function()
		{
		if(tailleTxt!="11") tailleTxt = tailleTxt-3;
		$("#fondArticle p").css("font-size", tailleTxt+"px");
		});

	$("#aGrand").click(function()
		{
		if(tailleTxt!="23") tailleTxt = tailleTxt+3;
		$("#fondArticle p").css("font-size", tailleTxt+"px");
		});
	};


/*--------------AJOUTER A VOS FAVORIS------------------*/
function favoris(titre,chaine,page) 
	{
	if (navigator.appName != 'Microsoft Internet Explorer' ) window.sidebar.addPanel(titre+" - Roland Garros 2008 - "+chaine+".fr","http://roland-garros."+chaine+".fr/index-fr.php?page="+page,"");
	else window.external.AddFavorite("http://roland-garros."+chaine+".fr/index-fr.php?page="+page,titre+" - Roland Garros 2008 - "+chaine+".fr");
	} 




/*--------------GENERE PLAYER VIDEO------------------*/
function generateVideo()
	{
	var taillePlayer = new Array();
	taillePlayer[0] = 384;
	taillePlayer[1] = 288;
	
	var tailleVideo = $('#tailleVideo').text();
	if(tailleVideo!='') taillePlayer = tailleVideo.split('|');
	taillePlayer[1] = Math.round(taillePlayer[1])+65;

	$('.media').media({
		width:     taillePlayer[0], 
		height:    taillePlayer[1], 
		autoplay:  true, 
		bgColor: 'transparent',
		params: { showstatusbar: '1' },
		caption:   false // supress caption text 
		});
	}
