function MagicWindow(n,t){var i=t.screenY,r=t.screenX,u="top="+i+",left="+r+",scrollbars=yes,resizable=yes,width=250,height=120";window.open(n,"_blank",u)}function BrowserWindow(n,t){var i=t.screenY,r=t.screenX,u="top="+i+",left="+r+",scrollbars=yes,resizable=yes,width=800,height=600";window.open(n,"_blank",u)}function HotNewsHistory(){var n="height=600,width=800,top=0, left=0,scrollbars=yes,resizable=yes";window.open("/Home/NoticeList","HotNewsHistory",n)}function toggleColor(n,t,i){var r=this;r._i=0,r._timer=null,r.run=function(){t[r._i]?($(n).css("color",t[r._i]),r._i++):r._i=0,r._timer=setTimeout(function(){r.run(n,t,i)},i)},r.run()}function layerCountOffset(n,t){var i=$(parent.window).width(),r=$(parent.window).height();return i<n?["10px","10px"]:r<t?"10px":"auto"}function member_url(n){var t={type:2,fix:!1,move:!1,title:"会员中心",closeBtn:1,content:n,area:["960px","543px"]};t.offset=layerCountOffset(960,543),layer.open(t)}function lotteryzone_url(n,t,i){switch(n.toLowerCase()){case"sysssc":case"syspk10":case"sys11x5":case"sysk3":case"sysklc":case"syspcdd":case"syssix":window.open("/Lotteryzone/"+n.toLowerCase()+"?class1="+t,i);break;case"bjk3":case"bjkl8":case"bjpk10":case"cqssc":case"gd11x5":case"gdkl10":case"gxk3":case"gxkl10":case"jsk3":case"pcdd28":case"six":case"taisix":case"sinsix":case"macaosix":case"syydj":case"tjssc":case"xjssc":case"xync":case"xyft":window.open("/Lotteryzone/"+n.toLowerCase(),i);break;default:layer.alert("无效菜单",{icon:0})}}function menu_url(n,t){var i;switch(n){case 1:window.location.href="/Custom/Home";break;case 2:window.location.href="/Custom/Live";break;case 201:window.location.href="/Custom/Qipai";break;case 3:window.location.href="/Custom/Sports";break;case 333:window.location.href="/Custom/SportsOld";break;case 301:window.location.href="/Custom/ElectronicSports";break;case 4:window.location.href="/Custom/Game";break;case 401:window.location.href="/Custom/Game?livetype=MG";break;case 402:window.location.href="/Custom/Game?livetype=PT";break;case 403:window.location.href="/Custom/Game?livetype=GD";break;case 404:window.location.href="/Custom/Game?livetype=GG";break;case 405:window.location.href="/Custom/Game?livetype=AE";break;case 406:window.location.href="/Custom/Game?livetype=BG";break;case 407:window.location.href="/Custom/Game?livetype=JDB";break;case 5:window.location.href="/Custom/LotteryFirst";break;case 6:window.location.href="/Custom/Six";break;case 601:window.location.href="/Custom/TaiSix";break;case 602:window.location.href="/Custom/SinSix";break;case 603:window.location.href="/Custom/MacaoSix";break;case 7:window.location.href="/Custom/Lottery/1";break;case 8:window.location.href="/Custom/Hot";break;case 9:window.location.href="/Custom/Reg";break;case 10:window.location.href="/Custom/Line";break;case 11:window.open("/Custom/Agent","_blank","width=800,height=650,status=no,scrollbars=no");break;case 111:window.open("/Custom/AgentProfit");break;case 12:top.location.href="/m_Home";break;case 13:window.location.href="/Home/Clause";break;case 14:window.location.href="/Lotteryzone/Index";break;case 15:window.location.href="/Lotteryzone/Cqssc";break;case 16:window.location.href="/Lotteryzone/Bjpk10";break;case 17:window.location.href="/Lotteryzone/Gdkl10";break;case 18:window.location.href="/Lotteryzone/Six";break;case 19:var r=300,u=600,e=window.screen.availHeight-60-u,o=window.screen.availWidth-10-r;window.open("/Chat/Index","聊天室","width="+r+",height="+u+",status=no,scrollbars=no,top="+e+",left="+o);break;case 31:i="/Account/UserCenter?menu=Account_Detail";break;case 32:i="/Account/UserCenter?menu=UserDeposit_Online";break;case 33:i="/Account/UserCenter?menu=UserWithdraw_Online";break;case 34:i="/Account/UserCenter?menu=UserTransfer_Edit";break;case 35:i="/Account/UserCenter?menu=Account_SiteMsg";break;case 36:layer.confirm("确定要退出当前登录吗",{icon:3,success:function(){$(":focus").blur()}},function(n){layer.close(n),window.location.href="/Account/Logout"});break;case 37:i="/Account/UserCenter?menu=Account_ModifyPass";break;case 38:i="/Account/UserCenter?menu=UserOrder_Sports";break;case 39:i="/Account/UserCenter?menu=UserOrder_UserReport";break;case 40:i="/Account/UserCenter?menu=UserTransfer_List";break;case 41:i="/Account/UserCenter?menu=UserFinance_RedBag";break;case 42:i="/Account/UserCenter?menu=Riches_Index";break;case 43:i="/Account/UserCenter?menu=Account_OAuth2Set";break;case 44:i="/Account/UserCenter?menu=Account_PromotionsApplyList";break;case 45:i="/Account/UserCenter?menu=UserOrder_Six";break;case 451:i="/Account/UserCenter?menu=UserOrder_TaiSix";break;case 452:i="/Account/UserCenter?menu=UserOrder_SinSix";break;case 453:i="/Account/UserCenter?menu=UserOrder_MacaoSix";break;case 46:i="/Account/UserCenter?menu=UserOrder_Cp";break;case 461:i="/Account/UserCenter?menu=UserOrder_Live";break;case 47:i="/Account/UserCenter?menu=UserOrder_ShareOrder";break;case 48:i="/Account/UserCenter?menu=UserOrder_FellowOrder";break;case 49:i="/Account/UserCenter?menu=UserOrder_UserReport";break;case 50:i="/Account/UserCenter?menu=UserFinance_OnlineList";break;case 51:i="/Account/UserCenter?menu=UserFinance_WithdrawList";break;case 52:i="/Account/UserCenter?menu=UserFinance_AddOrSubMoneyList";break;case 53:i="/Account/UserCenter?menu=TreasureBowlTransfer_List";break;case 54:i="/Account/UserCenter?menu=TreasureBowlTransfer_Edit";break;case 55:i="/UserOrder/UserTotalBill?menu=UserOrder_UserTotalBill";break;case 56:i="/Account/UserCenter?menu=UserPoints_Edit";break;case 57:i="/Account/UserCenter?menu=UserPoints_List";break;case 58:i="/Account/UserCenter?menu=SignIn_index";break;case 59:i="/Account/UserCenter?menu=UserLevel_List";break;case 90:i="/Account/UserCenter?menu=SelfHelpFS_index";break;case 510:i="/Account/UserCenter?menu=Quest_Dailysalary";break;case 60:i="/Account/UserCenter?menu=Quest_QuestList";break;case 61:window.location.href="/Custom/Lottery/2";break;case 62:window.location.href="/Custom/Lottery/3";break;case 63:window.location.href="/Custom/Lottery/4";break;case 64:window.location.href="/Custom/Lottery/5";break;case 65:window.location.href="/Custom/Lottery/6";break;case 66:window.location.href="/Custom/Lottery/7";break;case 67:window.location.href="/Custom/Lottery/8";break;case 68:window.location.href="/Custom/Lottery/9";break;case 69:window.location.href="/Custom/Lottery/10";break;case 70:layer.alert("敬请关注！",{icon:6});break;case 71:f_com.bm("http://agin.cc/promotion/index.html","agliveClientWeb");break;case 72:i="/Account/UserCenter?menu=Custom_LimitActivities";break;case 73:i="/Account/UserCenter?menu=Home_LotteryGame";break;case 74:i="/Account/UserCenter?menu=Account_MoneyLogList";break;case 75:i="/UserOrder/UserBetCount?menu=UserOrder_UserBetCount";break;case 76:i="/Account/UserCenter?menu=UserFinance_RechargeApplication";break;case 101:window.location.href="/Custom/About?code=gywm";break;case 102:window.location.href="/Custom/About?code=lxwm";break;case 103:window.location.href="/Custom/About?code=hzhb";break;case 104:window.location.href="/Custom/About?code=ckbz";break;case 105:window.location.href="/Custom/About?code=qkbz";break;case 106:window.location.href="/Custom/About?code=cjwt";break;case 107:window.location.href="/Custom/About?code=wfjs";break;case 108:window.location.href="/Custom/About?code=fzrbc";break;case 109:window.location.href="/Custom/About?code=dlfa";break;case 110:window.location.href="/Custom/About?code=hyxz";break;case 112:RechargecodeInterface();break;default:layer.alert("无效菜单",{icon:0})}if(t){var f=i.split("=")[1],s=f.split("_")[0],h=f.split("_")[1];$("#page-frame").attr("src","/"+s+"/"+h)}else i!=undefined&&window.open(i,"_blank")}function RechargecodeInterface(){layer.open({type:2,title:"充值码",shadeClose:!1,shade:.8,area:["400px","310px"],content:"/UserDeposit/RechargecodeInterface"})}function login_menu_url(n,t){if(n.length>0)switch(t){case 0:f_com.bm("/Live/AG","aglive");break;case 1:f_com.bm("/Live/AG","aglive");break;case 2:f_com.bm("/Live/AG?mh5=yes","aglive");break;case 3:f_com.bm("/Live/BBIN?page_site=live","bblive");break;case 4:f_com.bm("/Live/BBIN?page_site=ball","bblive");break;case 5:f_com.bm("/Live/BBIN?page_site=game","bblive");break;case 6:f_com.bm("/Live/BBIN?page_site=ltlottery","bblive");break;case 7:f_com.bm("/Live/MG","mglive");break;case 8:f_com.bm("/Live/DS","dslive");break;case 9:f_com.bm("/Live/HG","hglive");break;case 10:f_com.bm("/Live/BBIN?page_site=live&page_present=live","bbliveDirect");break;case 11:f_com.bm("/Live/PT?livetype=PT","ptlive");break;case 12:f_com.bm("/Live/VR","vrlive");break;case 13:f_com.bm("/Live/OG","oglive");break;case 131:f_com.bm("/Live/OG?gametype=21","oglive");break;case 14:f_com.bm("/Live/GD","gdlive");break;case 141:f_com.bm("/Live/GD?isMobile=2","gdlive");break;case 15:f_com.bm("/Live/BG","bglive");break;case 151:f_com.bm("/Live/BG?ismobile=1","bglive");break;case 16:layer.alert("敬请期待",{icon:0});break;case 17:f_com.bm("/Live/KY","kylive");break;case 18:f_com.bm("/Live/SLW","slwlive");break;case 20:f_com.bm("/Live/FY","fylive");break;case 21:f_com.bm("/Live/TH","thlive");break;case 22:f_com.bm("/Live/IBO?isMobile=1","ibolive");break;case 23:f_com.bm("/Live/IBO?isMobile=2","ibolive");break;case 24:f_com.bm("/Live/SABA?isMobile=pc","sabalive");break;case 25:f_com.bm("/Live/SABA?isMobile=mobile","sabalive");break;case 26:f_com.bm("/Live/JDB?isMobile=false","jdblive");break;case 27:f_com.bm("/Live/OGplus?isMobile=false","oglive");break;case 28:f_com.bm("/Live/KX","kxlive");break;case 34:case 40:menu_url(t)}else t==0||t==5?parent.layer.alert("请先登录",{icon:0},function(n){(window.location.href.indexOf("LotteryIndex")!=-1||top.window.location.href.indexOf("LotteryIndex")!=-1)&&(top.window.location.href="/lotteryindex/login"),parent.layer.close(n)}):layer.alert("请先登录",{icon:0},function(n){(window.location.href.indexOf("LotteryIndex")!=-1||top.window.location.href.indexOf("LotteryIndex")!=-1)&&(top.window.location.href="/lotteryindex/login"),layer.close(n)})}function login_dz_url(n,t,i,r){if(n.length>0&&n!="null")switch(t){case"AG":f_com.bm("/Live/AG?gametype="+i,"aglive");break;case"AG_M":f_com.bm("/Live/AG?mh5=yes&gametype="+i,"aglive");break;case"MG":f_com.bm("/Live/MG?livetype="+t+"&gametype="+i,"mglive");break;case"MG_M":f_com.bm("/Live/MG?livetype="+t+"&gametype="+i,"mglive");break;case"OMG":f_com.bm("/Live/MG?livetype="+t+"&gametype="+i,"mglive");break;case"OMG_M":f_com.bm("/Live/MG?livetype="+t+"&gametype="+i,"mglive");break;case"PT":f_com.bm("/Live/PT?livetype=PT&gametype="+i,"ptlive");break;case"PT_M":f_com.bm("/Live/PT?livetype=PT_M&gametype="+i,"ptlive");break;case"GG":f_com.bm("/Live/GG?gametype="+i,"gglive");break;case"GD":f_com.bm("/Live/GD?rngid="+i,"gdlive");break;case"GD_M":f_com.bm("/Live/GD?rngid="+i+"&isMobile=2","gdlive");break;case"JDB":f_com.bm();break;case"BG":f_com.bm("/Live/BG?gameType="+i,"bglive");break;case"BG_M":f_com.bm("/Live/BG?gameType="+i+"&ismobile=1","bglive");break;case"AE":f_com.bm("/Live/AE?gametype="+i,"aelive");break;default:r?layer.alert("敬请期待",{icon:0}):parent.layer.alert("敬请期待",{icon:0})}else r?layer.alert("请先登录",{icon:0},function(n){(window.location.href.indexOf("LotteryIndex")!=-1||top.window.location.href.indexOf("LotteryIndex")!=-1)&&(top.window.location.href="/lotteryindex/login"),layer.close(n)}):parent.layer.alert("请先登录",{icon:0},function(n){(window.location.href.indexOf("LotteryIndex")!=-1||top.window.location.href.indexOf("LotteryIndex")!=-1)&&(top.window.location.href="/lotteryindex/login"),parent.layer.close(n)})}function login_qp_url(n,t,i,r){if(n.length>0&&n!="null")switch(t){case"KY":f_com.bm("/Live/KY?gametype="+i,"kylive");break;case"SLW":f_com.bm("/Live/SLW?gametype="+i,"slwlive");break;case"JB":f_com.bm("/Live/JB?gametype="+i,"jblive");break;case"TH":f_com.bm("/Live/TH?gametype="+i,"thlive");break;case"KX":f_com.bm("/Live/KX?gametype="+i,"kxlive");break;default:r?layer.alert("敬请期待",{icon:0}):parent.layer.alert("敬请期待",{icon:0})}else r?layer.alert("请先登录",{icon:0},function(){(window.location.href.indexOf("LotteryIndex")!=-1||top.window.location.href.indexOf("LotteryIndex")!=-1)&&(top.window.location.href="/lotteryindex/login")}):parent.layer.alert("请先登录",{icon:0},function(){(window.location.href.indexOf("LotteryIndex")!=-1||top.window.location.href.indexOf("LotteryIndex")!=-1)&&(top.window.location.href="/lotteryindex/login")})}function login_ElectronicSports_url(n,t,i,r){if(n.length>0&&n!="null")switch(t){case"FY":f_com.bm("/Live/FY","fylive");break;default:r?layer.alert("敬请期待",{icon:0}):parent.layer.alert("敬请期待",{icon:0})}else r?layer.alert("请先登录",{icon:0}):parent.layer.alert("请先登录",{icon:0})}function custom_url(n,t,i){openModalDiySize("在线客服","/Home/OnlineCustomer",400,500,t,i)}function custom_agent_url(){$.ajax({type:"POST",url:"/Custom/getAgentUrlJson",data:addAntiForgeryToken(),async:!1,dataType:"json",success:function(n){n.flag?window.open(n.url):alert("代理链接未开放")}})}function agentprofit_agent_url(n,t){$.ajax({type:"POST",url:"/Custom/getAgentProfitUrlJson",data:addAntiForgeryToken({con:n,action:t}),async:!1,dataType:"json",success:function(n){n.flag?window.open(n.url):alert("代理链接未开放")}})}function UPDATE_JP(n){n=formatMoney(n),$("span.js-ele-JP1").html(n||0)}function formatMoney(n){n=(Math.round(n*100)/100).toString().replace(/^(\d*)$/,"$1."),n=(n+"00").replace(/(\d*\.\d{2})\d*/,"$1"),n=n.replace(".",",");for(var i=/(\d)(\d{3},)/;i.test(n);)n=n.replace(i,"$1,$2");return n=n.replace(/,(\d{2})$/,".$1")}function createNum(){var n=$("span.js-ele-JP1").html(),t;n=="loading..."?(n=""+(699e4+Math.random()*1e3),$("span.js-ele-JP1").html(n)):(n=n.replace(/\,/g,""),t=Math.random()*30,n=parseInt(t)%10==1?parseInt(n)-t:parseInt(n)+t,$("span.js-ele-JP1").html(n)),UPDATE_JP(n),setTimeout(createNum,1e4)}function getNotice(n){n||(n="msgNews"),$.ajax({type:"POST",url:"/Home/GetNoticeString",data:addAntiForgeryToken(),success:function(t){setContentString(n,t.notice)},error:function(){setContentString(n,"---")}})}function bl_addFavorite(){try{var n=navigator.userAgent.toLowerCase().indexOf("mac")!=-1?"Command/Cmd":"CTRL";document.all?window.external.addFavorite(location.href,document.title):window.sidebar?window.sidebar.addPanel(document.title,location.href,""):layer.alert("您可以尝试通过快捷键"+n+" + D 加入到收藏夹~")}catch(t){layer.alert("您可以尝试通过快捷键"+n+" + D 加入到收藏夹~")}}function bl_setHomePage(){document.all?(document.body.style.behavior="url(#default#homepage)",document.body.setHomePage(document.URL)):layer.alert("设置首页失败，请手动设置！")}function bl_dynamicTimeDisplay(n){var o="当前时间：",t=new Date,s,h,i,r,u,f,e;n==1&&(o="美东时间：",s=t.getTime()-432e5,t=new Date(s)),h=t.getFullYear(),i=t.getMonth()+1,i<10&&(i="0"+i),r=t.getDate(),r<10&&(r="0"+r),u=t.getHours(),u<10&&(u="0"+u),f=t.getMinutes(),f<10&&(f="0"+f),e=t.getSeconds(),e<10&&(e="0"+e),document.getElementById("bl_dynamicTimeDisplay").innerHTML=o+h+"-"+i+"-"+r+" "+u+":"+f+":"+e}function LimiteAccess(){layer.alert("请用新版H5访问",{icon:0})}function cancelMouse(){return!1}function setContentDecimal(n,t){var i=$("#"+n);i&&i.html(t?t:"0.00")}function setContentString(n,t){var i=$("#"+n);i&&i.html(t?t:"")}function confirmModel(n,t,i,r){layer.confirm(n,{icon:3},function(n){layer.close(n);var u=layer.msg("处理中，请耐心等待",{time:3e5,icon:16,shade:[.3,"#000"]});$.ajax({type:"POST",url:t,data:addAntiForgeryToken(i),success:function(n){layer.close(u),layer.alert(n.message,{icon:n.icon},function(t){layer.close(t),n.success&&(r.formid&&$("#"+r.formid)[0].reset(),r.goto&&(r.level.location.href=r.goto))})},error:function(){layer.close(u),layer.alert("发生错误",{icon:5})}})})}function handleCDateTime(n){if(!n)return"";n=n.replace("/Date(",""),n=n.replace(")/","");var i=parseInt(n),t=new Date(i),r=t.getFullYear()+"-",u=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",f=(t.getDate()<10?"0"+t.getDate():t.getDate())+" ",e=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",o=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",s=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return r+u+f+e+o+s}function openModalDiySize(n,t,i,r,u){var f={type:2,fix:!0,move:!1,title:n,closeBtn:1,content:t,area:[i+"px",r+"px"]};f.offset=layerCountOffset(i,r),u?parent.layer.open(f):layer.open(f)}function layerCountOffset(n,t){var i=document.body.clientHeight,u=$(parent.window).width(),r=$(parent.window).height();return u<n?["10px","10px"]:r<t?"10px":r>=i?(i-t)/2+"px":"auto"}function openModal(n,t){openModalDiySize(n,t,820,492)}function clearNoNum(n,t){if(n.value=n.value.replace(/[^\d.]/g,""),n.value=n.value.replace(/^\./g,""),n.value=n.value.replace(/\.{2,}/g,"."),n.value=n.value.replace(".","$#$").replace(/\./g,"").replace("$#$","."),n.value!=""){var i="";if(i=t==3?/^\d+\.{0,1}\d{0,3}$/:t==0?/^\d+$/:t==1?/^\d+\.{0,1}\d{0,1}$/:/^\d+\.{0,1}\d{0,2}$/,!i.test(n.value))return n.value=n.value.substring(0,n.value.length-1),!1}}var swfobject,f_com,commonRegExp;$.fn.Float=function(n){var t=this,i={topSide:150,floatRight:1,side:5,init:function(){var n=t,i=navigator.userAgent,r;n.css({position:"absolute","z-index":"1000",top:this.topSide}),i.toLowerCase().indexOf("360se")>-1?this.isBlock=!0:i.toLowerCase().indexOf("theworld")>0?this.isBlock=!0:i.toLowerCase().indexOf("msie 7")>0&&(this.side=-1),this.floatRight==1?n.css("right",this.side):n.css("left",this.side),r=this,setInterval(function(){r.lock.call(r)},20),this.close!=undefined&&this.closeFloat(),this.floatRight==1&&$(window).resize(function(){$(this).scrollLeft(0),n.css("right",5)})},lockTop:function(n,t,i,r,u){var f=n.css("top"),o=r.top+u.topSide,s=(o-parseInt(f))/20,e;this.isBlock&&(s=o-parseInt(f)),e=parseInt(f)+s,e+t.height<i.height&&n.css("top",e)},lockLeft:function(n,t,i){var r=n.css("left"),u=t.left+i.side,f=(u-parseInt(r))/20;n.css("left",parseInt(r)+f)},lockRight:function(n,t,i){var r=n.css("right"),e=document,u,f;t.left==0?(u=i.side,f=(Math.abs(u)-Math.abs(parseInt(r)))/20,n.css("right",Math.abs(parseInt(r))+f)):(u=t.left-i.side,f=(Math.abs(u)-Math.abs(parseInt(r)))/20,r=-(Math.abs(parseInt(r))+f)+"px",n.css("right",r))},lock:function(){var n=t,u=this.currentPosition(n),e=this.windowDimension(),i=this.scrollPosition(),f=this.pageDimension(),r=this;this.lockTop(n,u,f,i,r),this.floatRight==1?this.lockRight(n,i,r):this.lockLeft(n,i,r),this.isBlock&&(this.lastTop!=n.css("top")?(n.css("visibility","hidden"),this.lastTop=n.css("top")):n.css("visibility","visible"))},currentPosition:function(n){var t=n.offset();return{top:t.top,left:t.left,width:n.outerWidth(),height:n.outerHeight()}},windowDimension:function(){if(typeof innerWidth!="undefined"&&innerWidth!=0&&typeof innerHeight!="undefined"&&innerHeight!=0)return{width:innerWidth,height:innerHeight};var n=document;return{width:Math.min(n.body.clientWidth,n.documentElement.clientWidth),height:Math.min(n.body.clientHeight,n.documentElement.clientHeight)}},scrollPosition:function(){var n=document;return{top:Math.max(n.body.scrollTop,n.documentElement.scrollTop),left:Math.max(n.body.scrollLeft,n.documentElement.scrollLeft)}},pageDimension:function(){var n=document;return{width:Math.max(n.body.scrollWidth,n.documentElement.scrollWidth),height:Math.max(n.body.scrollHeight,n.documentElement.scrollHeight)}},closeFloat:function(){t.find("#"+this.close).click(function(){t.hide()}).css("cursor","pointer")}};n&&$.extend(i,n),i.init()},$.fn.subTabs=function(n){var t={inDelay:400,outDelay:600,showTime:300,notOver:1};return $.extend(t,n),this.each(function(){function h(){n.parent().find("div").hide()}function c(){n.stop(!0,!0).fadeIn(t.showTime)}function l(){n.stop(!0,!0).fadeOut(t.showTime)}function a(){h(),n.stop(!0,!0).fadeIn(t.showTime)}var i=$(this),u=i.attr("class").split(" ")[0],n=$("div[class="+u+"]"),o=i.width(),s=i.position().left,r=s-(n.width()-o)/2-i.parent().position().left-8,f,e;$(this).find("a").removeAttr("title"),n.find("a").removeAttr("title"),r<0&&t.notOver==1&&(r=0),t.left!=undefined&&(r=parseInt(t.left)-parseInt(n.width()/2)),n.css("left",r),n.hide(),$("."+u).hover(function(){clearTimeout(f),e=setTimeout(function(){c()},"400")},function(){clearTimeout(e),f=setTimeout(function(){l()},"400")}),i.bind("click",function(){if(n.is(":visible"))return!1;a()})})},function(n){n.cookie=function(t,i,r){var h,f,e,o,u,s;if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(i))||i===null||i===undefined))return r=n.extend({},r),(i===null||i===undefined)&&(r.expires=-1),typeof r.expires=="number"&&(h=r.expires,f=r.expires=new Date,f.setDate(f.getDate()+h)),i=String(i),document.cookie=[encodeURIComponent(t),"=",r.raw?i:encodeURIComponent(i),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("");for(r=i||{},e=r.raw?function(n){return n}:decodeURIComponent,o=document.cookie.split("; "),u=0;s=o[u]&&o[u].split("=");u++)if(e(s[0])===t)return e(s[1]||"");return null}}(jQuery),swfobject=function(){function v(){var i,r,n;if(!c){try{i=t.getElementsByTagName("body")[0].appendChild(h("span")),i.parentNode.removeChild(i)}catch(u){return}for(c=!0,r=w.length,n=0;n<r;n++)w[n]()}}function yt(n){c?n():w[w.length]=n}function pt(n){if(typeof r.addEventListener!=i)r.addEventListener("load",n,!1);else if(typeof t.addEventListener!=i)t.addEventListener("load",n,!1);else if(typeof r.attachEvent!=i)ui(r,"onload",n);else if(typeof r.onload=="function"){var u=r.onload;r.onload=function(){u(),n()}}else r.onload=n}function gt(){lt?ni():it()}function ni(){var o=t.getElementsByTagName("body")[0],u=h(f),r,e;u.setAttribute("type",p),r=o.appendChild(u),r?(e=0,function(){if(typeof r.GetVariable!=i){var t=r.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),n.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(e<10){e++,setTimeout(arguments.callee,10);return}o.removeChild(u),r=null,it()}()):it()}function it(){var y=s.length,r,t,h,c,v;if(y>0)for(r=0;r<y;r++){var f=s[r].id,e=s[r].callbackFn,o={success:!1,id:f};if(n.pv[0]>0){if(t=u(f),t)if(!g(s[r].swfVersion)||n.wk&&n.wk<312)if(s[r].expressInstall&&ut()){h={},h.data=s[r].expressInstall,h.width=t.getAttribute("width")||"0",h.height=t.getAttribute("height")||"0",t.getAttribute("class")&&(h.styleclass=t.getAttribute("class")),t.getAttribute("align")&&(h.align=t.getAttribute("align"));var p={},a=t.getElementsByTagName("param"),w=a.length;for(c=0;c<w;c++)a[c].getAttribute("name").toLowerCase()!="movie"&&(p[a[c].getAttribute("name")]=a[c].getAttribute("value"));ft(h,p,f,e)}else ti(t),e&&e(o);else l(f,!0),e&&(o.success=!0,o.ref=rt(f),e(o))}else l(f,!0),e&&(v=rt(f),v&&typeof v.SetVariable!=i&&(o.success=!0,o.ref=v),e(o))}}function rt(n){var r=null,t=u(n),e;return t&&t.nodeName=="OBJECT"&&(typeof t.SetVariable!=i?r=t:(e=t.getElementsByTagName(f)[0],e&&(r=e))),r}function ut(){return!d&&g("6.0.65")&&(n.win||n.mac)&&!(n.wk&&n.wk<312)}function ft(f,e,o,s){var c,v,l,a;d=!0,nt=s||null,at={success:!1,id:o},c=u(o),c&&(c.nodeName=="OBJECT"?(y=et(c),k=null):(y=c,k=o),f.id=ht,(typeof f.width==i||!/%$/.test(f.width)&&parseInt(f.width,10)<310)&&(f.width="310"),(typeof f.height==i||!/%$/.test(f.height)&&parseInt(f.height,10)<137)&&(f.height="137"),t.title=t.title.slice(0,47)+" - Flash Player Installation",v=n.ie&&n.win?"ActiveX":"PlugIn",l="MMredirectURL="+r.location.toString().replace(/&/g,"%26")+"&MMplayerType="+v+"&MMdoctitle="+t.title,typeof e.flashvars!=i?e.flashvars+="&"+l:e.flashvars=l,n.ie&&n.win&&c.readyState!=4&&(a=h("div"),o+="SWFObjectNew",a.setAttribute("id",o),c.parentNode.insertBefore(a,c),c.style.display="none",function(){c.readyState==4?c.parentNode.removeChild(c):setTimeout(arguments.callee,10)}()),ot(f,e,o))}function ti(t){if(n.ie&&n.win&&t.readyState!=4){var i=h("div");t.parentNode.insertBefore(i,t),i.parentNode.replaceChild(et(t),i),t.style.display="none",function(){t.readyState==4?t.parentNode.removeChild(t):setTimeout(arguments.callee,10)}()}else t.parentNode.replaceChild(et(t),t)}function et(t){var u=h("div"),e,i,o,r;if(n.win&&n.ie)u.innerHTML=t.innerHTML;else if(e=t.getElementsByTagName(f)[0],e&&(i=e.childNodes,i))for(o=i.length,r=0;r<o;r++)i[r].nodeType==1&&i[r].nodeName=="PARAM"||i[r].nodeType==8||u.appendChild(i[r].cloneNode(!0));return u}function ot(t,r,e){var v,y=u(e),w,o,k,a,c,s,l;if(n.wk&&n.wk<312)return v;if(y)if(typeof t.id==i&&(t.id=e),n.ie&&n.win){w="";for(o in t)t[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?r.movie=t[o]:o.toLowerCase()=="styleclass"?w+=' class="'+t[o]+'"':o.toLowerCase()!="classid"&&(w+=" "+o+'="'+t[o]+'"'));k="";for(a in r)r[a]!=Object.prototype[a]&&(k+='<param name="'+a+'" value="'+r[a]+'" />');y.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+w+">"+k+"<\/object>",b[b.length]=t.id,v=u(t.id)}else{c=h(f),c.setAttribute("type",p);for(s in t)t[s]!=Object.prototype[s]&&(s.toLowerCase()=="styleclass"?c.setAttribute("class",t[s]):s.toLowerCase()!="classid"&&c.setAttribute(s,t[s]));for(l in r)r[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&ii(c,l,r[l]);y.parentNode.replaceChild(c,y),v=c}return v}function ii(n,t,i){var r=h("param");r.setAttribute("name",t),r.setAttribute("value",i),n.appendChild(r)}function wt(t){var i=u(t);i&&i.nodeName=="OBJECT"&&(n.ie&&n.win?(i.style.display="none",function(){i.readyState==4?ri(t):setTimeout(arguments.callee,10)}()):i.parentNode.removeChild(i))}function ri(n){var t=u(n),i;if(t){for(i in t)typeof t[i]=="function"&&(t[i]=null);t.parentNode.removeChild(t)}}function u(n){var i=null;try{i=t.getElementById(n)}catch(r){}return i}function h(n){return t.createElement(n)}function ui(n,t,i){n.attachEvent(t,i),a[a.length]=[n,t,i]}function g(t){var r=n.pv,i=t.split(".");return i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10)||0,i[2]=parseInt(i[2],10)||0,r[0]>i[0]||r[0]==i[0]&&r[1]>i[1]||r[0]==i[0]&&r[1]==i[1]&&r[2]>=i[2]?!0:!1}function bt(r,u,o,s){var a,c,l;n.ie&&n.mac||(a=t.getElementsByTagName("head")[0],a)&&(c=o&&typeof o=="string"?o:"screen",s&&(e=null,tt=null),e&&tt==c||(l=h("style"),l.setAttribute("type","text/css"),l.setAttribute("media",c),e=a.appendChild(l),n.ie&&n.win&&typeof t.styleSheets!=i&&t.styleSheets.length>0&&(e=t.styleSheets[t.styleSheets.length-1]),tt=c),n.ie&&n.win?e&&typeof e.addRule==f&&e.addRule(r,u):e&&typeof t.createTextNode!=i&&e.appendChild(t.createTextNode(r+" {"+u+"}")))}function l(n,t){if(vt){var i=t?"visible":"hidden";c&&u(n)?u(n).style.visibility=i:bt("#"+n,"visibility:"+i)}}function kt(n){var t=/[\\\"<>\.;]/,r=t.exec(n)!=null;return r&&typeof encodeURIComponent!=i?encodeURIComponent(n):n}var i="undefined",f="object",st="Shockwave Flash",dt="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",ht="SWFObjectExprInst",ct="onreadystatechange",r=window,t=document,o=navigator,lt=!1,w=[gt],s=[],b=[],a=[],y,k,nt,at,c=!1,d=!1,e,tt,vt=!0,n=function(){var l=typeof t.getElementById!=i&&typeof t.getElementsByTagName!=i&&typeof t.createElement!=i,e=o.userAgent.toLowerCase(),s=o.platform.toLowerCase(),a=s?/win/.test(s):/win/.test(e),v=s?/mac/.test(s):/mac/.test(e),y=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,h=!+"\v1",u=[0,0,0],n=null,c;if(typeof o.plugins!=i&&typeof o.plugins[st]==f)n=o.plugins[st].description,!n||typeof o.mimeTypes!=i&&o.mimeTypes[p]&&!o.mimeTypes[p].enabledPlugin||(lt=!0,h=!1,n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),u[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),u[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10),u[2]=/[a-zA-Z]/.test(n)?parseInt(n.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof r.ActiveXObject!=i)try{c=new ActiveXObject(dt),c&&(n=c.GetVariable("$version"),n&&(h=!0,n=n.split(" ")[1].split(","),u=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]))}catch(w){}return{w3:l,pv:u,wk:y,ie:h,win:a,mac:v}}(),fi=function(){n.w3&&((typeof t.readyState!=i&&t.readyState=="complete"||typeof t.readyState==i&&(t.getElementsByTagName("body")[0]||t.body))&&v(),c||(typeof t.addEventListener!=i&&t.addEventListener("DOMContentLoaded",v,!1),n.ie&&n.win&&(t.attachEvent(ct,function(){t.readyState=="complete"&&(t.detachEvent(ct,arguments.callee),v())}),r==top&&function(){if(!c){try{t.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}v()}}()),n.wk&&function(){if(!c){if(!/loaded|complete/.test(t.readyState)){setTimeout(arguments.callee,0);return}v()}}(),pt(v)))}(),ei=function(){n.ie&&n.win&&window.attachEvent("onunload",function(){for(var e=a.length,r,i,u,f,t=0;t<e;t++)a[t][0].detachEvent(a[t][1],a[t][2]);for(r=b.length,i=0;i<r;i++)wt(b[i]);for(u in n)n[u]=null;n=null;for(f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(t,i,r,u){if(n.w3&&t&&i){var f={};f.id=t,f.swfVersion=i,f.expressInstall=r,f.callbackFn=u,s[s.length]=f,l(t,!1)}else u&&u({success:!1,id:t})},getObjectById:function(t){if(n.w3)return rt(t)},embedSWF:function(t,r,u,e,o,s,h,c,a,v){var y={success:!1,id:r};n.w3&&!(n.wk&&n.wk<312)&&t&&r&&u&&e&&o?(l(r,!1),yt(function(){var n,b,p,k,w,d;if(u+="",e+="",n={},a&&typeof a===f)for(b in a)n[b]=a[b];if(n.data=t,n.width=u,n.height=e,p={},c&&typeof c===f)for(k in c)p[k]=c[k];if(h&&typeof h===f)for(w in h)typeof p.flashvars!=i?p.flashvars+="&"+w+"="+h[w]:p.flashvars=w+"="+h[w];if(g(o))d=ot(n,p,r),n.id==r&&l(r,!0),y.success=!0,y.ref=d;else{if(s&&ut()){n.data=s,ft(n,p,r,v);return}l(r,!0)}v&&v(y)})):v&&v(y)},switchOffAutoHideShow:function(){vt=!1},ua:n,getFlashPlayerVersion:function(){return{major:n.pv[0],minor:n.pv[1],release:n.pv[2]}},hasFlashPlayerVersion:g,createSWF:function(t,i,r){return n.w3?ot(t,i,r):undefined},showExpressInstall:function(t,i,r,u){n.w3&&ut()&&ft(t,i,r,u)},removeSWF:function(t){n.w3&&wt(t)},createCSS:function(t,i,r,u){n.w3&&bt(t,i,r,u)},addDomLoadEvent:yt,addLoadEvent:pt,getQueryParamValue:function(n){var r=t.location.search||t.location.hash,u,i;if(r){if(/\?/.test(r)&&(r=r.split("?")[1]),n==null)return kt(r);for(u=r.split("&"),i=0;i<u.length;i++)if(u[i].substring(0,u[i].indexOf("="))==n)return kt(u[i].substring(u[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(d){var t=u(ht);t&&y&&(t.parentNode.replaceChild(y,t),k&&(l(k,!0),n.ie&&n.win&&(y.style.display="block")),nt&&nt(at)),d=!1}}}}(),f_com={},f_com.setCookie=function(n,t,i){if(n!=""&&t!=""){var u="Web,01 Jan 2020 18:56:35 GMT",r;return i!=null&&(i=parseInt(i),r=new Date,r.setTime(r.getTime()+i*864e5),u=r.toGMTString()),document.cookie=n+"="+escape(t)+";path=/;expires="+u+";",!0}return!1},f_com.delCookie=function(n){return document.cookie=n+"=;expires=Thu,01-Jan-70 00:00:01 GMT",!0},f_com.getCookie=function(n){var t,i,r;return(n+="=",t=document.cookie+";",i=t.indexOf(n),i!=-1)?(r=t.indexOf(";",i),unescape(t.substring(i+n.length,r))):!1},f_com.checkOs=function(){var n="",t=navigator.userAgent.indexOf("Windows",0)!=-1?1:0,i=navigator.userAgent.indexOf("Mac",0)!=-1?1:0,r=navigator.userAgent.indexOf("Linux",0)!=-1?1:0,u=navigator.userAgent.indexOf("X11",0)!=-1?1:0;return t?n="windows":i?n="mac":r?n="lunix":u&&(n="unix"),n},f_com.bm=function(n,t,i){function f(){for(var f in r)u.push(f+"="+(i[f]==undefined?r[f]:i[f]));window.open(n,t,u.join(",")).focus()}function e(n,t){var r=n+"BrowseRecords",i=f_com.localStorage("get",r);i?i.match(t)==null&&(i=i.split(","),i.push(t),f_com.localStorage("save",r,i)):f_com.localStorage("save",r,t)}var r={width:screen.width,height:screen.height,scrollbars:"yes",resizable:"yes",status:"no",location:"yes",toolbar:"no",menubar:"no"},u=[];i==undefined&&(i={}),/(PriorityWatch)/.test(n)&&(i={width:"1000",height:"700",scrollbars:"no"}),/(LiveBB3D|LiveBBK8|LiveBBRB|LiveBBBO)/.test(n)?self.location=n:f(),i.browse!=undefined&&t=="gameOpen"&&e(i.browse.name,i.browse.gametype)},f_com.logoff=function(n){$.ajax({type:"POST",url:n,cache:!1,async:!1,success:function(n){$("head").append(n)}})},$.fn.mtab2=function(n){var t=this,i="",r="",n=typeof n!="undefined"?n:"l";switch(n){case"c":i="top center",r="bottom center";break;case"r":i="top right",r="bottom right";break;default:i="top left",r="bottom left"}$.each(t.find("li[id^=#]"),function(n){n!=0&&(t.find(this.id)[0].style.display="none")}),t.find("li[id^=#]").click(function(){var n=this;$.each(t.find("li[id^=#]"),function(){n.id!=this.id?(t.find(this.id)[0].style.display="none",$(this)[0].style.backgroundPosition=i,$(this).removeClass("mtab")):(t.find(this.id)[0].style.display="block",$(this)[0].style.backgroundPosition=r,$(this).addClass("mtab"))})})},$.fn.idTabs=function(){for(var n={start:0,change:!1,click:null,selected:".selected",event:"!click"},t,i=0;i<arguments.length;++i){t=arguments[i];switch(t.constructor){case Boolean:n.change=t;break;case Number:n.start=t;break;case Function:n.click=t;break;case String:t.charAt(0)=="."?n.selected=t:t.charAt(0)=="!"?n.event=t:n.start=t}}return this.each(function(){var u,r,t;return n.selected.charAt(0)=="."&&(n.selected=n.selected.substr(1)),n.event.charAt(0)=="!"&&(n.event=n.event.substr(1)),n.start==null&&(n.start=-1),tabs=this,u=function(){if($(this).is("."+n.selected))return n.change;var u="#"+this.href.split("#")[1],r=[],t=[];if($("a",tabs).each(function(){this.href.match(/#/)&&(r.push(this),t.push("#"+this.href.split("#")[1]))}),n.click&&!n.click.apply(this,[u,t,tabs,n]))return n.change;for(i in r)$(r[i]).removeClass(n.selected);for(i in t)$(t[i]).hide();return $(this).addClass(n.selected),$(u).show(),n.change},r=$("a[href*='#']",tabs).unbind(n.event,u).bind(n.event,u),r.each(function(){$("#"+this.href.split("#")[1]).hide()}),t=!1,(t=r.filter("."+n.selected)).length||typeof n.start=="number"&&(t=r.eq(n.start)).length||typeof n.start=="string"&&(t=r.filter("[href*='#"+n.start+"']")).length,t&&(t.removeClass(n.selected),t.trigger(n.event)),n})},$.winBox=function(n,t){var i=$("#windowBox"),r,u;if(i.length==0&&($("body").after('<div id="windowBox"><\/div>'),i=$("#windowBox")),i.empty(),r={modal:!0,resizable:!1,width:700,height:"auto",minHeight:"auto",buttons:{CLOSE:function(){$(this).dialog("close")}}},t!=undefined)for(u in t)r[u]=t[u];if(i.dialog(r),n==undefined||n==""){i.html("loading...");return}if(i.dialog("isOpen")===!0){i.html(n);return}i.dialog("open").html(n)},$.fn.stab=function(n){var i=this,t=$(this).children("li");t.click(function(){var i=t.index(this)||0;t.children("a").removeClass("stab"),$(n).hide(),$(n).get(i).style.display="",$(this).children("a").addClass("stab")})},$.fn.LoginPW=function(n){var i=$(this),t={Upper:"密码须为小写，大写锁定启用中",Short:"密码长度不能少于6个字元",Long:"密码长度不能多于20个字元",False:"密码须符合0~9、a~z及A~Z字元"};t=$.extend(t,n),i.attr("maxlength")!=20&&i.attr("maxlength",20),i.keyup(function(){/[^a-zA-Z0-9]/g.test(this.value)&&(alert(t.False),this.value=this.value.replace(/[^a-zA-Z0-9]/g,"")),this.value.length>20&&(alert(t.Long),this.value=this.value.substring(0,20))})},$.fn.InputLabels=function(n){var t={Opacity:.5,MS:300,next:!1};return $.extend(t,n),this.each(function(){var n=$(this),i=t.next?$(this).next("input[name="+$(this).attr("name")+"]"):$("input[name="+$(this).attr("name")+"]"),r=!0,u;setTimeout(function(){this.opacity=i.val()==""?1:0,n.css("opacity",this.opacity)},300),n.click(function(){i.trigger("focus")}),i.focus(function(){i.val()==""&&u(t.Opacity)}).blur(function(){i.val()==""?(r||n.css({opacity:0}).show(),u(1)):u(0)}).keydown(function(t){t.keyCode!=16&&t.keyCode!=9&&t.keyCode!=13&&r&&(n.hide(),r=!1)}),u=function(i){n.stop().animate({opacity:i},t.MS),r=i>0}})},f_com.QQOnlineService=function(n,t){window.open("tencent://message/?uin="+n+"&amp;Site=web&amp;Menu=yes",t,"width=800,height=600,status=no,scrollbars=no")},f_com.BBOnlineService=function(n,t){window.open(n,t,"width=800,height=600,status=no,scrollbars=no")},f_com.localStorage=function(n,t,i){if(t==undefined&&(t=""),i==undefined&&(i=""),window.localStorage)switch(n){case"get":return window.localStorage[t];case"save":window.localStorage[t]=i;break;case"clear":window.localStorage.removeItem(t);break;case"clearall":window.localStorage.clear()}else switch(n){case"get":return f_com.getCookie(t);case"save":f_com.setCookie(t,i);break;case"clear":f_com.delCookie(t)}},$(function(){$("a.js-article-color").each(function(){var n=$(this).data("color");"undefined"!=typeof n&&(n=n.split("|"),n.length==2?new toggleColor(this,[n[0],n[1]],500):n.length==1&&n[0]!=""&&$(this).css("color",n[0]))})}),f_com.OpenLink=function(n){window.open(n,"outPage","top=50,left=50,width=1000,height=610,status=no,scrollbars=yes,resizable=yes").focus()},f_com.OpenEventPage=function(n){event_url=location.protocol+"//"+location.hostname,event_url=event_url.replace(/(:\/\/www\.|:\/\/ball-m\.|:\/\/www-dev\.|:\/\/)/,"://event."),window.open(event_url+"/"+n).focus()},$(window).load(function(){function o(i){var f=e.width()-$("body").width(),c;f=f>0?f/2:0;var u=i.offset(),o=u.left+f,s=u.top+i.height(),l=u.left+r,a=$("body").width()-r,h=$(window).height();if(l>a&&(o=o-r+$("#js-ele-obalance-wrap").width()),u.top>t&&s+t>h+$(window).scrollTop()){c=h-u.top,n.stop().css({display:"block",left:o,bottom:c,top:"auto"}).animate({opacity:"1",height:t},300,"easeOutQuint");return}n.stop().css({display:"block",left:o,top:s,bottom:"auto"}).animate({opacity:"1",height:t},300,"easeOutQuint")}function u(){n.stop().animate({opacity:"0",height:"0"},300,"easeOutQuint",function(){n.css({display:"none"})})}var f=$("<div>").append($("#js-ele-obalance-item-wrap")).html(),i,n,t,r,e=parent.mainFrame?$("body",parent.mainFrame.document):$("body");if(f!=""){e.prepend(f),n=parent.mainFrame?$("#js-ele-obalance-item-wrap",parent.mainFrame.document):$("#js-ele-obalance-item-wrap"),t=n.height(),r=n.width(),n.css({display:"none",height:"0"}),i=setTimeout(u,500);$("#js-ele-obalance-wrap").on("mouseenter",function(){typeof i!="undefined"&&clearTimeout(i),o($(this))}).on("mouseleave",function(){u()});n.on("mouseenter",function(){clearTimeout(i),o($("#js-ele-obalance-wrap"))}).on("mouseleave",function(){u()});$(window).scroll(function(){u()})}}),document.oncontextmenu=cancelMouse,addAntiForgeryToken=function(n){var t=$('[name="__RequestVerificationToken"]').val();return n?n.__RequestVerificationToken=t:n={__RequestVerificationToken:t},n},commonRegExp={positiveInteger:/^[0-9]*[1-9][0-9]*$/}