/* Reload Page on Orientation Change */ var supportsOrientationChange = "onorientationchange" in window, orientationEvent = supportsOrientationChange ? "orientationchange" : "resize"; window.addEventListener(orientationEvent, function() { window.location.reload() }, false); /* Display Mobile Menu */ $(document).ready(function(){ if($(window).width() <= 1020){ //only works on screensizes where mobile menu is present (in this case 1020px) $("#lower_bar_2").click(function(){ $("#pages-list").slideToggle(); }); } }); /* Add Class to Lower Bar on Mobile Navigation Click */ if($(window).width() <= 1020){ //only works on screensizes where mobile menu is present (in this case 1020px) $("#lower_bar_2").click(function(){ $(this).toggleClass("open"); }); } /* Display Menu Sub Nav */ $(document).ready(function(){ $("#pages-list > li:nth-child(3)").click(function(){ $("#pages-list > li:nth-child(3) > ul").toggle("fast"); }); }); /* Add Class to List Item on Click */ $("#pages-list > li:nth-child(3)").click(function(){ $(this).toggleClass("active"); }); /* Replace Span with Link in Navigation */ $(document).ready(function() { $('#pages-list > li:nth-child(1) > span').replaceWith('Home'); $('#pages-list > li:nth-child(2) > span').replaceWith('About'); $('#pages-list > li:nth-child(3) > span').replaceWith('Services'); $('#pages-list > li:nth-child(4) > span').replaceWith('Transformations'); $('#pages-list > li:nth-child(6) > span').replaceWith('Contact'); }); /* Add Sign In Link to Navigation */ $('
  • Members / Login
  • ').insertAfter('#pages-list > li:last-child'); /* Add Signup Button to Navigation */ $('
  • Signup
  • ').insertAfter('#pages-list > li:last-child'); /* Add Social Buttons to Navigation $('
  • ').insertAfter('#pages-list > li:last-child'); */ /* Window Scroll Function */ $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll >= 1) { $("#lower_bar").addClass("light-nav"); } else { $("#lower_bar").removeClass("light-nav"); } if (scroll >= 1) { $("#siteHeader").addClass("small-logo"); } else { $("#siteHeader").removeClass("small-logo"); } }); /* Window Height to Equal Viewport Height */ var vHeight = $(window).height(), cover = $('#wizzy93'); cover.css({"height":vHeight}); /* Scroll to Page Anchor */ $(function(){ $('a[href*="#"]:not([href="#"])').click(function() { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top }, 1000); return false; } }); }); /* Scroll to Top Function */ $(document).ready(function(){ $('.scrollup').click(function(){ $("html, body").animate({ scrollTop: 0 }, 600); return false; }); }); /* Add Intro Text to Standard H1 */ $('
    Life is Fitness
    ').insertBefore('#content > h1'); /* Add Placeholder to Newsletter Form */ $('#newsletter-signup .text').each( function(i,el) { if (!el.value || el.value == '') { el.placeholder = 'Enter your email address'; } }); /* Add Current Date */ var months = ['January','February','March','April','May','June','July', 'August','September','October','November','December']; var tomorrow = new Date(); tomorrow.setTime(tomorrow.getTime() + (1000*3600*24)); document.getElementById("spandate").innerHTML = tomorrow.getFullYear(); /* Wrap Container & Col Around WYSIWYG Gallery Post */ $( ".wizzy.wysiwyg-gallery.no-image" ).wrap( "