﻿
function showfo(i) {
    hideotherfo(i);
    $("div.fo" + i).slideDown(300);
};
function hideotherfo(i) {
    for (x = 1; x < 7; x++) {
        if (i != x) {
            $("div.fo" + x).slideUp(0);
        }
    }
};
function hidethisfo(i) {
    $("div.fo" + i).slideUp(0);
}

var menuTimeout;
function listenFO() {
    $("li.fo1").hover(function() { menuTimeout = setTimeout(function() { showfo("1"); }, 250); }, function() { if (menuTimeout) clearTimeout(menuTimeout); });
    $("li.fo2").hover(function() { menuTimeout = setTimeout(function() { showfo("2"); }, 250); }, function() { if (menuTimeout) clearTimeout(menuTimeout); });
    $("li.fo3").hover(function() { menuTimeout = setTimeout(function() { showfo("3"); }, 250); }, function() { if (menuTimeout) clearTimeout(menuTimeout); });
    $("li.fo4").hover(function() { menuTimeout = setTimeout(function() { showfo("4"); }, 250); }, function() { if (menuTimeout) clearTimeout(menuTimeout); });
    $("li.fo5").hover(function() { menuTimeout = setTimeout(function() { showfo("5"); }, 250); }, function() { if (menuTimeout) clearTimeout(menuTimeout); });
    $("li.fo6").hover(function() { menuTimeout = setTimeout(function() { showfo("6"); }, 250); }, function() { if (menuTimeout) clearTimeout(menuTimeout); });
}

$(document).ready(function() {
    listenFO();
    $(document).keypress(function(event) {
        if (event.keyCode == '27') {
            hideotherfo(0);
        }
    });
});

// PNG FIX
//$(document).ready(function() {
//    $(document).pngFix();
//});



