/*
 * menuBox plugin pour jQuery développé par Mandchou
 * http://www.mandchou.com/
 *
 * Copyright (c) 2009 Charly BELLE
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2010-01-13 13:45:21 -0500 (Wed, 13 Jan 2010)
 * Revision: 1
 */

(function($) {  
$.fn.menuBox = function (options){ // réglages par défaut
	options = jQuery.extend({
		speedIn:200, 
		speedOut:100, 
		menuWi:0,
		align:'horizontal'
	},options);	
	this.each(function(){
		var _self = $(this);
		_self.find('ul').css({position:'absolute'});
		_self.find('ul').addClass('ulFirstChild');
		_self.find('ul').find('ul').removeClass('ulFirstChild');
		var firstAlign = 0;
		var debugAlign = 5;
		$(this).find('ul').hide();
		$(this).find('li').bind('mouseenter',function(){
			var curObj = $(this).find('ul');
			var numId = $(this).attr('rel');
			$(this).addClass('menu' + numId + 'in menu' + numId + 'bg');
			//curObj.stop();
			//curObj.slideDown("fast");
			if ( $.browser.msie ) {
				curObj.css({marginLeft:'-60px',marginTop:'15px'});
				
			}
			curObj.fadeIn(300);
		});
		$(this).find('li').bind('mouseleave',function(){
			var curObj = $(this).find('ul');
			var numId = $(this).attr('rel');
			$(this).removeClass('menu' + numId + 'in menu' + numId + 'bg');
			//curObj.stop();
			//curObj.slideUp("fast");
			curObj.fadeOut(15);
		});
	});
}})(jQuery);

	


