$(document).ready(function () {

	// attempted workaround for IE
	//$('#sliderFold div.addthis_toolbox').hide();

	if (jQuery.fn.pngFix) {
		//alert('yes');
		$(document).pngFix();
	}

	// set up in-situ "read more" links
	// .readmore wraps entire article
	// .readmore .full wraps portion that's initially hidden
	// span.ellipsis is initially empty, and contains "read more", "read less" links
	$('.readmore .full').hide();
	$('.readmore span.ellipsis').append(' &#8230; <span class="morelink">(+ <a href="#" class="h3">more details</a>)</span>');
	$(".readmore .morelink").toggle(
		function() {	// show
			//alert('showing ... ' + $(this).html());
			$(this).parents(".readmore").find('.full').slideDown("fast");
			$(this).html('(- <a href="#" class="h3">fewer details</a>)').appendTo($(this).parents(".readmore"));
			$(this).parents(".readmore").find("span.ellipsis").html('');
		},
		function() {	// hide
			//alert('hiding ... ' + $(this).html());
			$(this).parents(".readmore").find('.full').slideUp("fast");
			$(this).html(' &#8230; <span class="morelink">(+ <a href="#" class="h3">more details</a>)</span>').appendTo($(this).parents(".readmore").find("span.ellipsis").html(''));
		}
	);

	var $container = $('.swf');

	$container.each(function() {
		var $swffile	= $(this).find('a:first').attr('href');
//		alert($swffile);
		var $width		= $(this).css('width');
		var $height		= $(this).css('height');

		//alert($width + ' x ' + $height);

		$(this).flash({
			swf: 		$swffile,
			width:	$width,	// Default is 320
			height:	$height,	// Default is 180
			params: {
				play: false,
				allowfullscreen: true,
				allowscriptaccess: 'always'
			},
			flashvars: {
				wmode: 'transparent',
				hasVersion: 10,							// optional and temporary
				autostart: false
			}
		});
	});

});
