
/* Initialisation shadowbox */
Shadowbox.init({
	language:   "fr",
	players:    ["iframe","img","html"],
	overlayColor: "#FFF",
	overlayOpacity: "0.4",
	viewportPadding: "30px"
});

/* Provoque l'ouverture d'une shadowbox*/
function openLinkInShadowbox(lnk, win_w, win_h){

	var init = {
					player:     'iframe',
					content:    lnk,
					width:      win_w,
					height:     win_h
				};
				
	Shadowbox.open(init);
	
}

/* Change le nom de la classe de l'objet
	en parramètre en y ajoutant / retirant le mot clef _over */
function changeStateMenu(elem){
	
	objClassName = elem.className;
	
	if(objClassName.indexOf('_over') > 0){
		elem.className = objClassName.substr(0, objClassName.length - 5);
	}else{
		elem.className = objClassName + "_over"; 
	}
	
}

/* Roll over sur callToAction de la home */
function rollOverCallToActionHome(elem, action){

	call_to_action_id = elem.id;
	
	if(action == 'show'){
		document.getElementById('txt_'+call_to_action_id).style.display = 'block';
		document.getElementById('img_'+call_to_action_id).className = 'image_bloc_over';
	}else{
		document.getElementById('txt_'+call_to_action_id).style.display = 'none';
		document.getElementById('img_'+call_to_action_id).className = 'image_bloc';
	}
	
}
