$.namespace('swis.feltz');

/** Cufon */
//Geometrix
Cufon.replace('.geometrix, .projectTitel span.titel, #footer li.copyright, #titelproject, .infoPersoon h3, #contactOpties a', { fontFamily: 'geometrix' } );
//Hover voor menu
Cufon.replace('#topnav li a, #footer li a, .projectTitel a, .infoPersoon .contactOpties li a, .nieuwsbrief, #footer .formButton', {
	fontFamily: 'geometrix',
	hover: {
		color: '#E6E600'
	}
});
Cufon.replace('.moduleMensenItemContent .contactOpties li a', {
	fontFamily: 'geometrix',
	hover: {
		color: '#4F5750'
	}
});
Cufon.replace('#mainnav li a', {
   fontFamily: 'geometrix' ,
   hover: {
	   color: '#aaab0c'
   }
});
Cufon.replace('#subnav li a', {
   fontFamily: 'geometrix' ,
   hover: {
	   color: '#E6E600'
   }
});

//Caecilia
Cufon.replace('h2, not(.nieuwsitem h3 a), h3:not(.projectTitel), h4, .pageIntro, .mainItem, ul#breadcrumbs, .nieuwsbriefoverzicht_titel, .nieuwsbriefitem_titel', { fontFamily: 'caecilia' } );

/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 
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 */		
	$(".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();
	});	
	$(".tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

$(document).ready(function() {   
	
	// Alle links met rel="external" in een nieuw venster openen
	$("a[rel=external]").each(function(e) {
		this.target = "_blank";
	});
								  
	$("#titelproject").css('display','none');
	
	tooltip();
	
});
