//detail tooltip
$(document).ready(function() {
  if($("#detail_question_wrapper").length > 0) { // check if element exists
    $('#detail_question_wrapper a#open_tooltip2').click(function() {
      $('#detail_tooltip2').show();
      return false;
    });
    $('#detail_question_wrapper a#close_tooltip2').click(function() {
      $('#detail_tooltip2').hide();
      return false;
    });

    $('#detail_question_wrapper a#open_tooltip3').click(function() {
      $('#detail_tooltip3').show();
      return false;
    });
    $('#detail_question_wrapper a#close_tooltip3').click(function() {
      $('#detail_tooltip3').hide();
      return false;
    });

    $('a#open_tooltip4').click(function() {
      $('#detail_tooltip4').show();
      return false;
    });
    $('a#close_tooltip4').click(function() {
      $('#detail_tooltip4').hide();
      return false;
    });

  }
})

// instead of the #facturen in jquery.custom
// // expandable_children - open / close mechanism
// $(".expandable_children .manage a").click(function() {
//   var parent_tr = $(this).parent().parent(); // current parent tr element
//   var parent_id = $(this).parent().parent().attr('id'); // id of parent element
//   
//   if((parent_tr).hasClass('tr_open')) { // opened -> closed state
//     $(parent_tr).removeClass('tr_open'); // remove "selected" class
//     $(this).addClass('tr_plus'); // change - to +
//     $(this).removeClass('tr_minus');
//     $(parent_tr).children('td').addClass('tr_white'); // change background to white
//     
//     // hide child tr elements
//     $('.' + parent_id).each(function(i) {
//       $(this).hide();
//       $(this).addClass('tr_child_hidden');
//     });
//     
//   }
//   
//   else { // closed -> opened state
//     $(parent_tr).addClass('tr_open'); // add "selected" class
//     $(this).removeClass('tr_plus');
//     $(this).addClass('tr_minus'); // change + to -
//     $(parent_tr).children('td').addClass('tr_blue'); // change background to blue
//     $('.' + parent_id + ':last td').addClass('tr_last'); //add padding on last "sub tr"
//     
//     // show child tr elements
//     $('.' + parent_id).each(function(i) {
//       $(this).show();
//       $(this).addClass('tr_child_visible');
//     });
//   }
//   
//   return false;
// });