/*
 * Email - Module
 */
jQuery( function ( $ ) {
    var EmailModule = {
        init : function () {
            this.show_or_hide_for_enable_mail_for_thershold_points() ;
            $( document ).on( 'change' , '#rs_mail_enable_threshold_points' , this.enable_mail_for_thershold_points ) ;
        } ,
        enable_mail_for_thershold_points : function () {
            EmailModule.show_or_hide_for_enable_mail_for_thershold_points() ;
        } ,
        show_or_hide_for_enable_mail_for_thershold_points : function () {
            if ( jQuery( '#rs_mail_enable_threshold_points' ).is( ':checked' ) == true ) {
                jQuery( '#rs_mail_threshold_points' ).closest( 'tr' ).show() ;
                jQuery( '#rs_email_subject_threshold_points' ).closest( 'tr' ).show() ;
                jQuery( '#rs_email_message_threshold_points' ).closest( 'tr' ).show() ;
            } else {
                jQuery( '#rs_mail_threshold_points' ).closest( 'tr' ).hide() ;
                jQuery( '#rs_email_subject_threshold_points' ).closest( 'tr' ).hide() ;
                jQuery( '#rs_email_message_threshold_points' ).closest( 'tr' ).hide() ;
            }
        } ,
    } ;
    EmailModule.init() ;
} ) ;