 <% if page_context -%>

<div class="modal hide fade in banner-preview" id="page_context-<%=page_context.id%>" style="width:1024px;height:500px;margin-left:-512px">
  <div class="modal-header">
    <a class="close" data-dismiss="modal">×</a>
    <h3><%= t(:preview) %></h3>
  </div>
  <div class="modal-body">
    <p class="page_context_slideshow">

      <iframe src=<%= panel_page_content_back_end_view_path(page_context.page_id, :category_id => page_context.page_context_category.id ,:preview=>true) %> style="width:1000px;height:300px" >

        </iframe>
    </p>
  </div>
  <div class="modal-footer">
    
  
    <a href="#" class="btn" data-dismiss="modal"><%= t(:close) %></a>
  </div>
  <div>
    <script type="text/javascript" src="/static/kernel.js"></script>
    <script type="text/javascript">
      $(document).ready(function() {

    $(".modal").on("hidden", function () {
    $("#show_preview").remove();
      });
      
      $("iframe").load(function(){
          // Get the body element
          var frameBody = $("iframe").contents().find("body");

          // Get all links inside the BODY tag
          $('a', frameBody).click(function(e){
                  //Disable all default actions       
                  e.preventDefault();
          });
          $('input', frameBody).attr("disabled", true);
      });
    });
    </script>
  </div>
</div>



<% end -%>
