﻿(function($) {
    //alert('setupHMenu extension');
    //alert('jQuery ' + jQuery);
    $.fn.setupHMenu = function(options) {

        // Needs to look at the divs there.

        //alert('this.length ' + this.length);
        
        // This code could set up hover / over css.
        
        return this.each(function() {
            //alert('each');
            $(this).find('.hMenuSection ul li').each(function() {
                //alert('li');
                var $$ = $(this);
                if (!$$.hasClass('selected')) {
                    $$.bind('mouseover', function() {
                        $(this).addClass('selected');
                    });
                    $$.bind('mouseout', function() {
                        $(this).removeClass('selected');
                    });
                }
            });
        });
    }
})(jQuery);