jQuery(document).ready(function() {
  $('.tip').each(function(){
    $(this).qtip({
      content: {
        text: false
      },
      position: {
        corner: {
          tooltip: 'rightMiddle', // Use the corner...
          target:  'leftMiddle' // ...and opposite corner
        }
      },
      style: {
        border: {
          width: 5,
          radius: 10
        },
      padding: 10, 
      textAlign: 'center',
      tip: true, // Give it a speech bubble tip with automatic corner detection
      name: 'dark' // Style it according to the preset 'cream' style
      }
    });
  });
  
  $('.cover_value').html('');

  // Hiding alert edition forms by default
  $('#alerts_container form').hide();

  $('#alerts_container .write_report').click(function(){
    $(this).next().slideToggle();
    return;
  });

  // Limiting number of characters
  $('.twit_area').keypress(function() {
    if($(this).val().length > 255)
    {
      $(this).val($(this).val().substr(0, 255));
    }
  });

  // Slider
  /*
  carousel = $('.alerts_wrapper').jCarouselLite({
    circular: false,
    btnNext: ".next",
    btnPrev: ".prev",
    scroll: 1,
    visible: 5,
    vertical: true,
  });

  carousel = $('.alerts_wrapper').jcarousel({
    circular: false,
    btnNext: ".next",
    btnPrev: ".prev",
    scroll: 1,
    visible: 5,
    vertical: true,
  });
  
  $('.next').click(function(){
    return false;
  });
  $('.prev').click(function(){
    return false;
  });
  
  $('.prev').html('');
  $('.next').html('');
  */
});

