$(document).ready(function() {


	// open the links with a class value of lien_ext in a new window
   	var b_varExists = (typeof(window['tooltipTitleTrad']) != "undefined");
   	var tooltip = (b_varExists == true && tooltipTitleTrad != '') ? tooltipTitleTrad : 'Open this link in a new window';
	$("a[class*='lien_ext']").each(function() {
		$(this).attr("target", "_blank");
		$(this).attr("title", tooltip);
	});

	// http://docs.jquery.com/Tutorials:Zebra_Striping_Made_Easy
	//datatable => Directory_Contact.php
	$(".datatable tr").mouseover(function() {$(this).addClass("ruled");}).mouseout(function() {$(this).removeClass("ruled");});
	$(".datatable tr:nth-child(even)").addClass("even");

	//datatablewide => Directory_Contact.php
	$(".datatablewide tr").mouseover(function() {$(this).addClass("ruled");}).mouseout(function() {$(this).removeClass("ruled");});
	$(".datatablewide tr:nth-child(even)").addClass("even");

	//datatablesmall => Directory_Contact.php
	$(".datatablesmall tr").mouseover(function() {$(this).addClass("ruled");}).mouseout(function() {$(this).removeClass("ruled");});
	$(".datatablesmall tr:nth-child(even)").addClass("even");
});

// form_menu.js
/*
function menuderoulant(selection){
	window.location=selection.options[selection.selectedIndex].value;
}
*/

/**
 * Paramètres d'Addthis d'initialisation de Addthis
 */
var addthis_config = {	ui_language: lng, // For forcing the menu to use a particular language, specified via ISO code - La variable langue est créée dans le fichier header.inc.php
						data_track_clickback:true, //Addthis : Set to true to allow us to append a variable to your URLs upon sharing. We'll use this to track how many people come back to your content via links shared with AddThis. Highly recommended.
						services_exclude:"amazonwishlist,amenme,bryderi,chiq,edelight,fashiolista,kaboodle,kirtsy,ladenzeile,stuffpit,thisnext,gamekicker,n4g" //	Services to exclude from all menus. Liste of services : http://www.addthis.com/services/list
					};
/**
	 * Fonction qui permer d'afficher la barre de partage de contenu Addthis
	 * @param lng
	 * @param orpha_nu
	 * @access public
	 * @return void
	 *
	 * Cette fonction est utlisé dans le fichier wlib.inc.php
	 **/
	function displayAddthisSharingContent(orpha_nu){

		var title = document.title;

		/**
		 *Construction du lien expert
		 **/
		var reg=new RegExp("\/[a-zA-Z0-9_]+\.php","g");
		var pathName = window.location.host+window.location.pathname;
		var fileName = reg.exec(pathName);

		var expertLink = "http://"+ pathName.replace(fileName, "/OC_Exp.php?lng="+lng+"&Expert="+orpha_nu);


		document.write('<div class="addthis_toolbox addthis_default_style "'+
       'addthis:url="'+ expertLink +'"'+
       'addthis:title="' + title + '">');

		document.write('<a class="addthis_button_email"></a>')
		document.write('<a class="addthis_button_print"></a>')
		document.write('<a class="addthis_button_facebook"></a>');;
		document.write('<a class="addthis_button_netvibes"></a>');
		document.write('<a class="addthis_button_viadeo"></a>');
		document.write('<a class="addthis_button_studivz"></a>');
		document.write('<a class="addthis_button_delicious"></a>');
		document.write('<a class="addthis_button_compact"></a>');
		document.write('</div>');

	}



	/**
	* AS - 15/09/11 - Fonction qui permet de construire les regles du formulaire de réaction
	*/
	function displayReactForm(){
		$(function() {
				//captcha





		});
		}
