		$(document).ready(function(){
		
			$(function() {
				$('.scroll-pane').jScrollPane();
			});
		
			$('#index').addClass('intro');
			
			$('#overlayContainer #overlay #logo').delay(500).fadeIn(2000).delay(500).fadeOut(2000, function() {
				$(this).remove();
				$('#overlay').fadeOut(2000);
			});
	
			$('#captionBox').hover(function() {
				$('#captionTab').fadeTo(0,0);
				$(this).stop().animate({bottom:"0px"}, 200);
			}, function() {
				$(this).stop().animate({bottom:"-80px"}, 200, null, function() {
					$('#captionTab').fadeTo(0,100);
				});
			});
			
			$('li#projectsButton')
			  .hover(function(e) {
			    $(this).children('ul').hoverFlow(e.type, {
			      'height': 'show',
			      'marginTop': 'show',
			      'marginBottom': 'show',
			      'paddingTop': 'show',
			      'paddingBottom': 'show' 
			    });
			  }, function(e) {
			    $(this).children('ul').hoverFlow(e.type, {
			      'height': 'hide',
			      'marginTop': 'hide',
			      'marginBottom': 'hide',
			      'paddingTop': 'hide',
			      'paddingBottom': 'hide' 
				});
		
			});
		
		});
		
		$('#slideshow').before('<div id="controller">').cycle({ 
		    fx:     'fade', 
		    speed:  'slow', 
		    timeout: 0, 
		    pager:  '#controller',
		    next:   '#next', 
    		prev:   '#prev'
		});
		
	
		Cufon.replace('h4');
	
