(function($) {
	$.fn.extend({
		Expandable: function() {
			this.each(function() {
				var $this = $(this),
				config = {
					handle: ".handle",
					content: ".content"
				},
				exts = $this.ParseClass();
				
				for (var key in exts) {
					config[key] = exts[key];
				}
				
				$(config.handle, $this).click(function(e) {
					if ($this.hasClass("hide")) {
						$this.addClass("show").removeClass("hide");
						$(config.content, $this).show('blind', {}, 500, function() {
							$(config.content, $this).css({display:""});
						});
					} else {
						$(config.content, $this).hide('blind', {}, 500, function() {
							$(config.content, $this).css({display:""});
							$this.addClass("hide").removeClass("show");
						});
					}
					e.preventDefault()
				});
			});
		}
	});
	
	$(document).ready(function() {
		$(".expandable").Expandable();
	});
})(jQuery);
