// Replaces the hero image with the showreel on mouseclick -brett

function load_showreel(){
	
	// This is some "wonderful" jiggery pokery to get the Outline video 
	// playing in the outline page.
	
	(function($) {
		
		var swfUrl = '/Browse/xml/Collections/Flash/showreel_outline.swf';
		var flashvars = {xmlfile:'/Browse/xml/Collections/en-US/outline/reel.xml',xmlfiletype:'Default'};
	
		var params = {wmode:'transparent',bgcolor:'#242424'};
			params.scale = 'noscale';
		
		var attributes = {};
			attributes.allowScriptAccess = 'always';

		var randomNumber = parseInt(Math.random()*99999999);
		
		if (Browser.Engine.trident == true) swfUrl += "?r=" + randomNumber;
		
		var container = $('<div/>', { id : 'outer' })
			container.height(390)
			container.width(716)
		var div = $('<div/>', { id : 'inner' })
		$(container).append(div);
		$('.Hero').prepend(container);

		$('.Hero a:first').remove();
		$('.Hero').find('.Caption').html('&nbsp;')
		
		swfobject.embedSWF(swfUrl, 'inner', '712', '388', "9.0.115.0", false, flashvars, params, attributes);
		
		$('.Hero .Links a').attr('href', 'javascript:void(0)')
	
	})(jQuery);
}

