;(function($){

	$.fn.foldable = function(){
	
		var $all = $(".foldable");
		var _selector = "p, ul, img, h3, li, span, em, strong, a, img";
	
		return $(this).each(function(){
				
			var $object = $(this);
			var _tag = $object.tagName;
			var $parent = $object.parent();
			$all.find("p, ul, img, h3, li, span, em, strong, a, img").hide();
			$object.click(function(){
				$all.each(function(){
					$(this).find("p, ul, img, h3, li, span, em, strong, a, img").hide();
				});
				$parent.find("p, ul, img, h3, li, span, em, strong, a, img").show();
			});
			
			$object.hover(function(){
			
				$object.css({
					color: "#ef3e42"
				});
			
			},function(){
			
				$object.css({
					color: "#00126d"
				});
			
			});
								
		});

	}
	
})(jQuery);

