$.toggleShowHide = function(init, o){

	var self = this;
	
	var f = {
		init : function(){
			$('.toggleShowHide').each(function(){
			
				var $e = $(this);
				var $t = $($e.attr('rel'));
				
				$e.bind('click.toggleShowHide', function(){
				
					if($t.is(':hidden')){
						self.showFunction($t);
					} else {
						self.hideFunction($t);
					}
					
					return false;
					
				});
				
			});
			return self;
		},
		
		hideFunction : function($t){
			$t.slideUp();
			return self;		
		},
		
		showFunction : function($t){
			$t.slideDown();
			return self;
		},
		
		destroy : function(){
			$('.toggleShowHide').unbind('click.toggleShowHide');
			return self;
		},
		
		refresh : function(){
			self.destroy().init();
			return self;			
		}
	};
	
	self = $.extend(f, self);

	if(typeof(init)=='undefined' || init){
		self.init();
	}
	
};
