$(document).ready(function(){

  //$(".col3-even .col:last-child").css({marginRight: 0});
  $("#subNav ul li a:first,#subNav ul li a:last").css({border: "none"});
  $("#usefulLinks ul li:last, #usefulDownloads ul li:last").css({borderBottom: "1px solid #C1C1C1", background : "none"});
  $("#footer ul li:first").css({'paddingLeft' : 0, 'border' : 'none'})
  
  $("#incFsize").click(function(){
    $('body').removeClass('smaller').addClass('larger');
    });
  
  $("#resetFsize").click(function(){
    $('body').removeAttr('class');
    });
  
  $("#decFsize").click(function(){
    $('body').removeClass('larger').addClass('smaller');
    });

  $('.redirector').change(function() {
    window.location = $(this).children('option:selected').val();
  });

  $('.yearRedirector').change(function() {
    window.location = "/projects?prev=true&year=" + $(this).children('option:selected').val();
  });

  $(function() {
    $( ".faq-accordion" ).accordion({ autoHeight: false });
  });
  
  $('#nan-accordion span').click(function(){
    $(this).toggleClass('open').next().toggleClass('hidden');    
  });
  
  
  
 // if ($("#rc-images").length > 0){
 //   var c = $("#rc-images ul li").length;
    
 //   $("#rc-images ul").css({'width' : 240 * c})
 //   }
    
  if ($("#rc-documents").length > 0){
    var c = $("#rc-documents ul li").length;

    $("#rc-documents ul").css({'width' : 285 * c})
    }
    
  if ($("#rc-video").length > 0){
    var c = $("#rc-video ul li").length;

    $("#rc-video ul").css({'width' : 240 * c})
    }

});
