
-menu_id = 2
-if @doc
  -if params[:media].to_s != ""
    -slug = "media"
  -elsif params[:press].to_s != ""
    -slug = "presse"
    
  -elsif params[:document] == "magazine-noe"
    -slug = "noe-search"
    
  -else
    -slug = "documentation"
-else
  -slug = "search"
  
-@menu_item_lang = @lang.menu_item_langs.joins(:menu_item).where(:menu_items => {:menu_id => menu_id}).find_by_permalink(slug)

-if @menu_item_lang
  -@menu_item = @menu_item_lang.menu_item
  -if @menu_item and @menu_item.menu_content and @menu_item.menu_content.class.to_s == "Page"
    -@lang_page = @menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id)
    -@description = @lang_page.description
    -@keywords = @lang_page.keywords
    -@twitter_title = @lang_page.twitter_title if @lang_page.twitter_title?

-if @menu_item
  -if @menu_item.title_image
    -if @menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).image_file
      -img_url = @menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).image_file.file.large.url 
      -@facebook_img =  @menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).image_file.file.large.medium.url
    -elsif @menu_item.image_file
      -img_url = @menu_item.image_file.file.large.url 
      -@facebook_img =  @menu_item.image_file.file.large.medium.url
    -if img_url
      .menu_item_top.principal.with_ratio{:style => "background-image:url('#{img_url}');", :data => {:ratio => 0.30}}
    -else
      %div{:style => "height:55px;"}
  


  .menu_content_inner
    .inner
      .menu_item_content
        -if @doc
          .first_title
            %h1=raw @menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id).title
            %hr
                
            .description
              =raw @menu_item.menu_content.lang_pages.find_by_lang_site_id(@lang.id).description