function get_swf_oa(){
    var url = location.search;		    
    var reg = new RegExp("video=.*");		    
    var value = new String(reg.exec(url));		    
    if(value != null){		        
	    value = value.replace("video=", "");			    
	    return value;
	}
	
	return false;    
}

function adiciona_flash(arquivo, id, w, h){
	swfobject.embedSWF(arquivo, id, w, h, '9.0.0', 'swf/expressInstall.swf', {},{},{} );   
	
}

function adiciona_flv(video, id, w, h, params ){
	params = params || {};
	flashvars = {video_play : video};
	
	swfobject.embedSWF('swf/player.swf', id, w, h, '9.0.0', 'swf/expressInstall.swf', flashvars, params, {} );	
}


$(document).ready(function(){	
	var video_oa = get_swf_oa();
    
    if(video_oa){
	    adiciona_flash("swf/" + video_oa + ".swf", 'oaVideo', 550, 400);
	}    	
	
	params = { allowFullScreen : true };

	if ($('#videoMc'))
		adiciona_flv('vid/01.flv', 'videoMc', 450, 241, params);

	if ($('#videoLimpe'))
		adiciona_flv('vid/02.flv', 'videoLimpe', 700, 550, params);

});

