jQuery(function(e){var b=HISTORY.body.attr("id");if(b!=="topics-browse"){var c,g,f,a;c=e("ul.media-thumbs");g=e("ul.media-thumbs-rich-media");f=e("div.mod.related-media");e(".in-depth .categories .category").matchColumns();e(".topic-highlights .mod:last").css("marginBottom","0");e("div.this-day").hover(function(){e(this).addClass("this-day-hover")},function(){e(this).removeClass("this-day-hover")}).click(function(){window.location=e(this).find("a:first").attr("href");return false});e("div.truncated-media").each(function(){var j,k,h;j=e(this);k=j.attr("id").replace("truncated-","");h=[];if(k==="videos"){h=HISTORY.truncated_video_thumbs}else{if(k==="photos"){h=HISTORY.truncated_photo_thumbs}else{if(k==="audio"){h=HISTORY.truncated_audio_thumbs}else{if(k==="rich-media"){h=HISTORY.truncated_rich_media_thumbs}}}}j.hide();e('<a class="smaller more" href="#">Show All</a>').toggle(function(l){l.preventDefault();e(this).html("<span>Show Fewer</span>");if(e.browser.msie&&e.browser.version<8){j.show()}else{j.slideDown("slow")}},function(l){l.preventDefault();e(this).html("<span>Show All</span>");if(e.browser.msie&&e.browser.version<8){j.hide()}else{j.slideUp("slow")}}).wrapInner("<span></span>").appendTo("div#topic-"+k+"-head");i=0;e("ul.media-thumbs > li:not(.row-clear)",j).each(function(){e(this).css({backgroundImage:"url("+h[i]+")"});i++});if(j.find(".playing").length>0){e("div#topic-"+k+"-head a.smaller.more").click()}});if(g.length>0){if(window.location.toString().indexOf("/interactives/")>=-1){e('a.thumb[href$="'+HISTORY.interactive_slug+'"]',g).parent().addClass("playing")}}if(c.length>0){e("a.thumb",c).hoverModals(290)}if(f.length>0){e(".head a.more",f).toggle(function(h){h.preventDefault();e("li.hide").slideDown("fast");e(this).find("span").text("Close")},function(h){h.preventDefault();e("li.hide").slideUp("fast");e(this).find("span").text("See more")})}}else{var d=e("form.search-something-else");d.find("a.pill").click(function(h){h.preventDefault();d.submit()})}});