$(document).ready(function() {

    // Text replace
    // (Note: I would have used font-face, if Abadi came in a format that was compatible with the font-squirrel font-face generator, but it isn't, so I can't.  -joe)
    Cufon.replace('#call,#navigation a,h1,#rightColumn h3,.overlayTop p,.overlayBottom p a, #words');
    
    // Superfish the menu
    $('ul#navigation').superfish({
       autoArrows: false,
       hoverClass: 'hover'
    });
    
    // Homepage slideshow
    if ($('body').hasClass('home')) {
        $('#feature').cycle();
    }
	
    if ($('ul#words').length > 0) {
        $('ul#words').cycle({timeout: 6000, speed: 2000});
    }	
	
	$("a[href*='fancybox']").fancybox();
    
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-18815437-1']);
	_gaq.push(['_trackPageview']);
	
	(function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	})();
	
});
