﻿/* 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.width = 'auto';
   
$(document).ready(function() {

 // $.cluetip.setup({insertionType: 'insertBefore', insertionElement: 'div:first'});
 
  //Display QuickView Popup
  $('a.load-local').cluetip({
	local:true,
	hideLocal: true,
	arrows: true,
	positionBy: 'auto',
	cursor: 'pointer',
	showTitle: false,
	mouseOutClose: false,
    closePosition: 'top',
    closeText: '<img src="../images/cs_close_window.gif" alt="close" />',
    sticky: true,
    //width: '100%',
    width: 'auto',
    activation: 'hover',
    cluezIndex: 6000,
    hoverIntent: false
	});
	
	//Click Anywhere to Close QuickView Popup
	$(document).click( function () {
		 $(document).trigger('hideCluetip'); 
	});
	
	//Press Escape Key to Close QuickView Popup
	$(document).keypress(function(e) { 
		if (e.keyCode==27) { 
			$(document).trigger('hideCluetip'); 
		} 
	});
	$(document).keyup(function(e) { 
		if (e.keyCode==27) { 
			$(document).trigger('hideCluetip'); 
		} 
	});
	

	
});