//<![CDATA[
JSoul.$(function(){
    JSoul("#searchForm").initsearchForm();
	JSoul("#combosBox").initCombosBox(28, 135);
	$("#trendMenu").initTrendMenu($("#trendContent"), 30, true);
	$("#tabsMenu").initUpEffect($("#imgContent"), "a", 265, false);
	if(window.videoArgs){
		JSoul("#flashBox").insertFlash(videoArgs);
	}
});
/***JSoul prototype extend Method [Combos Box]***/
JSoul.fn.extend({
	/**
	 * 初始化侧边信息
	 * @param {Integer} min 最小高度
	 * @param {Integer} max 最大高度
	 * @return JSoul
	 */
	initCombosBox: function(min, max){
		var main = this.extend({
			choosed: null
		});
		this.find("h4").each(function(i){
			var li = this.li = JSoul(this.parentNode).extend({
				start: min,
	            callback: function(selfer){
					selfer.style("height", selfer.start + "px");
	            },
	            showAct: function(size, name){
					this.clearTimeEvent();
					this.end = size;
					this.className(name);
					this.style("height", this.start + "px");
					this.timeIntervarEvent(true);
	            }
			}).initTimeIntervarEvent(50, 0.4);
			
			if(this.parentNode.className == "opened"){
				main.choosed = this;
				li.start = max;
			}
			//鼠标点击标题事件
			this.onclick = function(e){
				if (li.className() != "opened") {
					li.showAct(max, "opened");
					if(main.choosed){
						main.choosed.li.showAct(min, "");
					}
					main.choosed = this;
				}
			}
		});
		return this;
	}
});
//]]>