/* Catalyst by Pixelarity pixelarity.com | hello@pixelarity.com License: pixelarity.com/license */ (function($) { skel.breakpoints({ wide: '(max-width: 1680px)', normal: '(max-width: 1280px)', narrow: '(max-width: 980px)', mobile: '(max-width: 736px)', mobilep: '(max-width: 480px)' }); $(function() { var $window = $(window), $body = $('body'); // Disable animations/transitions until the page has loaded. $body.addClass('is-loading'); $window.on('load', function() { window.setTimeout(function() { $body.removeClass('is-loading'); }, 500); }); // Fix: Placeholder polyfill. $('form').placeholder(); // Prioritize "important" elements on narrow. skel.on('+narrow -narrow', function() { $.prioritize( '.important\\28 narrow\\29', skel.breakpoint('narrow').active ); }); // Dropdowns. $('#nav > ul').dropotron({ alignment: 'right' }); // Off-Canvas Navigation. // Title Bar. $( '' ) .appendTo($body); // Navigation Panel. $( '' ) .appendTo($body) .panel({ delay: 500, hideOnClick: true, hideOnSwipe: true, resetScroll: true, resetForms: true, side: 'left', target: $body, visibleClass: 'navPanel-visible' }); // Fix: Remove transitions on WP<10 (poor/buggy performance). if (skel.vars.os == 'wp' && skel.vars.osVersion < 10) $('#navButton, #navPanel, #page-wrapper') .css('transition', 'none'); // Banner. var $banner = $('#banner'); if ($banner.length > 0) { // Parallax background. if (skel.vars.browser != 'ie' && !skel.vars.mobile) { var originalPosition = $banner.css('background-position'); skel.on('change', function() { if (skel.breakpoint('normal').active) { $window.off('scroll.px'); $banner.css('background-position', originalPosition); } else { $banner.css('background-position', 'center 0px'); $window.on('scroll.px', function() { $banner.css('background-position', 'center ' + (parseInt($window.scrollTop()) * -0.5) + 'px'); }); } }); } } }); })(jQuery);