// JavaScript Document
jQuery.fn.extend({
	showHiddenFunc: function (temp1, temp2) {
		//core
		$showHidde = function (jEl) {
			jEl.each(function () {
				var jEl01 = $(this);
				if (jEl01.hasClass("ItemActive"))
					$("#" + jEl01.attr("rel")).show();
				else
					$("#" + jEl01.attr("rel")).hide();
				jEl01.bind("click", function () {
					var self = $(this);
					if ( !($(this).hasClass("ItemActive"))) {
						var check = false;
						$("ul > li > " + temp2).each(function() {
							if ($(this).hasClass("ItemActive")) {											 
								check = true;
								$(this).removeClass("ItemActive");
								$(this).parent().find(temp1).show().slideUp("normal", function() {
									$(this).hide();
									self.addClass("ItemActive");
									$("#" + self.attr("rel")).hide().slideDown("normal", function() {
										$(this).show();	
									});	
								});	
							}
						});						
						if (check == false) {
							self.addClass("ItemActive");
							$("#" + self.attr("rel")).hide().slideDown("normal", function() {
								$(this).show();			
							});
						}
					}
					else {
						$("#" + self.attr("rel")).show().slideUp("normal", function() {
							$(this).hide();														
						});
						self.removeClass("ItemActive");
					}
					return false;
				});	
			});
		}		
		//setup
		new $showHidde($(this));
	}
});
