1( function( $ ) { 2 'use strict'; 3 4 /** 5 * Main theme object. 6 */ 7 var EvolveThemes_Crowley = function() { 8 9 var self = this; 10 11 /** 12 * Load fonts. 13 */ 14 this.load_fonts = function() { 15 if ( typeof window.FontsLoadr === 'undefined' ) { 16 return; 17 } 18 19 if ( typeof window.crowley.fonts === 'undefined' ) { 20 return; 21 } 22 23 if ( typeof window.Preloadr !== 'undefined' ) { 24 window.document.documentElement.addEventListener( 'evolvethemes-fonts-active', function() { 25 window.Preloadr.complete( 'fonts' ); 26 } ); 27 28 window.document.documentElement.addEventListener( 'evolvethemes-fonts-inactive', function() { 29 window.Preloadr.complete( 'fonts' ); 30 } ); 31 } 32 33 window.FontsLoadr.init( window.crowley.fonts ); 34 }; 35 36 /** 37 * Correctly size embeds. 38 */ 39 this.size_embeds = function() { 40 $( '.crowley-mc-content' ).fitVids(); 41 }; 42 43 /** 44 * Load images. 45 */ 46 this.load_images = function() { 47 if ( typeof window.ImgLoadr === 'undefined' ) { 48 return; 49 } 50 51 window.ImgLoadr.size(); 52 window.ImgLoadr.load(); 53 }; 54 55 /** 56 * Initialize the preloader. 57 */ 58 this.init_preloader = function() { 59 if ( typeof window.Preloadr === 'undefined' ) { 60 return; 61 } 62 63 if ( typeof window.crowley.preloader === 'undefined' ) { 64 return; 65 } 66 67 window.Preloadr.init( window.crowley.preloader ); 68 }; 69 70 /** 71 * Event binding. 72 */ 73 this.bind = function() { 74 /* Initialize the preloader. */ 75 self.init_preloader(); 76 77 /* Load fonts. */ 78 self.load_fonts(); 79 80 /* Load images. */ 81 self.load_images(); 82 83 /* Size embeds. */ 84 self.size_embeds(); 85 }; 86 87 /** 88 * Initialization. 89 */ 90 this.init = function() { 91 self.bind(); 92 }; 93 94 this.init(); 95 96 }; 97 98 ( window.crowley.controller = new EvolveThemes_Crowley() ); 99 100} )( 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.