
/* the next line is an example of how you can override default options globally (currently commented out) ... */
 // $.fn.cluetip.defaults.tracking = true;
// $.fn.cluetip.defaults.debug = true;
$(document).ready(function() {

$.fn.cluetip.defaults = {  // default options; override as needed 
width:            275,      // The width of the clueTip
height:           'auto',   // The height of the clueTip. more info below [1]
cluezIndex:       97,       // Sets the z-index style property of the clueTip
positionBy:       'auto',   // Sets the type of positioning. more info below [2]
topOffset:        15,       // Number of px to offset clueTip from top of invoking element. more info below [3]
leftOffset:       15,       // Number of px to offset clueTip from left of invoking element. more info below [4]
local:            false,    // Whether to use content from the same page for the clueTip's body
							// (treats the attribute used for accessing the tip as a jQuery selector,
							// but only selects the first element if the selector matches more than one). more info below [5]
hideLocal:        true,     // If local option is set to true, this determines whether local content
							//  to be shown in clueTip should be hidden at its original location
attribute:        'rel',    // the attribute to be used for fetching the clueTip's body content
titleAttribute:   'title',  // the attribute to be used for fetching the clueTip's title
splitTitle:       '',       // A character used to split the title attribute into the clueTip title and divs                                 // within the clueTip body. more info below [6]
showTitle:        true,     // show title bar of the clueTip, even if title attribute not set
cluetipClass:     'default',// class added to outermost clueTip div in the form of 'cluetip-' + clueTipClass. more info below [7]
hoverClass:       '',       // class applied to the invoking element onmouseover and removed onmouseout
waitImage:        true,     // whether to show a "loading" img, which is set in jquery.cluetip.css
arrows:           false,    // if true, displays arrow on appropriate side of clueTip. more info below [8]
dropShadow:       true,     // set to false if you don't want the drop-shadow effect on the clueTip
dropShadowSteps:  6,        // adjusts the size of the drop shadow
sticky:           false,    // keep visible until manually closed
mouseOutClose:    false,    // close when clueTip is moused out
activation:       'hover',  // set to 'click' to force user to click to show clueTip
clickThrough:     false,    // if true, and activation is not 'click', then clicking on a clueTipped link will take user to                                  // the link's href, even if href and tipAttribute are equal
tracking:         false,    // if true, clueTip will track mouse movement (experimental)
delayedClose:     0,        // close clueTip on a timed delay (experimental)
closePosition:    'top',    // location of close text for sticky cluetips; can be 'top' or 'bottom' or 'title'
closeText:        'Close',  // text (or HTML) to to be clicked to close sticky clueTips
truncate:         0,        // number of characters to truncate clueTip's contents. if 0, no truncation occurs
							// effect and speed for opening clueTips
fx: {          
open:       'fadeIn', 		// can be 'show' or 'slideDown' or 'fadeIn'
openSpeed:  ''     
},                        	// settings for when hoverIntent plugin is used
hoverIntent: {sensitivity: 3, interval: 50, timeout: 0},           // function to run just before clueTip is shown. 
onActivate:       function(e) {return true;},     // function to run just after clueTip is shown.
onShow:           function(ct, c){},          // whether to cache results of ajax request to avoid unnecessary hits to server
ajaxCache:        true,               // process data retrieved via xhr before it's displayed
ajaxProcess:      function(data) { data = $(data).not('style, meta, link, script, title'); return data; },          // can pass in standard $.ajax() parameters, not including error, complete, success, and url     
ajaxSettings: {dataType: 'html'}
};

//default theme
  $('a.titletip').cluetip({splitTitle: '|', showTitle: false, cursor: 'pointer'});
  $('a.basic').cluetip();
  $('a.custom-width').cluetip({width: '200px', showTitle: false});
  $('h4').cluetip({attribute: 'id', hoverClass: 'highlight'});
  $('#sticky').cluetip({'sticky': true,'closePosition': 'title'});
  $('#examples a:eq(5)').cluetip({
    hoverClass: 'highlight',
    sticky: true,
    closePosition: 'bottom',
    closeText: '<img src="cross.png" alt="close" width="16" height="16" />',
    truncate: 60
  });
  $('a.chatFrame').cluetip({
    local:true, 
	positionBy: 'mouse', 
	hideLocal: false, 
	arrows: false, 
	cursor: 'pointer',
    sticky: true,
	mouseOutClose: true,
    closePosition: 'title',
    closeText: '[Close]'
  });

  $('a.localtip').cluetip({local:true, width: '340px', positionBy: 'mouse', hideLocal: false, arrows: false, cursor: 'pointer'});
  $('#clickme').cluetip({activation: 'click', width: 650});

// jTip theme
  $('a.jt:eq(0)').cluetip({
    cluetipClass: 'jtip', 
    arrows: true, 
    dropShadow: false,
    sticky: true,
    mouseOutClose: true,
    closePosition: 'title',
    closeText: '<img src="cross.png" alt="close" />'
  });
  $('a.jt:eq(1)').cluetip({cluetipClass: 'jtip', arrows: true, dropShadow: false, hoverIntent: false});
  $('span[@title]').css({borderBottom: '1px solid #900'}).cluetip({splitTitle: '|', arrows: true, dropShadow: false, cluetipClass: 'jtip'});

  $('a.jt:eq(2)').cluetip({
    cluetipClass: 'jtip', 
    arrows: true, 
    dropShadow: false, 
    height: '150px', 
    sticky: true,
    positionBy: 'bottomTop'    
  });

  $('a.jt:eq(3)').cluetip({local: true, hideLocal: false});
  
  $('a.jt:eq(4)').cluetip({
    cluetipClass: 'jtip', arrows: true, 
    dropShadow: false, 
    onActivate: function(e) {
      var cb = $('#cb')[0];
      return !cb || cb.checked;
    }
  });
// Rounded Corner theme
  $('ol.rounded a:eq(0)').cluetip({splitTitle: '|', dropShadow: false, cluetipClass: 'rounded', showtitle: false});
  $('ol.rounded a:eq(1)').cluetip({cluetipClass: 'rounded', dropShadow: false, showtitle: false, positionBy: 'mouse'});
  $('ol.rounded a:eq(2)').cluetip({cluetipClass: 'rounded', dropShadow: false, showtitle: false, positionBy: 'bottomTop', topOffset: 70});
  $('ol.rounded a:eq(3)').cluetip({cluetipClass: 'rounded', dropShadow: false, sticky: true, ajaxCache: false, arrows: true});
  $('ol.rounded a:eq(4)').cluetip({cluetipClass: 'rounded', dropShadow: false});    
});

