function formatPage() {
  var jqFirstArticle = $(".newsheadline:eq(0)");
  var jqSecondArticle = $(".newsheadline:eq(1)");
  // replace top left image with the image in the first article
  var jqSlideshowImage = jqFirstArticle.find("img");
  if (jqSlideshowImage.size() > 0) {
    $("#slideshow_image").replaceWith(jqSlideshowImage).addClass("rounded").attr("id","slideshow_image");
  }
  // set text over top left image
  $("#slideshow_caption").html(jqFirstArticle);
  // move second article to top right, unless there's an RSS feed already there
  if(jQuery("#video").find("#feedControl").size() == 0) {
    $("#video").html(jqSecondArticle);
  }
  // tidy up link separators
  $("img.section_separator").last().remove();
  // bottom section: remove columns if necessary
  if($("#bottom_half").find("iframe").size() > 0) {
    $("#bottom_half").css("column-count","1").css("-moz-column-count","1").css("-webkit-column-count","1");
  }
}

function fYouTube() {
	$('a').each(
			function() {
				var sHref = this.getAttribute('href');
				if ((sHref.indexOf('youtube.com') > -1)
						|| (sHref.indexOf('vimeo.com') > -1)) {
					var oContainer = document.createElement('div');
					oContainer = $(oContainer);
					oContainer.addClass('gtpb_youtube');
					$(this).replaceWith(oContainer);
					oContainer.oembed(sHref, 
					  {
					  	youtube: { maxWidth: 390 }
					  }
					);
				}
				// oContainer.find('embed').attr('rel',0);
			});
}

