$(document).ready(function(){
	$("a.styling").click(function(){
		var flashFile = '/uploads/assets/flash/' + $(this).attr('id') + '.flv';
		
		$("DIV#content ul li a").removeClass('selected');
		$(this).addClass('selected').blur();
		
		flashembed("flashVideo",
			/* 
				first argument supplies standard Flash parameters. See full list:
				http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
			*/
			{
				src:'/FlowPlayer/FlowPlayerDark.swf',
				width: 450, 
				height: 360,
				bgcolor: '#000000'
			},
			
			/*
				second argument is Flowplayer specific configuration. See full list:
				http://flowplayer.org/player/configuration.html
			*/
			{config: {   
				autoPlay: true,
				autoBuffering: true,
				initialScale: 'scale',
				videoFile: flashFile,
				
				showVolumeSlider: true,
				showMuteVolumeButton: true, 
				showMenu: false, 
				controlBarBackgroundColor: 0
			}} 
		);
		
		$.scrollTo($(this).attr('href'), {duration: 500});
		
		return false;
	});
	
	$("DIV#content UL:last").after('<div id="flashVideo">Adobe Flash player is required to view video files</div>');
});
