// Put all your lovely jQuery / Javascript goodies right down here.

// this is for the first fade in when page loads
jQuery(function($){
    $('#ajax').fadeIn(2000);
});
ajaxpage = function( url, containerid,link ) {
    jQuery.ajax( { 
        url: url,
        success: function( data, textStatus, XMLHttpRequest,link ) {
            jQuery("#" + containerid).fadeOut( 200 , function() {
                jQuery(this).html( data );
                })
                .fadeIn( 400 );
            },
        error: function( XMLHttpRequest, textStatus, errorThrown ) {
            alert( "XMLHttpRequest failed: " + errorThrown );
            }
        });
        $("nav span a").removeClass('active');
        $("#link_"+link).addClass('active');
};

