anchor.diff:            });
   
   
  -
  -
  -          // Add the cartodb tiles
  -          var cartodb_layer = {
  -            getTileUrl: function(coord, zoom) {
  -              return TILEHTTP + '://' + user_name + '.' + TILESERVER + '/tiles/' + table_name + '/'+zoom+'/'+coord.x+'/'+coord.y+'.png?sql=' + sql + '&style=' + style;
  -            },
  -            tileSize: new google.maps.Size(256, 256)
  -          };
  -          var cartodb_imagemaptype = new google.maps.ImageMapType(cartodb_layer);
  -          carto_embed_map.overlayMapTypes.insertAt(0, cartodb_imagemaptype);
  +          // Necessary params for wax and infowindow
  +          var cartodb_params = {
  +                cartodb_sql         : cartodb_sql,
  +                cartodb_style       : cartodb_style,
  +                cartodb_user_name   : cartodb_user_name,
  +                cartodb_table_name  : cartodb_table_name,
  +                cartodb_table_id    : cartodb_table_id,
  +                cartodb_map         : carto_embed_map,
  +                cartodb_map_canvas  : 'map_cartodb_container'
  +              }
  +
  +
  +          // Add wax interaction
  +          addCartoDBInteraction(cartodb_params);
   
   
             // Zoom to your geometries
             function getCartoDBBBox() {
               $.ajax({
                 method: "GET",
  -              url: 'http://'+user_name+'.' + SQL_SERVER + global_api_url+ 'sql/?q='+escape('select ST_Extent(the_geom) from '+ table_name),
  +              url: 'http://'+cartodb_user_name+'.' + SQL_SERVER + global_api_url+ 'sql/?q='+escape('select ST_Extent(the_geom) from '+ cartodb_table_name),
                 dataType: 'jsonp',
                 success: function(data) {
                   if (data.rows[0].st_extent!=null) {
  
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",
  