jQuery(document).ready(function() {
    jQuery('#yourConsumptionSeemsTooLargeMono').hide();
    jQuery('#yourConsumptionSeemsTooLargeFull').hide();
    jQuery('#yourConsumptionSeemsTooLargeEmpty').hide();
    jQuery('#yourConsumptionSeemsTooLargeExclusive').hide();
    jQuery('#yourConsumptionSeemsTooLargeGas').hide();

    jQuery("#elecConsumptionEstimation").change(function() {
        if (jQuery(this).val() > 8000) {
            jQuery('#yourConsumptionSeemsTooLargeMono').show();
        } else {
            jQuery('#yourConsumptionSeemsTooLargeMono').hide();
        }
    });

    jQuery("#nightOnlyConsumption").change(function() {
        if (jQuery(this).val() > 30000) {
            jQuery('#yourConsumptionSeemsTooLargeNightOnly').show();
        } else {
            jQuery('#yourConsumptionSeemsTooLargeNightOnly').hide();
        }
    });

    jQuery("#fullHourConsumption").change(function() {
        if (jQuery(this).val() > 8000) {
            jQuery('#yourConsumptionSeemsTooLargeFull').show();
        } else {
            jQuery('#yourConsumptionSeemsTooLargeFull').hide();
        }
    });

    jQuery("#emptyHourConsumption").change(function() {
        if (jQuery(this).val() > 8000) {
            jQuery('#yourConsumptionSeemsTooLargeEmpty').show();
        } else {
            jQuery('#yourConsumptionSeemsTooLargeEmpty').hide();
        }
    });

    jQuery("#gasConsumptionEstimation").change(function() {
        if (jQuery(this).val() > 50000) {
            jQuery('#yourConsumptionSeemsTooLargeGas').show();
        } else {
            jQuery('#yourConsumptionSeemsTooLargeGas').hide();
        }
    });

    jQuery('input#subscribe, input#login, input#password').focus(function() {
        if (jQuery(this).val() == "E-mail" || jQuery(this).val() == "E-Mail Adresse" || jQuery(this).val() == "E-mailadres" || jQuery(this).val() == "password") {
            value = jQuery(this).val();
            jQuery(this).attr("value", "");
        }
    });

    jQuery('input#subscribe, input#login, input#password').blur(function() {
        if (jQuery(this).val() == "") {
            jQuery(this).val(value);
        }
    });

    jQuery('#adresseFacturation').click(function() {
        jQuery('#addFacturation').slideToggle(500);
    });

    jQuery('#utiliserFacturation').click(function() {
        jQuery('#utiliserFactEmail').slideToggle(500);
    });
});
