﻿$(document).ready(function(a) {
    /* Brincadeira com as Imagens
    $('img').click(function() {
    $(this).animate({ opacity: 0.1 }, 200);
    $(this).animate({ opacity: 1 }, 1200);
    });*/

    //Tremer os Menus            
    $(".Menu_Lat > ul > div > li > a").mouseover(function() {
        $(this).animate({ paddingLeft: 5 }, 200);
    })
    .mouseout(function() {
        $(this).animate({ paddingLeft: 0 }, 200)
        .dequeue();
    });
    $(".Menu_Lat > ul > li > a").mouseover(function() {
        $(this).animate({ paddingLeft: 5 }, 200);
    })
    .mouseout(function() {
        $(this).animate({ paddingLeft: 0 }, 200)
               .dequeue();
    });

    $(".Menu_Lat > ul > ul").click(function() {

        if ($(this).next().find("li:eq(0)").is(":hidden")) {//Se está escondido (display:none)                    
            $(this).animate({ paddingLeft: 30 }, 250)
                           .animate({ paddingLeft: 25 }, 250)
                           //.animate({ opacity: 0.1 }, 200)
                           .css('background-image', 'url(/App_Themes/AZUL/imagens/top_ativo2.png)')
                           //.animate({ opacity: 1 }, 1200);
            $(this).next().find("li:eq(0)").show("fast", function() {
                $(this).next().show("fast", arguments.callee);
            });
        }
        else {
            $(this).next().find("li:eq(0)").hide("fast", function() {
                $(this).next().hide("fast", arguments.callee);
            });
            $(this).animate({ paddingLeft: 30 }, 250)
                           .animate({ paddingLeft: 25 }, 250)
                           //.animate({ opacity: 0.1 }, 200)
                           .css('background-image', 'url(/App_Themes/AZUL/imagens/top_ativo.png)')
                           //.animate({ opacity: 1 }, 900); ;

        }
    });

});

function Abre_Produtos()
{	
		if ($("#Port").next().find("li:eq(0)").is(":hidden")) {//Se está escondido (display:none)                    
            $("#Port").animate({ paddingLeft: 30 }, 250)
                           .animate({ paddingLeft: 25 }, 250)
                           //.animate({ opacity: 0.1 }, 200)
                           .css('background-image', 'url(/App_Themes/AZUL/imagens/top_ativo2.png)')
                           //.animate({ opacity: 1 }, 1200);
            $("#Port").next().find("li:eq(0)").show("fast", function() {
                $(this).next().show("fast", arguments.callee);
            });
        }
        else {
             $("#Port").animate({ paddingLeft: 30 }, 250)
                           .animate({ paddingLeft: 25 }, 250);
        }
}

      

