﻿function colunasMenu() {
    $("#menu ul.menu_ul").css({ 'width': "100%" });

    var colWrap = $("#menu ul.menu_ul").width();
    var colNum = Math.floor(colWrap / 200);
    var childCount = $('#menu ul li.menu_li').length;
    var colFixed = Math.floor(colWrap / childCount);

    var tamanholis = 0;
    $('#menu ul li.menu_li').each(function (index) {
        if ($(this).hasClass('menu_li')) {
            tamanholis = tamanholis + $(this).width();
        }
    });

    var tamanhomargem = ((colWrap - tamanholis) / (childCount - 1)) - 0.01;
    $("#menu ul.menu_ul").css({ 'width': colWrap });
    // $("#full_container #menu_horizontal ul li ul").css({ 'width': colFixed });
    //$("#full_container #menu_horizontal ul li").css({ 'width': colFixed });	
    $("#menu ul li.menu_li").css({ 'margin-right': tamanhomargem });
    $("#menu ul li.menu_li:last-child").css({ 'margin-right': 0 });
}

$(document).ready(function () {
    colunasMenu();
    var minimo = 1024;
    var maximo = 1240;

    var w = $(window).width();
    if (w < minimo) w = minimo;
    if (w > maximo) w = maximo;

    var tamanhovideo_w = (w * 323) / 1024;
    $("#home_video").css("width", tamanhovideo_w);

    var tamanhovideo_h = (w * 245) / 1024;
    $("#home_video").css("height", tamanhovideo_h);

    var tamanhovideo_video_w = tamanhovideo_w - ((tamanhovideo_w / 100) * 15);
    $("#home_video_video").css("width", tamanhovideo_video_w);

    var tamanhovideo_video_h = tamanhovideo_h - ((tamanhovideo_h / 100) * 15);
    $("#home_video_video").css("height", tamanhovideo_video_h);
    $("#home_video_fundo").css("height", tamanhovideo_video_h);


});
