
(function ($) {
		   
    $.fn.popmenu = function () {

        var itemHeight = $('li', this).first().height() + 'px';
        var parentHeight = this.parent().height() + 'px';

        //For all list items
        $('li', this).mouseenter(function () {
            var item = $(this);
            item.stop();
            item.animate({
                height: parentHeight,
                opacity: 0.8
            }, 500, function () {
                // Animation complete.
                item.css('background-position', 'center bottom');
            });
        }).mouseleave(function () {
            var item = $(this);
            item.stop();
            item.css('background-position', 'center -100px');
            item.animate({
                height: itemHeight,
                opacity: 0.9
            }, 500, function () {
                // Animation complete.
            });
        });

        //return false;

    };
})(jQuery);

