$(document).ready(function() {
    $.fn.wait = function(time, type) {
        time = time || 500;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                $(self).dequeue();
            }, time);
        });
    };

	$('#logo_image').fadeIn('slow', function() {
		$('.bottom_wrapper').wait();
		$('.bottom_wrapper').fadeIn('slow');
		$('#front_footer ').wait();
		$('#front_footer ').fadeIn('slow');
	});
	
	$("#contact_link").hover(
		function () {
			$("#contact_link span").replaceWith('<span>0408 355 876<br />richard@richardpearse.com</span>');
			Cufon.replace('.custom_font', {
					textShadow: '4px 4px 4px #333'
			});
		}, 
		function () {
			$("#contact_link span").replaceWith('<span>contact<br /></span>');
			Cufon.replace('.custom_font', {
					textShadow: '4px 4px 4px #333'
			});
		}
);

	/*$('#front_footer h2.custom_font a').tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    showBody: " - ", 
    fade: 250 
});*/
});

