$(document).ready(function () {
  
  $(".diagram .right-diag > li:first-child > div").addClass("color-top");
  $(".diagram .left-diag > li:first-child > div").addClass("color-top");
  $(".diagram .right-diag > li:first-child").addClass("first-node");
  $(".diagram li > ul > li:last-child").addClass("last-subnode");

  $(".news-detail.social div > ul > li > span:first-child").addClass("first-span");
  $(".news-detail.social div > ul > li > ul").addClass("sub-level");
  $(".news-detail.social div > ul > li > ul > li:last-child").addClass("go-zero");
  //$(".news-detail.social div > ul > li > ul > li").css("border-bottom", "none");
  //$(".news-detail.social li:even").addClass("colored");
  //$(".news-detail.social ul > li:last-child").css({"border-bottom":"1px dotted #CCC"});
  $(".news-detail.company li:first-child h3").css("margin-top", "0px");
  
  alturas = function(){
    var alturaTxt = $('.news-list').outerHeight();
    if (alturaTxt>790){
      var alturaLista = Number(alturaTxt-261);
      if ($('.list-business').outerHeight()<alturaLista) $('.list-business').css('height',alturaLista);
    }
  }
  if ($('.list-business').length > 0) alturas();
  
  $(".news-list .list li:odd").addClass("news-list-grey");
  $(".breadcrumbs-paths li:last-child strong").css("visibility","hidden");
  $(".business  ul li:last-child a").css("border-right","0px");
  $(".websites li:last-child a").css("border-bottom",0);
  $(".pre-footer ol li:first-child").css({'border-left':'30px', 'margin-left':'1px'});
  
  $(".list-business li:odd").addClass("lighter");
  $(".list-business li:even").addClass("darker");
  $(".list-business li span:first-child").addClass("shorter");
  $(".list-business li:first-child span").css("color", "white");

  $(".list.loop10 .work li:odd").addClass("bg");

  $(".websites").click(function(){
    $(".websites div").toggleClass("on");
    $(".websites div").mouseleave(function(){
      $(this).removeClass("on");
    });
  })  
  
  $(".drop-country span").click(function(){
    $(".drop-country ul").toggleClass("on");
    $(".drop-country ul").mouseleave(function(){
      $(this).removeClass("on");
    });
  })  
  
  /*$(".drop-country span").click(function(){
    $(".drop-country ul").toggleClass("on");
    $(".drop-country ul").mouseleave(function(){
      $(this).removeClass("on");
    });
  })  */
  
  $("a.newsletter").click(function(){
    $(".newsletter-expand").toggleClass("on");
    $(".newsletter-expand").mouseleave(function(){
      $(this).removeClass("on");
    });
  })  
  
  $("#the-group").click(function(){
    $(".submenu").toggleClass("on");
    $(".submenu").mouseleave(function(){
      $(this).removeClass("on");
    });
  })  
  
  /*$('.scroll-pane').jScrollPane({
      verticalDragMinHeight: 50,
      verticalDragMaxHeight: 50
  });*/

  $(".bottom-form .file-upload").filestyle({ 
    imageheight : 26,
    imagewidth : 26
  });
  

  
  $(".jspPane").css("width", "546px");

});



