$(window).load(function() {
	/* ---------------------------------------------------------------------- */
	/* Team flash in footer
	/* ---------------------------------------------------------------------- */
	
	if ($('#footer_team').size() > 0) {
		var flashvars = {};
			flashvars.xml_path = '/sup/flash/footer_team.xml.php';
		var params = {};
			params.wmode = "transparent";
		var attributes = {};
			attributes.id = "footer_team";
			attributes.style = "display: block; outline: none; margin-top: 0px;";
		swfobject.embedSWF("/sup/flash/footer_team.swf", "footer_team", "430", "200", "9.0.0", false, flashvars, params, attributes);
	}
	
	
	/* ---------------------------------------------------------------------- */
	/* Logo Scroller flash in footer
	/* ---------------------------------------------------------------------- */
	
	if ($('#logo_scroller_footer').size() > 0) {
		var flashvars = {};
			flashvars.logo_xml_path_footer = '/sup/flash/logo_scroller.xml';
		var params = {};
			params.wmode = "transparent";
		var attributes = {};
			attributes.id = "logo_scroller_footer";
			attributes.style = "display: block; outline: none; position: relative; top: 60px; left: 25px;";
		swfobject.embedSWF("/sup/flash/logo_scroller_footer.swf", "logo_scroller_footer", "428", "118", "9.0.0", false, flashvars, params, attributes);
	}
	
	
	
	/* ---------------------------------------------------------------------- */
	/* PNG fix in IE6 for header and callouts
	/* ---------------------------------------------------------------------- */

	if ($.browser.msie && $.browser.version == '6.0') {
		DD_belatedPNG.fix('.header');
		DD_belatedPNG.fix('.round_callout_static');
		DD_belatedPNG.fix('.next_generation_vc_callout');
	}
	
	// browser hack to position static callouts properly
	if ($.browser.msie && $.browser.version == '6.0') {
		$('.round_callout_static').css('right', -1);
	}
	
	
	
	/* ---------------------------------------------------------------------- */
	/* Make sure that the secondary content is always the height of primary
	/* ---------------------------------------------------------------------- */

	if ($('.torso.with_secondary_nav').size() > 0 && $('.torso .secondary_content').outerHeight() < $('.torso .primary_content').outerHeight()) {
		$('.torso .secondary_content').height($('.torso .primary_content').height() - parseInt($('.torso .secondary_content').css('padding-top')) - 15);
	}
	
	
	
	/* ---------------------------------------------------------------------- */
	/* Custom designed form elements
	/* ---------------------------------------------------------------------- */
	
	$(".set_widths input[type='text'], .set_widths input[type='password']").wrap("<span class=\"outer\"><span></span></span>");
	$(".set_widths textarea").wrap("<span class=\"outer\"><span></span></span>");
	
	$(".set_widths span.outer").each(function () {
		if($(this).find("input[type='text'], input[type='password']").className != ""){
			tempname = $(this).find("input[type='text'], input[type='password']").attr('class');
			$(this).addClass(tempname);			
		}
		
		$(this).find("input[type='text'], input[type='password']").attr('class', '');
		
		if($(this).find("textarea").className != ""){
			tempname = $(this).find("textarea").attr('class');
			$(this).addClass(tempname);			
		}
		
		$(this).find("textarea").attr('class', '');
		
	});
	
	
	
	/* ---------------------------------------------------------------------- */
	/* Default classes that replace use of CSS3 elements such as :last-child
	/* ---------------------------------------------------------------------- */
	
	$(".list_container .list_item:last").addClass('last_item');
	
	$(".live_feed_list .live_feed_item:nth-child(1), .live_feed_list .live_feed_item:nth-child(2), .live_feed_list .live_feed_item:nth-child(3), .live_feed_list .live_feed_item:nth-child(4)").addClass('most_recent');
	
	$(".live_feed_list .live_feed_item:nth-child(4)").addClass('last_large');
	
	$(".live_feed_list .clear_column").css('display', 'none');
	
	$(".small_list_container .small_list_item:nth-child(odd)").addClass('item_col_one');
	$(".small_list_container .small_list_item:nth-child(even)").addClass('item_col_two');
	
	$(".small_list_container .small_list_item.item_col_two").after('<div class="clear"></div>');
	
	$("<div class='easter_egg'></div>").appendTo("div.footer");
	
})
