
(function($) {
//Définition du plugin
    $.fn.voirEgalement = function(options) {
        // définition des paramètres par défaut
        var defaults = {
			hauteurListe: 0
        };
		
        // mélange des paramètres fournis et des paramètres par défaut
        var opts = $.extend(defaults, options);
		
		$(this).find(".bouton").hover(
			function () { // mouse hover
				$(this).css({cursor: 'pointer'});
			}
			,
			function () { // mouse leave  
				$(this).css({cursor: 'auto'});
			}
		);
		
		$(this).hover(
			function () { // mouse hover
				$(this).find(".bouton img").attr({src: 'images/voir-egalement/bouton-ouvert.jpg'});
				$(this).find(".categories").css({diplay: 'block'});
				$(this).find(".categories").animate({height: opts.hauteurListe+'px', borderWidth: '1px'}, 200);
			}
			,
			function () { // mouse leave
				$(this).find(".bouton img").attr({src: 'images/voir-egalement/bouton-ferme.png'});
				$(this).find(".categories").animate({height: '0', borderWidth: '0px'}, 200);
			}
		);
		
		$(this).find(".categories").liCliquable({bkColor: '#19427b'});
		
		// interface fluide
        return $(this);
    };   
})(jQuery);
