jQuery.noConflict();
(function($) { 
  $(function() {
		jQuery.fn.extend({
			TopMenu : function(options){
				var This = $(this);
				var div = This.next('div');
				var exT = options.extraTop || 0;
				var exL = options.extraLeft || 0;
				var speed = options.speed || 0;
				var STimer;
				var Timer;
				var ThisH = This.height();
				This.hover(function(){
					var ThisOff = This.offset();
					var ThisL = ThisOff.left + exL;
					var ThisT = ThisOff.top;
					var ThisB = (ThisT + ThisH) + exT;
					$(div).css({'position': 'absolute', 'left': ThisL+'px', 'top': ThisB+'px', 'z-index': 5000, 'overflow': 'hidden', 'opacity': 0.9});
					clearTimeout(Timer);
					STimer = setTimeout(function(){
						$(div).slideDown(speed);
					}, 200);
				}, function(){
					clearTimeout(STimer);
					Timer = setTimeout(function(){
						$(div).slideUp(speed);
					}, 100);
				});
				$(div).hover(function(){
					clearTimeout(Timer);
					$(div).slideDown(speed);
				}, function(){
					Timer = setTimeout(function(){
						$(div).slideUp(speed);
					}, 100);
				});
				
			}
		});
		$('#navigation').find('li').each(function(){
			var Tlink = $(this).find('a:first');
			if (Tlink.next('div').length > 0){
				Tlink.TopMenu({extraTop:28, extraLeft: 10, speed: 'fast'});
			}
		});
  });
})(jQuery);
