 
  function recordOutboundLink(link, category, action) {
    _gat._getTrackerByName()._trackEvent(category, action);
    setTimeout('document.location = "' + link.href + '"', 100);
  }
 
 // JavaScript Document
function MMM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features).focus();
}
 
 $(document).ready(function() {
 
  
	 $('a.helptitle').cluetip({splitTitle: '|'});
$('a.load-local').cluetip({local:true,  showTitle: false,  arrows: true,width: 500, sticky: true, activation: 'click', mouseOutClose:    false,   closeText:        'Close Window', cursor: 'pointer'});
	 
 
	/* FANCYBOX - FOR PHONE NUMBERS
	Apply fancybox to top phone */
	
	$("a.loginmiddle").fancybox({
	'width'				: '80%',
		'height'			: '80%',
        'autoScale'     	: true,
		 'scrolling'     	: 'auto',
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'type'				: 'iframe'
	});
	
	
	//CUSTOM REVEAL SCRIPT
	$('#tools a.expand').click(function() { $('#reveal .content').slideDown('slow'); $('#reveal .header a').addClass('active'); });
	$('#tools a.hidecontent').click(function() { $('#reveal .content').slideUp('slow'); $('#reveal .header a').removeClass('active'); });
	//individual header click toggle
	$('#reveal .header a').click(function(){
		//collapse and remove active class, if the div is opened it will close
		var activeHeader = $(this).hasClass('active');
		$(this).removeClass('active').parent('div').next('.content').slideUp('slow');
		//open the div if it is closed and add the active class
		if(activeHeader==0)
		{ $(this).addClass('active').parent('div').next('.content').slideDown('slow'); }
	});
 
 
//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 
	$(".toggle_container_long").hide(); 

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$("h2.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
		return false; //Prevent the browser jump to the link anchor
	});
	
	$("h2.trigger_long").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
		return false; //Prevent the browser jump to the link anchor
	});
	



 
	

});
 
