$(document).ready(function() {
    // do something here


    //	     $("html").append("<div class=tb-shade></div>"); 

    //           var windowWidth = document.documentElement.clientWidth;     
    //            var windowHeight = document.documentElement.clientHeight;      
    //            var popupHeight = $(".loginShow").height();     
    //            var popupWidth = $(".loginShow").width();      
    //            //居中显示层  

    //	  
    //	  $("#HLLogin").click(function(){  
    //              $(".loginShow").css({     
    //              "top": windowHeight/3-popupHeight/2,     
    //               "left": windowWidth/2-popupWidth/2     
    //               });   
    //                 
    //        $(".tb-shade").fadeIn("slow");  
    //        $(".loginShow").fadeIn("slow",function(){   
    //            $(".loginShow").css("display","block");     
    //            });  //fadein  
    //       });//end display top layer  
    //         



    //         $(".close a").click(function(){  
    //         $(this).parents(".ajax").fadeOut("slow",  function(){  
    //                 $(".ajax").css("display","none");  
    //                 $(".tb-shade").css("display","none");  
    //               });   
    //           });//end close  

    //相册超大图缩放
    var PhotoWidth = $('#Photo').width();
    $('#Photo img').css('max-width', PhotoWidth);

    //“记录栏目”超长加展开按钮
    for (i = 0; i < $('.gerenjilu').size(); i++) {
        var gerenjilu_p = $('.gerenjilu').eq(i).width();
        var gerenjilu_span = $('.gerenjilu  span').eq(i).width();
        if (gerenjilu_p < (gerenjilu_span + 100)) {
            $('.gerenjilu').eq(i).prepend('<a href=# class=zhankai>+</a>');

        };
    }

    //展开按钮
    $('.zhankai').live("click", function() {
        $(this).parents(".gerenjilu").css("white-space", "normal");
        $(this).replaceWith('<a href=# class=guanbi>+</a>');
        return false;
    });

    //关闭按钮
    $('.guanbi').live("click", function() {
        $(this).parents(".gerenjilu").css("white-space", "nowrap");
        $(this).replaceWith('<a href=# class=zhankai>+</a>');
        return false;
    });


    $("#txtGongGao").addClass("GongGaoCssFocus").next("#btnGengXin").css("display", "none").end().focus(function() {
    $(this).addClass("GongGaoCssBlur").removeClass("GongGaoCssFocus").next("#btnGengXin").css("display", "inline")
    }).blur(function() {
    $(this).addClass("GongGaoCssFocus").removeClass("GongGaoCssBlur").next("#btnGengXin").fadeOut("1000", function() { $(this).css("display", "none") })
    });





});
