function stopPropagation(){};
function switchTab(a, b, c, d, e) {
    try {
        for (i = 0; i < c; i++) {
            var f = document.getElementById("Tab_" + a + "_" + i),
            g = document.getElementById("List_" + a + "_" + i);
            if (i != b) {
                f.className = e;
                g.style.display = "none"
            }
        }
        /*try {
            for (ind = 0; ind < CachePic[a][b].length; ind++) document.getElementById(a + "_pic_" + b + "_" + ind).src = CachePic[a][b][ind]
        } catch(h) {}*/
        document.getElementById("Tab_" + a + "_" + b).className = d;
        document.getElementById("List_" + a + "_" + b).style.display = ""
    } catch(j) {}

}


$(document).ready(function(){
  $(".mov").hover(function(){
  $(this).addClass("movTop");},function(){$(this).removeClass("movTop");});
	var c=$(".imgBox .ext").parent();c.find(".pic").mouseover(function(){var d=$(this).parent();
  if(d.hasClass("extOpen")){if(b){clearTimeout(b)}}
  else
  {a=setTimeout(function(){d.addClass("extOpen")},400)}}).mouseout(function(){
  if(a){clearTimeout(a)}});c.mouseout(function(){var d=$(this);
  b=setTimeout(function(){d.removeClass("extOpen")},20)});
	    $(".openBtn span").click(function(){
		$(".open").toggle(0);//toggle/slideToggle
		$(".openBtn").toggleClass("on")
		});
		$(".lighton span").click(function(){
		$(".ligopen").toggle(0);//toggle/slideToggle
		$(".lighton").toggleClass("son");
		$("#playBox").toggleClass("ztop");
		});
 	 $(".newsList li:last").addClass("nob");
	 $(".mtop li:last").addClass("nb"); 
	 $(".ztList li:last").addClass("nob"); 
	 
	 $('#roll').hide();
	 $(window).scroll(function(){if($(window).scrollTop() >= 200){$('#roll').fadeIn(500);} else{
     $('#roll').fadeOut(100); }});$('#rollTop').click(function(){$('html,body').animate({scrollTop: '0px'},1000);});
     $('#rollBottom').click(function(){$('html,body').animate({scrollTop:$('#footer').offset().top},1000);});
	 $("#favmy").click(function(){
		AddMy();
		});	
	 });				   

	
	
$(function(){
	//超链接无虚线框处
	$("a").focus( 
    function () { 
    $(this).blur(); //得到焦点与失去焦点效果一致
      }
   )
	//隔行
	$(".scrImg a").mouseover(function(){  
    $(this).addClass("bf");  
    }).mouseout(function(){  
    $(this).removeClass("bf");  
    })   
	$(".jsonPP ul li:nth-child(4n)").addClass("r"); 
	//影片简介
	var videoInfo = $('.cont'),
        videoInfoDom = videoInfo.find('span').eq(1),
        oldInfo = videoInfoDom.html();
   		videoInfo.find('.contMore').toggle(function () {
        $(this).html('隐藏');
        videoInfoDom.html(videoInfoDom.attr('txt'));
    }, function () {
        $(this).html('查看更多');
        videoInfoDom.html(oldInfo);
    });
})

function AddMy(){
	var url = window.location.href;
	try{
		window.external.addMyorite(url,document.title);
	}catch(err){
		try{
			window.sidebar.addPanel(document.title, url,"");
		}catch(err){
			alert("加入收藏失败，请使用Ctrl+D进行添加");
		}
	}	
}


var writeCookies=function(a,b,c){try{"number"==typeof c&&(c={exp:c});var d="object"==typeof c?c:{},e=new Date,f=d.exp?d.exp:1,g=d.path?d.path:"/",h=d.domain?d.domain:null,i=d.secure?d.secure:!1;f!=null&&f>=0&&e.setTime(e.getTime()+f*24*60*60*1*1e3),document.cookie=a+"="+b+(f==null||f<0?f==-1?"; expires=-1":"":"; expires="+e.toGMTString())+(g==null?"":"; path="+g)+(h==null?"":"; domain="+h)+(i==!0?"; secure":"")}catch(j){}},readCookies=function(a){try{var b=document.cookie.split("; ");for(var c=0;c<b.length;c++){var d=b[c].split("=");if(a==d[0])return d.length>1?unescape(d[1]):""}return""}catch(e){}},lvs=function(a,b){var c=jQuery,d=c(".plist");a==2?(d.find("span")[0].className="ltA",d.find("span")[1].className="lzB"):(d.find("span")[0].className="ltB",d.find("span")[1].className="lzA"),writeCookies("lvs",a,1)},lvsRead=function(){var a=jQuery,b=a(".plist"),c=readCookies("lvs")||2;c==1?jQuery("#lzA").click():jQuery("#ltA").click()};jQuery(function(a){function b(a){var b=jQuery("#"+a+" .vPic"),c;b.each(function(a){var b=jQuery(this);b.hover(function(){b.css("z-index",1e3),c=setTimeout(function(){b.find(".popInfo").attr("style","display:block;")},600)},function(){clearTimeout(c),b.css("z-index",1),b.find(".popInfo").attr("style","display:none")})})}b("videoData"),a(".shLay").live("click",function(){a("#seaKey").hide(),a(this).removeClass().addClass("hdLay")}),a(".hdLay").live("click",function(){a("#seaKey").show(),a(this).removeClass().addClass("shLay")})}),jQuery(function(){jQuery("#lzA").click(function(){var a=jQuery;a("#videoData").removeClass("jsonPP").addClass("jsonPT")}),jQuery("#ltA").click(function(){var a=jQuery;a("#videoData").removeClass("jsonPT").addClass("jsonPP")}),lvsRead()})


//直接调用人气数据
function getVideoHit(vid){	
	$.post("/"+sitePath+"inc/ajax.asp?action=hit&id="+vid,function (obj){														
			var result=obj;
			if(result=="err"){
				set(document.getElementById("hit"),'发生错误');}
			else{				
				set(document.getElementById("hit"),result);}
		}
	);				
}
function set(viewid,v){viewid.innerHTML=v;}

function getNewsHit(nid){	
	$.post("/"+sitePath+"inc/ajax.asp?action=hitnews&id="+nid,function (obj){														
			var result=obj;
			if(result=="err"){
				set(document.getElementById("hit"),'发生错误');}
			else{				
				set(document.getElementById("hit"),result);}
		}
	);				
}
function set(viewid,n){viewid.innerHTML=n;}


function showlist_more(num){
	var listheight = 148,myheight = 0;
	var inum = $("#playlist"+num).children("#plist").children(".split-list").children("li").size();
	if ($("#playlist"+num).hasClass("hidemore")){
		$("#morebtn"+num).html("&uArr; 列表太多了，可以点击隐藏一些(共"+inum+"条) &uArr;");
		$("#playlist"+num).removeClass("hidemore");
		$("#playlist"+num).css("height","auto");
		$("#playlist"+num).css("padding-bottom","30px");
		myheight = $("#playlist"+num).height();
		$("#playlist"+num).height(listheight);
		$("#playlist"+num).animate({height:myheight});
	}else{
		$("#playlist"+num).animate({height:listheight+"px"});
		$("#playlist"+num).addClass("hidemore");
		$("#morebtn"+num).html("&dArr; 更多列表已自动隐藏，请点击展开全部(共"+inum+"条) &dArr;");
	}
}

function $G(){
var Url=top.window.location.href;
var u,g,StrBack='';
if(arguments[arguments.length-1]=="#")
   u=Url.split("#");
else
   u=Url.split("?");
if (u.length==1) g='';
else g=u[1];
if(g!=''){
   gg=g.split("&");
   var MaxI=gg.length;
   str = arguments[0]+"=";
   for(i=0;i<MaxI;i++){
	  if(gg[i].indexOf(str)==0) {
		StrBack=gg[i].replace(str,"");
		break;
	  }
   }
}
return StrBack;
}