(function () {
		jQuery.fn.acording = function (options) {
			return this.each(
				function () {
					jQuery.acording(this, options);					   
				}
			);		
		}
		jQuery.fn.acording = function (options) {
			// Optiuni default
			var defaults = {
				button: '.mediaspace',
				panel: '.acording-container'
			}
			settings = jQuery.extend({}, defaults, options);
			var firstPanel = settings.first;
			
			jQuery(settings.panel).each(
				function(i) {
					if (i == 0) {
						jQuery(this).show();	
					} else {
						jQuery(this).hide();	
					}
				}
			);
			jQuery(settings.button).click(
				function () {
					
					var thePanel = jQuery(this).parent().find(settings.panel);
					
					jQuery(settings.panel).each(
						function() {
							jQuery(this).slideUp('slow');	
						}
					);
					jQuery(thePanel).slideDown('slow');
					
				}
			);
		}
	}		   
)(jQuery);
