// JavaScript Document

jQuery(function() {
jQuery("a.dialog_infoLink[rel]").overlay();
var triggers = jQuery(".dialog_modalLink2[rel]").overlay({ 
 expose: { 
 color: '#666666', 
 closeOnClick: 'false',
 loadSpeed: 150,
 closeSpeed:100
 }, 
 speed:0,
 top: '10%' 
});
})

jQuery(function() {
jQuery("a.dialog_infoLink[rel]").overlay();
var triggers = jQuery(".dialog_modalLink[rel]").overlay({ 
 expose: { 
 color: '#fff', 
 loadSpeed: 150,
 closeSpeed:100
 }, 
 speed:0,
 top: '30%' 
});
});


var start;
var isPatience;

jQuery(".dialog_modalLink").click(
	function () {
		start = new Date();
		isPatience = true;
	}
);

window.onunload = function()

{

       // Check if the isPatience variable isset and has the value of true.

    if (typeof(isPatience) != 'undefined' && isPatience === true)

    {

           var end = new Date();

             // Calculate the difference and divide it by 1000 to get the seconds instead of miliseconds.

           var difference = Math.round((end.getTime() - start.getTime())/100);

             // Send this difference to HBX also add the time current hour on which this event occured:

             _hbSet('c3', difference+'|'+end.getHours());

             _hbSend();

             // debug alert:
             // alert(end.getTime()+'-'+start.getTime()+' - '+difference);

    }

}
