﻿(function ($) {
    $.fn.tinyMenu = function () {
        var menuOver = function () {
            var itm = $(this), mnu = itm.parent('ul:first')[0];
            clearTimeout(mnu.sfTimer);
            itm.find(">ul:hidden").show();
            itm.siblings().find("ul:visible").hide();
        };
        var menuOut = function () {
            var itm = $(this), mnu = itm.parent('ul:first')[0];
            clearTimeout(mnu.sfTimer);
            mnu.sfTimer = setTimeout(function () {
                itm.find(">ul").hide();
            }, 200);
        };

        $("li:has(ul)", this).hover(menuOver, menuOut);
    };
})(jQuery);

