update: I'm still looking for the random side of things, but I've got "a" solution for the switching. However, I'm a little concerned that I'm targeting h1 rather than the span (how do I go back two parents?)
$(document).ready(function() { $('#mainArticle #latestArticle .teaser').hide(); $('#mainArticle #latestArticle h1 span').addClass("hidden"); $('#mainArticle > div h1').click(function(){ var place = $(this).parent().attr("id"); $('#mainArticle h1 span').addClass("hidden"); $('#' + place + ' h1 span').removeClass("hidden"); $('#mainArticle .teaser').hide(); $('#' + place + ' .teaser').slideDown('slow'); }); });