(function() {
  var target = $('.archives li').slice(7);
  target.each(function() {
    $(this).css("display", "none");
  })

  $('#show_more_archive_list').click(function() {
    target.each(function() {
      $(this).slideDown();
    })

    $(this).hide();
    $('#show_less_archive_list').show();
  })

  $('#show_less_archive_list').click(function() {
    target.each(function() {
      $(this).slideUp();
    })

    $(this).hide();
    $('#show_more_archive_list').show();
  })

  var init = function(node) {
    // fit image for iPhone
    /* if (navigator.userAgent.match(/iPad/)) { */
    /* } */
  }

  document.body.addEventListener('AutoPagerize_DOMNodeInserted',function(evt){
    var node = evt.target;
    var requestURL = evt.newValue;
    var parentNode = evt.relatedNode;
    init(node);
  }, false);

  init(document);
})();

window.onload = function() {
  $('.article img').each(function() {
    var newWidth    = document.body.offsetWidth - 60;
    var imageRatio  = this.naturalHeight / this.naturalWidth;

    if (this.naturalWidth > newWidth) {
      this.width  = newWidth;
      this.height = newWidth * imageRatio;
    }
  });
};

@@ -513,99 +513,8 @@
 ) %7B%0A
-    // fit image for iPhone%0A    /* if (navigator.userAgent.match(/iPad/)) %7B */%0A    /* %7D */%0A
   %7D%0A
@@ -787,15 +787,12 @@
 $('.
-article
+body
  img
@@ -820,19 +820,19 @@
     var 
-new
+max
 Width   
@@ -833,16 +833,43 @@
 dth    =
+ 900;%0A    var deviceWidth =
  documen
@@ -954,16 +954,87 @@
 alWidth;
+%0A    maxWidth        = deviceWidth %3E maxWidth ? maxWidth : deviceWidth;
 %0A%0A    if
@@ -1055,19 +1055,19 @@
 Width %3E 
-new
+max
 Width) %7B
@@ -1087,19 +1087,19 @@
 idth  = 
-new
+max
 Width;%0A 
@@ -1117,19 +1117,19 @@
 eight = 
-new
+max
 Width * 

Update image resize JavaScript