/**
 * @author Raumer
 */

  function sbxToggleDiv2 (toggleId, toggleContainer) {
    $(toggleId).hover(function(){
      $(toggleContainer).toggle("slide", {direction: "right"}, 'normal');
      //$(toggleContainer).bind('mouseout', this);
      //$(this).toggleClass('toggleArrowUp').toggleClass('toggleArrowDown');
      return false;
     });
   }
   
$(document).ready(function(){
  //if (!($.browser.msie() && $.browser.version.number() < 7.0))
  if (!($.browser.msie && $.browser.version < 7.0))
  {
    $(".info, .mysbxInfoHelp").cluetip({
      positionBy: 'mouse',
      cluetipClass: 'sbx',
      sticky: true,
      mouseOutClose: true,
      cluezIndex: 1001,
      arrows: false,
      activation: 'click',
      attribute: 'rel',
      showTitle: true,
      dropShadow: false,
      closePosition: 'title',
      closeText: ''
    });
    $(".info, .mysbxInfoHelpLocal").cluetip({
      positionBy: 'mouse',
      cluetipClass: 'sbx',
      sticky: true,
      mouseOutClose: true,
      cluezIndex: 1001,
      arrows: false,
      activation: 'click',
      attribute: 'rel',
      showTitle: true,
      dropShadow: false,
      closePosition: 'title',
      closeText: '',
      local: true,
      hideLocal: true
    });
    $(".shareInfo").cluetip({
      width: '450px',
      positionBy: 'mouse',
      cluetipClass: 'sbx',
      sticky: true,
      mouseOutClose: true,
      cluezIndex: 1001,
      arrows: false,
      activation: 'click',
      showTitle: false,
      //splitTitle: '|',
      local: true,
      dropShadow: false,
      closePosition: 'top',
      closeText: '<span class="close">Close</span>'
    });
    $(".hover-tip").cluetip({
      width: '345px',
      topOffset: 25,
      leftOffset: 35,
      positionBy: 'mouse',
      cluetipClass: 'sbx',
      cluezIndex: 1001,
      sticky: true,
      mouseOutClose: true,
      arrows: false,
      activation: 'hover',
      attribute: 'rel',
      showTitle:  true,
      dropShadow: false,
      closePosition: 'top',
      closeText: '<span class="close">Close</span>',
//      closeText: 'test',
      hoverIntent: {    
        sensitivity:  3,
        interval:     350,
        timeout:      750
      }
    });
    sbxToggleDiv2 ($("#toggleAnchor"), $("#toggleTarget"));
 // For contextual help in form fields 
  } 
 
  $('form div.form-item div.description').parent().hover (
      function () {
        $(this).addClass("active");
        $(this).css ('z-index', '1000');
        $(this).parent().css ('z-index', '1000');
        $(this).parent().parent().css ('z-index', '1000');
      },
     
      function () {
        $(this).removeClass("active");
        $(this).css ('z-index', '0');
        $(this).parent().css ('z-index', '0');
        $(this).parent().parent().css ('z-index', '0');
      }
    );  
});

