﻿$(document).ready(function () {
        $('.liHover').hover(
      function () {
          $("#divLista").css('display', 'block');  
      },
      function () {
          $("#divLista").css('display', 'none');
      }
    ); 

 

    var url = decodeURIComponent(window.location.pathname);
    var urlCompleta = decodeURIComponent(window.location);

    url = url.substring(url.lastIndexOf("/"));
    url = url.replace("/", "");

    if (url != "") {
        $(" .menu ul li a[href$='" + url + "']").addClass("active");
    }

    urlCompleta = urlCompleta.substring(urlCompleta.lastIndexOf("/"));
    urlCompleta = urlCompleta.replace("/", "");
    if (urlCompleta != "") {

        urlCompleta = encodeURI(urlCompleta);

        $("#lateral li a[href$='" + "/" + urlCompleta.toLowerCase() + "']").parent().addClass("active");
    }


    $('a[rel=tooltip]').mouseover(function (e) {
        var tip = $(this).attr('title');

        $(this).attr('title', '');

        $(this).append('<div id="tooltip"><div class="tipBody">' + tip + '</div></div>');

    }).mousemove(function (e) {

        $('#tooltip').css('top', e.pageY + 10);
        $('#tooltip').css('left', e.pageX - 270);

    }).mouseout(function () {

        $(this).attr('title', $('.tipBody').html());
        $(this).children('div#tooltip').remove();

    });




});
