 <% if bulletin -%>

<div class="modal hide fade in banner-preview" id="bulletin-<%=bulletin.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="bulletin_slideshow">

      <iframe src=<%= panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.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="/assets/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 -%>
