	function moduleTabs(_tabsId){
		this.emId   = _tabsId + "_tabs";
		var tabs    = this.tabs = jQuery("#"+ this.emId + " li");
		var totals  = this.tabs.length;
		var tabsId  = _tabsId + "_content_";
		
		this.inits = function(){
			this.tabs.each(function(i){
			   	jQuery(this).children().bind("mouseover",function(){	   
					for(var a=1;a<=totals; a++){
						document.getElementById(tabsId+a).style.display="none";
					}
					document.getElementById(tabsId+(i+1)).style.display="";
					tabs.removeClass("cur");
					jQuery(this).parent().addClass("cur");
				});
			});
		}
	}
	
	
	function moduleFontRock(_fontId){
		this.emId   	= _fontId + "_rock";
		this.btmId   	= _fontId + "_btms";
		var 
			  obj		= jQuery("#" + this.emId),
			  objBtm	= jQuery("#" + this.btmId),
			  btmPlay	= objBtm.find(".play"),
			  btmPause  = objBtm.find(".pause"),
			  objW		= obj.width(),
			  timerid	= -1;

		this.inits		= function(){
			try{

				for(var a=0;a<3;a++){
					obj.append("　<li>"+jQuery(obj.find("li")[a]).html()+"</li>");
				}
				btmPlay.bind("click",function(){funPlay()});
				btmPause.bind("click",function(){funPause()});
				
				obj.find("li a").bind("mouseover",function(){funPause()}).bind("mouseout",function(){funPlay()});
				funPlay();
			}catch(ex){}
		}
		
		function funPlay(){
			clearInterval(timerid);
			timerid = setInterval(moveli,70);
		}
		function moveli(){
			var t= obj.css("left");
			t = parseInt(t)-1;
			if(t<=-objW) t =0;
			obj.css("left",t+"px")
		}
		function funPause(){
			clearInterval(timerid);
		}
	}

	function moduleFontFlop(_fontId){

		this.emId   		= _fontId + "_flop";
		this.btmId   		= _fontId + "_flop_btms";
		this.btmPrev		= jQuery("#" + this.btmId + " .prev")||{};
		this.btmNext		= jQuery("#" + this.btmId + " .next")||{};
		var local			= 0;
		var msgList			= jQuery("#" + this.emId);
		var msgList_li		= jQuery("#" + this.emId + " li");
		var msgList_li_h	= jQuery(msgList_li[local]).height();
		var timer 			= null;
		
		this.inits	= function(){
			try{
				with(this.btmPrev){
					bind("mouseover",function(){funPause();});
					bind("mouseout",function(){funPlay();});
					bind("click",function(){funPause();funPrev();funPlay();});
				}
				with(this.btmNext){
					bind("mouseover",function(){funPause();});
					bind("mouseout",function(){funPlay();});
					bind("click",function(){funPause();funNext();funPlay();});
				}
				with(msgList){
					prepend("<li>"+jQuery(msgList_li[msgList_li.length-1]).html()+"</li>"); 
					append("<li>"+jQuery(msgList_li[0]).html()+"</li>");
					bind("mouseover",function(){funPause();});
					bind("mouseout",function(){funPlay();});
				}
				msgList 	= jQuery("#" + this.emId);
				msgList_li	= jQuery("#" + this.emId + " li");
				msgList.css({top:-msgList_li_h});
				
				local = 1;
				funPlay();
			}catch(ex){}
		}
		
		function funPlay(){
			clearInterval(timer);
			timer = setInterval(funGo,4000);
		}
		
		function funPause(){
			clearInterval(timer);
		}
		
		function funNext(){
			funShow(0);
		}
		
		function funPrev(){
			funShow(1);
		}
		
		function funGo(){
			funShow(0);
		}
		
		function funShow(key){
			funPause();
			
			if(key==1){
				msgList.animate({top:parseInt(msgList.css("top"))+msgList_li_h}, 200, "linear",function(){
					local -= 1;
					if(local==0){msgList.css({top:-(msgList_li_h*(msgList_li.length-2))});local = msgList_li.length-2;}
				});
				
			}else{
				msgList.animate({top:parseInt(msgList.css("top"))-msgList_li_h}, 200, "linear",function(){
					local += 1;
					if(local==msgList_li.length-1){msgList.css({top:-msgList_li_h});local = 1;}
				});
				
			}
			funPlay();
		}
		
		function funGoLocal(key){
			local = local + key;
			if( local > msgList.length-1 ){
				local=0;
			}else if(local<0){
				local=msgList.length-1;
			}
		}
	}
	
	//搜索栏下拉菜单
	function modulSreachCCTV(_divId){
		this.emId 		= _divId;
		var obj			= {
			sreach		:jQuery("#"+_divId),
			sreachList	:jQuery("#"+_divId+" .menu a"),
			sreachKey	:jQuery("#"+_divId+" #keyword")
		}
		this.inits = function(){
			obj.sreachList.each(function(){
				jQuery(this).bind("click",function(){
					with(obj){
						sreachList.removeClass("cur");
						jQuery(this).addClass("cur");
						sreachKey.html(jQuery(this).html());
						sreachList.parent().hide();
					}
				});		 
			})
			
			with(obj.sreach){
				bind("mouseover",function(){obj.sreachList.parent().show();});
				bind("mouseout",function(){obj.sreachList.parent().hide();})
			}
		}
	}

	function moduleRotatingShow(_themeId, opts){
		this.emId		= _themeId + "_focusImg";
		var conList		= opts;
		var local		= conList.length-1;
		var obj			= {
			showImg		: jQuery("#"+this.emId+" img"),
			showNav		: jQuery("#"+this.emId+" h2 i"),
			showLink	: jQuery("#"+this.emId+" h2 a")
		};
		var timer 		= null;	
		
		function funPlay(){
			clearInterval(timer);
			timer = setInterval(funGo,5000);
		};
		
		function funPause(){
			clearInterval(timer);
		};
		
		function funGo(){
			funShow(local);
			
			var img = new Image();
			img.src = conList[funNextLocal(local)].imgUrl;
			
			if (img.complete) {
				local = funNextLocal(local);
				return;
			}
			img.onload = function () {
				local = funNextLocal(local);		
			};
			
		};
		
		this.inits	   = function(){
			funShow(local);
			local = funNextLocal(local);
			funPlay();
			
			obj.showNav.each(function(i){
				jQuery(this).bind("mouseover",function(){
					funPause();
					funShow(i);
					funPlay();
				})						  
			})
			
		}
		function funNextLocal(_local){
			var index = _local;
			index  -= 1;
			if( index < 0 ) index = conList.length-1;
			return	index;
		}
		
		function funShow(_local){
			with(obj){
				showImg.attr("src",conList[_local].imgUrl);
				showLink.html(conList[_local].title);
				showLink.attr("href",conList[_local].linkUrl);
				showImg.parent().attr("href",conList[_local].linkUrl);
				showNav.removeClass("cur");
				jQuery(obj.showNav[_local]).addClass("cur");
			}
		};
	}

	//初始化
	function initsHtml(){
		if (confirm("恢复初始？")){
			(new modulCustom('c1')).initsWeb();
		}
	}
	jQuery(function(){
		(new moduleFontFlop('f1')).inits();
		(new modulSreachCCTV('CCTVSearch')).inits();	
		mixScroll("#brand-show");
	});


var jq=jQuery;
function mixScroll(rid, b){
var inprogress = false,
    live_div = jq(rid);
if(!live_div.length)return;

var items = live_div.find("li"),
    btnPrev = live_div.find(">a.btn-prev"),
    btnNext = live_div.find(">a.btn-next"),
    p_item = live_div.find("ul"),
    p_itemP0 = p_item[0].parentNode,
    p_itemP = jq(p_itemP0),
    itemNum = items.length,
    lastItem = items[itemNum-1],
    leftMax = lastItem.offsetLeft + lastItem.offsetWidth,
    leftMin = 0,
    areaWidth = p_itemP0.offsetWidth;

items.clone(true).appendTo(p_item);

if(!items.length || leftMax <= areaWidth){
  return;
}

btnPrev.click(function(ev){
  leftCur = p_itemP0.scrollLeft;
  if(leftCur<=leftMin){
    return false;
  }
  var leftTarget = Math.max(leftMin, leftCur - areaWidth);
  p_itemP.stop();
  p_itemP.animate({"scrollLeft": leftTarget},
                  {"duration": 400,
                    "easing": "swing"}
                  );
  return false;
});
btnNext.click(function(ev){
  leftCur = p_itemP0.scrollLeft;
  if(leftCur>=leftMax){
    return false;
  }
  var leftTarget = Math.min(leftMax, leftCur + areaWidth);
  p_itemP.stop();
  p_itemP.animate({"scrollLeft": leftTarget},
                  {"duration": 400,
                    "easing": "swing"}
                  );
  return false;
});

function autoScroll(r){
  if(inprogress){
    return;
  }
  if(r===true){
    p_itemP0.scrollLeft = leftMin;
  }
  inprogress = true;
  p_itemP.stop();
  p_itemP.animate({"scrollLeft": leftMax},
             {"duration": (leftMax - p_itemP0.scrollLeft) * 18,
              "easing": "linear",
              'complete': function(){
                      inprogress = false;
                      setTimeout(function(){autoScroll(true);}, 0);
                  }
             });
}

live_div.hover(function(e){
  p_itemP.stop();
  inprogress = false;
},autoScroll);

autoScroll(true);

}