-@ancestor_1 = @menu_item.ancestors.reverse[1] if @menu_item
-@ancestor_1 = @original_menu_item if @original_menu_item

-if @menu_item.ancestors.reverse[0] 
  -menu_title = @menu_item.ancestors.reverse[0] 
-else
  -menu_title = @menu_item


-content_for :corps do   
  -if @menu_item.title_image
    -img_url = @menu_item.image_file.file.large.url if @menu_item.image_file
    -if img_url
      .menu_item_top.principal{:style => "background-image:url('#{img_url}');"}
        %h1=@menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id).title
      -@facebook_img =  @menu_item.image_file.file.large.medium.url
  
  .menu_content_inner{:class => @menu_item_lang.slug}
    .menu_item_content
      
      -if @menu_item.menu_content.blocks.find_by_lang_site_id(@lang.id).portlets.size == 0
        .menu_item_children_small
        
          -@menu_item.children.order(:position).each do |menu_item|
            -ml = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
            -if ml.enabled and ml.visible
              -if menu_item.image_file
                -ml_image = menu_item.image_file.file.large.medium.small.url
              -else
                -ml_image =""
              -css_style = "background-image:url('#{ml_image}');background-size:100%;background-size:cover;background-position:center center;"
            
              =link_to menu_item_url(menu_item) , :style => css_style, :data => {:ratio => "0.62"}, :class => "menu_itemlink_content".to_s do

  
    
                .overlay

           
                %h4.title
                  =menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id).title
                

      =render :partial => "public/blocks/block", :locals => {:block => @menu_item.menu_content.blocks.find_by_lang_site_id(@lang.id)}
    
    
      
 
        
  -if current_admin
    .admin_panel
      =link_to i(:pencil), edit_admin_menu_item_path(:id => @menu_item.menu_content.menu_item.id, :lang => @lang.slug), :class => "btn btn-primary"
    
  
  
      
    

=yield :corps

-if params[:url] == "contact"
  .center
    .row
      .columns.span_4
        %p
          %strong Siège social
        %p
  
          Zone Actipôle, 4/6 boulevard Beaubourg
          %br
          77183 CROISSY BEAUBOURG
        %p
          Tél. 0(33) 1 60 17 91 76
          %br
          Fax. 0(33) 1 64 11 22 03
        %p
          email : 
          =link_to "signa@bouvier-signa.com", "mailto:signa@bouvier-signa.com"
      
      .columns.span_8
        .contact_form
          #form=render :partial => "public/contacts/form"
  
          

-if @sidebar
  :coffeescript
    resize_menu_content_inner = ->
      $('.menu_content_inner').css
        "width" : ($("#main").outerWidth() - $(".side_menu").outerWidth())+"px"
        "float" : "left"
    resize_menu_content_inner()
    $(window).bind "resize", ->
      resize_menu_content_inner()
