$(document).ready(function(){function megaHoverOver(){var j=jQuery;j(this).find(".subNavigation").stop().fadeTo('fast',1).show();var processed=j(this).data('processed');if(processed!=true){(function(j){jQuery.fn.calcSubWidth=function(){rowWidth=0;j(this).find("ul").each(function(){rowWidth+=j(this).outerWidth();});};})(jQuery);if(j(this).find(".row").length>0){var biggestRow=0;j(this).find(".row").each(function(){j(this).calcSubWidth();if(rowWidth>biggestRow){biggestRow=rowWidth;}});j(this).find(".subNavigation").css({'width':biggestRow});var columnWidth=j(this).find(".subNavigation .row > ul").outerWidth();var totalWidth=(j(this).position().left+biggestRow);if(totalWidth>1024){var edgeDetected=true;var overFlow=(biggestRow-j(this).outerWidth()+26);if((j(this).position().left-biggestRow)<0){var overFlowAmount=(1024-biggestRow)/2;var overFlow=(j(this).position().left-overFlowAmount);}
j(this).find(".subNavigation").css({'left':-overFlow});}else{var edgeDetected=false;}
j(this).find(".subNavigation .row ul:last").css({'padding-right':0});j(this).data('processed',true);}else{j(this).calcSubWidth();j(this).find(".subNavigation").css({'width':rowWidth});j(this).data('processed',true);}}}
function megaHoverOut(){var j=jQuery;j(this).find(".subNavigation").stop().fadeTo('fast',0,function(){j(this).hide();});}
var config={sensitivity:5,interval:50,over:megaHoverOver,timeout:200,out:megaHoverOut};var j=jQuery;j(".listnavigation li .subNavigation").show();j(".mainnav .listnavigation li .subNavigation").css({'opacity':'0'});j(".mainnav .listnavigation li .subNavigation").hide();j(".mainnav .listnavigation li").hoverIntent(config);});
