      var html = '<div class="v-filter"></div><table class="v-image"><tr><td><img /></td></tr></table>';

      $(function(){

            $('body').prepend(html);
      
            $('a[rel=view]').click(function(){
            
                  $('table.v-image').show();
                  $('div.v-filter').show().animate({opacity: 0.8}, 400);
                  
                  $('table.v-image tr > td > img').attr('src', $(this).attr('href'));
                  
                  return false;
            
            });
            
            $('.v-image').click(function(){
            
                  $('div.v-filter').animate({opacity: 0}, 400).hide();
                  $('table.v-image tr > td > img').attr('src', '');
                  $('table.v-image').hide();
                  $('table.v-image img').css('opacity', 0);
                  
                  return false;
            
            });
            
            $('table.v-image img').load(function(){
            
                  $(this).css('opacity', 0);
                                                
                  $(this).show();
                  
                  $(this).animate({opacity: 1}, 800);
                  
            
            });
      
      });