function tpycjz(){(function($){$.fn.lazyload=function(options){var settings={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(options){$.extend(settings,options)};var elements=this;if("scroll"==settings.event){$(settings.container).bind("scroll",function(event){var counter=0;elements.each(function(){if($.abovethetop(this,settings)||$.leftofbegin(this,settings)){}else if(!$.belowthefold(this,settings)&&!$.rightoffold(this,settings)){$(this).trigger("appear")}else{if(counter++>settings.failurelimit){return false}}});var temp=$.grep(elements,function(element){return!element.loaded});elements=$(temp)})};this.each(function(){var self=this;if(undefined==$(self).attr("original")){$(self).attr("original",$(self).attr("src"))};if("scroll"!=settings.event||undefined==$(self).attr("src")||settings.placeholder==$(self).attr("src")||($.abovethetop(self,settings)||$.leftofbegin(self,settings)||$.belowthefold(self,settings)||$.rightoffold(self,settings))){if(settings.placeholder){$(self).attr("src",settings.placeholder)}else{$(self).removeAttr("src")};self.loaded=false}else{self.loaded=true};$(self).one("appear",function(){if(!this.loaded){$("<img />").bind("load",function(){$(self).hide().attr("src",$(self).attr("original"))[settings.effect](settings.effectspeed);self.loaded=true}).attr("src",$(self).attr("original"))}});if("scroll"!=settings.event){$(self).bind(settings.event,function(event){if(!self.loaded){$(self).trigger("appear")}})}});$(settings.container).trigger(settings.event);return this};$.belowthefold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).height()+$(window).scrollTop()}else{var fold=$(settings.container).offset().top+$(settings.container).height()};return fold<=$(element).offset().top-settings.threshold};$.rightoffold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).width()+$(window).scrollLeft()}else{var fold=$(settings.container).offset().left+$(settings.container).width()};return fold<=$(element).offset().left-settings.threshold};$.abovethetop=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollTop()}else{var fold=$(settings.container).offset().top};return fold>=$(element).offset().top+settings.threshold+$(element).height()};$.leftofbegin=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollLeft()}else{var fold=$(settings.container).offset().left};return fold>=$(element).offset().left+settings.threshold+$(element).width()};$.extend($.expr[':'],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery);jQuery(document).ready(function($){$("#post img").lazyload({effect:"fadeIn"})})};function favicon(){jQuery(document).ready(function($){$(".friendlinks a").each(function(e){$(this).prepend("<img src=http://www.google.com/s2/favicons?domain="+this.href.replace(/^(http:\/\/[^\/]+).*$/,'$1').replace('http://','')+" style=float:left;padding:1px;>")})})};function wzjzts(){jQuery(document).ready(function($){$('.list_title h1 a,.sticky h1 a').click(function(){$(this).text('请稍等，文章正在载入中……')})})};function fhdb(){(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0};if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break};d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()};h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0};e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);jQuery.fn.topLink=function(settings){settings=jQuery.extend({min:1,fadeSpeed:200},settings);return this.each(function(){var el=$(this);el.hide();$(window).scroll(function(){if($(window).scrollTop()>=settings.min){el.fadeIn(settings.fadeSpeed)}else{el.fadeOut(settings.fadeSpeed)}})})};$(document).ready(function(){$('#top-link').topLink({min:400,fadeSpeed:500});$('#top-link').click(function(e){e.preventDefault();$.scrollTo(0,300)})})};function bqqh(){$(document).ready(function(){$('#tabMenu > li').click(function(){$('#tabMenu > li').removeClass('selected');$(this).addClass('selected');$('.boxBody div').slideUp('1500');$('.boxBody div:eq('+$('#tabMenu > li').index(this)+')').slideDown('1500')}).mouseover(function(){$(this).addClass('mouseover');$(this).removeClass('mouseout')}).mouseout(function(){$(this).addClass('mouseout');$(this).removeClass('mouseover')});$('.boxBody #category li,.titleh1').mouseover(function(){$(this).children().animate({paddingLeft:"20px"},{queue:false,duration:300})}).mouseout(function(){$(this).children().animate({paddingLeft:"0"},{queue:false,duration:300})})})};var menu=function(){var t=15,z=50,s=6,a;function dd(n){this.n=n;this.h=[];this.c=[]};dd.prototype.init=function(p,c){a=c;var w=document.getElementById(p),s=w.getElementsByTagName('ul'),l=s.length,i=0;for(i;i<l;i++){var h=s[i].parentNode;this.h[i]=h;this.c[i]=s[i];h.onmouseover=new Function(this.n+'.st('+i+',true)');h.onmouseout=new Function(this.n+'.st('+i+')')}};dd.prototype.st=function(x,f){var c=this.c[x],h=this.h[x],p=h.getElementsByTagName('a')[0];clearInterval(c.t);c.style.overflow='hidden';if(f){p.className+=' '+a;if(!c.mh){c.style.display='block';c.style.height='';c.mh=c.offsetHeight;c.style.height=0};if(c.mh==c.offsetHeight){c.style.overflow='visible'}else{c.style.zIndex=z;z++;c.t=setInterval(function(){sl(c,1)},t)}}else{p.className=p.className.replace(a,'');c.t=setInterval(function(){sl(c,-1)},t)}};function sl(c,f){var h=c.offsetHeight;if((h<=0&&f!=1)||(h>=c.mh&&f==1)){if(f==1){c.style.filter='';c.style.opacity=1;c.style.overflow='visible'};clearInterval(c.t);return};var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s),o=h/c.mh;c.style.opacity=o;c.style.filter='alpha(opacity='+(o*100)+')';c.style.height=h+(d*f)+'px'};return{dd:dd}}();
