$(document).ready(function() {

	SOflashvars = {
		xml: 'settings.xml'};

	SOparams = {
		scale: 'noscale',
		menu: 'false',
		wmode: 'transparent' };

	SOattributes = { 
		id: "vPlayer", 
		name: "vPlayer" };
	
	$('a.vBtnShow').show();
	
	$('a.vBtnShow').click(function(e) {
	
		e.preventDefault();
		$(this).hide();
		
		$('.intro').fadeOut('fast', function() {
			$('a.vBtnClose').show();
		});
			
	});
	$('a.vBtnClose').click(function(e) {
	
		e.preventDefault();

		$('#vContainer').fadeOut('normal', function() {
			$('.intro').fadeIn();
		});
		
		// show/hide divs
		//$('.intro').show();
		//$('#vContainer').hide();
		
		// swap buttons
		$(this).hide();
		$('a.vBtnShow').show();
			
	});

});

function loadSWF(url, targetID){

	   //Check for existing SWF
	   /*if(isObject(targetID)){
	   
	      //replace object/element with a new div
	      replaceSwfWithEmptyDiv(targetID);
	      
	   }*/
	   var el = document.getElementById(targetID);
	   
	   if(el){
	   
	      var div = document.createElement("div");
	      el.parentNode.insertBefore(div, el);
	 
	      //Remove the SWF
	      swfobject.removeSWF(targetID);
	   
	      //Give the new DIV the old element's ID
	      div.setAttribute("id", targetID);
	      
	   }
	     
	   //Embed SWF
	   if (swfobject.hasFlashPlayerVersion("7")) {
	   
	      var attributes = { data: url, width:"374", height:"300" };
	      var params = {
	      	scale: 'noscale',
			menu: 'false',
			wmode: 'transparent'
	      	};
	      var obj = swfobject.createSWF(attributes, params, targetID);
	   
	   }
	   
	}
function unloadSWF(targetID){

	//Remove the SWF
	swfobject.removeSWF(targetID);

}