Football: Constantine: “I’m not going to drop the case” – News Sports: Football

0
0


[*]

And the verdict is… let’s play again! Unsurprisingly (not taking over would have been one), the 20 clubs in the Swiss Football League have largely endorsed the resumption of the season, stopped since February 23. From the weekend of June 20 and 21, there will remain thirteen days to go, which should lead us until Sunday August 2 (end of the championship).

Obtained by an overwhelming majority, this vote inevitably made many winners and some rare losers (the abstainers) as well as FC Sion, which, from the start, had displayed its total opposition to the resumption of the championship.

Settle the staff question

For the Valaisan club, the failure in the ballot boxes is further accentuated by the rejection, almost equally massive, of the formula “12 + 8” proposed by the LS which would have made it possible to remove all sports risks from the moment it n there would have been no relegation.

But this will not be the case, and FC Sion will have to fight for its survival. “I can’t say that I’m curling my mustache,” said Christian Constantin. I’m going to do what it takes to prepare a team that will hold the road for June 20 against St. Gallen … “It is however not at all certain that Ricardo Dionisio is still the coach at this date. “Under a renewal clause ending on May 31,” said the Valais president, “I have to tell him until Sunday if we are going to continue together for two years. My coach received an important offer in Portugal. I don’t see myself polluting its future. But I have to settle the question of my staff. ”

The risk of debt of 30 million

The resumption of the season obviously thwarts the plans of the owner of Tourbillon. “In politics, those who win are always the most numerous, but it is not necessarily those who have the best ideas. This Friday, Swiss football took in 30 million debt after the summer. ”

As he had promised, Christian Constantin will now set in motion the judicial machine, turning to the courts. “I’m not going to drop the case,” he announced. I think my arguments are correct. We don’t have the same weapons to compete for the 38% of the championship. We will see in court if I am the only one who thinks that the season is skewed… ”This should go through the filing of provisional measures.

After having already separated from several players, including Johan Djourou and Xavier Kouassi, who passed this Friday even to the “enemy” of Xamax, Sion could still lose Pajtim Kasami, Ermir Lenjani and Mickaël Facchinetti, all at the end of the contract on June 30 and free from that point on. Will they all agree to continue the season in Valais? This is one of the unknown multiples of the recovery to come. On the signature of Djourou and Kouassi at La Maladière, their former employer wants to be fatalist. “In place of Jeff (editor’s note: Jean-François Collet), I would’ve done the same thing. Xavier and Johan were right to sign there, ”concludes CC.

This will spice up the expected reunion between Xamax and Sion, scheduled for mid-July at La Maladière, on the 31st day.

N.JR

Created: 05.29.2020, 9:34 p.m.

    var commentNotSent = true;
    ///////////////////////////////////////////////////
    // object FBcomments, can be reused for FB authentification
    var FBcomments = {
            fbAppId : '188734271214193',
            version: 'v2.0',
            fbChannel_path : '/facebook_xd_receiver.html', 
            isLoggedIn : false, 

        ///////////////////////////////////////////////////
            initFb : function() {   
                window.fbAsyncInit = function() {
                FB.init({appId: FBcomments.fbAppId, version: FBcomments.version});
                if (typeof FB === 'undefined') {
                            alert($("#tr_fbConnectError").html()); 
                        } 
            };

            (function(d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) return;
                js = d.createElement(s); js.id = id;
                js.src = "https://connect.facebook.net/fr_FR/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
        },
        ///////////////////////////////////////////////////
        fbLogin : function() { 
         var populateFbData_ = this.populateFbData;
         var fbDisplay_ = this.fbDisplay;   
         var promptFanBox_ = this.promptFanBox;

             FB.init({appId: FBcomments.fbAppId, version: FBcomments.version}); 
             if (typeof FB === 'undefined') {
                alert($("#tr_fbConnectError").html()); 
             }  
                            FB.login(function(response) {
                                  if (response.authResponse) {
                                     // granted some permissions 
                                     this.isLoggedIn = true; 
                                     populateFbData_(response.authResponse.accessToken, response.authResponse.userID);
                                     fbDisplay_(); 
                                     promptFanBox_(response.authResponse.userID);
                                  } 
                                  else { 
                                    // user is not logged
                                    this.isLoggedIn = false;
                                    fbDisplay_();  
                                  }
                                }, {scope:'publish_actions'});
            },
            ///////////////////////////////////////////////////
            fbLogout : function() {  
                var fbDisplay_ = this.fbDisplay;
                $.cookie('fbsNN', '', { path: '/', expires: -1 });
                isLoggedIn = false;
                fbDisplay_();
            },

            ///////////////////////////////////////////////////
            populateFbData : function(accessToken, userID) {
                fbAccessToken = accessToken;
                fbUserID = userID;
                FB.api(
                '/me',
                {
                    fields: 'name'
                },
                function(response) {
                    var fbUserName = '';
                    if (response){
                        if (response.name){
                            fbUserName = response.name;
                        }
                    }
                    // store a fb-independent cookie for future login 
                    $.cookie('fbsNN', "access_token="+escape(fbAccessToken)+""+"&uid="+fbUserID+"&realname="+escape(fbUserName), { path: '/', expires: 30 }); 
                    fbDomInsert(fbUserName, fbUserID, fbAccessToken);
                }
                );
            },

            ///////////////////////////////////////////////////
            promptFanBox : function(userId) {
                FB.api({
                    method: 'fql.query',        
                    query: 'SELECT uid FROM page_fan WHERE uid='+userId+' AND page_id='+107915992569379 
                    },
                        function(response) {
                            if (typeof response[0] === 'undefined') {
                                // user has not liked the page 
                                $(document).ready(function(){  
                                    var txt = $("#tr_fanBoxPromptTitle").html(); 
                                    tb_show(txt,'/facebook_iframe.html?&height=250&width=645');
                                });
                            }   
                        }
                     );
             },
             ///////////////////////////////////////////////////
             fbDisplay : function() {    
                    fbLoginDisplay(this.isLoggedIn );  
                    loginDrop();
             }
             ///////////////////////////////////////////////////
    } // end object


            ///////////////////////////////////////////////////
            // cookie based user registration, maybe replaced by user DB in future
        function fetch_nnCookie() { 
                    var nnRegex = /access_token=([^&]+)&uid=([0-9]+)&realname=(.+)/; 
                        nnRegex.exec($.cookie('fbsNN'));         
                        fbAccessToken = unescape(RegExp.$1);      
                        fbUserID = RegExp.$2;
                        fbUserName = unescape(RegExp.$3);     
        }
            ///////////////////////////////////////////////////
        function check_nnCookie() {           
                if( $.cookie('fbsNN') == null) {     
                    return false; 
                }
                else { 
                        fetch_nnCookie();   
                    // check for valid data, delete cookie otherwise 
                    if (fbAccessToken != null && fbAccessToken.length > 0 && fbUserID != null && fbUserID.length > 0  && fbUserName != null && fbUserName.length > 0 && fbUserName != 'undefined') {
                        fbDomInsert(fbUserName, fbUserID, fbAccessToken); 
                        return true;   
                    }
                    else {
                        $.cookie('fbsNN', '', { expires: -1 }); 
                        return false;  
                    }
                }
        }

        ///////////////////////////////////////////////////
        // form handler 
        function commentsForm_send () {
            var fbForm_message = $.trim($("#fbForm_message").val());
            var fbForm_msgID = $.trim($("#fbForm_msgID").val()); // if this value is > 0, its a reply-to-another-comment message 
            var fbForm_uri = $.trim($("#fbForm_uri").val());
            var fbForm_storyId = $.trim($("#fbForm_storyId").val());
            var fbForm_ip = $.trim($("#fbForm_ip").val());          
            var fbForm_realName = $.trim($("#fbForm_realName").val());
            var fbForm_userId = $.trim($("#fbForm_userId").val());
            var fbForm_userToken = $("#fbForm_userToken").val(); 
            var fbForm_publishOnFB = $("#fbForm_publishOnFB:checked").val();
            if (typeof fbForm_publishOnFB === 'undefined') {
                fbForm_publishOnFB = 0; 
            }
                var fbFormN_gotcha = $.trim($("#fbFormN_gotcha").val());    
                var hasErrors = false; 
                var messageReg =  fbForm_message.length > 1; 

                if (messageReg == false) {
                    $("#commentError_message").show();  
                    hasErrors = true; 
                }
                if (fbFormN_gotcha.length > 1) {
                    hasErrors = true; 
                } 

      if (!($('#disclaimerConfirmBtn').is(':checked'))) {
                    $("#commentError_disclaimer").show();
                    hasErrors = true; 
                }
            if (!hasErrors) {
                    $("#commentsForm_send").attr("disabled", "true");
                    $("#commentsForm_send_noFb").attr("disabled", "true");

                    $("#commentSendLoading").show(); 
                    $.ajax({ type: "POST",
                        dataType: "text",
                        cache: false,
                        url: "/community/talkback_ajax.html",
                        async: true,
                        data: "action=sendComment&fbForm_realName="+encodeURIComponent(fbForm_realName)+"&fbForm_userId="+fbForm_userId+"&fbForm_userToken="+encodeURIComponent(fbForm_userToken)+"&fbForm_publishOnFB="+fbForm_publishOnFB+"&fbForm_uri="+encodeURIComponent(fbForm_uri)+"&fbForm_storyId="+fbForm_storyId+"&fbForm_ip="+fbForm_ip+"&fbForm_message="+encodeURIComponent(fbForm_message)+"&fbForm_msgID="+fbForm_msgID,
                        error: function(){
                            alert($("#tr_commentSendError").html()); 
                        },
                        complete: function(reqCode){
                            $("#commentLogin").hide();
                            $("#fbForm_message").hide();
                            $("#fbForm_message_count_class").hide();        
                            $("#commentError_message").hide();
                                $("#commentError_name").hide();
                                $("#commentError_location").hide();
                                $("#commentError_email").hide();
                                $("#commentError_disclaimer").hide();
                                $(".disclaimerText").hide();
                                $("#commentInfo_noFb").hide();
                                $("#commentsForm_send").hide();
                                $("#fbCommentPublishCheckbox").hide();
                                $("#commentsForm_send_noFb").hide();
                            $("#commentInfo_Fb").show();
                            $("#commentSendLoading").hide();
                        }
                    });
                } // hasErrors
            }

        //////////////////////////////////////////////////
        function delete_cookie(cookie) {
            $.cookie(cookie, null, {path: '/'});
        }

        //////////////////////////////////////////////////
        function save_form_to_cookie(class_name) {
            var form = new Array();
            $("."+ class_name).each(function(index) {
                form[index] = {};
                form[index]['id'] = $(this).attr("id");
                form[index]['val'] = $(this).val();
            });
            $.cookie(class_name, JSON.stringify(form), {json:true});
        }

        //////////////////////////////////////////////////
        function save_object_to_cookie(data) {
            var form = new Array();
            form[0]['id'] = 'fbFormN_firstName';
            form[0]['val'] = '';
            form[1]['id'] = 'fbFormN_surname';
            form[1]['val'] = '';
            form[2]['id'] = 'fbFormN_zip';
            form[2]['val'] = '';
            form[3]['id'] = 'fbFormN_location';
            form[3]['val'] = '';
            form[4]['id'] = 'fbFormN_email';
            form[4]['val'] = '';
            $("."+ class_name).each(function(index) {
                form[index] = {};
                form[index]['id'] = $(this).attr("id");
                form[index]['val'] = $(this).val();
            });
            $.cookie(class_name, JSON.stringify(form), {json:true});
        }

        //////////////////////////////////////////////////
        function set_logged_in_cookie(data) {
            $.cookie('comment_login_details_email', JSON.stringify(data), {json:true,expires:14,path: '/'});
        }

        //////////////////////////////////////////////////
        function read_logged_in_cookie() {
            var cookie_form_data_json = $.cookie('comment_login_details_email');
            if (cookie_form_data_json != null) {
                var form_data = JSON.parse(cookie_form_data_json);
                if (typeof form_data != 'undefined') {
                    if (form_data.user.customer_id == 53){
                        if (typeof form_data.pcr != 'undefined' && form_data.pcr != null && form_data.pcr.length > 0){
                            if (typeof form_data.uid != 'undefined' && form_data.uid != null && form_data.uid != 0){
                                auto_login_email(form_data);
                                return;
                            }
                        }
                    } else {
                        auto_login_email(form_data);
                    }
                }
            }

        }

        //////////////////////////////////////////////////
        function read_form_from_cookie(class_name) {
            var cookie_form_data_json = $.cookie(class_name);
            var form_data = JSON.parse(cookie_form_data_json);
            $.each(form_data, function(index, value) {
                $("https://news.google.com/#"+ value.id).val(value.val);
            });
        }

        ///////////////////////////////////////////////////
        function commentsForm_create_account() {
            var fbFormN_firstName = $.trim($("#fbFormN_firstName").val());
            var fbFormN_surname = $.trim($("#fbFormN_surname").val());
            var fbFormN_zip = $.trim($("#fbFormN_zip").val());
            var fbFormN_location = $.trim($("#fbFormN_location").val());
            var fbFormN_telephone = $.trim($("#fbFormN_telephone").val());
            var fbFormN_email = $.trim($("#fbFormN_email").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());
            var fbForm_storyId = $.trim($("#fbForm_storyId").val());
            if ($("#fbFormN_password").length) {
                var fbFormN_password = $.trim($("#fbFormN_password").val());
            }
            if ($("#fbFormN_password_confirm").length) {
                var fbFormN_password_confirm = $.trim($("#fbFormN_password_confirm").val());
            }

            var fbFormN_gotcha = $.trim($("#fbFormN_gotcha").val());

            var hasErrors = false; 

            var nameReg = !(fbFormN_firstName.match(/[*]/)) && !(fbFormN_surname.match(/[*]/)) && fbFormN_firstName.length > 1 && fbFormN_surname.length > 1;
            var locReg = !(fbFormN_location.match(/[*]/))&& fbFormN_location.length > 1; 

if (fbFormN_telephone.length > 1) {

        var telephoneReg = (fbFormN_telephone.match(/^d{10}$/));

}
var emailRegObj = /^([a-zA-Z0-9_.-])[email protected]([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/; // /^([a-zA-Z0-9_.-+])[email protected](([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;

            var password_params = '';

            $("#commentError_name").hide();     
            $("#commentError_location").hide(); 
            $("#commentError_telephone").hide(); 
            $("#commentError_email").hide(); 
            $("#commentError_password").hide(); 
            $(".disclaimerText").hide();

            if (nameReg == false) {
                $("#commentError_name").show();     
                hasErrors = true; 
            }

            if (locReg == false) {
                $("#commentError_location").show();     
                hasErrors = true; 
            }

            if (telephoneReg == null) {
                $("#commentError_telephone").show();
                hasErrors = true; 
            }

            if(emailRegObj.test(fbFormN_email) == false){
                $("#commentError_email").show();
                hasErrors = true; 
            }

            if (fbFormN_gotcha.length > 1) {
                hasErrors = true;  
            }

            if ($("#fbFormN_password").length && $("#fbFormN_password_confirm").length) {
                if (fbFormN_password != fbFormN_password_confirm) {
                    $("#commentError_password").show();
                    hasErrors = true;
                }
                else {
                    password_params += "&fbFormN_password=" + encodeURIComponent(fbFormN_password);
                    password_params += "&fbFormN_password_confirm=" + encodeURIComponent(fbFormN_password_confirm);
                }
            }

            if (!hasErrors) {
                $("#commentsForm_send").attr("disabled", "true");
                $("#commentsForm_send_noFb").attr("disabled", "true");
                save_form_to_cookie('comment_form_input');
                jQuery.ajax({ type: "POST",
                    dataType: "json",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=talkback_create_account&fbFormN_firstName="+encodeURIComponent(fbFormN_firstName)+"&fbFormN_surname="+encodeURIComponent(fbFormN_surname)+"&fbFormN_zip="+encodeURIComponent(fbFormN_zip)+"&fbFormN_location="+encodeURIComponent(fbFormN_location)+"&fbFormN_telephone="+encodeURIComponent(fbFormN_telephone)+"&fbFormN_email="+encodeURIComponent(fbFormN_email)+"&customer_id="+fbForm_customerId+"&story_id="+encodeURIComponent(fbForm_storyId)+password_params,
                    error: function(){ },
                    success: function(data){
                        if (data.code == 0) {
                            setMessageBox(data.message, data.addclass);
                        } else {

        $("#disclaimerConfirm").hide();
        $("#fbForm_message").hide();
        $("#fbForm_message_count_class").hide();
        $("#commentError_message").hide();
        $("#commentInfo_Fb").hide(); 
        $("#commentsForm_send").hide();
        $("#fbCommentPublishCheckbox").hide();
        $("#commentsForm_send_noFb").hide();

        $("#comment_signup_form").hide();

        $("#sms_verify").show();
        $("#fbFormN_smsVer").show();
        $("#commentsForm_sms_veryfy").show();

                            setMessageBox(data.message, data.addclass);
                        }
                    }
                });
            }
        }

            /////////////////////////////////////////////////
            function confirm_delete_account() {
                var customer_id = $.trim($("#fbForm_customerId").val());
                var login_email_email = $.trim($("#login_email_email").val());
                var login_email_token = $.trim($("#login_email_token").val());

                jQuery.ajax({ type: "POST",
                    dataType: "json",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=confirm_delete_account&customer_id="+customer_id+"&email="+encodeURIComponent(login_email_email)+"&token="+login_email_token,  
                    error: function(){ },
                    success: function(data){
                        if (data.code == 0) {
                            setMessageBox(data.message, data.addclass);
                        }
                        else if (data.code == 1) {
                            $('#deleteAccount').html(data.message);
                            $('#deleteAccount').fadeIn(800);
                            $('#commentFormSubContainer').slideUp(1000);
                            $('body,html').stop().animate({
                                'scrollTop': $("#deleteAccount").offset().top-200
                            }, 1000)
                        }
                    }     
                });
            }

            /////////////////////////////////////////////////
            function cancel_delete_account() {
                $('#deleteAccount').html('');
                $('#deleteAccount').hide();
                $('#commentFormSubContainer').slideDown(1000);
            }

            /////////////////////////////////////////////////
            function delete_account() {
                var customer_id = $.trim($("#fbForm_customerId").val());
                var login_email_email = $.trim($("#login_email_email").val());
                var login_email_token = $.trim($("#login_email_token").val());

                jQuery.ajax({ type: "POST",
                    dataType: "json",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=delete_account&customer_id="+customer_id+"&email="+encodeURIComponent(login_email_email)+"&token="+login_email_token,  
                    error: function(){ },
                    success: function(data){
                        if (data.code == 0) {
                            setMessageBox(data.message, data.addclass);
                        }
                        else if (data.code == 1) {
                            $('#deleteAccount').html('');
                            $('#deleteAccount').hide();
                            $('#commentFormSubContainer').slideDown(1000);
                            setMessageBox(data.message, data.addclass);
                            delete_cookie('comment_login_details_email');
                        }
                        else if (data.code == 2) {
                            $('#deleteAccount').html('');
                            $('#deleteAccount').hide();
                            $('#commentFormSubContainer').slideDown(1000);
                            setMessageBox(data.message, data.addclass);
                        }
                    }     
                });
            }

        //////////////////////////////////////////////////
        function commentsForm_update_account_close() {
            $("#manageAccount").html('');
        }

        ///////////////////////////////////////////////////
        function commentsForm_update_account() {
            var fbFormN_firstName = $.trim($("#update_firstName").val());
            var fbFormN_surname = $.trim($("#update_surname").val());
            var fbFormN_zip = $.trim($("#update_zip").val());
            var fbFormN_location = $.trim($("#update_location").val());
            var fbFormN_telephone = $.trim($("#update_telephone").val());
            var fbFormN_email = $.trim($("#update_email").val());
            var fbFormN_email_hidden = $.trim($("#update_email_hidden").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());
            var login_email_token = $.trim($("#login_email_token").val());
            var fbForm_storyId = $.trim($("#fbForm_storyId").val());
            if ($("#update_password").length) {
                var fbFormN_password = $.trim($("#update_password").val());
            }
            if ($("#update_password_confirm").length) {
                var fbFormN_password_confirm = $.trim($("#update_password_confirm").val());
            }

            var fbFormN_gotcha = $.trim($("#fbFormN_gotcha").val());

            var hasErrors = false; 

            var nameReg = !(fbFormN_firstName.match(/[*]/)) && !(fbFormN_surname.match(/[*]/)) && fbFormN_firstName.length > 1 && fbFormN_surname.length > 1;
            var locReg = !(fbFormN_location.match(/[*]/))&& fbFormN_location.length > 1; 


        var telephoneReg = (fbFormN_telephone.match(/^d{10}$/));


            var emailRegObj = /^([a-zA-Z0-9_.-])[email protected]([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/;     // /^([a-zA-Z0-9_.-+])[email protected](([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;

            var password_params = '';

            $("#commentErrorUpdate_name").hide();   
            $("#commentErrorUpdate_location").hide(); 
            $("#commentErrorUpdate_telephone").hide(); 
            $("#commentErrorUpdate_email").hide(); 
            $("#commentErrorUpdate_password").hide(); 
            $(".disclaimerText").hide();

            if (nameReg == false) {
                $("#commentErrorUpdate_name").show();   
                hasErrors = true; 
            }

            if (locReg == false) {
                $("#commentErrorUpdate_location").show();   
                hasErrors = true; 
            }

            if (telephoneReg == null) {
                $("#commentErrorUpdate_telephone").show();
                hasErrors = true; 
            }

            if(emailRegObj.test(fbFormN_email) == false){
                $("#commentErrorUpdate_email").show();
                hasErrors = true; 
            }

            if (fbFormN_gotcha.length > 1) {
                hasErrors = true;  
            }

            if ($("#fbFormN_password").length && $("#fbFormN_password_confirm").length) {
                if (fbFormN_password != fbFormN_password_confirm) {
                    if ((fbFormN_password != 'mot de passe' || fbFormN_password_confirm != 'confirmer le mot de passe') && (fbFormN_password != 'password' || fbFormN_password_confirm != 'confirm password')) {
                        $("#commentErrorUpdate_password").show();
                        hasErrors = true;
                    }
                }
                else {
                    password_params += "&fbFormN_password=" + encodeURIComponent(fbFormN_password);
                    password_params += "&fbFormN_password_confirm=" + encodeURIComponent(fbFormN_password_confirm);
                }
            }

            if (!hasErrors) {
                $("#commentsForm_send").attr("disabled", "true");
                $("#commentsForm_send_noFb").attr("disabled", "true");
                save_form_to_cookie('comment_form_input');
                jQuery.ajax({ type: "POST",
                      dataType: "json",
                      cache: false,
                      url: "/community/talkback_ajax.html",
                      async: true,
                      data: "action=talkback_update_account&fbFormN_firstName="+encodeURIComponent(fbFormN_firstName)+"&fbFormN_surname="+encodeURIComponent(fbFormN_surname)+"&fbFormN_zip="+encodeURIComponent(fbFormN_zip)+"&fbFormN_location="+encodeURIComponent(fbFormN_location)+"&fbFormN_telephone="+encodeURIComponent(fbFormN_telephone)+"&fbFormN_email="+encodeURIComponent(fbFormN_email)+"&fbFormN_email_hidden="+encodeURIComponent(fbFormN_email_hidden)+"&customer_id="+fbForm_customerId+password_params+"&token="+login_email_token+"&story_id="+encodeURIComponent(fbForm_storyId),
                      error: function(){ },
                      success: function(data){
                        if (data.code == 1) {
                            $("#disclaimerConfirm").hide();
                            $("#commentLogin").hide();
                            $("#fbForm_message").hide();
                            $("#fbForm_message_count_class").hide();
                            $("#commentErrorUpdate_message").hide();
                            $("#commentInfo_Fb").hide(); 
                            $("#commentsForm_send").hide();
                            $("#fbCommentPublishCheckbox").hide();
                            $("#commentsForm_send_noFb").hide(); 
                            $("#commentInfo_noFb").show();
                            $("#manageAccount").toggle();
                            $("#commentInfo_noFb").text(data.message);
                            setMessageBox(data.message, data.addclass);
                            delete_cookie('comment_login_details_email');
                        } else if (data.code == 2){
                            $("#commentLogin").show();
                            $("#fbForm_message").show();
                            $("#fbForm_message_count_class").show();
                            $("#commentErrorUpdate_message").hide();
                            $("#commentInfo_Fb").hide(); 
                            $("#commentsForm_send").hide();
                            $("#fbCommentPublishCheckbox").hide();
                            $("#commentsForm_send_noFb").hide(); 
                            $("#commentInfo_noFb").hide();
                            $("#manageAccount").toggle();
                            setMessageBox(data.message, data.addclass);
                            if (data.user.customer_id == 53){
                                auto_login_email(data);
                            }
                        } else if (data.code == 3){
                            setMessageBox(data.message, data.addclass);
                        }
                    }
                });
            }
        }

        // Handler to reset the timer on each notification 
        var timeoutHandle;
        function setMessageBox(message, boxclass) {
            $("#messageBox").hide();
            $("#messageBox").html(message);
            $("#messageBox").removeClass("warning error success").addClass(boxclass);
            $("#messageBox").fadeIn(1500);

            clearTimeout(timeoutHandle);

            timeoutHandle = setTimeout(function(){
                $("#messageBox").fadeOut(2000, function () {
              });
            }, 12000);
        }

        function forgot_password_send() {
            var email = $.trim($('#password_forgot_email').val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());

            var hasErrors = false;

            var emailRegObj = /^([a-zA-Z0-9_.-])[email protected]([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/;

            if(emailRegObj.test(email) == false){      
                $("#commentError_password_forgot_email").show();    
                hasErrors = true; 
            }

            if (!hasErrors) {

                jQuery.ajax({ type: "POST",
                    dataType: "json",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=reset_password&customer_id="+fbForm_customerId+"&email="+encodeURIComponent(email),  
                    error: function(){ },
                    success: function(data){
                            if (data.code = 0) {
                                setMessageBox(data.message, data.addclass);
                            }
                            else if (data.code = 1) {
                                $('#comment_password_reset_form').toggle('slow');
                                $('#comment_login_form').toggle('slow');
                                setMessageBox(data.message, data.addclass);
                            }
                    }     
                });

            }
        }

        ///////////////////////////////////////////////////
        function commentsForm_login_noFb() {
            var fbFormN_email = $.trim($("#fbFormN_email_login").val());
            var fbFormN_password = $.trim($("#fbFormN_password_login").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());

            var hasErrors = false;

            var emailRegObj = /^([a-zA-Z0-9_.-])[email protected]([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/;

            $("#commentError_email").hide(); 
            $("#commentError_password").hide(); 

            if(emailRegObj.test(fbFormN_email) == false){      
                $("#commentError_email").show();    
                hasErrors = true; 
            }

            if (!hasErrors) {

                //$("#commentsForm_send").attr("disabled", "true");
                //$("#commentsForm_send_noFb").attr("disabled", "true");
                //save_form_to_cookie('comment_form_input');

                jQuery.ajax({ type: "POST",
                    dataType: "json",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=talkback_login_email&email="+encodeURIComponent(fbFormN_email)+"&customer_id="+fbForm_customerId+"&password="+encodeURIComponent(fbFormN_password),
                    error: function(){

                    },
                    success: function(data){
                        //$("#commentLogin").hide();
                        //$("#fbForm_message").hide();
                        //$("#fbForm_message_count_class").hide();
                        //$("#commentError_message").hide();
                        //$("#commentInfo_Fb").hide(); 
                        //$("#commentsForm_send").hide();
                        //$("#fbCommentPublishCheckbox").hide();
                        //$("#commentsForm_send_noFb").hide(); 

                        if (data.code == 2) {
                            $('.commentFBlogin').hide();
                            $('#comment_login_form').hide();
                            $("#change_phonenumber").show();
                            setMessageBox(data.message, data.addclass);
                        } else {
                            $("#change_phonenumber").hide();
                            //$("#commentInfo_noFb").show();
                            //$("#commentLoggedInEmail").text(data.message);
                            setMessageBox(data.message, data.addclass);
                            $("#commentLoggedInEmail").show();
                            if ('user' in data) {
                                auto_login_email(data);
                            }
                        }
                    }
                });
            }
        }

        ///////////////////////////////////////////////////
        function commentsForm_phone_change() {
            var fbFormN_email_phone_chnage = $.trim($("#fbFormN_email_phone_chnage").val());
            var fbFormN_telephone_change = $.trim($("#fbFormN_telephone_change").val());
            var fbFormN_password_phone_chnage = $.trim($("#fbFormN_password_phone_chnage").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());

            jQuery.ajax({ type: "POST",
                dataType: "json",
                cache: false,
                url: "/community/talkback_ajax.html",
                async: true,
                data: "action=talkback_phone_change&email="+encodeURIComponent(fbFormN_email_phone_chnage)+"&customer_id="+fbForm_customerId+"&password="+encodeURIComponent(fbFormN_password_phone_chnage)+"&telephone="+encodeURIComponent(fbFormN_telephone_change),
                error: function(){
                },
                success: function(data){
                    if (data.code == 1) {
                        $("#commentError_email_phone_chnage").hide();
                        $("#fbFormN_email_phone_chnage").hide();
                        $("#commentError_telephone_change").hide();
                        $("#fbFormN_telephone_change").hide();
                        $("#commentError_password_phone_chnage").hide();
                        $("#fbFormN_password_phone_chnage").hide();
                        $("#commentsForm_sms_change_veryfy").hide();

                        $("#fbFormN_sms_change_Ver").show();
                        $("#commentsForm_sms_send_change_veryfy").show();

                        setMessageBox(data.message, data.addclass);
                    } else {
                        setMessageBox(data.message, data.addclass);
                    }
                }
            });
        }

        ///////////////////////////////////////////////////

        function comments_modifyForm_phone_change() {

            var fbFormN_email_phone_chnage = $.trim($("#fbFormN_email_phone_chnage").val());
            var fbFormN_telephone_change = $.trim($("#fbFormN_telephone_change").val());
            var fbFormN_password_phone_chnage = $.trim($("#fbFormN_password_phone_chnage").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());

            jQuery.ajax({ type: "POST",
                dataType: "json",
                cache: false,
                url: "/community/talkback_ajax.html",
                async: true,
                data: "action=talkback_phone_change&email="+encodeURIComponent(fbFormN_email_phone_chnage)+"&customer_id="+fbForm_customerId+"&password="+encodeURIComponent(fbFormN_password_phone_chnage)+"&telephone="+encodeURIComponent(fbFormN_telephone_change),
                error: function(){
                },
                success: function(data){
                    if (data.code == 1) {
                        $("#commentError_email_phone_chnage").hide();
                        $("#fbFormN_email_phone_chnage").hide();
                        $("#commentError_telephone_change").hide();
                        $("#fbFormN_telephone_change").hide();
                        $("#commentError_password_phone_chnage").hide();
                        $("#fbFormN_password_phone_chnage").hide();
                        $("#commentsForm_sms_change_veryfy").hide();

                        $("#fbFormN_sms_change_Ver").show();
                        $("#commentsForm_sms_send_change_veryfy").show();

                        setMessageBox(data.message, data.addclass);
                    } else {
                        setMessageBox(data.message, data.addclass);
                    }
                }
            });
        }

        ///////////////////////////////////////////////////
        function commentsForm_phone_change_sms_verify() {
            var fbFormN_email_phone_chnage = $.trim($("#fbFormN_email_phone_chnage").val());
            var fbFormN_telephone_change = $.trim($("#fbFormN_telephone_change").val());
            var fbFormN_password_phone_chnage = $.trim($("#fbFormN_password_phone_chnage").val());
            var fbFormN_sms_change_Ver = $.trim($("#fbFormN_sms_change_Ver").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());

            jQuery.ajax({ type: "POST",
                dataType: "json",
                cache: false,
                url: "/community/talkback_ajax.html",
                async: true,
                data: "action=talkback_phone_change_sms_verify&email="+encodeURIComponent(fbFormN_email_phone_chnage)+"&customer_id="+fbForm_customerId+"&password="+encodeURIComponent(fbFormN_password_phone_chnage)+"&telephone="+encodeURIComponent(fbFormN_telephone_change)+"&code="+encodeURIComponent(fbFormN_sms_change_Ver),
                error: function(){
                },
                success: function(data){
                    if (data.code == 1) {
                        $("#commentError_sms_change_ver").hide();
                        $("#fbFormN_sms_change_Ver").hide();
                        $("#commentsForm_sms_send_change_veryfy").hide();
                        $("#change_phonenumber").hide();

                        $('#comment_login_form').show();

                        setMessageBox(data.message, data.addclass);
                    } else {
                        setMessageBox(data.message, data.addclass);
                    }
                }
            });
        }
        ///////////////////////////////////////////////////
        function commentsForm_sms_verify() {
            var fbFormN_firstName = $.trim($("#fbFormN_firstName").val());
            var fbFormN_surname = $.trim($("#fbFormN_surname").val());
            var fbFormN_telephone = $.trim($("#fbFormN_telephone").val());
            var fbFormN_email = $.trim($("#fbFormN_email").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());
            var fbForm_storyId = $.trim($("#fbForm_storyId").val());
            var fbFormN_smsVer = $.trim($("#fbFormN_smsVer").val());

            var hasErrors = false;

            if (!hasErrors) {

                jQuery.ajax({ type: "POST",
                    dataType: "json",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=talkback_sms_verify&fbFormN_firstName="+encodeURIComponent(fbFormN_firstName)+"&fbFormN_surname="+encodeURIComponent(fbFormN_surname)+"&email="+encodeURIComponent(fbFormN_email)+"&telefone="+encodeURIComponent(fbFormN_telephone)+"&code="+ fbFormN_smsVer +"&customer_id="+fbForm_customerId+"&story_id="+encodeURIComponent(fbForm_storyId),
                    error: function(){
                    },
                    success: function(data){
                        if (data.code == 0) {
                            setMessageBox(data.message, data.addclass);
                        } else {
                            $("#commentLogin").hide();
                            $("#sms_verify").hide();
                            $("#fbFormN_smsVer").hide();
                            $("#commentsForm_sms_veryfy").hide();

                            setMessageBox(data.message, data.addclass);
                        }
                    }
                });
            }
        }

        //////////////////////////////////////////
        //swissnoise quiva
        function auto_login_quiva(data) {
            console.log("quiva login start");
            var user = {
                "remoteId": data.uid,
                "username": data.user.email,
                "password": data.pcr,
                "email": data.user.email,
                "firstName": data.user.first_name,
                "lastName": data.user.last_name,
                "zipCode": data.user.post_code,
                "locality": data.user.city,
                "phoneNumber": data.user.mobile_number
            };
            whatif.login(user).always(function() {

            });
            console.log("quiva login done");
        }
        //END swissnoise quiva

        function auto_login_email(data) {
            $(".commentFBlogin").hide();
            $(".commentOhnelogin").hide();
            var html = '';
            var name = data.user.first_name +' '+ data.user.last_name;
            html += '<span class="fbUserWelcome">Bienvenue, <span id="fbUserRealName">'+ name +'</span></span><br />';
            html += '<a target="_blank" href="" id="commentsForm_send_email">Soumettre Commentaire</button>';
            html += '<a target="_blank" href="" class="emailLogoutButton">Déconnecter</a><br />';
            html += '<a target="_blank" href="" id="emailManageAccount">Gérer le profil</a>';
            html += '';
            html += '';
            $("#commentLoggedInEmail").html(html);
            set_logged_in_cookie(data);
            $("#commentLoggedInEmail").show();

        }

        ///////////////////////////////////////////////////
        function commentsForm_send_noFb() {
            var fbForm_message = $.trim($("#fbForm_message").val());  
            fbForm_message = fbForm_message.replace(/&amp;/g, "+");
            var fbForm_uri = $.trim($("#fbForm_uri").val());
            var fbForm_storyId = $.trim($("#fbForm_storyId").val());
            var fbForm_ip = $.trim($("#fbForm_ip").val());

            var is_logged_in = false;
            if ($("#is_logged_in").length) {
                is_logged_in = true;
            }

            var fbFormN_firstName = $.trim($("#fbFormN_firstName").val());
            var fbFormN_surname = $.trim($("#fbFormN_surname").val());
            var fbFormN_zip = $.trim($("#fbFormN_zip").val());
            var fbFormN_location = $.trim($("#fbFormN_location").val());
            var fbFormN_email = $.trim($("#fbFormN_email").val());
            var fbForm_msgID = $.trim($("#fbForm_msgID").val()); // if this value is &gt; 0, its a reply-to-another-comment message 
            if ($("#fbFormN_password").length) {
                var fbFormN_password = $.trim($("#fbFormN_password").val());
            }
            if ($("#fbFormN_password_confirm").length) {
                var fbFormN_password_confirm = $.trim($("#fbFormN_password_confirm").val());
            }


            var fbFormN_gotcha = $.trim($("#fbFormN_gotcha").val());

            var hasErrors = false; 

            var messageReg =  fbForm_message.length &gt; 1; 
            var nameReg = !(fbFormN_firstName.match(/[*]/)) &amp;&amp; !(fbFormN_surname.match(/[*]/)) &amp;&amp; fbFormN_firstName.length &gt; 1 &amp;&amp; fbFormN_surname.length &gt; 1;
            // dont check for ZIP, cause of foreign countries 
            //var locReg = !(fbFormN_zip.match(/[*]/)) &amp;&amp; !(fbFormN_location.match(/[*]/)) &amp;&amp; fbFormN_zip.length &gt; 1 &amp;&amp; fbFormN_location.length &gt; 1;   
            var locReg = !(fbFormN_location.match(/[*]/))&amp;&amp; fbFormN_location.length &gt; 1; 
            var emailRegObj = /^([a-zA-Z0-9_.-])[email protected]([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/;     // /^([a-zA-Z0-9_.-+])[email protected](([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
            var password_params = '';

            $("#commentError_name").hide();
            $("#commentError_location").hide();
            $("#commentError_email").hide();
            $("#commentError_password").hide();
            $("#commentError_message").hide();
            $("#commentError_disclaimer").hide();
            $(".disclaimerText").hide();

            if (messageReg == false) {
                $("#commentError_message").show();
                hasErrors = true;
            }

            if (nameReg == false) {
                $("#commentError_name").show();
                hasErrors = true; 
            }

            if (locReg == false) {
                $("#commentError_location").show();     
                hasErrors = true; 
            }

            if(emailRegObj.test(fbFormN_email) == false){      
                $("#commentError_email").show();    
                hasErrors = true; 
            }

            if (fbFormN_gotcha.length &gt; 1) {
                hasErrors = true;
            }

            if (!($('#disclaimerConfirmBtn').is(':checked'))) {
                $("#commentError_disclaimer").show();
                $(".disclaimerText").show();
                hasErrors = true;
            }

            if (!hasErrors) {

                $("#commentsForm_send").attr("disabled", "true");
                $("#commentsForm_send_noFb").attr("disabled", "true");
                save_form_to_cookie('comment_form_input');

                jQuery.ajax({ type: "POST",
                    dataType: "html",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=sendComment&amp;fbFormN_firstName="+encodeURIComponent(fbFormN_firstName)+"&amp;fbFormN_surname="+encodeURIComponent(fbFormN_surname)+"&amp;fbFormN_zip="+encodeURIComponent(fbFormN_zip)+"&amp;fbFormN_location="+encodeURIComponent(fbFormN_location)+"&amp;fbFormN_email="+encodeURIComponent(fbFormN_email)+"&amp;fbForm_uri="+encodeURIComponent(fbForm_uri)+"&amp;fbForm_storyId="+fbForm_storyId+"&amp;fbForm_ip="+fbForm_ip+"&amp;fbForm_message="+encodeURIComponent(fbForm_message)+"&amp;fbForm_msgID="+fbForm_msgID,
                    error: function(){ },
                    success: function(){
                        $("#commentLogin").hide();
                        $("#fbForm_message").hide();
                        $("#fbForm_message_count_class").hide();
                        $("#commentError_message").hide();
                        $("#commentInfo_Fb").hide();
                        $("#commentsForm_send").hide();
                        $("#fbCommentPublishCheckbox").hide();
                        $("#commentsForm_send_noFb").hide();
                        $("#disclaimerConfirm").hide();
                        $("#commentInfo_noFb").show();
                    }
                });
            }
        }

        ///////////////////////////////////////////////////
        function commentsForm_send_email() {
            var fbForm_message = $.trim($("#fbForm_message").val());  
            fbForm_message = fbForm_message.replace(/&amp;/g, "+");
            var fbForm_uri = $.trim($("#fbForm_uri").val());
            var fbForm_storyId = $.trim($("#fbForm_storyId").val());
            var fbForm_customerId = $.trim($("#fbForm_customerId").val());
            var fbForm_ip = $.trim($("#fbForm_ip").val());
            var login_email_token = $.trim($("#login_email_token").val());

            var is_logged_in = false;
            if ($("#is_logged_in").length) {
                is_logged_in = true;
            }

            var fbFormN_email = $.trim($("#login_email_email").val());
            var fbForm_msgID = $.trim($("#fbForm_msgID").val()); // if this value is &gt; 0, its a reply-to-another-comment message 

            var fbFormN_gotcha = $.trim($("#fbFormN_gotcha").val());

            var hasErrors = false; 

            var messageReg =  fbForm_message.length &gt; 1; 

            $("#commentError_name").hide();     
            $("#commentError_location").hide(); 
            $("#commentError_email").hide(); 
            $("#commentError_password").hide(); 
            $("#commentError_message").hide();  
            $("#commentError_disclaimer").hide();   
            $(".disclaimerText").hide();

            if (messageReg == false) {
                $("#commentError_message").show();  
                hasErrors = true; 
            }

            if (fbFormN_gotcha.length &gt; 1) {
                hasErrors = true;  
            }

            if (!($('#disclaimerConfirmBtn').is(':checked'))) {
                $("#commentError_disclaimer").show();   
                hasErrors = true; 
            }

            if (!hasErrors) {
                $("#commentsForm_send").attr("disabled", "true");
                $("#commentsForm_send_noFb").attr("disabled", "true");
                commentNotSent = false;

                jQuery.ajax({ type: "POST",
                    dataType: "json",
                    cache: false,
                    url: "/community/talkback_ajax.html",
                    async: true,
                    data: "action=send_comment_email&amp;fbForm_uri="+encodeURIComponent(fbForm_uri)+"&amp;fbForm_storyId="+fbForm_storyId+"&amp;customer_id="+fbForm_customerId+"&amp;fbForm_ip="+fbForm_ip+"&amp;fbForm_message="+encodeURIComponent(fbForm_message)+"&amp;fbForm_msgID="+fbForm_msgID+"&amp;email="+encodeURIComponent(fbFormN_email)+"&amp;token="+login_email_token,  
                    error: function(){ },
                    success: function(data){
                                if (data.code == 1) {
                                    $("#commentLogin").hide();
                                    $("#fbForm_message").hide();
                                    $("#fbForm_message_count_class").hide();        
                                    $("#commentError_message").hide();
                                    $("#commentError_name").hide();         
                                    $("#commentError_location").hide();     
                                    $("#commentError_email").hide();    
                                    $("#commentError_disclaimer").hide();   
                                    $(".disclaimerText").hide();
                                    $("#commentInfo_noFb").hide(); 
                                    $("#commentsForm_send").hide(); 
                                    $("#fbCommentPublishCheckbox").hide();
                                    $("#disclaimerConfirm").hide();
                                    $("#commentsForm_send_noFb").hide();    
                                    $("#commentInfo_noFb").show();  
                                    $("#commentSendLoading").hide();
                                    $("#commentInfo_Notice").hide();
                                    $("#manageAccount").hide();
                                }
                                else if (data.code == 2) {
                                    setMessageBox(data.message, data.addclass);
                                }
                    }     
                });     
            }       
        }           

        ///////////////////////////////////////////////////
        ///////////////////////////////////////////////////
        // some jquery UI functions
        function fbLoginDisplay(loginState) {
            $(document).ready(function(){
                if (loginState == true) {
                    $(".notloggedToFacebook").hide();
                    $(".loggedToFacebook").show();
                    $('#commentsForm_send_noFb').hide();
                    $('#commentsForm_send').show();
                    $("#fbCommentPublishCheckbox").show();
                    $(".recommendCommentFacebook").show();
                }
else {
                    $(".loggedToFacebook").hide(); 
                    $(".notloggedToFacebook").show(); 
                    $('#commentsForm_send').hide();
                    $('#commentsForm_send_noFb').show();
                    $("#fbCommentPublishCheckbox").hide();
                    $(".recommendCommentFacebook").hide();
                    if ($("#commentLoggedInEmail").length) {
                        $("#commentLoggedInEmail").show();
                    }
            }});
        }

        ///////////////////////////////////////////////////
        function fbDomInsert(username, uid, token) {  
                    $(document).ready(function(){  
               $("#fbUserRealName").html(username); 
               var imgHtml= "";
               $("#fbUserProfilePicture").html(imgHtml);

               $("#fbForm_realName").val(username); 
               $("#fbForm_userId").val(uid);
               $("#fbForm_userToken").val(token);
            });
            }
            ///////////////////////////////////////////////////
            function loginDrop() {
                $(document).ready(function(){
                    $('#commentLogin').slideDown();
                    $("textarea#fbForm_message").attr("rows", 6);
                    $("#commentsForm_send").removeAttr("disabled");
                    $("#commentsForm_send_noFb").attr("disabled", "");
                    $("#commentsForm_send_email").removeAttr("disabled");
                    $("#fbForm_message").val("");
                    $('#fbForm_message').removeAttr("onclick");
                });
            }
    ///////////////////////////////////////////////////
    function doOnFbConnect() {
        $(".recommendCommentFacebook").show(); // for comments below: display checkbox to choose if recommended comments get published on facebook
    }

    ///////////////////////////////////////////////////
    function log(msg){
        if (typeof console === 'undefined') {
            return false;
        } else {
            return true;
        }
    }

    /////////////////////////////////////////////////////////////////////////////////   
    /////////////////////////////////////////////////////////////////////////////////  
    /////////////////////////////////////////////////////////////////////////////////
    // main 


    // fb auth 
    var fbAccessToken = ''; 
    var fbUserID = ''; 
    var fbUserName = '';  
    FBcomments.initFb(); 
    var nnFBloggedIn = check_nnCookie();  
        if (nnFBloggedIn == true) {
            fbLoginDisplay(true); 

        }
        else {
            fbLoginDisplay(false); 
        }

function inputFocus(thisFor, thisClass) {
$(“https://news.google.com/#”+ thisFor).focus(function() {
$(‘.’+ thisClass).animate({ opacity: “0” }, “fast”);
}).blur(function() {
if($(this).val() == “”) {
$(‘.’+ thisClass).animate({ opacity: “1” }, “fast”);
}
});
}

        //// some more jquery stuff
        $(document).ready(function(){
            read_logged_in_cookie();

            // hide 'populär auf facebook' widget in sideline
            //$("#fb_activityFeed").hide(); 

            $("#fbCommentPublishCheckbox").hide();

$(‘#fbFormN_password_login’).keypress(function(e){
if (e.which == 13){
e.preventDefault();
$(this).blur();
$(‘#commentsForm_post_confirmed’).focus().click();
return false;
}
});

$(‘#fbFormN_smsVer’).keypress(function(e){
if (e.which == 13){
e.preventDefault();
$(this).blur();
$(‘#commentsForm_sms_veryfy’).focus().click();
return false;
}
});

// Bind to set the fadeout of form labels when clicked or focused
$(‘.sbsLabel label’).each(function () {
var thisFor = $(this).attr(‘for’);
var thisClass = $(this).attr(‘class’);
inputFocus(thisFor, thisClass);
});

            // some form display handling 
                $('#disclaimerButtonShow').bind('click', function(){
                    $('.disclaimerText').show();
                    $('#disclaimerButtonShow').css('display','none');
                    $('#disclaimerButtonHide').css('display','inline');
                });
                $('#disclaimerButtonHide').bind('click', function(){
                    $('.disclaimerText').hide();
                    $('#disclaimerButtonHide').css('display','none');
                    $('#disclaimerButtonShow').css('display','inline');
                });

            // display login data on start 
            if ($("#fbUserRealName").html()) {
                if ($("#fbUserRealName").html().length &gt;= 2){ // &amp;&amp; $("textarea#fbForm_message").attr("rows") &gt; 2
                    $("#fbCommentPublishCheckbox").show();
                }
            }

            // clear textarea 
            $("#fbForm_message").val(''); 

            // submit buttons , disable on on reload 
            $("#commentsForm_send").attr("disabled", "true");
            $("#commentsForm_send_noFb").attr("disabled", "true");

            // set checkboxes
            $('#fbForm_publishOnFB').attr('checked', true); 
            $('.recommendCommentPublishOnFb').attr('checked', true); 
            $('#disclaimerConfirmBtn').attr('checked', false);

            // fixes a tiny bug: if values are prefilled on reload they should not be grey 
            var myFbFormIds = ['fbFormN_firstName', 'fbFormN_surname', 'fbFormN_zip', 'fbFormN_location', 'fbFormN_email', 'fbFormN_password', 'fbFormN_password_confirm'];
            for (var ii=0;ii &lt; myFbFormIds.length; ii++) {
              if ($(&quot;https://news.google.com/#&quot;+myFbFormIds[ii]).length) {
                if (!($(&quot;https://news.google.com/#&quot;+myFbFormIds[ii]).val().match(/[*]/))) {
                    $(&quot;https://news.google.com/#&quot;+myFbFormIds[ii]).css('color','#000000'); 
                };
              }
            }

            $('.comment_signup_form_toggle').live('click', function(){
                $('#comment_signup_form').toggle('slow');
                $('#comment_login_form').toggle('slow');
                return false;
            });

            $('.comment_form_forgot_password').live('click', function(){
                $('#comment_password_reset_form').toggle('slow');
                $('#comment_login_form').toggle('slow');
                return false;
            });

            $('.emailLogoutButton').live('click', function() {
                delete_cookie('comment_login_details_email');
                $(&quot;#commentLoggedInEmail&quot;).html('');
                $(&quot;#manageAccount&quot;).html('');
                $(&quot;#commentLoggedInEmail&quot;).hide();
                $(&quot;.commentFBlogin&quot;).show();
                $(&quot;.commentOhnelogin&quot;).show();
            });

            $('#show_update_phone').live('click', function() {
                $(&quot;#commentLoggedInEmail&quot;).html('');
                $(&quot;#manageAccount&quot;).html('');
                $(&quot;#commentLoggedInEmail&quot;).hide();
                $(&quot;#comment_login_form&quot;).hide();

                $(&quot;#change_phonenumber&quot;).show();
                $(&quot;.commentOhnelogin&quot;).show();
            });

            $('#commentsForm_send_email').live('click', function() {
                if (commentNotSent) {
                    commentsForm_send_email();
                }
            });

            $('#emailManageAccount').live('click', function () {
                var customer_id = $.trim($(&quot;#fbForm_customerId&quot;).val());
                var login_email_email = $.trim($(&quot;#login_email_email&quot;).val());
                var login_email_token = $.trim($(&quot;#login_email_token&quot;).val());

                jQuery.ajax({ type: &quot;POST&quot;,
                    dataType: &quot;json&quot;,
                    cache: false,
                    url: &quot;/community/talkback_ajax.html&quot;,
                    async: true,
                    data: &quot;action=login_manage_account&amp;customer_id=&quot;+customer_id+&quot;&amp;email=&quot;+encodeURIComponent(login_email_email)+&quot;&amp;token=&quot;+login_email_token,
                    error: function(){ },
                    success: function(data){
                        if (data.code == 0) {
                            setMessageBox(data.message, data.addclass);
                        }
                        else if (data.code == 1) {
                            $('#manageAccount').html(data.message);
                            $('#manageAccount').show();
                        }
                    }     
                });
            });

            });

[]


[
]Source link
https://www.lematin.ch/sports/football/constantin-lcher-affaire/story/30856098

LEAVE A REPLY

Please enter your comment!
Please enter your name here