How to synchronize two check boxes values, upon change?
I got it working this way:

/**                                                                                                                                                                 
 * Implements hook_block_info                                                                                                                                       
 */
 function mymodule_block_info() {

  $blocks['block_notify'] = array(
                           'info' =&gt; t('Notify me'),
                           'cache' =&gt; DRUPAL_NO_CACHE,
                           );

   return $blocks;
}

/**                                                                                                                                                                   
 * Implements  hook_block_view                                                                                                                                                      
 */
 mymodule_block_view($delta = '') {

 $block = array();
 switch ($delta) {
               case 'block_notify':                                                                                     
                 $block['content'] =  drupal_get_form('mymodule_example_form');                                                                                                                                 
                 break;                                                                                                                                         

              }
  return $block;
}


function mymodule_example_form($form, &amp;$form_state) {

 global $user;
 user_full = user_load($user-&gt;uid);
 $val = $user_full-&gt;field_user_message_notification['und'][0]['value'];

 $form['form_notify'] = array(
                         '#type' =&gt; 'checkbox',
                         '#default_value' =&gt; $val,
                         '#title' =&gt; t('Notify me by email when I receive a new message'),
                         //'#description' =&gt; t("Check this option to be notified by email when you receive a new message"),                                       
                         );

drupal_add_js(drupal_get_path('module', 'mymodule') . '/mymodule_request.js', 'file');
global $user;


return $form;
}


function mymodule_example_form_submit($form, &amp;$form_state) {
// Submission logic.                                                                                                                                                
 global $user;
 $user_full = user_load($user-&gt;uid);
 $edit = (array) $user_full;
 $edit['field_user_message_notification']['und'][0]['value'] = $form_state['values']['form_notify'] ;
 user_save($user_full, $edit);

 }


Then to trigger form submit on checkbox change I just added the follwing javascript in mymodule_request.js

jQuery(document).ready(

function ($)
{
 jQuery.noConflict();

 $checkBox = $("#edit-form-notify");

 if( $checkBox.length != 0)
 {
    $checkBox.click(
        function(){
            //        alert('hello');                                                                                                                             
            this.form.submit();
            }
          );

 }
});


I can now just select the "Notify me" block in my panel by " add content" in panels.