    $(document).ready(function(){

        $("#contenttabs").tabs({ fx: { opacity: 'toggle' } });

        $('ul#nav-sub.child-here li:first').removeClass("here");

        $('#contentbody h2:first,#contentsidebar h2:first').addClass("notopmargin");

        $('#contentsidebar dt:last').addClass("last");

        $('#marquee ul')
            .after('<div id="marqueenav">')
            .cycle({ 
                fx:    'scrollLeft', 
                timeout: 5000,
                pause: 1,
                pager:  '#marqueenav'
        });

        $("ul.sf-menu").superfish({
            delay:  500,
            animation: {opacity:'show',height:'show'},
            speed: 'fast',
            autoArrows:  false
        });

        // $("ul.sf-menu ul").find("li:last").addClass("lastitem");

        $("#nav ul.sf-menu li ul").each(function(){         // this function centres the drop-down menus under each of their top level nav bar items
            var pwidth = $(this).parent().width();          // get width of LI parent
            var cwidth = $(this).width();                   // get width of drop-down menu UL
            var marginleft = ((cwidth - pwidth) / 2);       // this is the value that the item needs to be negatively set on left margin
            $(this).css("margin-left",(0 - marginleft));    // set the new margin-left value directly onto the selector
        });

        // $("#contentTitle h1").each(function(){                 // this function puts the correct margin above the call to action based on height of page title
        //    var theight = $(this).height();                 // get height of title
        //    $("#calltoaction").css("padding-top",theight);  // apply the new padding-top value directly onto the selector
        //});

    });
