jQuery(document).ready(function() {
 // Delayed mouseout.
  jQuery('#nav li').hover(function() {
    // Stop the timer.
    clearTimeout(this.sfTimer);
    // Display child lists.
    jQuery('> ul', this).css({left: 'auto', display: 'block'})
      // Immediately hide nephew lists.
      .parent().siblings('li').children('ul').css({left: '-999em', display: 'none'});
  }, function() {
    // Start the timer.
    var uls = jQuery('> ul', this);
    this.sfTimer = setTimeout(function() {
      uls.css({left: '-999em', display: 'none'});
    }, 400);
  });
});

Cufon.replace('#nav > li > a',{textShadow: '1px 1px rgba(0,0,0,0.5)'});
Cufon.replace('h3:not(.project h3)');
Cufon.replace('h2');
Cufon.replace('h1');

 var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18534532-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);
  })();
  
  $(document).ready(function() {
							$('.rotate').cycle({
								fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
								timeout: 6000
							});
						});

