$(document).ready(function() {
/*	

	function megaHoverOver(){
		var doc_width = $(document).width();
		$(this).find(".sub").stop().fadeTo('fast', 1).show();
			
		//Calculate width of all ul's
		(function($) { 
			jQuery.fn.calcSubWidth = function() {
				rowWidth = 0;
				//Calculate row
				$(this).find("ul").each(function() {					
					rowWidth += $(this).width(); 
				});	
			};
		})(jQuery); 
		
		$(this).calcSubWidth();


		//this_sub.css({'width' : rowWidth});

		var this_sub = $(this).find(".sub");
		var offset = this_sub.offset();
		var doc_center = Math.round(doc_width/2);
		var sub_right_edge = (offset.left + this_sub.outerWidth(true) + 4);
		var container_right_edge = (doc_center + ($('#container').width() / 2));
		if(sub_right_edge>=container_right_edge){
			var this_left = sub_right_edge - container_right_edge;
			this_sub.css('left','-'+this_left+'px');
		}

		
	}
	
	function megaHoverOut(){ 
	  $(this).find(".sub").stop().fadeTo('fast', 0, function() {
		  $(this).hide().css('left',0); 
	  });
	}


	var config = {    
		 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 100, // number = milliseconds for onMouseOver polling interval    
		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    
		 timeout: 500, // number = milliseconds delay before onMouseOut    
		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    
	};

	//$("#navigation li .sub").css({'opacity':'0'});
	$("#navigation li").hoverIntent(config);
	*/
});
