 function initThisPage(){
                 // Les placeholders pour ie.
                    $('input, textarea').placeholder();

                    // On force l'affichage.
                    $(":checkbox").change();

                    // Les tooltips.
                    $('.tooltip').tooltipster();

                    // Les selects.
                    $.Select();

                    // Validation
                    $("[id$=accountForm]").validate({
                          highlight: function(element, errorClass, validClass) {
                              $(element).removeClass("InputText_errorLabel").parent().addClass('InputText-error');
                                setTimeout(function(){
                                    $(element).parent().find(".InputText_errorLabel").insertAfter($(element).parent());
                                }, 100);
                          },
                          unhighlight: function(element, errorClass, validClass) {
                               $(element).parent().removeClass('InputText-error');
                          },
                          invalidHandler: function(form, validator) {
                            $.each(validator.errorList, function(index, value){
                              var element = value.element;
                              $(element).removeClass("InputText_errorLabel").parent().addClass('InputText-error');
                              $(element).parent().find(".InputText_errorLabel").insertAfter($(element).parent());
                            });
                          },
                          errorClass: "InputText_errorLabel"
                    });

                    //Activity error messages
                    $('.ActivityWrapper_errorLabel').hide();
                    //$('select[id$=stateList]').change(performSpecialValidations);

                     $('.ActivityWrapper').append($('.petzlReceiveUpdatesPrompt'));

                    // Validation Rules
                    $.validator.addMethod('password', function (value, element) {
                        return /[A-Z]/.test(value) && /[0-9]/.test(value);
                    }, 'You must enter at least one capital letter and number.');

                    $.validator.addMethod('zip', function (value, element) {
                      return /(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)/.test(value);
                    });

                    $.validator.addMethod('equal', function (value, element) {
                        if ($(element).attr('id').indexOf('Password') >= 0){
                           return $(element).val() == $('[id$=PersonPassword]').first().val();
                        }
                         if ($(element).attr('id').indexOf('Email') >= 0){
                           return $(element).val() == $('[id$=PersonEmail]').first().val();
                        }
                    });

					$.validator.addMethod('email2', function (value, element) {
						return emailPattern.test(value);
                    });

                    $('[id$=PersonEmail]').rules("add", {
                        required:true,
                        email2:true
                    });

                    $('#PersonEmailConfirm').rules("add", {
                        required:true,
                        equal: true
                    });

                    $('[id$=PersonPassword]').rules("add", {
                        required:true,
                        password: true,
                        minlength: function(element){ return 8;}
                    });

                    $('#PersonPasswordConfirm').rules("add", {
                         required:true,
                         equal: true
                    });

                    $('select[id$=stateList]').rules("add", {
                         required:true
                    });

                    $('[id$=zip]').rules("add", {
                         required:true,
                         zip:true
                    });

                    $('.BillingAdressWrapper label.InputContainer_label:contains("*")').next().find('input[type=text]')
                    .each(function(){
                         $(this).rules("add", {
                              required:true
                         });
                    });

                    // Submit functon
                    $('#createUser').click(function(){
                        var valid1 = performSpecialValidations();
                        var valid2 = $("form[id$=accountForm]").valid();
                        if(valid1 && valid2)
                            createUser();
                        else{
                                $('div.InputText-error > input').first().focus();
                        }
                    });

                    $('.BtnError').append($('[id$=pageMessages]').text().replace(/Error:/g, ''));
                    $('[id$=pageMessages]').hide();
                }

              function performSpecialValidations(){
                    var valid = true;
                    var $options = $('[id$=subMarketsList]').find('option');
                    if ($options.length > 0) { 
                        if ($('.ActivityWrapper').find('input[type=checkbox]:checked').length == 0){
                            $('.ActivityWrapper_errorLabel').show();
                            valid = false;
                        }else
                            $('.ActivityWrapper_errorLabel').hide();
                    }

                    if (!$('.stateSelector select').val()){
                        $('.stateSelector .errorLabel').show();
                        valid = false;
                    }else
                        $('.stateSelector .errorLabel').hide();

                    if (!$('.countriesSelector select').val()){
                        $('.countriesSelector .errorLabel').show();
                        valid = false;
                    }else
                        $('.countriesSelector .errorLabel').hide();

                    return valid;
                }

                $(function () {
                    initThisPage();
                });