// JavaScript Document $(document).ready(function(){ $(".top_box").css("width","1200px") }); //游戏评测标题行高 $(document).ready(function(){ $(".maint_r4 dl dd .info h5").each(function(i){ var ah=$(this).find('a'), ahh=ah.height(); if(ahh>21){ $(this).css("line-height","21px"); } else{ $(this).css("line-height","42px"); } }); }); //下载页 图片轮播 $(document).ready(function(){ //下载页 图片轮播高度 var descElem = $('.mrd_pic ul li'), sjg= descElem.height(); var sjgElem = $('.mrd_pic'); sjgElem.css('height', sjg+'px'); var imgElem = $('.mrd_pic ul li img'), skg= descElem.width(); //个数 var you=document.getElementById("scrollPic"); if(you!==null){ var ligs=document.getElementById("scrollPic").getElementsByTagName("li").length; if(ligs<3){ $(".mrd_br").addClass("mrd_bron"); } var num=ligs-3; //pageClass var pageClass = 1; if(pageClass==null){ var pageClass=0; } //如果是pageClass==1 if( pageClass==1){ //首页左右切换滚动插件 $(function(){ var oPic=$('#scrollPic').find('ul'); var oImg=oPic.find('li'); var oLen=oImg.length;//获取数量 var oLi=oImg.width(); var prev=$("#prev"); var next=$("#next"); oPic.width(oLen*820);//计算总长度 var iNow=0; var iTimer=null; prev.click(function(){ if(iNow>0){ iNow--; } ClickScroll(); }) next.click(function(){ if(iNow minHeight){ descElem.css('height', minHeight+'px'); descBtn.attr('rel', 0).show(); } else { $("#j_app_desc_btn").css("display", "none"); } descBtn.click(function(){ var rel = $(this).attr('rel'); if(rel == 0){ descElem.css('height', 'auto'); descBtn.html('收起').attr('rel', 1); $(".more_btn").addClass("bbj"); } else{ descElem.css('height', minHeight+'px'); descBtn.html('更多').attr('rel', 0); $(".more_btn").removeClass("bbj"); } }); } }); }); $(document).ready(function(){ $(function(){ var zch=document.body.clientHeight; var pmh=document.documentElement.clientHeight; if(pmh>zch){ $('#foot').addClass('fixed'); }else{ $('#foot').removeClass('fixed'); } }); }); //下载页左侧跟随 $(document).ready(function(){ window.onload = window.onscroll = window.onresize = function () { var ht=$('.location').height()+$('.header').height()+$('.nav_box').height()+$('.dh_head').height()+$('.banner').height(), hts=$('.location').height()+$('.header').height()+$('.nav_box').height()+$('.dh_head').height()+$('.show_r').height(), htss=$('.location').height()+$('.header').height()+$('.nav_box').height()+$('.dh_head').height()+$('.banner').height()+$('.show_main').height()-500; var zh=document.documentElement.clientHeight, fh=$('#foot').height(), gdqy=$('#zcgs').height(), ksgd =gdqy+fh; if($(window).scrollTop() /g,'>'); str = str.replace(/\n/g,'
'); str = str.replace(/\[em_([0-9]*)\]/g,''); return str; } }); //多渠道弹窗 $(document).ready(function(){ $("#popup .qdbox div").hover( function () { $(this).addClass("hover"); }, function () { $(this).removeClass("hover"); } ); $("#popup .qdbox a em").hover( function () { $(this).parent().parent().find(".ewm_k").css("display","block"); }, function () { $(this).parent().parent().find(".ewm_k").css("display","none"); } ); $(function() { $(".show_l2 ul li.az").click(function() { $("#fade").css({display: "block", height: $(document).height()}); if (window.ActiveXObject)//判断浏览器是否属于IE { var browser = navigator.appName var b_version = navigator.appVersion var version = b_version.split(";"); var trim_Version = version[1].replace(/[ ]/g, ""); if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE6.0") { $("#fade").css({display: "none"}); } } $("#popup").css("display", "block"); }); $("#close").click(function() { //alert(2); $("#fade").css("display", "none"); $("#popup").css("display", "none"); }); }) if(document.getElementById("xpcontent_id")!=undefined){ var furl = document.referrer; if(furl.indexOf("www.so.com") > -1){ count_source($("#xpcontent_id").attr("data")); } } }); function count_source(id){ $.get("/game/api.php?op=count_source&action=count&id="+id); } function count_ad_click(id){ //广告点击统计 var times = parseInt(Math.random() * 10000); $.get("/game/api.php?op=poster&action=count&id="+id+"×="+times); } //9 1 $(function(){ var $showcase = $(".showcase"); var $scrollbar = $showcase.find(".scrollbar1"); var $slider = $showcase.find(".slider"); var _scrollbar_api; var _slider_api; function imageDownload($obj, callback) { var len = $obj.length; var num = 0; var list = []; $obj.each(function() { if (this.complete && this.width) { doSomething(); } else { this.onload = doSomething; } function doSomething() { num++; list.push(this); if (num == len) { callback(list); } } }); } imageDownload($scrollbar.find("li img"), function() { $scrollbar.scrollbar({ contentCls: "s-content", direction: "x", inEndEffect: true }, function(api) { _scrollbar_api = api; }); }); }); /*11.30*/ $(".show_l2 ul li.az").live({ click: function () { $(".yxtj_box").show(); }}); $(".yxtj_box .close").live({ click: function () { $(".yxtj_box").hide(); }}); /* $(function(){ $('#praise1').on('click', function(){ var t = $(this), s = t.find('span'), v = s.html(); if(!t.hasClass('flip')){ t.addClass('flip'); s.html(v*1+1); } }) $('#praise2').on('click', function(){ var t = $(this), s = t.find('span'), v = s.html(); if(!t.hasClass('out')){ t.addClass('out'); s.html(v*1+1); } }) }) */ window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];