
$(document).ready(function() {function megaHoverOver(){$(this).find(".sub").stop().fadeTo('fast', 1).show();(function($) { jQuery.fn.calcSubWidth = function() {
rowWidth = 0;$(this).find("ul").each(function() {rowWidth += $(this).width(); 
});};})(jQuery);if ( $(this).find(".row").length > 0 ) { //If row exists...
var biggestRow = 0;$(this).find(".row").each(function() {							   
$(this).calcSubWidth();if(rowWidth > biggestRow) {
biggestRow = rowWidth;}});$(this).find(".sub").css({'width' :biggestRow});
$(this).find(".row:last").css({'margin':'0'});} else { //If row does not exist...
$(this).calcSubWidth();$(this).find(".sub").css({'width' : rowWidth});
}}function megaHoverOut(){$(this).find(".sub").stop().fadeTo('fast', 0, function() {
$(this).hide();});}var config = {sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)    
interval: 50, // number = milliseconds for onMouseOver polling interval    
		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    
		 timeout: 200, // number = milliseconds delay before onMouseOut    
		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    
	};
 
	$("ul#topnavcc li .sub").css({'opacity':'0'});
	$("ul#topnavcc li").hoverIntent(config);
}); 
/* 3iqMENU 
*/
 $(document).ready(function() {  
	  
      function show() {
        var menu = $(this);
        if(!menu.hasClass('active')&&!menu.parent().parent().hasClass('active'))
        {
        $('#topnavbb li.active ul').fadeOut("fast");
        }
        menu.children(".sub").css('left','-1px');
        menu.children(".sub").slideDown();
      }
     
      function hide() { 
	   var menu = $(this);
        if(!menu.hasClass('active')&&!menu.parent().parent().hasClass('active'))
        {
        menu.children(".sub").css('left','-1px');
        menu.children(".sub").fadeOut('fast');
		}
      }
  
      $('ul#topnavbb li').hoverIntent({
        sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)
        interval: 150,   // number = milliseconds for onMouseOver polling interval
        over: show,     // function = onMouseOver callback (required)
        timeout: 300,   // number = milliseconds delay before onMouseOut
        out: hide       // function = onMouseOut callback (required)
      });
      $('ul#topnavbb').hover(function(){},function(){
		$('#topnavbb li.active ul.sub').fadeIn('fast');
		$('#topnavbb li.active ul').slideDown();
      });	  

});//Document ready

