var IsLight=false;var IsOpenList=false;function buildtags(a,e){var g=a.split("，");var d=e.split("，");var f="";for(var c=0;c<g.length;c++){f+='<a href="http://search.joy.cn/index.html?_lxkw='+escape(g[c])+'&_lxpg=1&_lxps=12&_lxsort=&_lxsa=1&_lxdate1=&_lxdate2=&_lxlayout=&_lxmp=7&_lxtpc=1,3,4,6,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,25,27&_lxkwt=&_lxdup=3&_lxtpcc=" title="" target="_blank">'+g[c]+"</a>&nbsp;"}for(var b=0;b<d.length;b++){f+='<a href="http://search.joy.cn/index.html?_lxkw='+escape(d[b])+'&_lxpg=1&_lxps=12&_lxsort=&_lxsa=1&_lxdate1=&_lxdate2=&_lxlayout=&_lxmp=7&_lxtpc=1,3,4,6,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,25,27&_lxkwt=&_lxdup=3&_lxtpcc=" title="" target="_blank">'+d[b]+"</a>&nbsp;"}$(".p02").html(f)}var transshow=false;function showAndHide(c,a){var d=$("#"+c)[0];var b=(typeof(a)=="undefined")?"":a;if(b==""){b=(transshow)?"none":"block"}else{b=(b!="hide")?"block":"none"}d.style.display=b;transshow=(b!="none")}(function(a){a.fn.lightBox=function(e){e=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:false,imageBtnClose:"images/lightbox-btn-close.gif",containerBorderSize:10,containerResizeSpeed:400},e);var c=this;function g(){d(this,c);return false}function d(j,i){f()}function f(){if(IsLight==false){a("body").append('<div id="jquery-overlay"></div>');var k=b();a("#jquery-overlay").css({backgroundColor:e.overlayBgColor,opacity:e.overlayOpacity,width:k[0],height:k[1]}).fadeIn();var j=a("#dplayer")[0];var l=a(".newcondiv01")[0];var i=a("#boxLight")[0];j.style.zIndex="1000";i.style.zIndex="1000";i.style.position="relative";i.src="http://css.megajoy.com/vod/movie/images/img09091101_1.gif";l.style.position="static";a(".left01")[0].style.position="static";IsLight=true}else{h()}}function h(){IsLight=false;a("#jquery-overlay").fadeOut(function(){a("#jquery-overlay").remove()});var i=a("#boxLight")[0];var j=a("#dplayer")[0];var k=a(".newcondiv01")[0];k.style.position="relative";j.style.zIndex=0;i.style.zIndex=0;i.src="http://css.megajoy.com/vod/movie/images/img09091101.gif"}function b(){var k,i;if(window.innerHeight&&window.scrollMaxY){k=window.innerWidth+window.scrollMaxX;i=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){k=document.body.scrollWidth;i=document.body.scrollHeight}else{k=document.body.offsetWidth;i=document.body.offsetHeight}}var j,l;if(self.innerHeight){if(document.documentElement.clientWidth){j=document.documentElement.clientWidth}else{j=self.innerWidth}l=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){j=document.documentElement.clientWidth;l=document.documentElement.clientHeight}else{if(document.body){j=document.body.clientWidth;l=document.body.clientHeight}}}if(i<l){pageHeight=l}else{pageHeight=i}if(k<j){pageWidth=k}else{pageWidth=j}arrayPageSize=new Array(pageWidth,pageHeight,j,l);return arrayPageSize}return this.unbind("click").click(g)}})(jQuery);function CutString(g,c){var b="";var f=g;var e=c-3;if(e<0){e=0}var a=0;for(var d=0;d<f.length;d++){a+=f.charCodeAt(d)>254?2:1;if(a>e){if(b.length<f.length){b+="…"}break}b+=f.substr(d,1)}return b}function TrackPageViewPath(a){try{pageTracker._trackPageview(a+window.location.pathname.replace("/",""))}catch(b){}}function setPlayerFront(b){var c=document.getElementById("rightcolumn");var a=document.getElementById("dplayer");if(c){if(IsLight==false){if(b=="true"){c.style.position="static";IsOpenList=true}else{c.style.position="relative";$(".newcondiv01")[0].style.position="relative";IsOpenList=false}}else{if(b=="true"){c.style.position="static";IsOpenList=true}else{c.style.position="static";$(".newcondiv01")[0].style.position="static";IsOpenList=false}}}}function cutbreif(a,b){$("#"+a)[0].style.display="none";$("#"+b)[0].style.display=""}function clip(b){var a=document.getElementById(b).value;copyToClipboard(a)}var isOpen=false;function ShareQQ(a){if(isOpen==false){$("#"+a)[0].style.display="";isOpen=true}else{$("#"+a)[0].style.display="none";isOpen=false}}function copyToClipboard(a){if(window.clipboardData){window.clipboardData.setData("text",a);alert("分享代码已经复制至剪贴板，可以用粘贴或者CTRL+V将视频发布至您的Blog或者BBS")}else{alert("抱歉，在你的游览器里不能自动复制到剪贴板～")}}$(document).ready(function(){$("#addtoclection").attr("href","javascript:MjActionCollection();TrackPageViewPath('/CR/Function/Favorite/');");$("#addtoup").attr("href","javascript:MjActionUp();TrackPageViewPath('/CR/Function/Up/');")});function MjActionUp(){MJActionSupport(AppID,243,ContentTypeID,ContentID,"Support")}function UserLoginState(){var a=$.cookie("current_user_info");if(a==null||a.length==0){return false}return true}function UserLoginCallJS(){CommentAnchor.location.reload()}function MjActionCollection(){if(!UserLoginState()){MJActionShowLogin(3,"UserLoginCallJS()")}else{MJActionCollect(AppID,245,ContentTypeID,ContentID,ColAuthor,ColCategoryId,ColDescription,ColImageUrl,ColPubDate,ColTitle,ColUrl)}}var xpos,ypos,locationobj;function showBtn(d,a){var c=document.documentElement.scrollLeft;var b=document.documentElement.scrollTop;getAbsPoint(d);GetUrlList(a);locationobj=a;document.all.btn.style.display="block";document.all.btn.style.left=xpos+c+50;document.all.btn.style.top=ypos+b+60}function showBtn2(d,a){var c=document.documentElement.scrollLeft;var b=document.documentElement.scrollTop;getAbsPoint(d);locationobj=a;GetUrlList(a);document.getElementById("btn1").style.display="block";document.getElementById("btn1").style.left=xpos+c+25+"px";document.getElementById("btn1").style.top=ypos+b+15+"px"}function hiddnBtn1(){document.getElementById("btn").style.display="none"}function hiddnBtn(){document.getElementById("btn1").style.display="none"}function showContinue(a){a.style.display="block"}function getAbsPoint(a){var b=a.getBoundingClientRect();xpos=b.left;ypos=b.top}var vOnlyVid=0;var vCountMum=0;var pid=0;function getPid(a){pid=a}var textvalue;function getShareUrl(a){if(vCountMum==1){switch(a){case"1":TrackPageView("/outgoing/baiduspace/");textvalue="http://client.joy.cn/flvplayer/vodsp_1_1_51_"+pid+"_"+vOnlyVid+"_0.swf";copyToClipboard(textvalue);break;case"2":TrackPageView("/outgoing/qzone/");textvalue="http://client.joy.cn/flvplayer/vod_1_1_51_"+pid+"_"+vOnlyVid+"_0.swf";copyToClipboard(textvalue);break;case"3":TrackPageView("/outgoing/xiaonei/");textvalue='<object width="480" height="410"><param name="movie"  value="http://client.joy.cn/flvplayer/vod_1_1_51_'+pid+"_"+pid+'.swf" /><embed src="http://client.joy.cn/flvplayer/vod_1_1_51_'+pid+"_"+vOnlyVid+'_0.swf" width="480" height="410" type="application/x-shockwave-flash" allowFullScreen="true"></embed></object>';copyToClipboard(textvalue);break;case"4":TrackPageView("/outgoing/sohublog/");textvalue='<embed src="http://client.joy.cn/flvplayer/vod_1_1_51_'+pid+"_"+vOnlyVid+'_0.swf" width="480" height="410" type="application/x-shockwave-flash" allowFullScreen="true"></embed>';copyToClipboard(textvalue);break;case"5":textvalue="http://client.joy.cn/flvplayer/vod_1_1_51_"+pid+"_"+vOnlyVid+"_0.swf";copyToClipboard(textvalue);break;case"6":TrackPageView("/outgoing/wangyiblog/");textvalue='<embed src="http://client.joy.cn/flvplayer/vod_1_1_51_'+pid+"_"+vOnlyVid+'_0.swf" width="480" height="410" type="application/x-shockwave-flash" allowFullScreen="true"></embed>';copyToClipboard(textvalue);break;case"7":textvalue="[flash=480,400]http://client.joy.cn/flvplayer/vod_1_1_51_"+pid+"_"+vOnlyVid+"_0.swf[/flash]";copyToClipboard(textvalue);break}}else{switch(a){case"1":TrackPageView("/outgoing/baiduspace/");textvalue="http://client.joy.cn/flvplayer/vodsp_2_1_51_"+pid+"_0.swf";copyToClipboard(textvalue);break;case"2":TrackPageView("/outgoing/qzone/");textvalue="http://client.joy.cn/flvplayer/vodsp_2_1_51_"+pid+"_0.swf";copyToClipboard(textvalue);break;case"3":TrackPageView("/outgoing/xiaonei/");textvalue='<object width="480" height="410"><param name="movie"  value="http://client.joy.cn/flvplayer/vod_2_1_51_'+pid+'_0.swf" /><embed src="http://client.joy.cn/flvplayer/vodsp_2_1_51_'+pid+'_0.swf" width="480" height="410" type="application/x-shockwave-flash" allowFullScreen="true"></embed></object>';copyToClipboard(textvalue);break;case"4":TrackPageView("/outgoing/sohublog/");textvalue='<embed src="http://client.joy.cn/flvplayer/vodsp_2_1_51_'+pid+'_0.swf" width="480" height="410" type="application/x-shockwave-flash" allowFullScreen="true"></embed>';copyToClipboard(textvalue);break;case"5":textvalue="http://client.joy.cn/flvplayer/vodsp_2_1_51_"+pid+"_0.swf";copyToClipboard(textvalue);break;case"6":TrackPageView("/outgoing/wangyiblog/");textvalue='<embed src="http://client.joy.cn/flvplayer/vodsp_2_1_51_'+pid+'_0.swf" width="480" height="410" type="application/x-shockwave-flash" allowFullScreen="true"></embed>';copyToClipboard(textvalue);break;case"7":textvalue="[flash=480,400]http://client.joy.cn/flvplayer/vodsp_2_1_51_"+pid+"_0.swf[/flash]";copyToClipboard(textvalue);break}}}function TransToSite(f){var e=$("#entitytitle").text().replace(/\s+/g,"").replace("(","（").replace(")","）");switch(f){case"trans_tencent":TrackPageView("/outgoing/tencent");var c="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+encodeURIComponent(location.href);if(!window.open(c)){location.href=c}break;case"trans_rr":TrackPageView("/outgoing/renren/");void ((function(k,q,o){if(/renren\.com/.test(q.location)){return}var m="http://share.renren.com/share/buttonshare.do?link=",j=q.location,i=q.title,n=[o(j),"&title=",o(i)].join("");function h(){if(!window.open([m,n].join(""),"",["toolbar=0,status=0,resizable=1,width=626,height=436,left=",(k.width-626)/2,",top=",(k.height-436)/2].join(""))){j.href=[m,n].join("")}}if(/Firefox/.test(navigator.userAgent)){setTimeout(h,0)}else{h()}})(screen,document,encodeURIComponent));break;case"trans_kx":TrackPageView("/outgoing/kaixin/");var g=document;g.kaixin001_repaste.rtitle.value=escape(e);g.kaixin001_repaste.rcontent.value=escape(e+"（到激动网")+"(www.joy.cn)"+escape("看更多精彩视频）");g.kaixin001_repaste.rurl.value=g.location.href;g.kaixin001_repaste.submit();break;case"trans_db":TrackPageView("/outgoing/douban/");var c="http://www.douban.com/recommend/?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(e);if(!window.open(c,"","toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330")){location.href=c}break;case"trans_fb":TrackPageView("/outgoing/facebook/");var c="http://www.facebook.com/share.php?u="+encodeURIComponent(location.href)+"&t="+encodeURIComponent(e);if(!window.open(c)){location.href=c}break;case"trans_tt":TrackPageView("/outgoing/twritter/");var c="http://twitter.com/home?status="+encodeURIComponent("看看这个激动视频："+e+"("+location.href+")");if(!window.open(c)){location.href=c}break;case"trans_51":TrackPageView("/outgoing/51/");var b="";if(vCountMum>1){b="http://client.joy.cn/flvplayer/51comvodsp_2_1_51_"+pid+"_0.swf"}else{b="http://client.joy.cn/flvplayer/51comvodsp_1_1_51_"+pid+"_"+vOnlyVid+"_0.swf"}var c="http://diary.51.com/mod/diary_joy_add.php?vaddr="+b+"&title="+e;if(!window.open(c)){location.href=c}break;case"trans_tongxue":TrackPageView("/outgoing/tongxue/");var b="";b=location.href;var c="http://share.tongxue.com/share/share.php?link="+b+"&title="+encodeURIComponent(e);if(!window.open(c)){location.href=c}break;case"trans_digu":TrackPageView("/outgoing/digu/");var b="";b=encodeURIComponent(location.href);var a="http://digu.com/space/add_bookMark_new.jsp?sourceId=1094&url="+b+"&title="+encodeURIComponent(e);if(!window.open(a,"","toolbar=0,resizable=1,scrollbars=yes,status=1,width=550,height=250")){location.href=a}break;case"trans_9911":TrackPageView("/outgoing/9911/");var b="";b=encodeURIComponent(location.href);var a="http://www.myspace.cn/Modules/PostTo/Pages/DefaultMblog.aspx?t="+encodeURIComponent(e)+"&u="+b;if(!window.open(a)){location.href=a}break;case"trans_taobao":TrackPageView("/outgoing/taobao/");var a="http://share.jianghu.taobao.com/share/addShare.htm?url="+encodeURIComponent(location.href);if(!window.open(a)){location.href=a}break;case"trans_sina":TrackPageView("/outgoing/sina/");void ((function(y,n,m,h,j,i,x,q,o){var k="http://v.t.sina.com.cn/share/share.php?",w=q||n.location,i=["url=",m(w),"&title=",m(x||n.title),"&source=",m(h),"&sourceUrl=",m(j),"&content=",o||"gb2312","&pic=",m(i||"")].join("");function v(){if(!window.open([k,i].join(""),"mb",["toolbar=0,status=0,resizable=1,width=440,height=430,left=",(y.width-440)/2,",top=",(y.height-430)/2].join(""))){w.href=[k,i].join("")}}if(/Firefox/.test(navigator.userAgent)){setTimeout(v,0)}else{v()}})(screen,document,encodeURIComponent,"JOY","http://www.joy.cn","","","",""));break}}function TrackPageView(a){try{pageTracker._trackPageview(a)}catch(b){}}function GetUrlList(a){$("#UrlList")[0].href=a}function PGJump1(e,a){var c=document.getElementById("PGPage1").value;var d=c.match(/^\+?[0-9]*[1-9][0-9]*$/);if(d==null){alert("请输入数值");return}var b=parseInt(c);if(b<1||b>a){alert("请输入范围内的数值");return}window.location.href=e}function PGJump(e,a){var c=document.getElementById("PGPage").value;var d=c.match(/^\+?[0-9]*[1-9][0-9]*$/);if(d==null){alert("请输入数值");return}var b=parseInt(c);if(b<1||b>a){alert("请输入范围内的数值");return}window.location.href=e}function hideTrans(){$("#menu_ul")[0].style.display="none";transshow=false}function holdTrans(){try{var b=$("#albumtrans").offset();$("#menu_ul").css({top:b.top+25,left:b.left})}catch(a){}};