anchor.diff:        $('a[data-toggle="tab"]').on('shown', function (e) {
               if(!embedEvents){
                 embedEvents = true;
  +
  +              console.log("Embed events");
   
                 $('button#btn_copy_embed').zclip({
                   path:'/assets/ZeroClipboard.swf',
  
positive.code: <%if document.class==Video || document.class==Audio || document.class==Picture || document.class==Swf || document.class==Embed || document.class==Officedoc || document.class==Scormfile || document.class==Webapp %>
    <%=javascript_include_tag "jquery.zclip.min" %>
    <script type="text/javascript">
      $(document).ready(function(){
  
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 || document.class==Audio || document.class==Picture || document.class==Swf || document.class==Embed || document.class==Officedoc || document.class == Scormfile || document.class == Webapp ||  document.class == Link %>
        <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%>
      <%if document.class!=Link %>
        <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>
      <% end %>
  
      <li>
        <a href="#tab3" data-toggle="tab">
  