$(function() {
	$(".bg").each(function() {
		this.style.backgroundImage = "url(img/bg-container-gradient.png)";
		this.style.backgroundPosition = "0 " + (-$(this).offset().top) + "px";
		this.style.backgroundRepeat = "repeat-x";
	});
	$("html:not(.ie) #blurbs li:not(.bg)").each(function() {
		this.style.backgroundImage = "url(img/bg-container-gradient.png)";
		this.style.backgroundPosition = $("#blurbs li")[0].style.backgroundPosition;
		this.style.backgroundRepeat = "repeat-x";
	})
	//// Internet Explorer can't handle png-24 backgrounds with the transitions
	$("html.ie #blurbs li.bg").each(function() {
		this.style.backgroundImage = "url(img/bg-gradient.png)";
		this.style.backgroundPosition = "0 " + (-$(this).offset().top) + "px";
		this.style.backgroundRepeat = "repeat-x";
		this.style.backgroundColor = "#D6D0B0";
	});
	$("html.ie #blurbs li:not(.bg)").each(function() {
		this.style.backgroundImage = "url(img/bg-gradient.png)";
		this.style.backgroundPosition = $("#blurbs li")[0].style.backgroundPosition;
		this.style.backgroundRepeat = "repeat-x";
		this.style.backgroundColor = "#D6D0B0";
	})
	////---
	$("#blurbs ul").cycle({
		timeout:12000
	});
	$("#photos div").cycle();
	var idCount = 0;
	$("h2.fla").each(function() {
		var swfText = $(this).text().toUpperCase();
		$(this).html("<span id='h2_" + idCount + "'></span>");
		swfobject.embedSWF("swf/h2.swf", "h2_" + idCount++, $(this).css("width"), "16px", "9.0.0", null, {txt:swfText}, {menu:"false", wmode:"transparent"}, {styleclass:"h2fla"});
	});
	$("#updates span").each(function() {
		var lineWidth = parseInt($(this).parent().css("width")) - this.offsetWidth - 1;
		$(this).after("<span class='dateDivider' style='width:" + lineWidth + "px'></span>")
	});
});