function FocusText(BoxName) {
	if (BoxName.value == BoxName.defaultValue) {
		BoxName.value = '';
	}
}
function BlurText(BoxName) {
	if (BoxName.value == '') {
		BoxName.value = BoxName.defaultValue;
	}
}
function Lecture(str, id) {

	jQuery(".vignette_video").css("borderColor", "#C1C1C1");
	jQuery("#vign_"+id).css("borderColor", "#E2001A");

	var ogvUrl = str.substr(0, str.length-4)+".ogv";
	var webmUrl = str.substr(0, str.length-4)+".webm";
	var mp4Url = str.substr(0, str.length-4)+".mp4";
	
	jQuery(".video-js-box").empty().append('<video id="video_player_js" class="video-js" width="400" height="225" controls="controls" preload="auto" poster="../../wp-content/themes/a65-alienor/images/vignette_video_attente.jpg"><source src="'+mp4Url+'" type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\' /><source src="'+webmUrl+'" type=\'video/webm; codecs="vp8, vorbis"\' /><source src="'+ogvUrl+'" type=\'video/ogg; codecs="theora, vorbis"\' /><object id="flash_fallback_1" class="vjs-flash-fallback" width="400" height="245" type="application/x-shockwave-flash" data="../../wp-content/themes/a65-alienor/swf/player_video.swf"><param name="movie" value="../../wp-content/themes/a65-alienor/swf/player_video.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value=\'chemin='+str+'&image=&VideoWidth=400&VideoHeight=225&couleur=0x008ae5&autoStart=on\' /></object></video>');
	var myPlayer = VideoJS.setup("video_player_js");
	myPlayer.play(); 
	
	
}

/* Gestion Menu */
jQuery(function(){
    jQuery("#menu li").hover(function(){
        jQuery(this).addClass("hover");
       jQuery('ul:first',this).css('visibility', 'visible');
    }, function(){
        jQuery(this).removeClass("hover");
        jQuery('ul:first',this).css('visibility', 'hidden');
    });
});


var t = 1;

function changerTaille(modif) {
	t = t + modif;	
	document.getElementById("contenu").style.fontSize = t + "em";		
	createCookie("tailleTexte", t, 365);
} 	

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}
