jQuery(document).ready(function($){
// Element modification - addClass
  $(".nav").each(function() { $(this).find("li").filter(":last").addClass("last"); });
  // Apply padding
  $("body.home #recent-work ul li:nth-child(odd), body.home #side-grid .blog:first").addClass("pad");
  // Targets all left team member blocks
  $("#team ul li:nth-child(odd)").addClass("first");
  // Removes top padding
  $('#team li:eq(0), #team li:eq(1)').addClass('top');
  // Removes rightmost border from Our Work grid
  $('body.post-type-our-work-archive #work ul li:nth-child(3n)').addClass('last');
  $('body.tax-clients #work ul li:nth-child(3n)').addClass('last');
  $('body.single-our-work #content ul li:nth-child(3n)').addClass('last');
  // Manipulates leftmost grid blocks on Our Services page
  $('ul.grid li:even').addClass('odd');
  // Targets <cite> within <p>
  $('p:has(cite)').addClass('base');  
  // Removes bottom border
  $('body.single-our-work #sidebar li:last, #careers .second li:last, #top-posts li:last, #recent-comments li:last, #team li:last, #team li.first:last, #what dd:last, ul.grid li:eq(2),ul.grid li:eq(3)').addClass('last-bottom-border');
  // Update Gravity Forms default form error message
  $('#gform_1 .validation_error, #gform_2 .validation_error').html("Please correct the errors below.");
  // Inserts borders between blog archive months
  $('#archives-menu .acitem').each(function() { $(this).find('li:not(:last)').after(' | '); });
});

// jQuery.Syntax Dynamic Loader v1.0
jQuery(document).ready(function($){
    var SyntaxRoot = "/_static/jquery-syntax/";

    if ($('.syntax').length) {
        $.getScript(SyntaxRoot + "jquery.syntax.min.js", function () {
            $.syntax({root: SyntaxRoot});
        });
    }
});

