The Fission Process | MIT Nuclear Reactor Laboratory (2024)

'); // get main menu //// var $mainmenu = $(".block-primary-nav .block-content > ul").clone(); var $mainmenu = $(".block-primary-nav .menu-block-wrapper > ul").clone(); $mobilemenu.find("#divmobmainlinks").append($mainmenu); // set all li with a child ul to openable but closed // $mobilemenu.find("#divmoblinks li").children("ul").parent().addClass("openable closed"); // ...but then open up the active trail // $mobilemenu.find("#divmoblinks a.active, #divmoblinks a.active-trail").parent().removeClass("closed").addClass("open"); // create opener/closer buttons // $mobilemenu.find("#divmoblinks li.openable > a").append('+'); // toggle mobile menu on/off // $mobilemenu.find('#divmobtoggle a').on('click', function(e) { e.preventDefault(); $('#divmoblinks').slideToggle(); $(this).toggleClass('active'); }); // toggle submenus on/off // $mobilemenu.find('span.opener').on('click', function(e) { e.preventDefault(); $(this).parent('a').parent('li').removeClass('closed').addClass('open'); }); $mobilemenu.find('span.closer').on('click', function(e) { e.preventDefault(); $(this).parent('a').parent('li').removeClass('open').addClass('closed'); }); // insert mobile menu into page // //$("body").prepend($mobilemenu); $("#page-wrapper").prepend($mobilemenu); //// //// set LINK CLASSES and open links in new windows //// // links starting with "http" (but not to this site) // $('a[href^="http"]').not('[href*="'+sitedomain+'"]').attr('target','_blank').addClass('external'); // links starting with "mailto" // $('a[href^="mailto"]').addClass('mailto'); // links ending with ".pdf" // $('a[href$=".pdf"]').attr('target','_blank').addClass('pdf'); // links ending with ".ppt" // $('a[href$=".ppt"]').attr('target','_blank').addClass('ppt'); // links ending with ".doc" // $('a[href$=".doc"]').attr('target','_blank').addClass('doc'); //// //// REWRITE LINKS to http to links to https for logged-in users //// if ($('body').hasClass('logged-in')) { $('a[href^="http://'+sitedomain+'"]').each(function() { var href = $(this).attr('href'); href = href.replace('http', 'https'); $(this).attr('href', href); }); } //// //// Miscellaneous HTML REWRITING //// // set search default (obsolete as of 6/21/18) // //$('#block-google-appliance-ga-block-search-form .form-item-search-keys input').attr('placeholder', 'Search NRL'); // place class 'image' on paragraphs containing just an image (which may or may not be inside a link) // $('#content-wrapper p > img').each(function() { var $parent = $(this).parent('p'); var text = $.trim($parent.text()); if ($parent.children().length == 1 && text == '') { $parent.addClass('image'); } }); $('#content-wrapper p > a > img').each(function() { var $parent = $(this).parent('a').parent('p'); var text = $.trim($parent.text()); if ($parent.children().length == 1 && text == '') { $parent.addClass('image'); } }); // move right sidebar blocks into content side column // if ($('.region-sidebar-second').length > 0) { // if a right sidebar exists if ($('body').hasClass('page-type-page') || $('body').hasClass('page-type-webform')) { // if a type that can have sidetext if ($('.group-sidecol').length == 0) { // if no side column, create one $('

').insertAfter('.group-maincol'); } $('.region-sidebar-second .block').prependTo($('.group-sidecol')); // move blocks } $('.region-sidebar-second').remove(); // delete the right sidebar region } // responsive image fix for ckeditor-inserted images // removes inline style width and height from images that have BOTH SET IN PX // moves width and height to attributes, and sets max-width // $('img[style]').each( function() { var strstyle = $(this).attr('style'); var wpattern = /width:\s*\d+px/i; var hpattern = /height:\s*\d+px/i; if (wpattern.test(strstyle) && hpattern.test(strstyle)) { var w = parseInt($(this).css('width')); var h = parseInt($(this).css('height')); $(this).attr('width', w) .attr('height', h) .css('width', '') .css('height', ''); $(this).css('max-width', w); // comment this line to disable max-width } }); //// //// prepare HOME PAGE slideshow //// if ($("body").hasClass("page-type-homepage") && $('.block-home-spotlights .slide').length > 0) { // create slideshow container and clone spotlights to make slideshow // $('

').prependTo('.region-secondary-content'); $('.block-home-spotlights .slide').clone().appendTo('#divslideshow'); // start slideshow // $('#divslideshow').cycle({ containerResize: 0, slideResize: 0, fx: 'fade', speed: 500, timeout: 7000, pause: 0, //startingSlide: Math.floor(Math.random()*$('#divslideshow div.slide').length), startingSlide: 0, pager: '#divslidebuttons', pagerAnchorBuilder: function(idx, slide) { return ''+(idx+1)+''; } }); // pause when hovering over caption $('#divslideshow .text').mouseover( function() {$('#divslideshow').cycle('pause');} ); $('#divslideshow .text').mouseout( function() {$('#divslideshow').cycle('resume');} ); // pause when hovering over pager $('#divslidebuttons').mouseover( function() {$('#divslideshow').cycle('pause');} ); $('#divslidebuttons').mouseout( function() {$('#divslideshow').cycle('resume');} ); } //// //// TABBED CONTENT (facility pages) //// this "dissects" the content of .field-name-field-maintext to divide it into tabs //// $('body.page-type-facility .field-name-field-maintext .field-item').each(function() { // proceed only if first element is h2 // if ($(this).children().eq(0).is('h2')) { // save reference var $maintext = $(this); var originalcontent = $maintext.html(); // wrap original contents with a div $maintext.wrapInner('

'); var $originalcontainer = $maintext.find('div.original'); // add a container for the tabbed content var $tabcontainer = $('

'); $tabcontainer.prependTo($maintext); // add a container for the tab buttons var $buttoncontainer = $('

    '); $buttoncontainer.prependTo($maintext); // separate the original contents of $tabcontainer into tabs... each child h2 is a tab label, // and the following children up to the next h2 are contents of that tab var ntabs = 0; $originalcontainer.children().each(function() { if ($(this).is("h2")) { // h2 starts a new tab ntabs++; // split h2 by vertical bar - first part is button text, second part remains as heading var h2text = $(this).html(); var h2parts = h2text.split("|"); buttontext = h2parts[0]; if (h2parts.length > 1) { $(this).html(h2parts[1]); } // append new button to button list $buttoncontainer.append('

  • '+buttontext+'
  • '); // append new tab to container $tabcontainer.append('

    '); // if h2 ends with vertical bar, add class to keep the heading invisible if (h2text.slice(-1) == '|') { $(this).addClass('silent');; } // add heading to new tab $tabcontainer.children().last().append(this); } else if (ntabs > 0) { // not h2, so add element to most recent tab $tabcontainer.children().last().append(this); } }); // remove original contents $originalcontainer.remove(); // // at least one tab // if (ntabs >= 1) { // // connect the buttons to the tab content and turn on the first tab // $buttoncontainer.find('a').click(function() { if (! $(this).hasClass('tabactive')) { var tabclass = $(this).attr('class'); $tabcontainer.find('div.tab').addClass('taboff'); $tabcontainer.find('div.'+tabclass).removeClass('taboff'); $buttoncontainer.find('a').removeClass('tabactive'); $(this).addClass('tabactive'); $(window).resize(); // forces resizing of videos } return false; }); $buttoncontainer.find('a').first().addClass('tabactive'); $tabcontainer.children('.tab').first().removeClass('taboff'); } // // no tabs - restore original content // else { $buttoncontainer.remove(); $tabcontainer.html(originalcontent); } } }); //// //// RESPONSIVE EMBEDDED IFRAMES for videos, google maps, etc. //// adapted from http://css-tricks.com/NetMag/FluidWidthVideo/demo.php //// // on this site, include all iframes embedded into content area, unless explicitly requested not to var $allVideos = $('#content-wrapper iframe').not('.noresize'); // initialize // $allVideos.each(function() { $(this) // jQuery .data does not work on object/embed elements .attr('data-aspectRatio', this.height / this.width) .removeAttr('height') .removeAttr('width') .wrap('

    '); // attempt to give a helpful style sheet to TechTV videos so they will act responsively // if ($(this).is('iframe[src*="techtv.mit.edu"]')) { var src = $(this).attr('src'); src = src.replace('http:',''); // remove http: so that video works through https src = src.replace(/size=\w*/,'size=responsive'); // change size to responsive src = src.replace('external_stylesheet=','external_stylesheet=//'+sitedomain+'/sites/default/files/css_injector_images_image/techtvresponsive.css'); $(this).attr('src', src); } }); // react to window resize event // function _videoresize() { $allVideos.each(function() { var $el = $(this); var newWidth = $el.parent().width(); $el .width(newWidth) .height(newWidth * $el.attr('data-aspectRatio')); }); } $(window).resize(_videoresize); //// //// MONITOR FOR FONT RESIZE and call window resize when found //// Requires jquery.onfontresize.min.js //// $(document).bind('fontresize', function () { $(window).resize(); }); $(window).resize(); // kick off resize-triggered events when page loaded});//--><!]]>

    The Fission Process | MIT Nuclear Reactor Laboratory (2024)

    References

    Top Articles
    Latest Posts
    Article information

    Author: Rev. Porsche Oberbrunner

    Last Updated:

    Views: 5989

    Rating: 4.2 / 5 (53 voted)

    Reviews: 92% of readers found this page helpful

    Author information

    Name: Rev. Porsche Oberbrunner

    Birthday: 1994-06-25

    Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

    Phone: +128413562823324

    Job: IT Strategist

    Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

    Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.