$(document).ready(function () {
    /******** CONNEXION MENU HAUT ******/
    var formValidator1 = new ValidatorClass();
    
 /*   $("#inscription_form").submit(function () {
        if (!$("#cg:checked").val()) {
            alert('Veuillez valider les conditions générales');
            return false
        }
    });*/
    
    $("#sexe").change(function () {
        if ($(this).val() == "") {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
            $("#sexeValidate").html("");
            $("#sexeValidate").append(html_image);
            $("#radio_avatar_1").attr("value", "avatarFemme1");
            $("#radio_avatar_2").attr("value", "avatarFemme2");
            $("#radio_avatar_3").attr("value", "avatarFemme3");
            $("#avatar_1").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme1.jpg");
            $("#avatar_2").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme2.jpg");
            $("#avatar_2").attr("checked", "checked");
            $("#avatar_3").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme3.jpg")
        } else {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
            $("#sexeValidate").html("");
            $("#sexeValidate").append(html_image);
            if ($(this).val() == "Homme") {
                $("#radio_avatar_1").attr("value", "avatarHomme1.jpg");
                $("#radio_avatar_2").attr("value", "avatarHomme2.jpg");
                $("#radio_avatar_3").attr("value", "avatarHomme3.jpg");
                $("#avatar_1").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarHomme1.jpg");
                $("#avatar_2").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarHomme2.jpg");
                $("#avatar_2").attr("checked", "checked");
                $("#avatar_3").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarHomme3.jpg")
            } else if ($(this).val() == "Femme") {
                $("#radio_avatar_1").attr("value", "avatarFemme1.jpg");
                $("#radio_avatar_2").attr("value", "avatarFemme2.jpg");
                $("#radio_avatar_3").attr("value", "avatarFemme3.jpg");
                $("#avatar_1").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme1.jpg");
                $("#avatar_2").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme2.jpg");
                $("#avatar_2").attr("checked", "checked");
                $("#avatar_3").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme3.jpg")
            }
        }
    });
   /* $("#nom").blur(function () {
        var nom_saisi = $("#nom").val();
        if (nom_saisi == null || nom_saisi == "") {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
            $("#nomValidate").empty();
            $("#nomValidate").append(html_image)
        } else {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
            $("#nomValidate").empty();
            $("#nomValidate").append(html_image)
        }
    });
   $("#pseudo").blur(function () {
        var pseudo_saisi = $("#pseudo").val();

            urlPseudo = jurl_portail_membre_siexiste;
            urlPseudo += "?login=" + pseudo_saisi;
            $.getJSON(urlPseudo, function (data) {
                var existe = data.existe;
                if (existe == 1) {
                    $("#pseudoError").fadeIn("slow");
                    $("#pseudoError").html("&nbsp;<font color='red'>Ce pseudo est dejà utilisée!</font>");
                    $("#pseudo").val("");
                }else {
                    var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                    $("#pseudoError").fadeOut("slow");
                }
            });
        
    });
  
    
    $("#email").blur(function () {
        var email_saisi = $("#email").val();
       
            urlMail = jurl_portail_membre_siexistemail;
            urlMail += "?mail=" + email_saisi;
            $.getJSON(urlMail, function (data) {
                var existe = data.existe;
                if (existe == 1) {
                    $("#mailError").fadeIn("slow");
                    $("#mailError").html("&nbsp;<font color='red'>Cette adresse mail est dejà utilisée!</font>");
                    $("#email").val("");
                } else {
                    
                    $("#mailError").fadeOut("slow");

                }
            })
        
    });*/
   $("#mdp").blur(function () {
        var mdp_saisi = $("#mdp").val();
        if (mdp_saisi.length < 6) {
            
            $("#mdpError").fadeIn("slow");
            $("#mdpError").html('<font color="red">Ce champ doit contenir au moins 6 caractères</font>');
        }  else {
            $("#mdpError").fadeOut("slow");
           
        }
    });
   /* $("#mdp2").blur(function () {
        var mdp_saisi = $("#mdp").val();
        var mdp2_saisi = $("#mdp2").val();
        if ((mdp_saisi != mdp2_saisi) || mdp2_saisi == "" || mdp_saisi == "") {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
            $("#mdp2Validate").empty();
            $("#mdp2Validate").append(html_image);
            $("#mdpError1").fadeIn("slow");
            $("#mdpError1").html("<font color='red'>La confirmation n'est pas identique au mot passe saisi!</font>");
        } else {
            $("#mdpError1").fadeOut("slow");
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
            $("#mdp2Validate").empty();
            $("#mdp2Validate").append(html_image);
        }
    });*/
    $('#est_professionnel').change(function() {
        var est_professionnel = $(this).val();
        if (est_professionnel == 1 || est_professionnel == 2) {
            $('#pro').show();
        } else {
            $('#pro').hide();
        }
    });
    
    //cb Protection anti-bot
    $('#telephone').blur(function (){
    	var saisi = $('#telephone').val();
    	if(saisi != ''){}
    
    });
    
   /* $("#professionnel_siret").blur(function () {
        var saisi = $("#professionnel_siret").val();
        if (saisi == null || saisi == "") {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
            $("#proSiretValidate").empty();
            $("#proSiretValidate").append(html_image);
        } else {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
            $("#proSiretValidate").empty();
            $("#proSiretValidate").append(html_image);
        }
    });
    $("#professionnel_raison_sociale").blur(function () {
        var saisi = $("#professionnel_raison_sociale").val();
        if (saisi == null || saisi == "") {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
            $("#proRaisonSocialeValidate").empty();
            $("#proRaisonSocialeValidate").append(html_image);
        } else {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
            $("#proRaisonSocialeValidate").empty();
            $("#proRaisonSocialeValidate").append(html_image);
        }
    });
    $("#professionnel_telephone").blur(function () {
        var saisi = $("#professionnel_telephone").val();
        if (saisi == null || saisi == "") {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
            $("#proTelValidate").empty();
            $("#proTelValidate").append(html_image);
        } else {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
            $("#proTelValidate").empty();
            $("#proTelValidate").append(html_image);
        }
    });
    formValidator1.init({
        form: '#inscription_form',
        errorColors: {
           // isRequired: 'yellow',
           // isEmail: 'red',
           // isNumeric: 'red'
        },
        isRequired: ['nom', 'pseudo', 'email', 'mdp', 'mdp2'],
        isEmail: ['email'],
        isNumeric: ['annee', 'jour'],
        bindElement: '#inscription_button',
        emailFieldMsg: '- Email invalide',
        requiredFieldMsg: '- Les champs colorés en jaunes sont requis',
        numericFieldMsg: '- Les champs colorés en rouge doivent êtres numériques',
        callback: function () {}
    });
   
   $("#inscription_form").submit(function () {
        if ($("#mdp").val() != $("#mdp2").val()) {
            alert('Le champ mot de passe et confirmation doivent être identiques');
            return false;
        }
        if ($("#sexe").val() == 0) {
            alert('Le champ sexe est requis');
            return false;
        }
		
        var pseudo_saisi = $("#pseudo").val();
        var regexp = new RegExp('^([a-zA-Z0-9]+)$');
		
        if (!pseudo_saisi.match(regexp)) {
            alert('Le login ne doit contenir que des chiffres et des lettres non accentuées');
            return false;
        }
        if ($('#est_professionnel').val() == 1) {
            if ($('#professionnel_siret').val() == '') {
                alert('En tant que professionnel vous devez fournir votre numéro de siret');
                return false;
            }
            if ($('#professionnel_raison_sociale').val() == '') {
                alert('En tant que professionnel vous devez fournir votre raison sociale');
                return false;
            }
            if ($('#professionnel_telephone').val() == '') {
                alert('En tant que professionnel vous devez fournir votre numéro de téléphone');
                return false;
            }
        }
    })
    $("#connect_btn").click(function () {
        var login = $("#login").val();
        var pass = $("#pass").val();
        urlConnexion = jurl_portail_membre_connexionmembrecom;
        urlConnexion += "?login=" + login + "&pass=" + pass;
        var resultat = "";
        $.getJSON(urlConnexion, function (data) {
            var conn = data.conn;
            
            if (conn == 0) {
                alert("Login ou mot de passe incorrect");
            }else if (conn == 3) {
            	alert("Votre compte n'est pas encore valide, un e-mail vous a ete envoye pour valider votre compte, si vous l'avez pas recu veuillez vous rendre sur la page mot de passe oublie en indiquant votre adresse e-mail dans le champ correspondant. ");
            }  
            
            else {
                $("#login_form").submit();
            }
        })
    });;*/
    
    $("#pass_menu").keydown(function (event) {
        if (event.keyCode == 13) {
            $("#connect_btn_menu").click();
        }
    });
    $("#connect_btn_menu").click(function () {
        var login = $("#login_menu").val();
        var pass = $("#pass_menu").val();
        urlConnexion = jurl_portail_membre_connexionmembrecom;
        urlConnexion += "?login=" + login + "&pass=" + pass;
        
        $.getJSON(urlConnexion, function (data) {
            var conn = data.conn;
            if (conn == 0) {
                alert("Login ou mot de passe incorrect");
            } else if (conn == 3) {
            	alert("Votre compte n'est pas encore valide, un e-mail vous a ete envoye pour valider votre compte, si vous l'avez pas recu veuillez vous rendre sur la page mot de passe oublie en indiquant votre adresse e-mail dans le champ correspondant. ");
            }else{
            	$("#login_form_menu").submit();
            }
        })
    });
	
    var formValidator2 = new ValidatorClass();
    $("#ecrire_form").submit(function () {
        if ($("#contenu").val() == "" || $("#contenu").val() == null) {
            alert(" - Veuillez remplir le message");
            return false;
        }
    });
    formValidator2.init({
        form: '#ecrire_form',
        errorColors: {
            isRequired: 'yellow'
        },
        isRequired: ['objet_ecrire'],
        bindElement: '#ecrire_button',
        emailFieldMsg: '- Email invalide',
        requiredFieldMsg: '- Le champs coloré en jaune est requis',
        callback: function () {}
    });
    var formValidator3 = new ValidatorClass();
    formValidator3.init({
        form: '#mdp_form',
        errorColors: {
            isEmail: 'yellow'
        },
        isEmail: ['emailMdp'],
        bindElement: '#mdp_button',
        emailFieldMsg: 'Email invalide',
        callback: function () {}
    });
    $("#parler_form").submit(function () {
        if ($("#message_parler").val() == "" || $("#message_parler").val() == null) {
            alert("  Veuillez remplir le message");
            return false;
        }
    });
    var formValidator4 = new ValidatorClass();
    formValidator4.init({
        form: '#parler_form',
        errorColors: {
            isEmail: 'yellow'
        },
        isEmail: ['email_expediteur', 'email_1'],
        bindElement: '#parler_button',
        emailFieldMsg: 'Email invalide',
        callback: function () {}
    });
    $("#textareaCom").blur(function () {
        var commentaire = $("#textareaCom").val();
        commentaire = commentaire.replace(/\n/, "<br />");
        var mere = $("#mere_0").val();
        var membre_session = $("#membre_session").val();
        var identifiant_membre = $("#identifiant_membre_0").val();
        if (commentaire != null && commentaire != "" && commentaire != "Rédiger un commentaire ...") {
            urlComment = jurl_services_membres_laissercommentairepourmembre;
            urlComment += "?identifiant_membre=" + identifiant_membre + "&mere=" + mere + "&commentaire=" + commentaire;
            $.getJSON(urlComment, function (data) {
                var commentaires = data.newCommentaire;
                var croix = data.croix;
                if (croix == "OUI") {
                    var croix_x = "X";
                    var classe_membre = "close_membre";
                } else {
                    var croix_x = "";
                    var classe_membre = "";
                }
                if (commentaires != null && commentaires != "Rédiger un commentaire ...") {
                    $("#textareaCom").val("Rediger un commentaire ...");
                    if (commentaires.detailAuteur.sexe == "Femme") {
                        classe = "unit_Commentaire commentaire rose";
                    } else {
                        classe = "unit_Commentaire commentaire bleu";
                    }
                    var url = commentaires.detailAuteur.url_dressing;
                    var html = '<div class="' + classe + '" id="div_' + commentaires.numero_commentaire + '"> <h4><a href="' + url + '">' + commentaires.detailAuteur.pseudo + '</a> (' + commentaires.heur + 'h ' + commentaires.minute + ' - ' + commentaires.date_creation_formate + ')</h4><div class="postauthor"> <a href="javascript:void(0);" class="' + classe_membre + '" numero_commentaire="' + commentaires.numero_commentaire + '"> ' + croix_x + '</a> <img class="avatar avatar-80 photo"  src="'+ j_jelixwww +'upload/photo/miniature/membre/' + commentaires.detailAuteur.vignette + '" alt=""/><p class="drg_commentaire">' + commentaires.commentaire + ' </p></div></div>';
                    $("#div_new_comment").after(html);
                    $(".close_membre").click(function () {
                        var numero_commentaire = $(this).attr("numero_commentaire");
                        urlSuppr = jurl_services_membres_supprimercommentaire;
                        urlSuppr += "?numero_commentaire=" + numero_commentaire;
                        $.getJSON(urlSuppr, function (data) {
                            var resultat = data.resultat;
                            if (resultat == "OK") {
                                $("#div_" + numero_commentaire).fadeOut('slow');
                            }
                        })
                    })
                }
            })
        }
    });


    /********
     *etape de paiement
     **/
    /******** sur click sur le lien monpanier ******/
    //mettre en panier
    $("a.monpanier").click(function () {
        var reference_produit = $(this).attr("reference_produit");
        var identifiant_membre = $(this).attr("identifiant_membre");
        urlM = jurl_portail_panier_miseenpanier;
        urlM += "?reference_produit=" + reference_produit + "&identifiant_membre=" + identifiant_membre;
        $.getJSON(urlM, function (data) {
            urlPanier = jurl_portail_panier_etape_panier;
            $("#btn_mettre_hors_panier").html("");
            $("#btn_mettre_en_panier").html("");
            $("#btn_mettre_en_panier").attr("style", "display:none");
            $("#btn_mettre_hors_panier").attr("style", "display:block");
            var btn_html = '<img src="'+ j_jelixwww +'design/images/fiche/ajouter_au_panier_gris.gif" alt=""/> ';
            $("#btn_mettre_hors_panier").append(btn_html);
            $("#panier_livraison").val(data.numero_panier);
            
            if (data.adresseLivraisonPanier) {
                $("#adresse_livraison").val(data.adresseLivraisonPanier.adresse);
                $("#cp_livraison").val(data.adresseLivraisonPanier.code_postal);
                $("#ville_livraison").val(data.adresseLivraisonPanier.ville);
                $("#pays_livraison").val(data.adresseLivraisonPanier.numero_pays);
                $("#telephone_livraison").val(data.adresseLivraisonPanier.telephone);
                $("#portable_livraison").val(data.adresseLivraisonPanier.portable);
            }
            
            if (reference_produit != undefined) {
                $("#article0").html("");
                var NbrArticle = parseInt(data.nbr_pdt_dans_panier);
                var htmlNbrArticle = "";
                if (NbrArticle == 0) {
                    $("#articleDansPanier").attr("style", "display:none");
                    $("#article0").attr("style", "display:block");
                    $("#article0").html("vous avez 0 article dans votre panier");
                    htmlNbrArticle = "";
                } else if (NbrArticle == 1) {
                    $("#articleDansPanier").attr("style", "display:block");
                    $("#article0").attr("style", "display:none");
                    htmlNbrArticle = 'Vous avez ' + NbrArticle + ' article dans votre panier';
                    $("#article0").html("");
                } else {
                    $("#articleDansPanier").attr("style", "display:block");
                    $("#article0").attr("style", "display:none");
                    htmlNbrArticle = 'Vous avez ' + NbrArticle + ' articles dans votre panier';
                    $("#article0").html("");
                }
                $("#articleDansPanier").html(htmlNbrArticle);
            }
          /** fin de mise en panier **/

            $("#etape_panier").load(urlPanier, null, function (responseText, textStatus, XMLHttpRequest) {
                $(".del_produit_panier").click(function () {
                    var numero_panier = $(this).attr("numero_panier");
                    var reference_produit = $(this).attr("reference_produit");
                    $("#btn_mettre_en_panier").html("");
                    $("#btn_mettre_hors_panier").html("");
                    $("#btn_mettre_hors_panier").attr("style", "display:none");
                    $("#btn_mettre_en_panier").attr("style", "display:block");
                    var btn_html = '<img src="'+ j_jelixwww +'design/images/fiche/ajouter_au_panier.gif" alt=""/>';
                    $("#btn_mettre_en_panier").append(btn_html);
                    var prix = $(this).attr("prix");
                    var total = $("#total_final").attr("total");
                    var i = $(this).attr("id");
                    var new_total = total - prix;
                    urlDel = jurl_portail_panier_supprimerproduitdupanier;
                    urlDel += "?reference_produit=" + reference_produit + "&numero_panier=" + numero_panier;
                   
                    $.getJSON(urlDel, function (data) {
                        $("#" + i).parents("tr").remove();
                        $("#total_final").append("");
                        $("#total_final").text(new_total + "€");
                        $("#total_final").attr("total", new_total);
                        var NbrArticle = parseInt(data.nbr_pdt_dans_panier);
                        var htmlNbrArticle = "";
                        if (NbrArticle == 0) {
                            $("#articleDansPanier").attr("style", "display:none");
                            $("#article0").attr("style", "display:block");
                            $("#article0").html("vous avez 0 article dans votre panier");
                            htmlNbrArticle = "";
                        } else if (NbrArticle == 1) {
                            $("#articleDansPanier").attr("style", "display:block");
                            $("#article0").attr("style", "display:none");
                            htmlNbrArticle = 'Vous avez ' + NbrArticle + ' article dans votre panier';
                            $("#article0").html("");
                        } else {
                            $("#articleDansPanier").attr("style", "display:block");
                            $("#article0").attr("style", "display:none");
                            htmlNbrArticle = 'Vous avez ' + NbrArticle + ' articles dans votre panier';
                            $("#article0").html("");
                        }
                        $("#articleDansPanier").html(htmlNbrArticle);
                    })
                });
                
                $("#continuer_achat_button").click(function () {
                    var urlAchat = jurl_portail_boutique_ficheproduit;
                    var last_reference_produit = $(this).attr("last_reference_produit");
                    urlAchat += "?reference_produit=" + last_reference_produit;
                    window.location.replace(urlAchat);
                });
                
                
               /* $("#goToIdentification").click(function () {
                    cacherToutesEtapes();
                    $("#etape_identification").attr("style", "display:block")
                });
                $("#goToLivraison").click(function () {
                    var adresse_livraison = $("#adresse_livraison").val();
                    if (adresse_livraison == "") {
                        cacherToutesEtapes();
                        $("#etape_livraison").attr("style", "display:block")
                    } else {
                        cacherToutesEtapes();
                        toEtape_confirmation()
                    }
                });*/
               
                
                /*  $("#sexe_com").change(function () {
                    if ($(this).val() == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#sexeComValidate").html("");
                        $("#sexeComValidate").append(html_image);
                        $("#radio_avatar_1_com").attr("value", "avatarFemme1.jpg");
                        $("#radio_avatar_2_com").attr("value", "avatarFemme2.jpg");
                        $("#radio_avatar_3_com").attr("value", "avatarFemme3.jpg");
                        $("#avatar_1_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme1.jpg");
                        $("#avatar_2_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme2.jpg");
                        $("#avatar_2_com").attr("checked", "checked");
                        $("#avatar_3_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme3.jpg");
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#sexeComValidate").html("");
                        $("#sexeComValidate").append(html_image);
                        if ($(this).val() == "Homme") {
                            $("#radio_avatar_1_com").attr("value", "avatarHomme1.jpg");
                            $("#radio_avatar_2_com").attr("value", "avatarHomme2.jpg");
                            $("#radio_avatar_3_com").attr("value", "avatarHomme3.jpg");
                            $("#avatar_1_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarHomme1.jpg");
                            $("#avatar_2_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarHomme2.jpg");
                            $("#avatar_2_com").attr("checked", "checked");
                            $("#avatar_3_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarHomme3.jpg");
                        } else if ($(this).val() == "Femme") {
                            $("#radio_avatar_1_com").attr("value", "avatarFemme1.jpg");
                            $("#radio_avatar_2_com").attr("value", "avatarFemme2.jpg");
                            $("#radio_avatar_3_com").attr("value", "avatarFemme3.jpg");
                            $("#avatar_1_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme1.jpg");
                            $("#avatar_2_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme2.jpg");
                            $("#avatar_2_com").attr("checked", "checked");
                            $("#avatar_3_com").attr("src", j_jelixwww +"upload/photo/miniature/membre/avatarFemme3.jpg");
                        }
                    }
                });
                
            $("#nom_com").blur(function () {
                    var nom_saisi = $("#nom_com").val();
                    if (nom_saisi == null || nom_saisi == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'{literal}design/images/bg_off.gif" alt="" />';
                        $("#nomComValidate").empty();
                        $("#nomComValidate").append(html_image);
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#nomComValidate").empty();
                        $("#nomComValidate").append(html_image);
                    }
                });
                $("#pseudo_com").blur(function () {
                    var pseudo_saisi = $("#pseudo_com").val();
                    var regexp = new RegExp('^([a-zA-Z0-9]+)$');
                    if (pseudo_saisi == null || pseudo_saisi == "" || !pseudo_saisi.match(regexp)) {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#pseudoComValidate").empty();
                        $("#pseudoComValidate").append(html_image);
                    } else {
                        urlPseudo = jurl_portail_membre_siexiste;
                        urlPseudo += "?login=" + pseudo_saisi;
                        $.getJSON(urlPseudo, function (data) {
                            var existe = data.existe;
                            if (existe == 1) {
                                var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                                $("#pseudoComValidate").empty();
                                $("#pseudoComValidate").append(html_image);
                                $("#pseudo_com").val("");
                            } else {
                                var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                                $("#pseudoComValidate").empty();
                                $("#pseudoComValidate").append(html_image);
                            }
                        })
                    }
                });
                $("#email_com").blur(function () {
                    var email_saisi = $("#email_com").val();
                    var regMail = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
                    if (!regMail.test(email_saisi)) {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#mailComValidate").empty();
                        $("#mailComValidate").append(html_image);
                        $("#mailErrorCom").fadeIn("slow");
                        $("#mailErrorCom").html("&nbsp;<font color='red'>Format erroné d'adresse mail!</font>");
                        $("#email_com").focus();
                    } else {
                        $("#mailErrorCom").fadeOut("slow");
                        urlMail = jurl_portail_membre_siexistemail;
                        urlMail += "?mail=" + email_saisi;
                        $.getJSON(urlMail, function (data) {
                            var existe = data.existe;
                            if (existe == 1) {
                                var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                                $("#mailComValidate").empty();
                                $("#mailComValidate").append(html_image);
                                $("#email_com").focus();
                                $("#mailComValidateMessage").fadeIn("slow");
                                $("#mailComValidateMessage").html('<font color="red">Cette adresse mail existe déjà!</font>');
                            } else {
                                var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                                $("#mailComValidateMessage").fadeOut("slow");
                                $("#mailComValidate").empty();
                                $("#mailComValidate").append(html_image);
                            }
                        })
                    }
                });
                $("#jour_com").blur(function () {
                    var cp = $("#jour_com").val();
                    mettre_image_numerique(cp, "jPict", "jour_com", 2);
                });
                $("#annee_com").blur(function () {
                    var cp = $("#annee_com").val();
                    mettre_image_numerique(cp, "aPict", "annee_com", 4);
                });
                $("#mdp_com").blur(function () {
                    var mdp_saisi = $("#mdp_com").val();
                    if (mdp_saisi == null || mdp_saisi == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#mdpComValidate").empty();
                        $("#mdpComValidate").append(html_image);
                    } else if (mdp_saisi.length < 6) {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#mdpComValidate").empty();
                        $("#mdpComValidate").append(html_image);
                        $("#mdpComMessage").fadeIn("slow");
                        $("#mdpComMessage").html('<font color="red">Ce champ doit contenir au moins 6 caractères</font>');
                    } else {
                        $("#mdpComMessage").fadeOut("slow");
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#mdpComValidate").empty();
                        $("#mdpComValidate").append(html_image);
                    }
                });
                $("#mdp2_com").blur(function () {
                    var mdp_saisi = $("#mdp_com").val();
                    var mdp2_saisi = $("#mdp2_com").val();
                    if (mdp_saisi != mdp2_saisi || mdp2_saisi == "" || mdp_saisi == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#mdp2ComValidate").empty();
                        $("#mdp2ComValidate").append(html_image);
                        $("#mdpComMessage1").fadeIn("slow");
                        $("#mdpComMessage1").html('<font color="red">Confirmation différent du mot de passe saisi</font>');
                    } else {
                        $("#mdpComMessage1").fadeOut("slow");
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#mdp2ComValidate").empty();
                        $("#mdp2ComValidate").append(html_image);
                    }
                });*/
                
               /*$('#est_professionnel_com').change(function() {
                    var est_professionnel = $(this).val();
                    if (est_professionnel == 1) {
                        $('#professionnel_com').show();
                    } else {
                        $('#professionnel_com').hide();
                    }

                });*/
             /*  $("#professionnel_siret_com").blur(function () {
                    var saisi = $("#professionnel_siret_com").val();
                    if (saisi == null || saisi == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#proSiretValidate_com").empty();
                        $("#proSiretValidate_com").append(html_image);
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#proSiretValidate_com").empty();
                        $("#proSiretValidate_com").append(html_image);
                    }
                });
                $("#professionnel_raison_sociale_com").blur(function () {
                    var saisi = $("#professionnel_raison_sociale_com").val();
                    if (saisi == null || saisi == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#proRaisonSocialeValidate_com").empty();
                        $("#proRaisonSocialeValidate_com").append(html_image);
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#proRaisonSocialeValidate_com").empty();
                        $("#proRaisonSocialeValidate_com").append(html_image);
                    }
                });
                $("#professionnel_telephone_com").blur(function () {
                    var saisi = $("#professionnel_telephone_com").val();
                    if (saisi == null || saisi == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#proTelValidate_com").empty();
                        $("#proTelValidate_com").append(html_image);
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#proTelValidate_com").empty();
                        $("#proTelValidate_com").append(html_image);
                    }
                });*/
                
               /* var formValidator_identification_com = new ValidatorClass();
                formValidator_identification_com.init({
                    form: '#inscription_form_com',
                    errorColors: {
                        isRequired: 'yellow',
                        isEmail: 'red',
                        isNumeric: 'red'
                    },
                    isRequired: ['nom_com', 'pseudo_com', 'email_com', 'mdp_com', 'mdp2_com'],
                    isEmail: ['email_com'],
                    isNumeric: ['annee_com', 'jour_com'],
                    bindElement: '#inscription_button_com',
                    emailFieldMsg: '- Email invalide',
                    requiredFieldMsg: '- Les champs colorés en jaunes sont requis',
                    numericFieldMsg: '- Les champs colorés en rouge doivent êtres numériques',
                    callback: function () {}
                });*/
                
               /*  $("#inscription_form_com").submit(function () {
                  if (!$("#cg_com:checked").val()) {
                        alert('Veuillez valider les conditions générales');
                        return false;
                    }
                    if ($("#mdp_com").val() == "") {
                        alert('Le champ sexe est requis');
                        return false;
                    }
                    if ($("#mdp_com").val() != $("#mdp2_com").val()) {
                        alert('Le champ mot de passe et confirmation doivent être identiques');
                        return false;
                    }
                    if ($('#est_professionnel_com').val() == 1) {
                        if ($('#professionnel_siret_com').val() == '') {
                            alert('En tant que professionnel vous devez fournir votre numéro de siret');
                            return false;
                        }
                        if ($('#professionnel_raison_sociale_com').val() == '') {
                            alert('En tant que professionnel vous devez fournir votre raison sociale');
                            return false;
                        }
                        if ($('#professionnel_telephone_com').val() == '') {
                            alert('En tant que professionnel vous devez fournir votre numéro de téléphone');
                            return false;
                        }
                    }
                    var pseudo_saisi = $("#pseudo_com").val();
                    var regexp = new RegExp('^([a-zA-Z0-9]+)$');
                    if (!pseudo_saisi.match(regexp)) {
                        alert('Le pseudo ne doit contenir que des chiffres ou des lettres non accentuées');
                        return false;
                    } else {
                        var sexe = $("#sexe_com").val();
                        var nom = $("#nom_com").val();
                        var prenom = $("#prenom_com").val();
                        var pseudo = $("#pseudo_com").val();
                        var email = $("#email_com").val();
                        var mdp = $("#mdp_com").val();
                        var jour = $("#jour_com").val();
                        var mois = $("#mois_com").val();
                        var annee = $("#annee_com").val();
                        var avatar = $("input[name=avatar_insc_com]:checked").val();
                        var est_professionnel = $('#est_professionnel_com').val();
                        var pro_siret = $('#professionnel_siret_com').val();
                        var pro_raison_sociale = $('#professionnel_raison_sociale_com').val();
                        var pro_telephone = $('#professionnel_telephone_com').val();
                        
                        urlInscription = jurl_portail_membre_inscriptionmembrecom;
                        urlInscription += "?sexe=" + sexe + "&nom=" + nom + "&prenom=" + prenom + "&pseudo=" + pseudo;
                        urlInscription += "&email=" + email + "&mdp=" + mdp;
                        urlInscription += "&jour=" + jour + "&mois=" + mois + "&annee=" + annee;
                        urlInscription += "&avatar=" + avatar;
                        urlInscription += "&est_professionnel="+est_professionnel;
                        urlInscription += "&professionnel_siret="+pro_siret;
                        urlInscription += "&professionnel_raison_sociale="+pro_raison_sociale;
                        urlInscription += "&professionnel_telephone="+pro_telephone;
                        
                        $.getJSON(urlInscription, function (data) {
                            if (data.url_blog != '') {}
                            if (data.inscr == 0) {
                                alert("Ce pseudo existe déjà, veuillez inserer un autre");
                            } else if (data.inscr == 3) {
                                alert(data.error_msg);
                            } else if (data.inscr == 2) {
                                alert("Il n'y a aucun produit dans votre panier");
                            } else {
                                var pseudo_membre = data.detail_membre.pseudo;
                                var identifant_membre = data.identifiant_membre;
                                var numero_panier = data.numero_panier;
                                $("#pseudo_livraison").text(pseudo_membre);
                                $("#membre_livraison").attr("value", identifant_membre);
                                $("#panier_livraison").attr("value", numero_panier);
                                var adresseLivraisonPanier = data.adresseLivraisonPanier;
                                var recap_nom = "";
                                if (data.detail_membre.sexe == "Femme") {
                                    recap_nom += "Mme ";
                                } else {
                                    recap_nom += "Mr ";
                                }
                                $("#adresse_livraison").val(data.adresseLivraisonPanier.adresse);
                                $("#cp_livraison").val(data.adresseLivraisonPanier.code_postal);
                                $("#ville_livraison").val(data.adresseLivraisonPanier.ville);
                                $("#pays_livraison").val(data.adresseLivraisonPanier.numero_pays);
                                $("#telephone_livraison").val(data.adresseLivraisonPanier.telephone);
                                $("#portable_livraison").val(data.adresseLivraisonPanier.portable);
                                recap_nom += data.detail_membre.nom + " " + data.detail_membre.prenom;
                                $("#recap_nom").text(recap_nom);
                                $("#confirmation_button_com").attr("numero_panier", numero_panier);
                                var recap_address = "";
                                recap_address += adresseLivraisonPanier.adresse + "<br />";
                                recap_address += adresseLivraisonPanier.code_postal + "&nbsp;";
                                recap_address += adresseLivraisonPanier.ville + "<br />";
                                recap_address += adresseLivraisonPanier.pays;
                                $("#recap_address").append(recap_address);
                                cacherToutesEtapes();
                                $("#etape_livraison").attr("style", "display:block");
                                urlMenuLoge = jurl_portail_membre_menuloge;
                                $("#div_menu_loge").load(urlMenuLoge, null, function (responseText, textStatus, XMLHttpRequest) {});
                            }
                        });
                        return false;
                    }
                });*/
                //fin inscription commande 

                //connexion
             /* $("#connexion_button_com").click(function () {
					
                    var login = $("#login_com").val();
                    var pass = $("#password_com").val();
                    var auto_com = $("#auto_com").val();
                    urlConnexion = jurl_portail_membre_connexionmembrecom;
                    urlConnexion += "?login=" + login + "&pass=" + pass + "&auto_com=" + auto_com;
                   
                    $.getJSON(urlConnexion, function (data) {
                        var conn = data.conn;
                        if (data.url_blog != '') {}
                        if (conn == 0) {
                            alert("Login ou mot de passe incorrect");
                        } else if (conn == 2) {
                            alert("Il n'y a aucun produit dans votre panier");
                        } else {
                            $("#adresse_livraison").val(data.adresseLivraisonPanier.adresse);
                            $("#cp_livraison").val(data.adresseLivraisonPanier.code_postal);
                            $("#ville_livraison").val(data.adresseLivraisonPanier.ville);
                            $("#pays_livraison").val(data.adresseLivraisonPanier.numero_pays);
                            $("#telephone_livraison").val(data.adresseLivraisonPanier.telephone);
                            $("#portable_livraison").val(data.adresseLivraisonPanier.portable);
                            var pseudo_membre = data.detail_membre.pseudo;
                            var identifant_membre = data.identifiant_membre;
                            var numero_panier = data.numero_panier;
                           $("#pseudo_livraison").text(pseudo_membre);
                            $("#membre_livraison").attr("value", identifant_membre);
                              $("#panier_livraison").attr("value", numero_panier);
                           var adresseLivraisonPanier = data.adresseLivraisonPanier;
                           var recap_nom = "";
                            if (data.detail_membre.sexe == "Femme") {
                                recap_nom += "Mme ";
                            } else {
                                recap_nom += "Mr ";
                            }
                            recap_nom += data.detail_membre.nom + " " + data.detail_membre.prenom;
                            $("#recap_nom").text(recap_nom);
                            $("#confirmation_button_com").attr("numero_panier", numero_panier);
                           var recap_address = "";
                            recap_address += adresseLivraisonPanier.adresse + "<br />";
                            recap_address += adresseLivraisonPanier.code_postal + "&nbsp;";
                            recap_address += adresseLivraisonPanier.ville + "<br />";
                            recap_address += adresseLivraisonPanier.pays;
                            $("#recap_address").append(recap_address);
                            cacherToutesEtapes();
                            var adresse_livraison = $("#adresse_livraison").val();
                           if (adresse_livraison == "") {
                                cacherToutesEtapes();
                                $("#etape_livraison").attr("style", "display:block");
                            } else {
                                cacherToutesEtapes();
                                toEtape_confirmation();
                            }
                            urlMenuLoge = jurl_portail_membre_menuloge;
                            $("#div_menu_loge").load(urlMenuLoge, null, function (responseText, textStatus, XMLHttpRequest) {});
                        }
                    })
                });*/
				
                //fin connexion
                //adresse de livraison
                //verification champs
              /* $("#adresse_livraison").blur(function () {
                    var adresse_livraison = $("#adresse_livraison").val();
                    adresse_livraison = jQuery.trim(adresse_livraison);
                    if (adresse_livraison == null || adresse_livraison == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#adresseComValidate").empty();
                        $("#adresseComValidate").append(html_image)
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#adresseComValidate").empty();
                        $("#adresseComValidate").append(html_image);
                    }
                });
                $('#cp_livraison').blur(function() {
                    var cp_livraison = $("#cp_livraison").val();
                    cp_livraison = jQuery.trim(cp_livraison);
                    if (cp_livraison == null || cp_livraison == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#cpComValidate").empty();
                        $("#cpComValidate").append(html_image);
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#cpComValidate").empty();
                        $("#cpComValidate").append(html_image);
                    }
                });
                $("#ville_livraison").blur(function () {
                    var ville_livraison = $("#ville_livraison").val();
                    ville_livraison = jQuery.trim(ville_livraison);
                    if (ville_livraison == null || ville_livraison == "") {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
                        $("#villeComValidate").empty();
                        $("#villeComValidate").append(html_image);
                    } else {
                        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
                        $("#villeComValidate").empty();
                        $("#villeComValidate").append(html_image);
                    }
                });
                $("#telephone_livraison").blur(function () {
                    var telephone_livraison = $("#telephone_livraison").val();
                    telephone_livraison = jQuery.trim(telephone_livraison);
                    mettre_image_numerique(telephone_livraison, "telephoneComValidate", "telephone_livraison", 10);
                });
                var formValidator_livraison_com = new ValidatorClass();
               formValidator_livraison_com.init({
                    form: '#livraison_form_com',
                    errorColors: {
                        isRequired: 'yellow',
                        isNumeric: 'red'
                    },
                    isRequired: ['cp_livraison', 'ville_livraison', 'adresse_livraison', 'telephone_livraison'],
                    isNumeric: ['cp_livraison', 'telephone_livraison'],
                    bindElement: '#livraison_button_com',
                    requiredFieldMsg: '- Les champs colorés en jaunes sont requis',
                    numericFieldMsg: '- Les champs colorés en rouge sont numeriques',
                    callback: function () {}
                });*/
               
               /* $("#livraison_form_com").submit(function () {
                    var panier_livraison = data.numero_panier;
                    var adresse_livraison = $("#adresse_livraison").val();
                    adresse_livraison = jQuery.trim(adresse_livraison);

                    var cp_livraison = $("#cp_livraison").val();
                    cp_livraison = jQuery.trim(cp_livraison);

                    var ville_livraison = $("#ville_livraison").val();
                    ville_livraison = jQuery.trim(ville_livraison);

                    var pays_livraison = $("#pays_livraison").val();

                    var telephone_livraison = $("#telephone_livraison").val();
                    telephone_livraison = jQuery.trim(telephone_livraison);

                    var portable_livraison = $("#portable_livraison").val();
                    portable_livraison = jQuery.trim(portable_livraison);

                    urlLivraison = jurl_portail_panier_updatelivraisonpanier;
                    urlLivraison += "?numero_panier=" + panier_livraison + "&adresse=" + adresse_livraison + "&code_postal=" + cp_livraison + "&ville=" + ville_livraison + "&pays=" + pays_livraison + "&telephone=" + telephone_livraison + "&portable=" + portable_livraison;
                    $.getJSON(urlLivraison, function (data) {
                        var success = data.success;
                        if (success == 'false') {
                            return false;
                        }

                        var adresseLivraisonPanier = data.adresseLivraisonPanier;
                        $("#adresse_livraison").val(adresseLivraisonPanier.adresse);
                        $("#cp_livraison").val(adresseLivraisonPanier.code_postal);
                        $("#ville_livraison").val(adresseLivraisonPanier.ville);
                        $("#pays_livraison").val(adresseLivraisonPanier.numero_pays);
                        $("#telephone_livraison").val(adresseLivraisonPanier.telephone);
                        $("#portable_livraison").val(adresseLivraisonPanier.portable);
                        var recap_address = "";
                        recap_address += adresseLivraisonPanier.adresse + "<br />";
                        recap_address += adresseLivraisonPanier.code_postal + "&nbsp;";
                        recap_address += adresseLivraisonPanier.ville + "<br />";
                        recap_address += adresseLivraisonPanier.pays;
                        $("#recap_address").empty();
                        $("#recap_address").append(recap_address);
                       // cacherToutesEtapes();
                        //toEtape_confirmation();
                    });
                    return false;
                });*/
                //fin adresse de livraison 
            });
        });
    });
    /******** fin panier ******/
    //paiement
    $(".btn_paiement").click(function () {
        var numero_produit_panier = $(this).attr("numero_produit_panier");
        
        urlPaiement = jurl_portail_panier_paiement;
        urlPaiement += "?numero_produit_panier=" + numero_produit_panier + "&mode_paiement=cheque";
        document.location.replace(urlPaiement);
    });
    /********
     *fin etape de paiement
     **/
    /* fin commande*/
    
    
    /*commentaire video*/
    $('.vp').click(function () {
        $('#TB_window').append(description)
    });
    $('#mode').click(function () {
        $('#TB_title').append("<img src='"+ j_jelixwww +"design/images/videos_modes.gif'><br><h2>" + titre_mode + "</h2>");
    });
    $('#formation').click(function () {
        $('#TB_title').append("<img src='"+ j_jelixwww +"design/images/videos_formations.gif'><br><h2>" + titre_formation + "</h2>");
    });
    $('#conseil').click(function () {
        $('#TB_title').append("<img src='"+ j_jelixwww +"design/images/videos_conseils.gif'><br><h2>" + titre_conseil + "</h2>");
    });
    $('.lien_video').click(function () {
        var categorie = $(this).attr("categorie");
        var id = $(this).attr("id");
        var numero_video = $(this).attr("numero_video");
        lightbox(categorie, id, numero_video);
    });

    //***************************pour les videos lightbox de la page accueil************************//
    $('.light_video').click(function () {
        var numero_categorie = $(this).attr("numero_categorie");
        var numero_video = $(this).attr("numero_video");
        var titre = $(this).attr("titre");
        var contenu = $(this).attr("contenu");
        var parametrehome = {};
        parametrehome.allowScriptAccess = "always";
        parametrehome.quality = "high";
        parametrehome.allowFullScreen = true;
        parametrehome.wmode = "transparent";
        if (numero_categorie == 1) {
            var image = "videos_modes.gif";
        }
        if (numero_categorie == 2) {
            var image = "videos_formations.gif";
        }
        if (numero_categorie == 3) {
            var image = "videos_conseils.gif";
        }
        var html = '<h1><img src="'+ j_jelixwww +'design/images/' + image + '" alt=""/></h1><ul id="mycarousel"  class="jcarousel-skin-tango">';
        urlVideo = jurl_services_videos_videoaccueil;
        urlVideo += "?numero_video=" + numero_video + "&numero_categorie_video=" + numero_categorie;
        $.getJSON(urlVideo, function (data) {
            var infosMembreConnecte = data.infosMembreConnecte;
            var unVideo = data.unVideo;
            var detail_video = data.detail_video;
            var commentaire_premier_video = "";
            var comment_zero = "";
            var bar = j_jelixwww +"design/images/flesh_bar.gif";
            var image = j_jelixwww +"/design/images/vos_commentaires.gif";
            var text = "Faire un commentaire";
            var image_comment = "";
            var image_flesh = "";
            image_comment = "<img src=\"" + image + "\" class=\"titre\"/>";
            image_flesh = "<img src=\"" + bar + "\" class=\"flesh\"/>";
            if ((infosMembreConnecte.identifiant_membre) != null) {
                if (infosMembreConnecte.sexe == "Femme") {
                    classe_zero = "commentaire rose";
                } else {
                    classe_zero = "commentaire bleu";
                }
                var index = numero_video;
                comment_zero = get_comment_zero(classe_zero, infosMembreConnecte, numero_video, index);
                commentaire();
            }
            commentaire_premier_video = get_html_comment_video(detail_video['commentaire'], numero_video);
            html += '<li><div class="video_carosel"><h2><span class="nombre_video"></span><span class="lien_car" numero_vid="' + numero_video + '">' + titre + '</span></h2><div id="video' + numero_video + '">&nbsp;</div><p class="video_bottom">' + contenu + '</p></div><div id="profileCommentaireBlock"><div class="bar_com">' + image_comment + '' + image_flesh + ' <a href="javascript:void(0);" class="text">' + text + ' </a> </div><br/><div id="comment_zero_vid">' + comment_zero + '</div> <div id="comment_all' + numero_video + '">' + commentaire_premier_video + '</div></div></li>';
            html += '<div class="clear"></div></ul>';
            $("#div_video_light").empty();
            $("#div_video_light").append(html);
            $(".inputs").blur(function () {
                var num_vid = $(this).attr("numero_video");
                var commentaire = $("#commentaire_video_0" + num_vid).val();
                var mere = $("#mere_video_0" + num_vid).val();
                $('.zero').hide();
                set_comment_zero(commentaire, mere, num_vid, num_vid);
            });
            $('.zero').hide();
            $('.text').click(function () {
                if ((infosMembreConnecte.identifiant_membre) != null) {
                    $('.zero').slideToggle('normal');
                } else {
                    $.modal.impl.close();
                    $(this).delay(3000, function () {
                        $('#compte_container').modal({
                            position: ['5px', ],
                            onOpen: modalOpen,
                            onClose: modalClose
                        })
                    })
                }
            });
            swfobject.embedSWF(j_jelixwww+"swf/video-light-box.swf?flv=" + unVideo['url_video'] + "&autoPlay=true", "video" + numero_video, "482", "321", "9.0.28", false, false, parametrehome);
        })
    });
    //**************************************************************//
    //***************************fin pour les videos lightbox de la page accueil************************//      
    /*fin commentaire*/
    /**** debut formulaire ordre cheque ****/
    $(".paiement_cheque").click(function () {
        urlOrdre = jurl_portail_membre_ordrecheque;
        $("#cheque_container").load(urlOrdre, null, function (responseText, textStatus, XMLHttpRequest) {
            var formValidator_ordre_cheque = new ValidatorClass();
            formValidator_ordre_cheque.init({
                form: '#ordre_cheque_form',
                errorColors: {
                    isRequired: 'yellow'
                },
                isRequired: ['nom_ordre', 'adresse_ordre', 'ville_ordre', 'cp_ordre'],
                bindElement: '#btn_ordre_cheque',
                requiredFieldMsg: '- Les champs colorés en jaunes sont requis',
                callback: function () {}
            });
            $("#ordre_cheque_form").submit(function () {
                var nom_ordre = $("#nom_ordre").val();
                var adresse_ordre = $("#adresse_ordre").val();
                var cp_ordre = $("#cp_ordre").val();
                var ville_ordre = $("#ville_ordre").val();
                var pays_ordre = $("#pays_ordre").val();
                urlOrdreCheque = jurl_portail_membre_updateordrecheque;
                urlOrdreCheque += "?nom=" + nom_ordre + "&adresse=" + adresse_ordre + "&code_postal=" + cp_ordre + "&ville=" + ville_ordre + "&pays=" + pays_ordre;
                $.getJSON(urlOrdreCheque, function (data) {
                    $.modal.impl.close();
                });
                return false;
            })
        })
    });
    /**** fin formulaire ordre cheque ****/
    /**** debut formulaire coordonnees bancaire 
     * supprime iban de isRequired : ['nom_titulaire_compte','domiciliation_bancaire','agence_bancaire','code_banque','code_gichet','num_compte','cle_rib','iban'],
     ****/
    $(".paiement_bancaire").click(function () {
        urlCoord = jurl_portail_membre_coordonneebancairezone;
        $("#coord_bancaire").load(urlCoord, null, function (responseText, textStatus, XMLHttpRequest) {
            var formValidator_banque = new ValidatorClass();
            formValidator_banque.init({
                form: '#coordonne_bancaire_form',
                errorColors: {
                    isRequired: 'yellow'
                },
                isRequired: ['nom_titulaire_compte', 'iban', 'code_bic'],
                bindElement: '#btn_coordonne_bancaire',
                requiredFieldMsg: 'Les champs colorés en jaunes sont requis',
                callback: function () {}
            });
            $("#coordonne_bancaire_form").submit(function () {
                var nom_titulaire_compte = $("#nom_titulaire_compte").val();
                var iban = $("#iban").val();
                var code_bic = $("#code_bic").val();
                urlCoordonnesBancaire = jurl_portail_membre_updatecoordonneebancaire;
                urlCoordonnesBancaire += "?nom_titulaire_compte=" + nom_titulaire_compte;
                urlCoordonnesBancaire += "&iban=" + iban;
                urlCoordonnesBancaire += "&code_bic=" + code_bic;
                $.getJSON(urlCoordonnesBancaire, function (data) {
                    $.modal.impl.close()
                });
                return false
            })
        })
    });
    /**** fin formulaire coordonnee bancaire ****/
});

function toEtape_confirmation() {
    $("#etape_confirmation").empty();
    $("#etape_confirmation").attr("style", "display:block");
    //etape confirmation
    urlConfirmation = jurl_portail_panier_etape_confirmation;
    $("#etape_confirmation").load(urlConfirmation, null, function (responseText, textStatus, XMLHttpRequest) {
        $(".suivi_commande").click(function () {
            var numero_produit_panier = $(this).attr("numero_produit_panier");
            var suivi = $(this).attr("suivi");
            if (suivi == 1) {
                var urlSuivi = jurl_portail_panier_sans_suivi_commande;
                urlSuivi += "?numero_produit_panier=" + numero_produit_panier;
                $.getJSON(urlSuivi, function (data) {
                    $("#suivi_" + numero_produit_panier).attr("suivi", 0);
                    $(".tot_final_commande").text(data.total_final);
                    $("#prix_suivi_" + numero_produit_panier).attr("style", "text-decoration: line-through;")
                })
            } else {
                var urlSuivi = jurl_portail_panier_suivi_commande;
                urlSuivi += "?numero_produit_panier=" + numero_produit_panier;
                $.getJSON(urlSuivi, function (data) {
                    $("#suivi_" + numero_produit_panier).attr("suivi", 1);
                    $(".tot_final_commande").text(data.total_final);
                    $("#prix_suivi_" + numero_produit_panier).attr("style", "")
                })
            }
        });
        $(".chronopost").click(function () {
            var numero_produit_panier = $(this).attr("numero_produit_panier");
            var chronopost = $(this).attr("chronopost");
            if (chronopost == 1) {
                var urlChronopost = jurl_portail_panier_sans_chronopost;
                urlChronopost += "?numero_produit_panier=" + numero_produit_panier;
                $.getJSON(urlChronopost, function (data) {
                    $("#chronopost_" + numero_produit_panier).attr("chronopost", 0);
                    $(".tot_final_commande").text(data.total_final);
                    $("#prix_chronopost_" + numero_produit_panier).attr("style", "text-decoration: line-through;")
                })
            } else {
                var urlChronopost = jurl_portail_panier_chonopost;
                urlChronopost += "?numero_produit_panier=" + numero_produit_panier;
                $.getJSON(urlChronopost, function (data) {
                    $("#chronopost_" + numero_produit_panier).attr("chronopost", 1);
                    $(".tot_final_commande").text(data.total_final);
                    $("#prix_chronopost_" + numero_produit_panier).attr("style", "")
                })
            }
        });
        
        $("#lien_modifier_coordonnee").click(function () {
            cacherToutesEtapes();
            $("#etape_livraison").attr("style", "display:block")
        });
        $(".tab_pannier").click(function () {
            cacherToutesEtapes();
            $("#etape_panier").attr("style", "display:block")
        });
        $(".tab_indentification").click(function () {
            cacherToutesEtapes();
            $("#etape_identification").attr("style", "display:block")
        });
        $(".tab_livraison").click(function () {
            cacherToutesEtapes();
            $("#etape_livraison").attr("style", "display:block")
        });
        $(".tab_confirmation").click(function () {
            cacherToutesEtapes();
            $("#etape_confirmation").attr("style", "display:block")
        });
        //fin navigation entre les etapes 
        //confirmation commande
        $("#confirmation_button_com").click(function () {
            var panier_facturation = $("#confirmation_button_com").attr("numero_panier");
            urlConfirmation = jurl_portail_panier_confirmerpanier;
            urlConfirmation += "?numero_panier=" + panier_facturation;
            $.getJSON(urlConfirmation, function (data) {
                if (data.ok == 0) {
                    alert('Une erreur s\'est produite. La commande n\'a pas pu être totalement validée. Veuillez réessayer svp');
                    return false;
                }
                cacherToutesEtapes();
                
                // Ajout tracker touslesprix.com
                var touslesprix_trackers = new Array(5);
                var commandes_length = data.commandes.length;
                for(var i = 0; i < commandes_length; ++i) {
                    touslesprix_trackers.push('<img src="http://affiliation.touslesprix.com/affilie.php?idb=3284&numcom='+data.commandes[i].numcom+'&montant='+data.commandes[i].montant+'" border="0" />');
                }
                var touslesprix_tracker = touslesprix_trackers.join('');
                $('#etape_paiement').append(touslesprix_tracker);
                
                $("#etape_paiement").attr("style", "display:block");
                urlPaiement = jurl_portail_gestionventesachts_etape_paiement;
                $("#etape_paiement").load(urlPaiement, null, function (responseText, textStatus, XMLHttpRequest) {
                    //paiement
                    $(".btn_paiement").click(function () {
                        var numero_produit_panier = $(this).attr("numero_produit_panier");

                        urlPaiement = jurl_portail_panier_paiement;
                        urlPaiement += "?numero_produit_panier=" + numero_produit_panier + "&mode_paiement=cheque";
                        document.location.replace(urlPaiement);
                    });
                });

            });
        });
        //fin confirmation commande
    });
    //fin etape confirmation
}

function mettre_image_numerique(champ, div, div_input, max) {
    if (is_numeric(champ) == false) {
        var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
        $("#" + div).empty();
        $("#" + div).append(html_image);
        $("#" + div_input).attr('style', 'background-color: red');
        $("#" + div + "Message").fadeIn("slow");
        $("#" + div + "Message").html('<font color="red">Ce champ doit contenir des chiffres </font>')
    } else if (is_numeric(champ) == true) {
        if (champ.length == max) {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_on.gif" alt="" />';
            $("#" + div).empty();
            $("#" + div).append(html_image);
            $("#" + div + "Message").fadeOut("slow");
            $("#" + div_input).attr('style', '')
        } else {
            var html_image = '<img class="imgValidate" src="'+ j_jelixwww +'design/images/bg_off.gif" alt="" />';
            $("#" + div).empty();
            $("#" + div).append(html_image);
            $("#" + div_input).attr('style', 'background-color: red');
            $("#" + div + "Message").fadeIn("slow");
            $("#" + div + "Message").html('<font color="red">Ce champ doit contenir ' + max + ' chiffres </font>')
        }
    }
}
function lightbox(categorie, id, numero_video) {
    $("#span-prev").empty();
    $("#span-next").empty();
    $("#div_video_light").empty();
    if (categorie == 1) {
        var image = "videos_modes.gif"
    }
    if (categorie == 2) {
        var image = "videos_formations.gif"
    }
    if (categorie == 3) {
        var image = "videos_conseils.gif"
    }
    if (id != null) {
        var html = '<h1><img src="'+ j_jelixwww +'design/images/' + image + '" alt=""/></h1><ul id="mycarousel"  class="jcarousel-skin-tango">';
        urlVideo = jurl_services_videos_listevideoparcategorietrie;
        urlVideo += "?numero_video=" + numero_video + "&numero_categorie_video=" + categorie;
        $.getJSON(urlVideo, function (data) {
            var liste_video = data.listeVideoParCategorie;
            var infosMembreConnecte = data.infosMembreConnecte;
            var nombre = data.nombre;
            if ((liste_video.length) != 0) {
                var commentaire_premier_video = "";
                var comment_zero = "";
                var bar = j_jelixwww +"design/images/flesh_bar.gif";
                var image = j_jelixwww +"design/images/vos_commentaires.gif";
                var text = "Faire un commentaire";
                var image_comment = "<img src=\"" + image + "\" class=\"titre\"/>";
                var image_flesh = "<img src=\"" + bar + "\" class=\"flesh\"/>";
                for (Val in liste_video) {
                    if (infosMembreConnecte.sexe == "Femme") {
                        classe_zero = "commentaire rose"
                    } else {
                        classe_zero = "commentaire bleu"
                    }
                    var index = liste_video[Val]["numero_video"];
                    comment_zero = get_comment_zero(classe_zero, infosMembreConnecte, numero_video, index);
                    commentaire();
                    commentaire_premier_video = get_html_comment_video(liste_video[Val]["commentaire"], liste_video[Val]["numero_video"]);
                    var nb = parseInt(Val) + 1;
                    html += '<li><div class="video_carosel"><h2><span class="nombre_video">[' + nb + ' sur ' + nombre + ']</span><span class="lien_car" numero_vid="' + liste_video[Val]["numero_video"] + '">' + liste_video[Val]["titre"] + '</span></h2><div id="video' + Val + '">&nbsp;</div><p class="video_bottom">' + liste_video[Val]["contenu"] + '</p></div><div id="profileCommentaireBlock"><div class="bar_com">' + image_comment + '' + image_flesh + ' <a href="javascript:void(0);" class="text">' + text + ' </a> </div><br/><div id="comment_zero_vid">' + comment_zero + '</div> <div id="comment_all' + liste_video[Val]["numero_video"] + '">' + commentaire_premier_video + '</div></div></li>'
                }
                html += '<div class="clear"></div></ul>';
                $("#div_video_light").append(html);
                var taille = liste_video.length;
                if (taille != 1) {
                    $("#span-prev").html('<a class="prev" href="#"><img src="' + chemin_prev + '" alt=""></a>');
                    $("#span-next").html('<a class="next" href="#"><img src="' + chemin_next + '" alt=""></a>');
                    $('.prev').hide();
                    scrollToVideo()
                }
                commentaire();
                $(".inputs").blur(function () {
                    var num_vid = $(this).attr("numero_video");
                    var commentaire = $("#commentaire_video_0" + num_vid).val();
                    var mere = $("#mere_video_0" + num_vid).val();
                    $('.zero').hide();
                    set_comment_zero(commentaire, mere, num_vid, num_vid)
                });
                $('.zero').hide();
                $('.text').click(function () {
                    if ((infosMembreConnecte.identifiant_membre) != null) {
                        $('.zero').slideToggle('normal')
                    } else {
                        $.modal.impl.close();
                        $(this).delay(3000, function () {
                            $('#compte_container').modal({
                                position: ['5px', ],
                                onOpen: modalOpen,
                                onClose: modalClose
                            })
                        })
                    }
                });
                for (Val in liste_video) {
                    url_video = liste_video[Val]['url_video'];
                    var lcId = new Date().getTime();
                    document["flashProxy" + Val] = new FlashProxy(lcId, j_jelixwww +"swf/JavaScriptFlashGateway.swf");
                    var sample = new FlashTag(j_jelixwww +"swf/video-light-box.swf", 482, 321, "7,0,14,0");
                    if (Val == 0) {
                        sample.setFlashvars("lcId=" + lcId + "&flv=" + url_video + "&autoPlay=true")
                    } else {
                        sample.setFlashvars("lcId=" + lcId + "&flv=" + url_video + "&autoPlay=false")
                    }
                    $('#video' + Val).html(sample + "")
                }
                $('.next').click(function () {
                    $('.prev').show();
                    var taille = liste_video.length;
                    var x = parseInt(taille) - 2;
                    var taille1 = parseInt(taille) - 1;
                    var courant = $('#courant').val();
                    var suivant = parseInt(courant) + 1;
                    if (courant < taille1) {
                        pause(courant);
                        marche(suivant);
                        $('#courant').val(parseInt(courant) + 1)
                    }
                    if (courant == x) {
                        $('.next').hide()
                    }
                });
                $('.prev').click(function () {
                    $('.next').show();
                    var courant = $('#courant').val();
                    var precedent = parseInt(courant) - 1;
                    if (courant > 0) {
                        pause(courant);
                        marche(precedent);
                        $('#courant').val(parseInt(courant) - 1)
                    }
                    if (courant == 1) {
                        $('.prev').hide()
                    }
                })
            }
        })
    }
}

function pause(i) {
    document["flashProxy" + i].call('FJGpauseMovie')
}
function marche(i) {
    document["flashProxy" + i].call('FJGplayMovie')
}
function cacherToutesEtapes() {
   document.getElementById("etape_panier").style.display = "none";
    document.getElementById("etape_identification").style.display = "none";
    document.getElementById("etape_livraison").style.display = "none";
    document.getElementById("etape_confirmation").style.display = "none";
    document.getElementById("etape_paiement").style.display = "none"
}
function ecrire_message(id_membre) {
    $(document).ready(function () {
        $("#identifiant_membre").val(id_membre);
        urlPseudo = jurl_portail_membre_getpseudomembre;
        urlPseudo += "?identifiant_membre=" + id_membre;
        $.getJSON(urlPseudo, function (data) {
            $("#loginDestinaitaire").html(data)
        })
    })
}
function repondre_commentaire(numero_commentaire) {
    $(document).ready(function () {
        var commentaire = $("#rep_" + numero_commentaire).val();
        var mere = numero_commentaire;
        var identifiant_membre = $("#identifiant_membre_0").val();
        if (commentaire != null && commentaire != "") {
            $("#rep_" + numero_commentaire).val("Rediger une reponse ... ");
            urlComment = jurl_services_membres_laissercommentairepourmembre;
            urlComment += "?identifiant_membre=" + identifiant_membre + "&mere=" + mere + "&commentaire=" + commentaire;
            $.getJSON(urlComment, function (data) {
                var commentaires = data.newCommentaire;
                if (commentaires != null) {
                    if (commentaires.detailAuteur.sexe == "Femme") {
                        classe = "reponse rose"
                    } else {
                        classe = "reponse bleu"
                    }
                    var html = '<div class="' + classe + ' reponse_text"><div class="auteur"><a href="#">' + commentaires.detailAuteur.pseudo + '</a>' + commentaires.heur + 'h ' + commentaires.minute + ' - ' + commentaires.date_creation_formate + '</div> <div class="reponse-meta"><img style="background-image:url('+ j_jelixwww +'upload/photo/miniature/membre/' + commentaires.detailAuteur.vignette + ');" src="'+ j_jelixwww +'design/images/spacer.gif" alt="" /></div><div class="reponse-content"><p>' + commentaires.commentaire + '</p></div></div>';
                    $("#div_rep_comment_" + numero_commentaire).append(html)
                }
            })
        }
    })
}
function repondre_commentaire_fiche_produit(numero_commentaire) {
    $(document).ready(function () {
        var commentaire = $("#rep_" + numero_commentaire).val();
        commentaire = commentaire.replace(/\n/, "<br />");
        var mere = numero_commentaire;
        var reference_produit = $("#reference_produit_0").val();
        if (commentaire != null && commentaire != "") {
            $("#rep_" + numero_commentaire).val("Rediger une reponse ... ");
            urlComment = jurl_services_produits_laissercommentairepourproduit;
            urlComment += "?reference_produit=" + reference_produit + "&mere=" + mere + "&commentaire=" + commentaire;
            $.getJSON(urlComment, function (data) {
                var commentaires = data.newCommentaire;
                if (commentaires != null) {
                    if (commentaires.detailAuteur.sexe == "Femme") {
                        classe = "reponse rose"
                    } else {
                        classe = "reponse bleu"
                    }
                    var url = commentaires.detailAuteur.url_dressing;
                    var url = commentaires.detailAuteur.url_dressing;
                    var html = '<div class="' + classe + ' reponse_text"><div class="auteur"><a href="#">' + commentaires.detailAuteur.pseudo + '</a>' + commentaires.heur + 'h ' + commentaires.minute + ' - ' + commentaires.date_creation_formate + '</div> <div class="reponse-meta"><img src="'+ j_jelixwww +'upload/photo/miniature/membre/' + commentaires.detailAuteur.vignette + '" alt="" /></div><div class="reponse-content"><p>' + commentaires.commentaire + '</p></div></div>';
                    $("#div_rep_comment_" + numero_commentaire).append(html)
                }
            })
        }
    });
    $("#rep_" + numero_commentaire).append("Rediger une reponse ...")
}

/*fonctions pour video*/

function set_comment_zero(commentaire, mere, numero_video, index) {
    if (commentaire != null && commentaire != "") {
        commentaire = commentaire.replace(/\n/, '<br />');
        urlComment = jurl_services_videos_laissercommentairepourvideo;
        urlComment += "?numero_video=" + numero_video + "&mere=" + mere + "&commentaire=" + commentaire;
        $.getJSON(urlComment, function (data) {
            var listeCommentairePourVideo = data.listeCommentairePourVideo;
            var infosMembreConnecte = data.infosMembreConnecte;
            var new_comment = get_html_comment_video(listeCommentairePourVideo, numero_video);
            $("#comment_all" + index).empty();
            $("#comment_all" + index).append(new_comment);
            $("#commentaire_video_0" + index).val('Rediger un commentaire...')
        })
    }
}
function get_fils(value) {
    if (value != null) {
        var fils = value;
        var comment_fils = "";
        for (val in fils) {
            if (fils[val]["detailAuteur"]["sexe"] == "Homme") {
                classeReponse = "commentaire bleu"
            } else {
                classeReponse = "commentaire rose"
            }
            urlMembre = fils[val]['detailAuteur']['url_dressing'];
            comment_fils += '<div class="' + classeReponse + ' reponse_text"><div class="reponse-meta"> <img src="'+ j_jelixwww +'upload/photo/miniature/membre/' + fils[val]['detailAuteur']['vignette'] + '" alt="" /></div><div class="auteur"><a href="' + urlMembre + '">' + fils[val]['detailAuteur']['pseudo'] + '</a>(' + fils[val]["heur"] + 'h : ' + fils[val]['minute'] + ' - ' + fils[val]['date_creation_formate'] + ')</div><div class="reponse-content"><p>' + fils[val]['commentaire'] + '</p> </div><div class="clear"></div></div>'
        }
        return comment_fils
    } else return ""
}
/*************************/

function open_fiche_membre(identifiant_membre) {
    urlMembre = jurl_portail_membre_fichemembre;
    urlMembre += "?identifiant_membre=" + identifiant_membre;
    window.location.replace(urlMembre)
}
/***********************/

function get_html_comment_video(tab, index) {
    if ((tab.length) != null) {
        var html_comment = "";
        for (Valeur in tab) {
            if (tab[Valeur]['detailAuteur']['sexe'] == "Femme") {
                classe = "commentaire rose"
            } else {
                classe = "commentaire bleu"
            }
            var comment_fils = get_fils(tab[Valeur]['fils']);
            urlMembre = tab[Valeur]['detailAuteur']['url_dressing'];
            html_comment += '<div class="unit_Commentaire ' + classe + '"><h4><a href="' + urlMembre + '">' + tab[Valeur]['detailAuteur']['pseudo'] + '</a>' + tab[Valeur]['heur'] + 'h ' + tab[Valeur]['minute'] + ' - ' + tab[Valeur]['date_creation_formate'] + '</h4><div class="postauthor"> <a href="#" class="com_close"> </a> <a href="' + urlMembre + '"><img  class="avatar avatar-80 photo" src="' + chemin_vignette + tab[Valeur]['detailAuteur']['vignette'] + '" alt=""/></a><p class="drg_commentaire">' + tab[Valeur]['commentaire'] + '</p></div></div>'
        }
        return html_comment
    }
}
function get_html_comment_video_accueil(tab, index) {
    if ((tab.length) != null) {
        var html_comment = "";
        for (Valeur in tab) {
            if (tab[Valeur]['detailAuteur']['sexe'] == "Femme") {
                classe = "commentaire rose"
            } else {
                classe = "commentaire bleu"
            }
            var comment_fils = get_fils(tab[Valeur]['fils']);
            urlMembre = tab[Valeur]['detailAuteur']['url_dressing'];
            html_comment += '<div class="unit_Commentaire ' + classe + '"><h4><a href="' + urlMembre + '">' + tab[Valeur]['detailAuteur']['pseudo'] + '</a>' + tab[Valeur]['heur'] + 'h ' + tab[Valeur]['minute'] + ' - ' + tab[Valeur]['date_creation_formate'] + '</h4><div class="postauthor"> <a href="#" class="com_close"> </a> <a href="' + urlMembre + '"><img  class="avatar avatar-80 photo" src="' + chemin_vignette + tab[Valeur]['detailAuteur']['vignette'] + '" alt=""/></a><p class="drg_commentaire">' + tab[Valeur]['commentaire'] + '</p></div></div>'
        }
        return html_comment
    }
}
function get_comment_zero(classe, infosMembreConnecte, numero_video, index) {
    urlMembre = infosMembreConnecte.url_dressing;
    var comment_zero = '<div class="zero unit_Commentaire ' + classe + '"><h4><a href="' + urlMembre + '">' + infosMembreConnecte.pseudo + '</a></h4><div class="postauthor"><a href="' + urlMembre + '"> <img class="avatar avatar-80 photo" src="' + chemin_vignette + infosMembreConnecte.vignette + '" alt=""/></a><textarea name="commentaire_video_0' + index + '" id="commentaire_video_0' + index + '" type="text" class="inputs" numero_video="' + index + '" index="' + index + '"> Rediger un commentaire ...</textarea><input name="mere_video_0' + index + '" id="mere_video_0' + index + '" value="0" type="hidden"/><input name="numero_video_0' + index + '" id="numero_video_0' + index + '" value="' + numero_video + '" type="hidden"/></div></div>';
    return comment_zero
}



