1jQuery(document).ready(function($) { 2 3 //Masonry blocks 4 $blocks = $(".posts"); 5 6 $blocks.imagesLoaded(function(){ 7 $blocks.masonry({ 8 itemSelector: '.post-container' 9 }); 10 11 // Fade blocks in after images are ready (prevents jumping and re-rendering) 12 $(".post-container").fadeIn(); 13 }); 14 15 $(document).ready( function() { setTimeout( function() { $blocks.masonry(); }, 500); }); 16 17 $(window).resize(function () { 18 $blocks.masonry(); 19 }); 20 21 22 // Toggle mobile-menu 23 $(".nav-toggle").on("click", function(){ 24 $(this).toggleClass("active"); 25 $(".mobile-navigation").slideToggle(); 26 }); 27 28 29 // Toggle search form 30 $(".search-toggle").on("click", function(){ 31 $(this).toggleClass("active"); 32 $(".header-search-block").slideToggle(); 33 $(".header-search-block #s").focus(); 34 return false; 35 }); 36 37 38 // Show mobile-menu > 1000 39 $(window).resize(function() { 40 if ($(window).width() > 1000) { 41 $(".nav-toggle").removeClass("active"); 42 $(".mobile-navigation").hide(); 43 } 44 }); 45 46 47 // Load Flexslider 48 $(".flexslider").flexslider({ 49 animation: "slide", 50 controlNav: false, 51 prevText: "Previous", 52 nextText: "Next", 53 smoothHeight: true 54 }); 55 56 57 // Add custom audio player 58 $('#audio-player').mediaelementplayer({ 59 alwaysShowControls: true, 60 features: ['playpause','progress','volume'], 61 audioVolume: 'horizontal', 62 audioWidth: 872, 63 audioHeight: 100 64 }); 65 66 67 // resize videos after container 68 var vidSelector = ".post iframe, .post object, .post video, .widget-content iframe, .widget-content object, .widget-content iframe"; 69 var resizeVideo = function(sSel) { 70 $( sSel ).each(function() { 71 var $video = $(this), 72 $container = $video.parent(), 73 iTargetWidth = $container.width(); 74 75 if ( !$video.attr("data-origwidth") ) { 76 $video.attr("data-origwidth", $video.attr("width")); 77 $video.attr("data-origheight", $video.attr("height")); 78 } 79 80 var ratio = iTargetWidth / $video.attr("data-origwidth"); 81 82 $video.css("width", iTargetWidth + "px"); 83 $video.css("height", ( $video.attr("data-origheight") * ratio ) + "px"); 84 }); 85 }; 86 87 resizeVideo(vidSelector); 88 89 $(window).resize(function() { 90 resizeVideo(vidSelector); 91 }); 92 93 94 // Smooth scroll to header 95 $('.tothetop').click(function(){ 96 $('html,body').animate({scrollTop: 0}, 500); 97 $(this).unbind("mouseenter mouseleave"); 98 return false; 99 }); 100 101 102});
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.