$.fn.toggleFor = function(settings) {
var togglers = $(this);
//accessible slider options
var options = $.extend({
    speed: 'slow', //number of visible labels
    shownClass: 'optionMax',
    hiddenClass: 'optionMin',
    multiple:true
}, settings);

function _init() {
  togglers.each(function() {
    $(this).bind('click', function(e){
      var currentElm=$(this);
      if(options.multiple){
        $('#'+$(this).attr('rel')).slideToggle('slow');
        $(this).toggleClass(options.shownClass);
        $(this).toggleClass(options.hiddenClass);
      }else{
        togglers.each(function(i){
              if(currentElm.attr('rel')==$(this).attr('rel')){
                $('#'+$(this).attr('rel')).slideToggle('slow');
                $(this).toggleClass(options.shownClass);
                $(this).toggleClass(options.hiddenClass);
              }
              else{
                $('#'+$(this).attr('rel')).hide('slow');
                $(this).removeClass(options.hiddenClass);
                $(this).addClass(options.shownClass);
              }

        }
        );
      }

    })
  });
}

_init();
};

$.fn.closeFor = function(settings) {
var togglers = $(this);
//accessible slider options
var options = $.extend({
    speed: 'slow' //number of visible labels
    }, settings);

function _init() {
  togglers.each(function() {
    $(this).bind('click', function(e){
      $('#'+$(this).attr('rel')).slideUp('slow');
    })
  });
}

_init();
};

