$(document).ready(function(){
	initCufon();
});
function initCufon() {
	Cufon.replace('.img-holder .text-box p, .top-nav li a strong, .calculate-box p, #calculator h2, dd.tubepress_meta_title a', { fontFamily: 'Calluna', hover: true });
	Cufon.replace('.slide h3, .slide .text-box span', { fontFamily: 'Maseo', hover: true });
	Cufon.replace('.slide p, #sidebar strong.title, #sidebar-sub strong.title, .calccenter', { fontFamily: 'Sentinel-l-i', hover: true });
	refresh();
	refreshaddnav();

}

// #nav li a,
function refresh(){
	var nav = $('#nav');
	var elements = nav.find('>li');
	elements.each(function(){
		var btn = $(this);
		btn.mouseenter(function(){
			btn.addClass('hover');
		})
		btn.mouseleave(function(){
			setTimeout(function(){
				btn.removeClass('hover');
				Cufon.refresh('#nav>li>a, #nav>li.hover>a', { fontFamily: 'DINNR', hover: true });
			}, 100)
		})
	})
}
function refreshaddnav(){
	var nav = $('#add-nav');
	var elements = nav.find('>li');
	elements.each(function(){
		var btn = $(this);
		btn.mouseenter(function(){
			btn.addClass('hover');
		})
		btn.mouseleave(function(){
			setTimeout(function(){
				btn.removeClass('hover');
				Cufon.refresh('#add-nav>li>a, #add-nav>li.hover>a', { fontFamily: 'DINNR', hover: true });
			}, 100)
		})
	})
}


