//menu
/*
$(document).ready(function(){
  
  $('li.mainlevel').mousemove(function(){
  $(this).find('ul').slideDown("1000");//you can give it a speed
  });
  $('li.mainlevel').mouseleave(function(){
  $(this).find('ul').slideUp("fast");
  });
  
});
*/


function displaySubMenu(li) {
    var subMenu = li.getElementsByTagName("ul")[0];
    if (subMenu != null && typeof (subMenu) != typeof (undefined)) {
        subMenu.style.display = "block";
    }
}
function hideSubMenu(li) {
    var subMenu = li.getElementsByTagName("ul")[0];
    if (subMenu != null && typeof (subMenu) != typeof (undefined)) {
        subMenu.style.display = "none";
    }
} 


var menuids = ["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus() {

    for (var i = 0; i < menuids.length; i++) {
        if (document.getElementById(menuids[i]) != null) {
            var ultags = document.getElementById(menuids[i]).getElementsByTagName("ul")
            for (var t = 0; t < ultags.length; t++) {
                ultags[t].parentNode.getElementsByTagName("a")[0].className = "subfolderstyle"
                ultags[t].parentNode.onmouseover = function() {
                    this.getElementsByTagName("ul")[0].style.display = "block"
                }
                ultags[t].parentNode.onmouseout = function() {
                    this.getElementsByTagName("ul")[0].style.display = "none"
                }
            }
        }
        }
  
}

if (window.addEventListener)
    window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
    window.attachEvent("onload", buildsubmenus)


$(function() {
    /*
    $('#mainmenu div[class="leftv"]').hover(function() {
    $(this).children('ul').stop(true, true).show('slow');
    }, function() {
    $(this).children('ul').stop(true, true).hide('slow');
    });

    $('#mainmenu div[class="leftv"]').hover(function() {
    $(this).children('div').stop(true, true).show();
    }, function() {
    $(this).children('div').stop(true, true).hide();
    });
    $('#mainmenu div[class="leftv"]').hover(function() {
    $(this).children('ul').stop(true, true).show('slow');
    }, function() {
    $(this).children('ul').stop(true, true).hide('slow');
    });
    */
    $('#mainmenu div[class="leftv"]').mouseover(function() {
        $(this).children('ul').css("left", $(this).css("left"));
        $(this).children('ul').show();

    });
    $('#mainmenu div[class="leftv"]').mouseout(function() {

        $(this).children('ul').hide();

    });
    /*
    $('#mainmenu div[class="leftv"] a').hover(function() {
    $(this).siblings().filter('ul').stop(true, true).show();
    }, function() {
    $(this).siblings().filter('ul').stop(true, true).hide();
    });
    */
});

