1( function( $ ) { 2 3 function removeNoJsClass() { 4 $( 'html:first' ).removeClass( 'no-js' ); 5 } 6 7 /* Superfish the menu drops ---------------------*/ 8 function superfishSetup() { 9 $('.menu').superfish({ 10 delay: 200, 11 animation: {opacity:'show', height:'show'}, 12 speed: 'fast', 13 cssArrows: true, 14 autoArrows: true, 15 dropShadows: false 16 }); 17 } 18 19 /* Parallax ---------------------*/ 20 function parallaxSetup() { 21 var $window = $(window); 22 $('#custom-header[data-type="background"]').each(function(){ 23 var $bgobj = $(this); // assigning the object 24 $(window).scroll(function() { 25 var yPos = -($window.scrollTop() / $bgobj.data('speed')); 26 // Put together our final background position 27 var coords = '50% '+ yPos + 'px'; 28 // Move the background 29 $bgobj.css({ backgroundPosition: coords }); 30 }); 31 }); 32 } 33 34 function modifyPosts() { 35 36 /* Insert Line Break Before More Links ---------------------*/ 37 $('<br />').insertBefore('.postarea .more-link'); 38 39 /* Hide Comments When No Comments Activated ---------------------*/ 40 $('.nocomments').parent().css('display', 'none'); 41 42 /* Animate Page Scroll ---------------------*/ 43 $(".scroll").click(function(event){ 44 event.preventDefault(); 45 $('html,body').animate({scrollTop:$(this.hash).offset().top}, 500); 46 }); 47 48 /* Fit Vids ---------------------*/ 49 $('.postarea').fitVids(); 50 51 } 52 53 $( document ) 54 .ready( removeNoJsClass ) 55 .ready( superfishSetup ) 56 .ready( parallaxSetup ) 57 .ready( modifyPosts ) 58 .on( 'post-load', modifyPosts ); 59 60})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.