anchor.diff:        <a class="btn btn-primary" href='<%=download_document_path(document)%>'><i class="icon-download"></i> <%=t('document.actions.download')%></a> 
       </div>
     </div>
  -  <div class="tab-pane <%= document_details_tab_class document, :embed %>" id="document-embed">
  -    <p><%=t("document.embed_explanation")%></p>      
  -    <div class="contentembed">
  -        <textarea class="shortUrl" readonly="true" rows="5" id="textarea_for_iframe" type="text">
  -          &lt;video id="" class="" preload="metadata" style="position: relative; width:100%; height:100%; top:0%; left:0%;" controls="controls" poster="<%=video_url(document, :format => :png, :style => '170x127#')%>"&gt;&lt;source src="<%= video_url(document, :format => :webm) %>" type="video/webm"&gt;&lt;source src="<%= video_url(document, :format => :mp4) %>" type="document/mp4"&gt;&lt;source src="<%= video_url(document, :format => :flv) %>" type="video/x-flv"&gt;&lt;p&gt;Your browser does not support HTML5 video.&lt;/p&gt;&lt;/video&gt;
  -        </textarea>
  +  <%if document.class==Video%>
  +    <div class="tab-pane <%= document_details_tab_class document, :embed %>" id="document-embed">
  +      <p><%=t("document.embed_explanation")%></p>      
  +      <div class="contentembed">
  +          <textarea class="shortUrl" readonly="true" rows="5" id="textarea_for_iframe" type="text">
  +            &lt;video id="" class="" preload="metadata" style="position: relative; width:100%; height:100%; top:0%; left:0%;" controls="controls" poster="<%=video_url(document, :format => :png, :style => '170x127#')%>"&gt;&lt;source src="<%= video_url(document, :format => :webm) %>" type="video/webm"&gt;&lt;source src="<%= video_url(document, :format => :mp4) %>" type="document/mp4"&gt;&lt;source src="<%= video_url(document, :format => :flv) %>" type="video/x-flv"&gt;&lt;p&gt;Your browser does not support HTML5 video.&lt;/p&gt;&lt;/video&gt;
  +          </textarea>
   
  -        <button class="btn " id="btn_copy_embed" href="#" data-toggle="tooltip" data-placement="right" title="<%=t('copy_to_clip')%>">
  +          <button class="btn " id="btn_copy_embed" href="#" data-toggle="tooltip" data-placement="right" title="<%=t('copy_to_clip')%>">
   
  -          <i class="icon-copy large"></i>
  -        </button>
  -      </div>
  -  </div>
  +            <i class="icon-copy large"></i>
  +          </button>
  +        </div>
  +    </div>
  +  <%end%>
   
       <!-- tab5 / scorm -->
     <div class="tab-pane" id="tab5">
  
positive.code: <%=javascript_include_tag "jquery.zclip.min" %>
  
  <script type="text/javascript">
    $(document).ready(function(){
      var embedEvents = false;
      
      $('a[data-toggle="tab"]').on('shown', function (e) {
            if(!embedEvents){
              embedEvents = true;
  
              $('button#btn_copy_embed').zclip({
                path:'/assets/ZeroClipboard.swf',
                copy:function(){
                  return $('#textarea_for_iframe').val();
                },
                afterCopy: function(){}
              });
  
              $("#textarea_for_iframe").mouseup(function(e){
                // fixes safari/chrome problem
                e.preventDefault();
              }).focus(function(e){
                mytxt = $(this).text();
                $(this).select();
              }).click(function(e){
                mytxt = $(this).text();
                $(this).select();
              });
  
            }
      });
    });
  
    </script>
  
  
  
  
negative.code:       <%= link_to (raw("<i class='icon-edit'></i> <span class='hidden-tablet hidden-phone'>")) + t('document.actions.edit')+ raw("</span>"), '#document-edit', 'data-toggle' => 'tab' %>
      </li>
      <% end %>
      <%if document.class==Video%>
        <li class="<%= document_details_tab_class document, :embed %>">
            <%= link_to (raw("<i class='icon-code'></i> <span class='hidden-tablet hidden-phone'>")) + t('excursion.actions.embed')+ raw("</span>"), '#document-embed', 'data-toggle' => 'tab' %>
        </li>
      <%end%>
      <li class="<%= document_details_tab_class document, :download %>">
          <%= link_to (raw("<i class='icon-download'></i> <span class='hidden-tablet hidden-phone'>")) + t('document.actions.download')+ raw("</span>"), '#document-download', 'data-toggle' => 'tab' %>
      </li>
  