$(function() {
    $("a[rel^='prettyPhoto']").prettyPhoto({
		overlay_gallery: false,
		social_tools: false
	});
	
	$('#mid-nav > ul > li').mouseenter(function(){
		if($(this).children('ul').length > 0) {
			$(this).stop().animate({height:'215px'},{queue:false, duration:300, easing: 'swing', complete: 
				function() {
					$(this).children('ul').stop().fadeIn('fast', function() { $(this).css('opacity','1'); });
				}
			});
		}
	});
	
	$('#mid-nav > ul > li').mouseleave(function(){
		if($(this).children('ul').length > 0) {
			$(this).children('ul').stop().fadeOut('fast', function() {
				$(this).parent().stop().animate({height:'56px'},{queue:false, duration:600, easing: 'swing'});
			});
		}
	});
	
	var last_nav_item = $('#side-nav > ul > .menuactive');
	
	$('#side-nav > ul > li').mouseenter(function(){
		if($(this)[0] != last_nav_item[0] && $(this).children('ul').length > 0) {
			last_nav_item.stop().animate({height:'50px'},{queue:false, duration: 600, easing: 'swing'});
			$(this).stop().animate({height:'325px'},{queue:false, duration:300, easing: 'swing'});
			last_nav_item = $(this);
		}
	});
	
	$('#splash .quotes').innerfade({
		animationtype: 'fade',
		speed: 1000,
		timeout: 8000,
		type: 'random'
	});	
	
	$('#splash .slideshow').innerfade({
		animationtype: 'fade',
		speed: 1000,
		timeout: 8000
	});		
});
