﻿/// <reference path="jquery.js" />

$(document).ready(function(){
    
    
    $("div.column").dblclick(function(){   
    
       
            var content = $(this).text();
            var width = $(this).width() -1;
            var height = $(this).height() - 4;
            
            var $editbox = $("<input type='text'" + 
                            "style='width:" + width + ";" +
                            "height:" + height + ";" +
                            "border:none" +                           
                            "' value='" +  content + "' />");          
           
             
            $(this).empty();            
            $(this).prepend($editbox);             
            $editbox.focus();
            $editbox.select();
            
            
             $($editbox).bind("blur",function(){
               
               content = $(this).val();
               var parent = $(this).parent();
               parent.html(content);                           
               
            });
        
    });
    
});



