$(document).ready(function () {
	
	Cufon.replace('#menu li a, #languages span a',{fontFamily: 'HelveticaNeue', hover: true});
	Cufon.replace('#content h2',{fontFamily: 'HelveticaNeue'});
	
	if(window.location.hash.length > 0) {
		var hash = window.location.hash.substring(1);
		$('#menu_'+hash).addClass('active');
	}
	
	$('span.tags span.tag').each(function(i,el) {
		
		var fontSize = Math.ceil(7*Math.random()) + 7;
		$(el).css('font-size',fontSize);
	});
	
	$(window.location).bind("change",function(objEvent,objData) {
		$('#menu li').removeClass('active');
		$('#menu_'+objData.currentHash).addClass('active');
		Cufon.refresh();
	});
});