(function($){$.fn.extend({setTab:function(DEFAULTSTYLE,TABSWITCHTYPE,HASIMPLCONTNET,IMPLCONTENT){var tmpSwitchType;if(undefined == DEFAULTSTYLE || "" == DEFAULTSTYLE){DEFAULTSTYLE = "def";}switch(TABSWITCHTYPE){case undefined:tmpSwitchType = "click";break;case 0:tmpSwitchType = "mouseover";break;case 1:tmpSwitchType = "click";break;default:break;}if(undefined == HASIMPLCONTNET){HASIMPLCONTNET = 0;}var subType;var subLength = $(this).find("li").length;if(0 == subLength){subLength = $(this).find("div").length;if(0 == subLength){subLength = $(this).find("a").length;subType = "div";}else{subType = "div";}}else{subType = "li";}$(this).find(subType).each(function(){$(this).bind(tmpSwitchType,function(){var tmpTitId = $(this).attr("id");var tmpStr = tmpTitId.substring(3);$(this).parent().find(subType).each(function(){$(this).removeClass(DEFAULTSTYLE);});$(this).addClass(DEFAULTSTYLE);if(1 == HASIMPLCONTNET){for(var i = 0; i < subLength; i++){$("#" + IMPLCONTENT + "cont" + i).removeClass("show").addClass("hidden");}$("#" + IMPLCONTENT + "cont" + tmpStr).removeClass("hidden").addClass("show");}});});}})}(jQuery));
