/**
 * @author adamchambers
 */

Cufon.replace('h1, #menu ul li a, #options a', { forceHitArea:  
true }); 

$(document).ready(function() {
	
	$('#website').attr('href', '#').click(function() {
		$.ajax({
			type : "POST",
			url : "ssi/ajax/visitor.ajax.php",
			success : function(response) {
				if(response == "true") {
					editLinks();
				}
				$.scrollTo($('a[name=site]'), 800);
			}
		});
		return false;
	});
	
	
	$('#find_us, ').hover(function() {
		// do nothing
	}, function() {
		$('#find_us').slideUp(200);
	});
});

function editLinks(){
	$('a').not('.email').not('.infiniteCarousel .wrapper ul li a').each(function() {
		var href = $(this).attr('href');
		$(this).attr('href', href+"#site");
	});
}
