$(document).ready(function(){

	// Fade the navigation and content in.
	$('#navigation').css("display", "none");
	$('#content').css("display", "none");
	$('#navigation').fadeIn(2500);
	$('#content').fadeIn(2500);

	 // When an entry is hovered over, show the link as hovered.
	 $(".sf-menu").children("li").hover(
	 	function() {
	 		$(this).addClass("prettyHover");
	 		$(this).css("background-image", "url('../images/nav-background-hover.png')");
	 	},
	 	function() {
	 		$(this).removeClass("prettyHover");
	 		$(this).css("background-image", "url('../images/nav-background.png')");
	 	}
	 );
	 
	 // When an entry is clicked on, activate the link.
	 $(".sf-menu").children("li").click(
	 	function() {
	 		window.location = $(this).children("a").attr("href");
	 	}
	 );

	// Cycle Sparkles logo.
	$('#sparkles').innerfade({ 
    	speed: 5000,
    	timeout: 0,
    	runningclass: 'sparkles'
  	});
  	
	 // Open external links in a new window.
	 $("a").filter(".link").click(function(){
	   return !window.open(this.href);
	 });
});
