/* Elemental by Pixelarity pixelarity.com | hello@pixelarity.com License: pixelarity.com/license */ (function($) { var $window = $(window), $body = $('body'), $header = $('#header'), $main = $('#main'); // Breakpoints. breakpoints({ xlarge: [ '1281px', '1680px' ], large: [ '981px', '1280px' ], medium: [ '737px', '980px' ], small: [ '481px', '736px' ], xsmall: [ '361px', '480px' ], xxsmall: [ null, '360px' ] }); // Play initial animations on page load. $window.on('load', function() { window.setTimeout(function() { $body.removeClass('is-preload'); }, 100); }); // Dropdowns. $('#nav > ul').dropotron({ alignment: 'center', openerActiveClass: 'dropotron-active' }); // Nav Panel. // Button. $( '' ) .appendTo($body); // Panel. $( '' ) .appendTo($body) .panel({ delay: 500, hideOnClick: true, hideOnSwipe: true, resetScroll: true, resetForms: true, side: 'left' //target: $body, //visibleClass: 'navPanel-visible' }); // Spotlights. $('.spotlight') .each(function() { var $this = $(this), $image = $this.find('.image'), $img = $image.find('img'), x; // No image? Skip. if ($image.length == 0) return; // Assign image. $image.css('background-image', 'url(' + $img.attr('src') + ')'); // Set background position. if (x = $img.data('position')) $image.css('background-position', x); // Hide . $img.hide(); }); })(jQuery);