$(document).ready(function() {
	$('#node-9 > div.content img').each(function(){
		var imgHeight = $(this).height();
		var imgWidth = $(this).width();
		$(this).attr('height',imgHeight);
		$(this).attr('width',imgWidth);;
	});
	//$('#node-9 > div.content img:gt(1)').hide();
	$('#node-9 > div.content').cycle({
		slideExpr: 'img',
	    fx:     'fade', 
	    speed:  1000, 
	    timeout: 8000
	});
});
if($.browser.msie){

}
else{
	var $currentPage = document.location.toString(); // gets current page url
	if($currentPage.match(/membermedia/)){ // do this only if url contains 'membermedia'
		$('div.swftools object object param[name="flashvars"]').each(function(){ // do this on each object param with a attribute of 'name' with a value of 'flashvars' 
			var $fileURL = unescape($(this).attr('value').match(/http[^]*/)); // the value of the flashvars param, url unescaped
			var $fileTitle = $fileURL.match(/files\/[^]*/); // take the url and return everything after 'file/ '(unfortunately, including 'file/')
			var $fileLink = "<a class='media-file' href='"+ $fileURL.replace(/'/g,"&#39;") + "'>"+ $fileTitle +"</a>"; // create a link with the file URL and file title
			$(this).parent().parents('div.swftools').after($fileLink); // attach this link after each div with a class of 'swftools'
		});
	}
}


