
$(document).ready(function()
{
	if(DetectFlashVer(8, 0, 0))
	{
		$("h2").css("margin-left", "-3px");
		$("h2").html(flash("imagens/titulo_interna.swf", "titulo=" + $("h2").html(), 600, 45, true));
	}
});


function janela(url, w, h){
	try {
		jan = open(url, "", "width=" + w + ",height=" + h + ",left=" + ((screen.availWidth-w)/2) + ",top=" + ((screen.availHeight-h)/2));
		jan.focus();
	}
	catch(e){
		alert(idioma=="port"? "Por favor desabilite seu anti-popup." : "Please disable your anti-popup.");
	}
}

function slideDown(div){

	if($("#" + div).css("display")=="none") 
	{
		$("#" + div).slideDown("normal");
	} 
	else 
	{
		$("#" + div).slideUp("normal");
	}

}

function popup(url){
    Shadowbox.open({
        content:    url,
        player:     "iframe",
        title:      "TheMediaGroup",
        height:     440,
        width:      600
    });
}

function flash(movie, flashvars, width, height, retorna){
	swfid = movie.split("/");
	swfid = swfid[swfid.length-1].replace(".swf", "");
	strSWF= '<object id="' + swfid + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width + '" height="' + height + '">'+
			'<param name="movie" value="' + movie + '">'+
			'<param name="quality" value="high">'+
			'<param name="wmode" value="transparent">'+
			'<param name="FlashVars" value="' + flashvars + '">'+
			'<embed name="' + swfid + '" src="' + movie + '" width="' + width + '" height="' + height + '" flashvars="' + flashvars + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>'+
			'</object>';
	if(!retorna) this.document.write(strSWF);
	else return(strSWF);
}