// Flash has a problem with crossdomain.xml when accessed from hedgegallery.com, so forwarding all non-www URLs to www.
if( document.URL.indexOf('www.') == -1 )
	window.location = document.URL.replace('http://', 'http://www.');

$(document).ready(function() {

	var attributes = {
		id: "website",
		name: "website"
	};
	
	var params = {
		base: 'http://' + window.location.host
	}
	
	var flashVars = {
		resetSharedObject: _reset,
		xmlFile: 'hedge.xml'
	}
	
	swfobject.embedSWF('/assets/swf/hedge_site.swf?v3', 'myContent', '100%', '100%', '9.0.0', null, flashVars, params, attributes);
	
	$('a.announcement').fancybox({
		overlayColor: '#fff',
		overlayOpacity: '0.8', 
		showCloseButton: 'false',
		cyclic: 'true',
		padding: 12
	});

	viewAnnouncement();

});

viewAnnouncement = function() {
	$('a.announcement:first').trigger('click');
}
