//Lazyload
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(5($){$.J.L=5(r){8 1={d:0,A:0,b:"h",v:"N",3:4};6(r){$.D(1,r)}8 m=9;6("h"==1.b){$(1.3).p("h",5(b){8 C=0;m.t(5(){6(!$.k(9,1)&&!$.l(9,1)){$(9).z("o")}j{6(C++>1.A){g B}}});8 w=$.M(m,5(f){g!f.e});m=$(w)})}g 9.t(5(){8 2=9;$(2).c("s",$(2).c("i"));6("h"!=1.b||$.k(2,1)||$.l(2,1)){6(1.u){$(2).c("i",1.u)}j{$(2).K("i")}2.e=B}j{2.e=x}$(2).T("o",5(){6(!9.e){$("<V />").p("X",5(){$(2).Y().c("i",$(2).c("s"))[1.v](1.Z);2.e=x}).c("i",$(2).c("s"))}});6("h"!=1.b){$(2).p(1.b,5(b){6(!2.e){$(2).z("o")}})}})};$.k=5(f,1){6(1.3===E||1.3===4){8 7=$(4).F()+$(4).O()}j{8 7=$(1.3).n().G+$(1.3).F()}g 7<=$(f).n().G-1.d};$.l=5(f,1){6(1.3===E||1.3===4){8 7=$(4).I()+$(4).U()}j{8 7=$(1.3).n().q+$(1.3).I()}g 7<=$(f).n().q-1.d};$.D($.P[\':\'],{"Q-H-7":"$.k(a, {d : 0, 3: 4})","R-H-7":"!$.k(a, {d : 0, 3: 4})","S-y-7":"$.l(a, {d : 0, 3: 4})","q-y-7":"!$.l(a, {d : 0, 3: 4})"})})(W);',62,62,'|settings|self|container|window|function|if|fold|var|this||event|attr|threshold|loaded|element|return|scroll|src|else|belowthefold|rightoffold|elements|offset|appear|bind|left|options|original|each|placeholder|effect|temp|true|of|trigger|failurelimit|false|counter|extend|undefined|height|top|the|width|fn|removeAttr|lazyload|grep|show|scrollTop|expr|below|above|right|one|scrollLeft|img|jQuery|load|hide|effectspeed'.split('|'),0,{}));
//各种小效果
jQuery(function($){
//lightBox
$('.entry a:has(img)').lightBox();
//页面渐显
//$('#container').fadeIn(1000);
//鼠标滑过效果
//$('#biaoqian').hover(function(){$(this).css("background-position","top left")},function(){$(this).css("background-position","top right")});
$('.logo').hover(function(){$(this).css("background-position","0 -30px")},function(){$(this).css("background-position","0 0")});
$(".post .title a,.title_cat a").mouseover(function(e){this.myTitle=this.title;this.myHref=this.href;this.myHref=(this.myHref.length>30?this.myHref.toString().substring(0,30)+"...":this.myHref);this.title="";var tooltip="<div id='tooltip'><p>"+this.myTitle+"<em>"+this.myHref+"</em>"+"</p></div>";$('body').append(tooltip);$('#tooltip').css({"opacity":"0.8","top":(e.pageY+20)+"px","left":(e.pageX+10)+"px"}).show('fast')}).mouseout(function(){this.title=this.myTitle;$('#tooltip').remove()}).mousemove(function(e){$('#tooltip').css({"top":(e.pageY+20)+"px","left":(e.pageX+10)+"px"})});
//边栏
//$("#sidebar li.widget li").hover(function(){$(this).stop().animate({marginLeft:"+=6"},300)},function(){$(this).stop().animate({marginLeft:"0"},150)});
//评论框
$('.depth-1').hover(function(){$(this).css("background","#E2EAEF");},function(){$(this).css("background","#fff");});
$('.cmborder').hover(function(){$(this).find('.comment-meta').show();},function(){$(this).find('.comment-meta').hide();});
//lazyload启用
$("img:not([src*=smilies])").lazyload({placeholder:"http://ygs.im/wp-content/themes/private/images/fill.gif",effect:"fadeIn"});
//loading
//$('#loading-one').empty().append('页面载入完毕.').parent().fadeOut('slow');
//导航栏
//$("#sub_menu li a").hover(function(){$(this).stop().animate({marginLeft:"+=6"},300)},function(){$(this).stop().animate({marginLeft:"0"},150)});
//搜索框提示
$("#s").focus(function(){var txt_value = $(this).val();if(txt_value==this.defaultValue){$(this).val("");}});
$('#s').blur(function(){var txt_value = $(this).val();if(txt_value==""){$(this).val(this.defaultValue);}});
//判断首页+首页伸缩
if($('.title').length>1){
//$('#menu-item-2346').addClass("current_page_item");
/*$('.title').click(function(){
if($(this).next().is(':visible')){
$(this).children('a').text('页面载入中……').prev().remove();
window.location=$(this).children('a').attr('href')
}else{
$('.entry').slideUp(300);
$('.title').children('span').remove();
$('.title').children('a').before("<span>&uarr;&darr;</span>");
$(this).next().slideDown(500);
$(this).children('a').prev().html("&gt;");
};
return false;
});
$('.title:not(.sticky):first').click();*/
$('#sidebar .about h3 span').hover(function(){
$(".deepin").show(300);},function(){
$(".deepin").hide(200);
});
$('.deepin').css("opacity","0.8");
$('.more-link').text('阅读全文…');
}
//分类列表
/*
$('.title_list li').hover(function(){
$(this).css("background","#B7B7B7");$(this).children().css("color","#fff");$(this).children().find('a').css("color","#fff");
},function(){
$(this).css("background","#fff");$(this).children().css("color","#000");$(this).children().find('a').css("color","#666");
});
*/
//archive and links
$(".link 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>");
});
$('.archives-yearmonth').css({cursor:"s-resize"});
$('.archives-monthlisting').hide();
$('.archives-monthlisting:first').show();$('.archives-yearmonth').click(function(){$(this).next().slideToggle('fast');return false});
});
//评论部分
jQuery(function($){
$('.quote a').text("引用");
$('.quote').click(function() {
	var atname = $(this).parent().find('.fn').text();
	var quotecontent = $(this).prev().prev().text();//获得评论内容
	atname = $.trim(atname);
	$("#comment").attr("value","<blockquote><strong>" + atname + ": </strong>" + quotecontent + "</blockquote>\n").focus();//组合成引用
});
$('#commentform').keypress(function(e){
if(e.ctrlKey && e.which == 13 || e.which == 10) {
$(this).submit();
}
});
$('.reply').click(function(){
var rid= $(this).parent().attr("id");
var rna= $(this).parent().find('.fn').text();
rna=$.trim(rna);
$("#comment").attr("value","<a href='#"+rid+"' rel='nofollow'>@"+rna+"</a>\n").focus();
});
$('#cancel-comment-reply-link').click(function(){$("#comment").attr("value",'');});
$('.showsmilies').toggle(function(){$('#smiley').slideDown(500);$(this).text("隐藏");return false;},function(){$('#smiley').slideUp(500);$(this).text("表情");return false;});
//表单验证
$('#commentform :input').blur(function(){
if($(this).is('#author')){if(this.value==""){$(this).addClass("onError");}else{$(this).removeClass("onError");}}
if($(this).is('#email')){if(this.value=="" || !/^(?:[a-z\d]+[_\-\+\.]?)*[a-z\d]+@(?:([a-z\d]+\-?)*[a-z\d]+\.)+([a-z]{2,})+$/i.test(this.value)){$(this).addClass("onError");}else{$(this).removeClass("onError");}}
if($(this).is('#url')){if(this.value!="" && !/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/.test(this.value)){$(this).addClass("onError");}else{$(this).removeClass("onError");}}
if($(this).is('#comment:first')){if(this.value==""){$(this).addClass("onError");}else{$(this).removeClass("onError");}}});
$('#sb').click(function(){$('#commentform :input').trigger('blur');var numError=$('#commentform .onError').length;if(numError){return false;}});
//伪装登录
if($('#author').val() && $('#email').val()){
var $authorName=$('#author').val();
$('fieldset').slideUp(500);
$('.authorInfo').children('span').html($authorName+"<em>(<a href='#' class='authorChange'>更改</a>)</em>，");
$('.authorInfo').children('span').click(function(){
$('fieldset').slideDown(500);
return false;});}});
//贴图
function comment_image(){var URL = prompt('请输入图片的 URL 地址:','http://');if (URL) {document.getElementById('comment').value = document.getElementById('comment').value + '[img]' + URL + '[/img]';}}
// CSS3输出
var css_string="";
//圆角 各大浏览器已支持直接使用border-radius
//css_string+='#container';
//css_string+='{/*border-radius:8px;-webkit-border-radius:8px;-moz-border-radius:8px;*/box-shadow:1px 1px 5px #ABC1D1;-webkit-box-shadow:1px 1px 5px #ABC1D1;-moz-box-shadow:1px 1px 5px #ABC1D1;}';
//css_string+='#biaoqian';
//css_string+='{box-shadow:1px 1px 2px #ABC1D1;-webkit-box-shadow:1px 1px 2px #ABC1D1;-moz-box-shadow:1px 1px 2px #ABC1D1;}';
//css_string += '.link ul li ul li, .commentlist li div.vcard img.avatar';
//css_string += '{border-radius:6px 0 6px 0;-webkit-border-radius:6px 0 6px 0;-moz-border-radius:6px 0 6px 0}';
//css_string += '.gfw img.avatar, #tooltip';
//css_string += '{-webkit-border-radius:5px;-moz-border-radius:5px}';
//css_string += '#sb';
//css_string += '{-webkit-border-radius:3px;-moz-border-radius:3px}';
css_string += '.post .entry pre, #tooltip';
css_string += '{word-wrap:break-word}';
//选中颜色
css_string += '::selection';
css_string += '{background:#EF3982;color:#FFF}';
css_string += '::-moz-selection';
css_string += '{background:#EF3982;color:#FFF}';
css_string += '::-webkit-selection';
css_string += '{background:#EF3982;color:#FFF}';
//图片边框 各大浏览器已支持直接使用box-shadow
//css_string += '.post .entry img';
//css_string += '{-webkit-box-shadow:1px 1px 5px #999;-moz-box-shadow:1px 1px 5px #999}';
//评论框闪烁
css_string += '.commentlist .cmborder:hover';
css_string += '{-webkit-animation:"cmshadow" 1s alternate infinite}';
css_string += '@-webkit-keyframes "cmshadow"{0%{-webkit-box-shadow:gray 0 0 0px}10%{-webkit-box-shadow:gray 0 0 2px}20%{-webkit-box-shadow:gray 0 0 3px}30%{-webkit-box-shadow:gray 0 0 6px}40%{-webkit-box-shadow:gray 0 0 8px}50%{-webkit-box-shadow:gray 0 0 10px}60%{-webkit-box-shadow:gray 0 0 8px}70%{-webkit-box-shadow:gray 0 0 6px}80%{-webkit-box-shadow:gray 0 0 4px}90%{-webkit-box-shadow:gray 0 0 2px}100%{-webkit-box-shadow:gray 0 0 0px}}';
document.write('<style type="text\/css">' + css_string + '<\/style>');
//临时
