
$(document).ready (function () {
   /*
   $('.BotigaCataFamiHead').click (function () {
      var hid = $(this).attr('id');
      var bid = hid.replace(/Head/,'Body');
      if ( document.getElementById (bid).style.display == 'none' ) {
         $('#'+bid).slideDown ('slow');
      } else {
         $('#'+bid).slideUp ('slow');
      }
   });
   */
   $('#cistRight').click (function () {
      if ( document.getElementById ('cistForm').style.display == 'none' ) {
         document.getElementById ('cistella').style.width = '258px';
         $('#cistForm').show ('slow');
         $('.BotigaCistProds').jScrollPane ({
            verticalDragMaxHeight: 100,
            showArrows: true
         });
      } else {
         $('#cistForm').hide ('slow');
         setTimeout ("document.getElementById ('cistella').style.width = '25px';", 700);
      }
   });
   $('.BotigaBbuy').click (function () {
      if ( document.getElementById ('cistForm').style.display == 'none' ) {
         document.getElementById ('cistella').style.width = '258px';
         $('#cistForm').show ('slow');
      }
   });
   $('.BotigaBotoX').click (function () {
      $('#cistForm').hide ('slow');
      setTimeout ("document.getElementById ('cistella').style.width = '25px';", 700);
   });
   $('#cistClosTop').click (function () {
      $('#cistForm').hide ('slow');
      setTimeout ("document.getElementById ('cistella').style.width = '25px';", 700);
   });
   $('#cistClosBot').click (function () {
      $('#cistForm').hide ('slow');
      setTimeout ("document.getElementById ('cistella').style.width = '25px';", 700);
   });
   $('#regalHead').click (function () {
      if ( document.getElementById ('regalBody').style.display == 'block' ) {
         /*
         with (document.getElementById ('conf')) {
             conf_gift_noms.value = '';
             conf_gift_addr.value = '';
             conf_gift_pobl.value = '';
             conf_gift_zipc.value = '';
             conf_gift_pais.value = '';
             conf_gift_text.value = '';
             submit ();
         }
         */
         $('#regalBody').slideUp ('slow');
      } else {
         $('#regalBody').slideDown ('slow');
      }
   });
});


