anchor.diff:            }
   
   
  -
  -
  -
  +          // Wax interaction
  +          function addCartoDBInteraction(params) {
  +            var currentCartoDbId,
  +                tilejson = generateTileJson(params);
  +                infowindow = new CartoDBInfowindow(params);
  +                cache_buster = 0;
  +            
  +            var waxOptions = {
  +              callbacks: {
  +                out: function(){
  +                  params.cartodb_map.setOptions({draggableCursor: 'default'});
  +                },
  +                over: function(feature, div, opt3, evt){
  +                  params.cartodb_map.setOptions({draggableCursor: 'pointer'});
  +                },
  +                click: function(feature, div, opt3, evt){
  +                  infowindow.open(feature);
  +                }
  +              },
  +              clickAction: 'full'
  +            };
  +            
  +            var wax_tile = new wax.g.connector(tilejson);
  +            params.cartodb_map.overlayMapTypes.insertAt(0,wax_tile);
  +            var interaction = wax.g.interaction(params.cartodb_map, tilejson, waxOptions);
  +
  +
  +            // Generate tilejson
  +            function generateTileJson(params) {
  +              var core_url = 'http://' + params.cartodb_user_name + '.' + TILESERVER;  
  +              var base_url = core_url + '/tiles/' + params.cartodb_table_name + '/{z}/{x}/{y}';
  +              var tile_url = base_url + '.png?cache_buster=0';
  +              var grid_url = base_url + '.grid.json';
  +          
  +              // SQL?
  +              if (params.cartodb_sql) {
  +                var query = 'sql=' + params.cartodb_sql;
  +                tile_url = wax.util.addUrlData(tile_url, query);
  +                grid_url = wax.util.addUrlData(grid_url, query);
  +              }
  +
  +              // Style
  +              if (params.cartodb_style) {
  +                var style = 'style=' + params.cartodb_style;
  +                tile_url = wax.util.addUrlData(tile_url,style);
  +                grid_url = wax.util.addUrlData(grid_url,style);
  +              }
  +
  +          
  +              // Build up the tileJSON
  +              // TODO: make a blankImage a real 'empty tile' image
  +              return {
  +                blankImage: 'http://cartodb.s3.amazonaws.com/embed/blank_tile.png', 
  +                tilejson: '1.0.0',
  +                scheme: 'xyz',
  +                tiles: [tile_url],
  +                grids: [grid_url],
  +                tiles_base: tile_url,
  +                grids_base: grid_url,
  +                formatter: function(options, data) {
  +                    currentCartoDbId = data.cartodb_id;
  +                    return data.cartodb_id;
  +                },
  +                cache_buster: function(){
  +                    return params.cache_buster;
  +                }
  +              };
  +            };
  +          };
  +
  +
  +          // Zoom bindings
             $('a.cartodb_map_embed_zoom_in').click(function(ev){
               ev.preventDefault();
               carto_embed_map.setZoom(carto_embed_map.getZoom()+1);
  
positive.code:             carto_embed_map.setZoom(carto_embed_map.getZoom()-1);
            });
          });
  
        </script>
      <% end %>
  
negative.code: <html lang="en">
    <head>
      <meta charset='utf-8' />
      <title>CartoDB Embed Map</title>
      <style type="text/css">
        html {width:100%; height:100%; padding:0; margin:0; border:none;}
        body {width:100%; height:100%; padding:0; margin:0; background:none;}
        div#outer_map_cartodb_container {position:relative; width:100%; height:100%; background:white; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
        div#map_cartodb_container {position:absolute; top:5px; left:5px; right:5px; bottom:5px; z-index:0;}
        span.cartodb_map_controls {position:absolute; top:10px; left:10px; width:26px; height:100px; z-index:10;}
        span.cartodb_map_controls a.cartodb_map_embed_zoom_in {display:block; width:30px; height:32px; text-indent:-9999px; line-height:0; font-size:0; background:url('http://cartodb.s3.amazonaws.com/embed/sprite.png') no-repeat -289px -142px;}
        span.cartodb_map_controls a.cartodb_map_embed_zoom_in:hover {background-position:-320px -142px; cursor:pointer;}
        span.cartodb_map_controls a.cartodb_map_embed_zoom_out {display:block; width:30px; height:32px; text-indent:-9999px; line-height:0; font-size:0; background:url('http://cartodb.s3.amazonaws.com/embed/sprite.png') no-repeat -289px -174px;}
        span.cartodb_map_controls a.cartodb_map_embed_zoom_out:hover {background-position:-320px -174px; cursor:pointer;}
        div.cartodb_infowindow {position:absolute; display:block; width:214px; padding:0;}
        div.cartodb_infowindow a.close {position:absolute; right:3px; top:3px; width:22px; height:15px; padding:4px 0 3px 0; text-align:center; font:bold 15px "Helvetica",Arial; color:#666666; text-decoration:none; line-height:15px}
        div.cartodb_infowindow a.close:hover {color:#333333}
        div.cartodb_infowindow div.outer_top {width:186px; padding:25px 18px 5px 10px; background:url('http://cartodb.s3.amazonaws.com/embed/sprite.png') 0 top;}
        div.cartodb_infowindow div.top {width:186px; max-height:200px; overflow-y:auto; overflow-x:hidden}
        div.cartodb_infowindow div.top label {display:block; width:auto; padding:0 0 0 5px; font:normal 11px Arial; color:#B3B3B3; text-shadow:0 1px white}
        div.cartodb_infowindow div.top p {display:block; width:170px; max-height:20px; padding:2px 4px; margin:2px 0 7px; font:bold 11px 'Helvetica',Arial; color:#666666; border:none; background:none; text-shadow:0 1px white;
          text-overflow:ellipsis; overflow:hidden; white-space:nowrap;}
        div.cartodb_infowindow div.top p.empty {font-weight:normal; font-style:italic; color:#b7b7b7;}
        div.cartodb_infowindow div.bottom {width:180px; height:36px; padding:11px 16px 10px 10px; background:url('http://cartodb.s3.amazonaws.com/embed/sprite.png') no-repeat right top;}
        div.cartodb_infowindow div.bottom label {float:left; margin:5px 0 0 3px; font:normal 11px Arial; color:#B3B3B3; text-shadow:0 1px white}
        div.cartodb_infowindow div.bottom label strong {font:bold 11px 'Helvetica',Arial; color:#666666; text-shadow:0 1px white;}
        div.cartodb_infowindow div.bottom a {float:right; height:12px; margin:0 5px 0 0; padding:4px 7px; border:1px solid #999; font:bold 11px "Helvetica",Arial; color:#333333; text-align:center;
          text-decoration:none; -webkit-border-radius:3px; -moz-border-radius:3px; border-radius:3px; text-shadow:0 1px white; background:linear-gradient(-90deg, #FFFFFF, #CACBCE); background:-webkit-gradient(linear, 50% 0%, 50% 100%, from(#FFFFFF), to(#CACBCE));
          background:-moz-linear-gradient(-90deg, #FFFFFF, #CACBCE); background: -o-linear-gradient(#FFFFFF,#CACBCE); filter:  progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#FFFFFF', endColorstr='#CACBCE');}
        div.cartodb_infowindow div.bottom a:hover {background:linear-gradient(-90deg, #CACBCE, #FFFFFF); background:-webkit-gradient(linear, 50% 0%, 50% 100%, from(#CACBCE), to(#FFFFFF));
          background:-moz-linear-gradient(-90deg, #CACBCE, #FFFFFF); background: -o-linear-gradient(#CACBCE,#FFFFFF); filter:  progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#CACBCE', endColorstr='#FFFFFF'); cursor:pointer;}
        a.cartodb_logo {position:absolute; bottom:14px; left:75px; display:block; width:69px; height:27px; background:url('http://cartodb.s3.amazonaws.com/embed/sprite.png') no-repeat -350px -141px;
                text-indent:-9999px; line-height:0; font-size:0;}
      </style>
  
  
      <% if @table.public? %>
        <script type="text/javascript">
          var cartodb_table_name  = "<%= @table.name %>",
              cartodb_table_id    = "<%= @table.id %>",
              cartodb_user_name   = "<%= @subdomain %>",
              <% if Rails.env == "development" %>
                TILEHTTP = "http",
                TILESERVER = "localhost.lan:8181",
  