$(function () {
    /* REPLACE DE FONTES */
    Cufon.replace('#mainMenu a', { hover: { color: '#3d5057'} }); Cufon.replace('#corpo h1, #fosterCorp, #redesSociais strong:first,  #linksRodape .primeiroNivel, table.tabelaInterna tbody tr td, ul#botoes li,#footer #infRodape ul#endereco li#primeira, #paginaInterna p#destaqueMobile');

    /* MARCAÇÃO MENU LATERAL */
    var url = location.pathname.split('/'); var linksTopo = $('#mainMenu a'); var linksLateral = $('#menuLateral li a'); for (var i = 0; i < url.length; i++) { for (var a = 0; a < linksTopo.length; a++) { if (url[1] == "" || url[1] == "index.aspx") { $("#english").css("display", "block"); $(linksTopo[0]).css("color", "#3d5057"); $("#logoFoster").find("img").attr("src", $("#logoFoster").find("img").attr("src").split("foster.").join("foster-home.")); } else if (linksTopo[a].id == url[i] && linksTopo[a].id != '') { $(linksTopo[a]).css("color", "#3d5057"); } } for (var b = 0; b < linksLateral.length; b++) { if (linksLateral[b].id == url[i] && linksLateral[b].id != '') { $(linksLateral[b]).addClass('marcado'); } else if (location == linksLateral[b].href && linksLateral[b].id != '') { $(linksLateral[b]).addClass('marcado'); } } } 
});

/* SWFOBJECT
Versão alterada por Marlon Rogério (05/10)
- src, width e height são obrigatórios
- os demais parametros são opcionais
*/
function flash(src, id, width, height, flashVersion, flashVars, wmode, menu, scale) {
    var _flashVersion = (flashVersion == null) ? "8" : flashVersion;
    var _flashVars = (flashVars == null) ? "" : flashVars;
    var _wmode = (wmode == null) ? "transparent" : wmode;
    var _menu = (menu == null) ? "false" : menu;
    var _scale = (scale == null) ? "exactfit" : scale;

    var params = { menu: _menu, scale: _scale, wmode: _wmode };
    var attributes = { type: "application/x-shockwave-flash", quality: "high" };

    //chamada do flash arquivo swfobject.js
    swfobject.embedSWF(src, id, width, height, _flashVersion, _flashVars, "", params, attributes);
}
//ATIVA MENU DINAMICO
$(function () {
    var indice = 0;
    $('#menuPrimeiroNivel li.primeiroNivel').hover(
        function () {
            $(this).find("ul#subEmpresa").stop().animate({ bottom: '-158px' }, 100).css('display', 'block');
            $(this).find("ul#subServicos").stop().animate({ bottom: '-30px' }, 100).css('display', 'block');
            $(this).find("ul#subContato").stop().animate({ bottom: '-47px' }, 100).css('display', 'block');
            $(this).find('ul.segundoNivel li').css('display', 'block');
            $(this).find("ul.segundoNivel").css('border-bottom', '1px solid #fff');
        },
        function () {
            $(this).find("ul.segundoNivel").stop().animate({ bottom: '0px' }, 100).css('display', 'block');
            $(this).find("ul.segundoNivel").css('border-bottom', 'none');
            $(this).find('ul.segundoNivel li').css('display', 'none');
        }
    );
});
