
var resizeTimer = null;
$(function(){
	processSubmenu();
	$(window).bind('resize', function() {
		if (resizeTimer) clearTimeout(resizeTimer);
		resizeTimer = setTimeout(processSubmenu, 100);

	}); 

	$('.submenu_popup').hover(function(){
		$(this).show();
	}, function(){
		$(this).hide();
	});

	$('.fuel_hover_js').hover(function(){
		$('.fuel_popup').show();
	},function(){
		$('.fuel_popup').hide();
	});
});
function processSubmenu(){
	$('.submenu_popup').each(function(){
		var ah = $(this).parent().find('a.main');
		var pos = ah.position();
		$(this).css('left', pos.left);
		$(this).css('top', pos.top+30);


		ah.hover(function(){
			$(this).parent().find('.submenu_popup').show();
		}, function(){
			$('.submenu_popup').hide();
		});
	});
}
