$(document).ready(function()
{
    isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
    if( isIE6 )
    {
    DD_belatedPNG.fix('#home_image, #header_link, #tagline, #top_shadow');
    }
    if (document.all) {
        //$("#navigation li").hoverClass("sfHover");
    }

  $(window).bind("load", function() {

   $(".entry img.shrink_img").each(function(){
    if($(this).width() > 200) {
     var wide = $(this).width(); var high = $(this).height();
     wide = wide + 32; high = high + 32;
     var scalefactor = 200/$(this).width();
     var adjustedheight = scalefactor * $(this).height();
     $(this).width(200);
     $(this).height(adjustedheight);
     $(this).click(function(){
      var showimg = window.open(this.src,'showgraphic','width='+wide+',height='+high+',resizable=0,status=0,scrollbars=0');
     });

     $(this).parent().prepend("<i style='color:#789;padding-bottom:10px;display:inline-block;'>click image to zoom</i>");
     $(this).addClass('shrink');
    }

     this.style.display = "block";

   });
  });

   $(".entry img").each(function(){
    if((window.location.search.substring(1,3)!='p=') && (window.location.search.substring(1,3)!='m=') && (window.location.search.substring(1,4)!='cat')) {
    if($(this).width() > 678) {
     var wide = $(this).width(); var high = $(this).height();
     wide = wide + 32; high = high + 32;
     var scalefactor = 678/$(this).width();
     var adjustedheight = scalefactor * $(this).height();
     $(this).width(678);
     $(this).height(adjustedheight);
     if($(this).parent().parent().hasClass("wp-caption")) {
      $(this).parent().parent().width(678);
     }
    }
    }
   });

 });


