// tooltip settings
var xOffset = -20;
var yOffset = 10;

$(document).ready(function(){
	// tooltips
	$(".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")
				.show();
				//.fadeIn("fast");
	    },
		function(){
			this.title = this.t;		
			$("#tooltip").remove();
	    }
	);	
	$(".tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
	// fancybox
	$("a[rel=lightbox]").fancybox({
		'hideOnContentClick': true,
		'overlayShow': true,
		'zoomSpeedIn': 0,
		'zoomSpeedOut': 0
	});
	
	$(function(){
      $('a.new-window').click(function(){
		window.open(this.href);
		return false;
      });
	});
	
});

