 /* Tooltip script */

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


//Cufon
 Cufon.replace('h1'); 
 Cufon.replace('h2');  
 Cufon.replace('h3');    
 Cufon.replace('h4');
 Cufon.replace('#menu li a', { hover: true });
 
 
//Analytics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-3881401-20']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();



//Misc
 $(document).ready(function(){

	
	//Tooltip hover effects
	tooltip();

	// initialize scrollable  
    $("div.scrollable").scrollable({ 
        vertical:true,  
        size: 1 
    }).mousewheel(); 

   //Corners
   $('#menu li').corner("7px");	
							
   //Print alt rows
   $("#bf-table tr:even").addClass("alt");
      
	
 });
