var submenu;

$.Submenu = function () {
	
	var me = this;
	
	var $submenu = $("#topo-menu ul > li");
	
	this.defaults = {
		//
	};
	
	this.init = function() {
		me.submenu();
	};

	this.mostrar = function(e) {
		$(e.target).closest('li').find('.submenu').show();
	};

	this.esconder = function(e) {
		$(e.target).parents('.father').find('.submenu').hide();
	};

	this.submenu = function() {
		$submenu.mouseenter(
			function(e) {
				me.mostrar(e);
			}
		).mouseleave(
			function(e) {
				me.esconder(e);
			}
		)
	};
	
	this.init();
	
};

(function($){
	$(function (){
		
		submenu = new $.Submenu();
		
	});
})(jQuery);
