$(document).ready(function() { /** * Form Value Checker */ var search = $('#search-form #search'); function searchHasValue(search) { if ( $(search).val() ) { $(search).parent().addClass('has-value'); } else { $(search).parent().removeClass('has-value'); } } searchHasValue(search); $('#search-form #search').focus( function() { searchHasValue(this); }); $('#search-form #search').blur( function() { searchHasValue(this); }); $('#search-form #search').keyup( function(event) { searchHasValue(this); }); /** * Clear Input */ $('#searchclear').click(function() { $(search).val(''); searchHasValue(search); return false; }); /** * Content Modifications */ $('#content h1').addClass('lined').wrapInner(''); $('#content h1').next('h2').addClass('excerpt'); // Remove added classes from listings page $('#content .agent-listing h1').removeClass('lined').find('span a').unwrap(); $('#content .agent-listing h1').next('h2').removeClass('excerpt'); $('#content #featured-post h1').removeClass('lined').find('span a').unwrap(); $('#content #featured-post h1').next('h2').removeClass('excerpt'); $('#content #the-post h1').removeClass('lined').find('span a').unwrap(); $('#content #the-post h1').next('h2').removeClass('excerpt'); $('.archive #content h1').removeClass('lined').find('span a').unwrap(); $('.archive #content h1').next('h2').removeClass('excerpt'); // Add 'btn' class to inputs of type submit $('#content input[type=submit]').addClass('btn'); /** * Main Navigation */ // Append span element after first row of links $('#nav ul:first-child > li').append(''); /** * Sidebar Dropdown Functionality */ $('#aside .children').wrap('