1jQuery(document).ready(function($) { 2 3 $wrapper = $( '.posts' ); 4 if ( $wrapper.length ) { 5 $grid = $wrapper.imagesLoaded( function() { 6 $grid = $wrapper.masonry( { 7 itemSelector: '.post-container', 8 stagger: 0, 9 transitionDuration: 0, 10 } ); 11 } ); 12 13 setTimeout( function() { $grid.masonry(); }, 500 ); 14 setTimeout( function() { $grid.masonry(); }, 1000 ); 15 setTimeout( function() { $grid.masonry(); }, 1500 ); 16 setTimeout( function() { $grid.masonry(); }, 2000 ); 17 setTimeout( function() { $grid.masonry(); }, 2500 ); 18 } 19 20 // Toggle mobile-menu 21 $(".nav-toggle").on("click", function(){ 22 $(this).toggleClass("active"); 23 $(".mobile-navigation").slideToggle(); 24 }); 25 26 27 // Toggle search form 28 $(".search-toggle").on("click", function() { 29 $(this).toggleClass("active"); 30 $(".header-search-block").slideToggle(); 31 if ( $( this ).hasClass( 'active' ) ) { 32 $(".header-search-block .search-field").focus(); 33 } else { 34 $(".header-search-block .search-field").blur(); 35 } 36 return false; 37 } ); 38 39 40 // Hide mobile-menu > 1000 41 $(window).resize(function() { 42 if ($(window).width() > 1000) { 43 $(".nav-toggle").removeClass("active"); 44 $(".mobile-navigation").hide(); 45 } 46 }); 47 48 49 // Display dropdown menus on focus. 50 $( '.main-menu a' ).on( 'blur focus', function( e ) { 51 $( this ).parents( 'li.menu-item-has-children' ).toggleClass( 'focus' ); 52 } ); 53 54 55 // Load Flexslider 56 $(".flexslider").flexslider({ 57 animation: "slide", 58 controlNav: false, 59 prevText: "Previous", 60 nextText: "Next", 61 smoothHeight: true 62 }); 63 64 65 // resize videos after container 66 var vidSelector = ".post iframe, .post object, .post video, .widget-content iframe, .widget-content object, .widget-content iframe"; 67 var resizeVideo = function(sSel) { 68 $( sSel ).each(function() { 69 var $video = $(this), 70 $container = $video.parent(), 71 iTargetWidth = $container.width(); 72 73 if ( !$video.attr("data-origwidth") ) { 74 $video.attr("data-origwidth", $video.attr("width")); 75 $video.attr("data-origheight", $video.attr("height")); 76 } 77 78 var ratio = iTargetWidth / $video.attr("data-origwidth"); 79 80 $video.css("width", iTargetWidth + "px"); 81 $video.css("height", ( $video.attr("data-origheight") * ratio ) + "px"); 82 }); 83 }; 84 85 resizeVideo(vidSelector); 86 87 $(window).resize(function() { 88 resizeVideo(vidSelector); 89 }); 90 91 92 // Smooth scroll to header 93 $('.tothetop').click(function(){ 94 $('html,body').animate({scrollTop: 0}, 500); 95 $(this).unbind("mouseenter mouseleave"); 96 return false; 97 }); 98 99 100});
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.