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 /* Flexslider --------------------- */ 20 function flexSliderSetup() { 21 if( ($).flexslider) { 22 var slider = $('.content-slideshow .flexslider'); 23 slider.fitVids().flexslider({ 24 slideshowSpeed : slider.attr('data-speed'), 25 animationDuration : 600, 26 animation : 'slide', 27 animationLoop : true, 28 video : false, 29 useCSS : false, 30 prevText : '<i class="fa fa-angle-left"></i>', 31 nextText : '<i class="fa fa-angle-right"></i>', 32 touch : true, 33 smoothHeight : false, 34 pauseOnAction : true, 35 pauseOnHover : false, 36 controlNav : false, 37 itemWidth : 300, 38 itemMargin : 24, 39 maxItems : 3, 40 41 start: function(slider) { 42 slider.removeClass('loading'); 43 $( ".preloader" ).hide(); 44 } 45 }); 46 } 47 if( ($).flexslider) { 48 var slider = $('.gallery-slideshow .flexslider'); 49 slider.fitVids().flexslider({ 50 slideshowSpeed : slider.attr('data-speed'), 51 animationDuration : 600, 52 animation : slider.attr('data-transition'), 53 animationLoop : true, 54 video : false, 55 useCSS : false, 56 prevText : '<i class="fa fa-angle-left"></i>', 57 nextText : '<i class="fa fa-angle-right"></i>', 58 touch : true, 59 smoothHeight : true, 60 pauseOnAction : true, 61 pauseOnHover : false, 62 63 start: function(slider) { 64 slider.removeClass('loading'); 65 $( ".preloader" ).hide(); 66 } 67 }); 68 } 69 } 70 71 /* Masonry --------------------- */ 72 function masonrySetup() { 73 var $container = $('.portfolio-wrap'); 74 $container.masonry({ 75 itemSelector : '.single, .half, .third, .fourth' 76 }); 77 } 78 79 /* Determine if user agent is iPhone or iPad --------------------- */ 80 function isIOSDevice(){ 81 return navigator.platform.match( /iPhone|iPad/i ); 82 } 83 84 /* Fix Header BG Image if IOS device --------------------- */ 85 function iosBgFix() { 86 87 if (isIOSDevice()) { 88 var banner = $('.custom-header-image'); 89 if ( banner.length ) { 90 // Remove Fixed position from banner 91 banner.css('background-attachment', 'scroll' ); 92 } 93 } 94 } 95 96 function modifyPosts() { 97 98 /* Fit Vids --------------------- */ 99 $('.feature-vid, .content-holder').fitVids(); 100 101 /* Hide First Video From Content --------------------- */ 102 $('.format-video .content-holder div.fluid-width-video-wrapper:first-child').hide(); 103 104 /* Insert Nav Arrow Before Submenu --------------------- */ 105 $('<span class="nav-arrow"></span>').insertBefore('ul.sub-menu li:first-child, ul.menu ul li:first-child'); 106 107 /* Insert Line Break Before More Links --------------------- */ 108 $('<br />').insertBefore('a.more-link, a.read-more'); 109 110 /* Hide Comments When No Comments Activated --------------------- */ 111 $('.nocomments').parent().css('display', 'none'); 112 113 /* Animate Page Scroll --------------------- */ 114 $(".scroll").click(function (event) { 115 event.preventDefault(); 116 $('html,body').animate({scrollTop:$(this.hash).offset().top}, 500); 117 }); 118 119 } 120 121 $( document ) 122 .ready( removeNoJsClass ) 123 .ready( superfishSetup ) 124 .ready( iosBgFix ) 125 .ready( modifyPosts ) 126 .on( 'post-load', modifyPosts ); 127 128 $( window ) 129 .load( flexSliderSetup ) 130 .load( masonrySetup ) 131 .resize( masonrySetup ); 132})( 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.