function mainmenu(){


    //coloca os submenus todos do tamanho do maior
    //para cada ul dentro do principal
    /*$("#menu ul ul").each(function(){
        //mostro para poder obter o width
        $(this).show();
        var nMax = 0;
        //descubro o maior
        $(">li",$(this)).each(function(){
            if(nMax < $(this).outerWidth()){
                nMax = $(this).outerWidth();
            }
        });

        //coloc todos do tamanho do maior
        $(">li",$(this)).width(nMax);
        $(this).width(nMax);
        //escondo
        $(this).hide();

    });

    $("#menu ul ul ").css({display: "none"}); // Opera Fix*/
    //
    //trata do hover para o ie
    $("#menu ul li, #subMenu ul li:not(.selected)").hover(function(){
        $(this).find('ul:first').css({
            visibility: "visible",
            display: "none"}
        ).fadeIn("fast");

    },function(){
        $(this).find('ul:first').css({
            visibility: "hidden"});
    });
}
 
 
 
$(document).ready(function(){					
    mainmenu();

    $("#jquery_jplayer_1").jPlayer({
            ready: function () {
                $(this).jPlayer("setMedia", {
                        m4v: "../imagens/apresentacao.mp4"
                }).jPlayer("play");
            },
            ended: function (event) {
                $(this).jPlayer("play");
            },
            volume:0.5,
            swfPath: "../imagens",
            supplied: "m4v"
    });
    
    $("a.prettyPhoto, area.prettyPhoto").attr("title","");

    $("a.prettyPhoto, area.prettyPhoto").prettyPhoto({
        animation_speed: 'fast', /* fast/slow/normal */
        slideshow: 5000, /* false OR interval time in ms */
        autoplay_slideshow: false, /* true/false */
        opacity: 0.80, /* Value between 0 and 1 */
        show_title: false, /* true/false */
        allow_resize: true, /* Resize the photos bigger than viewport. true/false */
        default_width: 500,
        default_height: 344,
        counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
        theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
        horizontal_padding: 20, /* The padding on each side of the picture */
        hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
        wmode: 'opaque', /* Set the flash wmode attribute */
        autoplay: true, /* Automatically start videos: True/False */
        modal: false, /* If set to true, only the close button will close the window */
        deeplinking: false, /* Allow prettyPhoto to update the url to enable deeplinking. */
        overlay_gallery: false, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
        keyboard_shortcuts: false, /* Set to false if you open forms inside prettyPhoto */
        changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
        callback: function(){}, /* Called when prettyPhoto is closed */
        ie6_fallback: true,
        custom_markup: '',
        social_tools: false /* html or false to disable */
    });

    colocaBanner();

});

function colocaBanner(){

    var flashvars = false;
    var params = {
        'wmode': 'transparent'
    };
    var attributes = {
      id: "animacao",
      name: "animacao"
    };

    swfobject.embedSWF($("#header").attr("rel"), "header", "681", "279", "9.0.0","expressInstall.swf", flashvars, params, attributes);

}
