$(document).ready(function(){(function(){$("#previous").click(function(){$("#sponsor dl:visible").fadeOut("fast",function(){if($(this).prev().is("dl")){$(this).prev().fadeIn("fast")}else{$("#sponsor dl:last-child").fadeIn("fast")}})});$("#next").click(function(){$("#sponsor dl:visible").fadeOut("fast",function(){if($(this).next().is("dl")){$(this).next().fadeIn("fast")}else{$("#sponsor dl:first-child").fadeIn("fast")}})});$("#point b:first-child").click(function(){$("#sponsor dl:visible").fadeOut("fast",function(){$("#sponsor dl:first-child").fadeIn("fast")})});$("#point b:nth-child(2)").click(function(){$("#sponsor dl:visible").fadeOut("fast",function(){$("#sponsor dl:nth-child(2)").fadeIn("fast")})});$("#point b:last-child").click(function(){$("#sponsor dl:visible").fadeOut("fast",function(){$("#sponsor dl:last-child").fadeIn("fast")})})})();(function(){$("#switch").toggle(function(){$(this).text("完整模式");$(this).removeClass("switch-up");$(this).addClass("switch-down");$("#scroll").animate({height:"45px"},"fast");$("#sponsor dl dt:first-child").css("float","left");$("#sponsor dl dd:last-child").hide()},function(){$(this).text("精简模式");$(this).removeClass("switch-down");$(this).addClass("switch-up");$("#scroll").animate({height:"90px"},"fast",function(){$("#sponsor dl dt:first-child").css("float","none");$("#sponsor dl dd:last-child").show()})})})();(function(){var a=$("#s").attr("placeholder");if(!$("#s").val()||$("#s").val()==a){$("#s").css("color","#aaa");$("#s").val(a)}$("#s").focus(function(){if($(this).val()==a){$(this).css("color","#666");$(this).val("")}});$("#s").blur(function(){if(!$(this).val()||$(this).val()==a){$(this).css("color","#aaa");$(this).val(a)}});$("#searchsubmit").click(function(){if($("#s").val()==a){alert(a);return false}})})();(function(){$("#tag").toggle(function(){$("#bookmark").slideDown("fast");$(this).removeClass("slide-down");$(this).addClass("slide-up")},function(){$("#bookmark").slideUp("fast");$(this).removeClass("slide-up");$(this).addClass("slide-down")})})();(function(){if($.browser.msie){$(".post, .comment li:not(.webmaster)").hover(function(){$(this).css("backgroundColor","#fafafa")},function(){$(this).css("backgroundColor","#fff")});$(".commentform input, .commentform textarea").focus(function(){$(this).css("backgroundColor","#fafafa")});$(".commentform input, .commentform textarea").blur(function(){$(this).css("backgroundColor","#fff")})}})();(function(){$(".reply").click(function(){var a=$(this).text()+$(this).parent().parent().prev().find("em").text()+"\uff1a";if(!$("#comment").val()){$("#comment").val(a)}else{$("#comment").val($("#comment").val()+"\n"+a)}$("html, body").animate({scrollTop:$("#comment").offset().top},"slow");return false})})();(function(){if(!!$("#switch-comment-author")){$("#switch-comment-author").toggle(function(){$(this).text("隐藏资料");$("#comment-author").show("fast");return false},function(){$(this).text("显示资料");$("#comment-author").hide("fast");return false})}})();(function(){$("img").lazyload({effect:"fadeIn"})})()});
