// JavaScript Document

$(document).ready(function() {
    $("#pagetransition").css("display", "none");   /** set the css for the div to display none **/
 
    $("#pagetransition").fadeIn(2000);  /** set the fade in effect for 2 seconds **/
 
    $("a.transition").click(function(event){     /** set the fade effect to activate when a link is clicked **/
        event.preventDefault();
        linkLocation = this.href;
        $("#pagetransition").fadeOut(1000, redirectPage);
    });
 
    function redirectPage() {  /** serves to redirect the browser after the content of your page fully fades out **/
        window.location = linkLocation;
    }
});
