﻿registerDD = function(ele) {
	//delete ele.onmouseover;
	ele.onmouseover = null;
}

$(function() {
    $('ul.topLevelNavLinks > li').mouseover(function() {
        $('#tmpEle').remove();
        $(this).addClass('over');
        // get the width of the link.
        var linkWidth = $(this).find('span').width();
        //create a tmp element to put in the UL
        if ($(this).has('ul').length > 0) {
            var bgColor = $(this).find('ul > li:first').css('backgroundColor');
            var ele = $('<li id="tmpEle" style="width:' + linkWidth + 'px;background:' + bgColor + ';height:6px;">&nbsp;</li>').prependTo($(this).find('ul'));
        }
    });

    $('ul.topLevelNavLinks > li').mouseout(function() {
        $(this).removeClass('over');
    });
});
