// JavaScript Document

function resize(w,h){if ( w > 0 ){document.getElementById("broadcasterContent").style.width = w + "px";}if ( h > 0 ){document.getElementById("broadcasterContent").style.height = h + "px";}return true;}


(function($) {
	/**
	 * equalizes the heights of all elements in a jQuery collection
	 * thanks to John Resig for optimizing this!
	 * usage: $("#col1, #col2, #col3").equalizeCols();
	 */
	 
	$.fn.equalizeCols = function(){
		var height = 0,
			reset = $.browser.msie ? "1%" : "auto";
  
		return this
			.css("height", reset)
			.each(function() {
				height = Math.max(height, this.offsetHeight);
			})
			.css("height", height)
			.each(function() {
				var h = this.offsetHeight;
				if (h > height) {
					$(this).css("height", height - (h - height));
				};
			});
			
	};
	
})(jQuery);


$(document).ready(function(){

	$('#bd').prepend('<div class="topCap"></div>').after('<div class="bottomCap"><div class="bl"></div><div class="bottom"></div><div class="br"></div></div>');

	$('.col-left').wrapInner('<div class="sidebar"></div>');
	
	$('.yui-u').equalizeCols();
	
	
	$("td").tooltip({
		showBody: " - ",
		fade: 250,
		delay: 0,
		track: true
	});

	
	
	
	
});

$("#speakersFlash").ready(function() {
	// embed flash for homepage
	var so = new SWFObject("/stage/assets/layout/cc3/speakers.swf", "Creation College 3 Keynote Speakers", "578", "460", "9", "#FFFFFF");
	so.addParam("quality", "medium");
	so.addParam("wmode", "window");
	so.addParam("play", "true");
	so.addParam("salign", "t");
	so.write("speakersFlash");
});