var mq = window.matchMedia( "(min-width: 58.75em)" ); // Vertically Align $(document).ready(function() { (function ($) { $.fn.vAlign = function() { return this.each(function(i){ var ah = $(this).height(); var ph = $(this).parent().height(); var mh = Math.ceil((ph-ah) / 2); $(this).css('margin-top', mh); }); }; })(jQuery); if (mq.matches) { $(window).load(function() { $('.ff-valign').vAlign(); }); $(window).resize(function(){ $('.ff-valign').vAlign(); }); } else { // window width is less than 58.75em } }); // Back to Top $('a[href=#ff-back-top-link]').on('click', function(){ $('html, body').animate({scrollTop:0}, 'slow'); return false; }); // Remove Class $(document).ready(function() { $('#uName').removeClass('ccm-input-text'); $('#uEmail').removeClass('ccm-input-text'); }); // Add Class $(document).ready(function() { $('.ccm-search-block-submit').addClass('button secondary small'); $('.formBlockSubmitButton').addClass('button secondary small'); $('.guestBook-formBlock .button').addClass('button secondary small ff-mar-top-medium'); $('.poll input[type="submit"]').addClass('button secondary small ff-mar-top-small'); }); // Show Back To Top when height > 100% $(document).ready(function() { if ($("body").height() > $(window).height()) { $('#ff-back-top').show(); } }); // Remove Element $(document).ready(function() { $('.guestBook-formBlock br').remove(); }); // Better Contact Form $(document).ready(function() { if ($('.formBlockSurveyTable').length > 0){ $('table.formBlockSurveyTable').replaceWith( $('table').html() .replace(/
/gi, "