/*!
* Murat Tüfekçi
*
* Dropdown Menu
*
*
* Date: 20.03.2011
* Depends on library: jQuery
*/
(function ($) {
    $.fn.mtmenu = function (options) {
        var defaults = {
    };
    var options = $.extend(defaults, options);
    var MenuWrapper = $(this);
    var onLeaveTimer = null;
    if (this.length > 1) {
        this.each(function () { $(this).mtmenu(options) });
        return this;
    }

    this.initialize = function () {
        $(this).children("li").hover(function () {
            if ($(this).parentsUntil("div.Nav").length <= 1) {
                $(this).children("ul").show();
                //Burda yapacaksın.
                var ulHeight = $(this).children("ul").outerHeight();
                var ulWidth = $(this).children("ul").width();

                $(this).children("ul").children("div.navLeft").css("height", (ulHeight - 2) + "px");
                $(this).children("ul").children("div.navRight").css("height", (ulHeight - 2) + "px");
                $(this).children("ul").children("div.navBottom").css("width", ulWidth + "px");
                $(this).children("ul").css("width", ulWidth + "px");
            }


        },
        function () {
            if ($(this).parentsUntil("div.Nav").length <= 1) {
                $(this).children("ul").delay(300).hide();
            }
        });
    };

    return this.initialize();
};
})(jQuery);
