$(function(){ $("#section2 .content").prepend(''); $("#section2 .diary").animate({"top":"15px","opacity":"1"},{duration: 1500, easing:'easeOutQuint'}); $("#section2 .archive").animate({"top":"15px","opacity":"1"},{duration: 1500, easing:'easeOutExpo'}); $("#footer").fadeIn(3000); $(".navigation_menu a[href='diary.html']").addClass("active_page"); $("#totop").hide(); $(".blog_body").bind("scroll",function(){ var bbh =$(this).scrollTop(); if(bbh>10){ $("#totop").fadeIn(); }else{ $("#totop").fadeOut(); } }); $(".date li").live("click",function(){ var ThisC =$(this).attr("class"); if(ThisC=="active"){ $(this).children("ul").slideUp(); $(this).removeClass("active"); $(this).children("span").text("+"); }else{ $(".date .active ul").slideUp(); $(".date .active span").text("+"); $(".date .active").removeClass("active"); $(this).children("ul").slideDown(); $(this).addClass("active"); $(this).children("span").text("-"); } }); $(".archive p").live("click",function(){ $(".archive ol.activep").slideUp().removeClass("activep"); $(this).next("ol").slideDown().addClass("activep"); }); $(".icon_comment").live("click",function(){ $(".blog_body").animate({scrollTop:"+=300"}); $("#comment_form").slideToggle(); }); $("#totop").live("click",function(){ $(".blog_body").animate({scrollTop:0}); }); $('.blog_body img').live("error",function(){ $(this).hide(); }); $("#more_log a").live("click",function(){ var MorePage = $(this).attr("href"); $(this).parent("p").remove(); var pId = MorePage.replace(".html","").split('-'); $(".blog_body").append('

'); var InsertTo =".log_wrap_"+ pId[2]; $(InsertTo).html('
').load(MorePage+' .blog_body ul',function(){ $(".blog_body").animate({"scrollTop":"+="+($(".diary").height()-50)}); $("#more_log").load(MorePage+' .blog_body #more_log a'); }); return false; }); $('a[rel=lightbox]').live("click",function(){ return false; }); $('.diary a[rel=lightbox] img').live("click",function(){ var SRC = $(this).attr("src"); $("body").append(''); var Perh =$(window).height(); $(".light_box img").bind("load",function(){ var h = $(this).height(); var w = $(this).width(); var mt = (Perh - h)/2; $(this).css("margin-top",mt); }); $(".light_box").fadeIn(); return false; }); $(".light_box img").live("click",function(){ $(".light_box").fadeOut(function(){$(this).remove()}); }); }); /* * * * * * * * * * * * * * * * * * * * * CopyrightⒸwebstudio WhitePallet™ * * * * * * * * * * * * * * * * * * * * */