﻿var maxContentPictureWidth = 440;
$.fn.zoomIn = function() {
    var orgWidth = $(this).width();
    if (orgWidth <= maxContentPictureWidth) { return; }
    var orgHeight = $(this).height();
    var times = maxContentPictureWidth / orgWidth;
    $(this).width(orgWidth * times);
    $(this).height(orgHeight * times);
    $(this).css("cursor", "pointer").css("cursor", "hand"); //browsers!!
    var wrapperAnchor = document.createElement("a");
    $(wrapperAnchor).attr("href", $(this).attr("src"))
           .attr("title", "preview")
    .addClass("thickbox")
    .attr("id", "created" + Math.floor((Math.random()*100)).toString() );   //flagged as created at runtime!!
    $(this).wrap(wrapperAnchor);
}
$(function() {
    $("#content img").each(function() {
        $(this).zoomIn();
    });
    tb_init("a.thickbox[id^='created']");    
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'scripts/clipboard.swf';
SyntaxHighlighter.all();
});