function RecordLog(n,t,i,r){var u=GetCookie("TracingInfo","UserID"),f="//srv.gongkong.com/GongKongRedis.aspx?cf=gongkong&ch="+n+"&wh="+escape(window.location.href)+"&et="+t+"&uid="+u+"&cid="+i+"&aid=&id="+r;$.ajax({url:f,type:"GET",dataType:"jsonp",jsonp:"jsoncallback",data:null,async:!1,success:function(){}})}function RecordLogUrl(n,t,i,r,u){var f=GetCookie("TracingInfo","UserID"),e="//srv.gongkong.com/GongKongRedis.aspx?cf=gongkong&ch="+n+"&wh="+escape(u)+"&et="+t+"&uid="+f+"&cid="+i+"&aid=&id="+r;$.ajax({url:e,type:"GET",dataType:"jsonp",jsonp:"jsoncallback",data:null,async:!1,success:function(){}})}function GetCookie(n,t){var i=new RegExp(t?n+"=(?:.*?&)*?"+t+"=([^&;$]*)":n+"=([^;$]*)","i");return i.test(unescape(document.cookie))?RegExp.$1:""}function RecordLogJump(n,t,i,r,u,f){if(RecordLogUrl(n,t,i,r,u),u!=null&&u!="undefined"&&u!="")switch(f){case"_blank":window.open(u,"_blank");break;default:window.location.href=u}}function RecordLogTest(n,t,i){var r=GetCookie("TracingInfo","UserID"),u="http://c.gongkong.com/WebForms/TestLog.aspx?flag=300&wh="+escape(window.location.href)+"&et="+n+"&uid="+r+"&cid="+t+"&id="+i;$.ajax({url:u,type:"GET",dataType:"jsonp",jsonp:"jsoncallback",data:null,async:!1,success:function(){}})}function Favorate(n,t,i,r){var u=GetCookie("RegUserInfo","UserID");u==""?alert("请先登陆后再收藏!"):((r==null||r=="")&&(r=window.location.href),$.ajax({waitTitle:"请稍后...",url:"/gongkong2/UserFavorate/Index",type:"POST",data:{userId:u,title:escape(n),url:escape(r),elementId:t,elementType:i},success:function(n){if(n!=null&&n.result!=null)switch(n.result){case 1:alert("请先登录后再收藏!");break;case 2:alert("您已经收藏过了!");break;case 3:alert("收藏成功!");break;default:alert("网络异常,请重试!")}else alert("网络异常,请重试!")}}))}function IsFavorate(n){var t=GetCookie("RegUserInfo","UserID"),i;t!=""&&(i=window.location.href,$.ajax({waitTitle:"请稍后...",url:"/gongkong2/UserFavorate/isFavorate",type:"POST",data:{userId:t,url:escape(""),elementId:n,elementType:"SeriesDetail"},success:function(n){n!="False"&&$("#spanFavorate").html('已收藏')}}))}function imgReset(n,t,i){var f=n.offsetWidth,e=n.offsetHeight,r,u;parseFloat(t)/parseFloat(i)>parseFloat(f)/parseFloat(e)?(r=parseInt(f*i/e),n.style.height=i+"px",n.style.width=r+"px",n.parentNode.tagName=="A"?(n.parentNode.style.height=i+"px",n.parentNode.style.width=r+"px",n.parentNode.style.display="block",n.parentNode.style.marginLeft=parseInt((t-r)/2)+"px"):n.style.marginLeft=parseInt((t-r)/2)+"px"):(u=parseInt(e*t/f),n.style.height=u+"px",n.style.width=t+"px",n.parentNode.tagName=="A"?(n.parentNode.style.height=u+"px",n.parentNode.style.width=t+"px",n.parentNode.style.display="inline-block",n.parentNode.style.marginTop=parseInt((i-u)/2)+"px"):n.style.marginTop=parseInt((i-u)/2)+"px")}function lookHistory(n,t,i,r,u){if(n.length==0||t.length==0||i.length==0||u!=null&&u=="preview")return!1;needHistoryTags=n=="news"||n=="product"||n=="data"||n=="paper",console.log("lookHistory set needHistoryTags="+needHistoryTags),$.ajax({type:"POST",url:controllerhost+"/news/setCookieUrl",data:"type="+n+"&id="+t+"&url="+window.location.href.replace("#","")+"&title="+encodeURIComponent(i)+"&isByType="+r,dataType:"json",success:function(n){n!=null&&n!=undefined&&n.length>0?needHistoryTags||$.each(n,function(t){var i="
"+n[t].title.subBtyesString(32)+"";$("#historyul").append(i)}):$("#historyul").append("暂无记录!")}})}function detailGuessLike(n,t,i){var u="",e="c0c",f=GetCookie("TracingInfo","UserID");$.ajax({type:"POST",url:controllerhost+"/Cookie/GetDetailHistory",dataType:"json",success:function(r){r!=null&&r!=undefined&&r.length>0&&$.each(r,function(n){u+=r[n].code+e}),$("#"+n).attr("his",u);var o=Math.round(Math.random()*1e4),s="http://new.gkw.cn/Action/GuessLikeAction.ashx?action=GetHtml&HorS=4&PageType=4&ChannelType="+i+"&UserId="+f+"&count=6&ContentID="+t+"&rnd="+o+"&callback=?",h="http://new.gkw.cn/Action/GuessLikeAction.ashx?action=GetPropertyTags&HorS=4&PageType=4&ChannelType="+i+"&UserId="+f+"&count=6&ContentID="+t+"&His="+u+"&rnd="+o+"&callback=?";console.log(s),console.log(h),getGuessLike(s,n,1),console.log("detailGuessLike get needHistoryTags="+needHistoryTags),needHistoryTags&&getHistoryTag(h,1)}})}function getGuessLike(n,t,i){return i>=5?!0:($.ajax({url:n,dataType:"jsonp",jsonpCallback:"cb_getGuessLike",success:function(r){if(r==null||r==""||r==undefined){if(console.log("("+i+")GuessLike unavailable"),getGuessLike(n,t,parseInt(i)+1))return!0}else if(r.message==null||r.message==""||r.message==undefined||console.log("("+i+")GuessLike gldata.message="+r.message),r.value==null||r.value==""||r.value==undefined){if(console.log("("+i+")GuessLike gldata.value unavailable"),getGuessLike(n,t,parseInt(i)+1))return!0}else if(r.value=="False"){if(console.log("("+i+")GuessLike gldata.value="+r.value),getGuessLike(n,t,parseInt(i)+1))return!0}else return console.log("("+i+")GuessLike gldata.value available"),$("#"+t).html(r.value),!0}}),!1)}function getHistoryTag(n,t){return t>=5?!0:($.ajax({url:n,dataType:"jsonp",jsonpCallback:"cb_getHistoryTag",success:function(i){if(i==null||i==""||i==undefined){if(console.log("("+t+")GuessTag unavailable"),getHistoryTag(n,parseInt(t)+1))return!0}else if(i.message==null||i.message==""||i.message==undefined||console.log("("+t+")GuessTag tagdata.message="+i.message),i.value==null||i.value==""||i.value==undefined){if(console.log("("+t+")GuessTag tagdata.value unavailable"),getHistoryTag(n,parseInt(t)+1))return!0}else if(i.value=="False"){if(console.log("("+t+")GuessTag tagdata.value="+i.value),getHistoryTag(n,parseInt(t)+1))return!0}else{console.log("("+t+")GuessTag tagdata.value available");var r="#historyul li {-moz-border-radius:2px; -webkit-border-radius:2px; border-radius: 2px; display: block; float: left; padding: 5px 15px; text-decoration:none; background: #e4393c; margin-right: 5px; margin-bottom:5px; max-width: 90%; }";return r+="#historyul li a {color: #FFF; font-family: '微软雅黑', sans-serif; font-size:15px; }",$("#historyul").before(""),$("#historyul").html(i.value),$("#historyul").siblings("h3").html("标签推荐"),$("#historyul").siblings(".dl_ys").hide(),!0}}}),!1)}function replaceImageW(n,t){var i,r,e,f;try{if(i=n.getElementsByTagName("IMG"),i)for(r=0;r1?(t=r,i=parseInt(parseInt(u)*parseFloat(r)/parseFloat(n)),o?(this.obj.style.width=t+"px",this.obj.style.height=i+"px"):this.obj.outerHTML=""):(parseInt(n)")},u.src=e}}catch(h){}}$(function(){var n=$("#spanFavorate").parent("dt").attr("rid");IsFavorate(n)}),jQuery(function(n){n(document).ready(function(){var a=[],u=[],e=[],h=0,f="",t="",i="",o=null,c=0,l=0,s=0,r=0;n(window).scroll(function(){var i=n(this).scrollTop();f=i>h?"down":"up",h=i}),n.fn.stickUp=function(u){var f,h;if(n(this).addClass("stuckMenu"),f=0,u!=null){for(h in u.parts)u.parts.hasOwnProperty(h)&&(e[f]=u.parts[f],f++);f==0&&console.log("error:needs arguments"),t=u.itemClass,i=u.itemHover,u.topMargin!=null?u.topMargin=="auto"?r=parseInt(n(".stuckMenu").css("margin-top")):isNaN(u.topMargin)&&u.topMargin.search("px")>0?r=parseInt(u.topMargin.replace("px","")):isNaN(parseInt(u.topMargin))?(console.log("incorrect argument, ignored."),r=0):r=parseInt(u.topMargin):r=0,o=n("."+t).size()}c=parseInt(n(this).height()),l=parseInt(n(this).css("margin-bottom")),s=parseInt(n(this).next().closest("div").css("margin-top")),vartop=parseInt(n(this).offset().top)};n(document).on("scroll",function(){if(varscroll=parseInt(n(document).scrollTop()),o!=null)for(var h=0;htestView?(n("."+t).removeClass(i),n("."+t+":eq("+r+")").addClass(i)):varscroll<50&&(n("."+t).removeClass(i),n("."+t+":eq(0)").addClass(i))}f=="down"&&varscroll>u[h]-50&&varscroll