if(!tc){ var tc = {}; }
  
  tc.showhide = function(app,options){
    var _me = this;
    
    this.initialize = function(){
      tc.util.log('showhide.initialize');
      app.Y.all('ul.showhide-target').each(function(node){
        node.setAttribute('original_height',node._node.offsetHeight);
        node.setStyle('height','0px');
        node.setStyle('marginBottom','0px');
        node.addClass('hidden');
      });
      _me.atags = app.Y.all('a.showhide-trigger');
      _me.atags.each(function(node){
        var split = node.getAttribute('href').split('#');
        if(split.length == 2){
          node.on('click',_me.anchorClickedHandler);
        }
      });
      return _me;
    }
    
    _me.anchorClickedHandler = function(event){
      var target;
      event.preventDefault();
      event.stopImmediatePropagation();
      _me.showhide(event.target.getAttribute('href').split('#')[1]);
    }
    
    _me.showhide = function(id){
      var target;
      target = app.Y.one('#'+id);
      if(target){
        if(target.hasClass('hidden')){
          target.removeClass('hidden');
          target.transition({
            duration: 0.5,
            easing: 'ease-in-out',
            height: target.getAttribute('original_height')+'px',
            marginBottom:'18px'
          });
        } else {
          target.addClass('hidden');
          target.transition({
            duration: 0.5,
            easing: 'ease-in-out',
            height: '0px',
            marginBottom:'0px'
          });
        }
      }
    }
    
    return this.initialize();
    
  }
