// ---------------------------------------- +
// - Fun��o para executar flashs
// ---------------------------------------- +
function RodarFlash( path, variaveis, _width, _height ) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+_width+'" height="'+_height+'">');
	document.write('<param name="movie" value="'+path+'?'+variaveis+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="scale" value="showall">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="'+path+'?'+variaveis+'" width="'+_width+'" height="'+_height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
	document.write('</object>');
}

function attachBackground(_path, _element, _width, _height, _flashVars)
{
	var flashvars				= {};
	var params					= {};
	var attributes 				= {};
	flashvars.BASE_XML			= _flashVars
	params.menu					= "false";
	params.scale				= "noscale";
	params.salign				= "tl";
	params.allowFullScreen		= "true";
	params.quality				= "high";
	params.bgcolor				= "#000000";
	params.allowScriptAccess	= "always";
	params.wmode				= "opaque";
	swfobject.embedSWF(_path, _element, _width, _height, "8.0.0", "swfobject/expressInstall.swf", flashvars, params, attributes);
}

// ---------------------------------------- +
// - Fun��o limpa campo busca
// ---------------------------------------- +
function limpaTexto(campo, valor){
	if(document.getElementById(campo).value == valor){
		document.getElementById(campo).value = "";
	}else if(document.getElementById(campo).value == ""){
		document.getElementById(campo).value = valor;
	}
}


$('.img-download').hover(function(){
	$('.btn-download-fotos a', this).stop().animate({bottom:'0'},{queue:false,duration:200});
}, function(){
	$('.btn-download-fotos a', this).stop().animate({bottom:'-39px'},{queue:false,duration:200});
});

$(document).ready(function(){
	ative = ""
	$(".listagem li > a").click( function(){
			var id = "sub_"+$(this).attr("id");
			if(id == ative)return false;
			ative = id;
			$("li.text-faq").slideUp("fast");
			$("#"+id).slideDown("fast").removeClass("text-faq-close").addClass("text-faq");
		}
	);
});
