1(function($) { 2 "use strict"; 3 4 $(document).ready(function() { 5 6 var navbarHeight = $('.navbar').outerHeight(); 7 8 $('.post-thumb, p, .portfolio-thumb-large').fitVids( {customSelector: "iframe[src^='http://v.wordpress.com'], iframe[src^='http://www.youtube.com']"} ); 9 10 // Top Menu Animation 11 12 $(window).scroll(function(){ 13 if ($(this).scrollTop() > 10) { 14 $('body.page-template-page-home-php.hide-nav .navbar').css('top', '0'); 15 } else { 16 $('body.page-template-page-home-php.hide-nav .navbar').css('top', '-' + navbarHeight + 'px'); 17 } 18 }); 19 20 21 // ==================================================================== 22 23 // Home Slide Height 24 25 $('#home').css({'height': (($(window).height()-0))+'px'}); 26 $(window).resize(function(){ 27 $('#home').css({'height': (($(window).height()-0))+'px'}); 28 }); 29 30 31 // ==================================================================== 32 33 // Superslides 34 35 $('.fs-slider').each(function(){ 36 37 var play = parseInt( $(this).attr('data-pause') ); 38 var animation = $(this).attr('data-effect'); 39 var animation_speed = parseInt( $(this).attr('data-animation') ); 40 var inherit_width_from = $(this).attr('data-width'); 41 var inherit_height_from = $(this).attr('data-height'); 42 if( $(this).attr('data-pagination') == 'on' ) { 43 var pagination = 1; 44 } else { 45 var pagination = 0; 46 } 47 48 $(this).superslides({ 49 play: 5000, 50 animation_speed: 2000, 51 animation: 'fade', 52 //pagination: pagination, 53 //inherit_width_from: inherit_width_from, 54 //inherit_height_from: inherit_height_from 55 }); 56 57 }); 58 59 60 // ==================================================================== 61 62 // Owl Carousel 63 64 $(".staff-carousel").each(function(){ 65 var columns = $(this).attr('data-columns'); 66 $(this).owlCarousel({ 67 items: columns,
68 slideSpeed: 800 69 }); 70 }); 71 72 $(".testimonials-carousel").owlCarousel({ 73 singleItem: true, 74 navigation: false, 75 pagination: false, 76 slideSpeed: 800, 77 autoHeight: true, 78 autoPlay: 5000 79 }); 80 81 $(".blog-carousel").each(function(){ 82 var columns = $(this).attr('data-visible'); 83 $(this).owlCarousel({ 84 items: columns, 85 itemsDesktop: columns, 86 itemsDesktopSmall: columns, 87 itemsTablet: 1, 88 navigation: false, 89 pagination: true, 90 slideSpeed: 800, 91 autoHeight: true 92 }); 93 }); 94 95 96 // ==================================================================== 97 98 // Fancybox 99 100 $('.gallery').each(function(){ 101 var uid = Math.floor(Math.random() * 100); 102 $('a', this).attr('rel', 'gallery-' + uid); 103 }); 104 105 $('.gallery a').fancybox({ 106 openEffect: 'none' 107 }); 108 109 // ==================================================================== 110 111 // Scrolly 112 113 $('.parallax').scrolly(); 114 115 // ==================================================================== 116 117 // Models Filter 118 119 $('.models').mixitup(); 120 121 // ==================================================================== 122 123 // Portfolio Filter 124 125 if( $().mixitup ) { 126 $('.portfolio').mixitup(); 127 } 128 129 // =================================================================== 130 131 // Sidebar Menu 132 133 $('.widget_recent_entries li a, .widget_categories li a, .widget_archive li a, .widget_pages li a, .widget_meta li a, .recentcomments').append("<i class='fa fa-angle-right'></i>"); 134 135 $('.widget_categories li, .widget_archive li').each(function(){ 136 var clone = $('a', this).clone(); 137 $(this).empty().append(clone); 138 }); 139 140 141 $('.comment-reply-link, .post-password-form input[type="submit"]').addClass('btn btn-default'); 142 $('input.wpcf7-submit, #commentform input[type="submit"]').addClass('btn btn-primary btn-lg'); 143 $('.vc_btn.vc_btn_white').addClass('btn btn-default'); 144 145 $('.staff-columns-2 .item').addClass('col-sm-6'); 146 $('.staff-columns-3 .item').addClass('col-sm-4'); 147 $('.staff-columns-4 .item').addClass('col-sm-3'); 148 149 $('.post-password-form input[type="password"], .widget_categories select, .widget_archive select').addClass('form-control'); 150 151 152 // =================================================================== 153 154 // Fullscreen Sections 155 156 function fullscreen() { 157 158 var w_height = $(window).height(); 159 160 $('section.fullscreen').each(function(){ 161 $(this).css('min-height', w_height + 'px'); 162 }); 163 } 164 165 fullscreen(); 166 167 $(window).resize(function(){ 168 fullscreen(); 169 }); 170 171 172 // ==================================================================== 173 174 // Menu Item Activation 175 176 $('.navbar-collapse a').each(function(){ 177 178 var location = window.location.toString(); 179 var url = $(this).attr('href'); 180 var hash = url.substring( url.indexOf('#') ); 181 var clean_url = url.replace(hash, ''); 182 183 if( location === hash ) hash = '#top'; 184 185 if( location = clean_url ) $(this).attr('data-target', hash); 186 187 }); 188 189 $('body').scrollspy({ 190 target: '.navbar-collapse', 191 offset: 70 192 }) 193 194 $('[data-spy="scroll"]').each(function () { 195 var $spy = $(this).scrollspy('refresh'); 196 }); 197 198 199 // ==================================================================== 200 201 // Smooth Scroll on Menu Click 202 203 $('.navbar-nav a[href*=#], .welcome a').not('.navbar-nav a[href="#"]').on("click",function(){ 204 var t= $(this.hash); 205 var t=t.length&&t||$('[name='+this.hash.slice(1)+']'); 206 if(t.length){ 207 var tOffset=t.offset().top - navbarHeight; 208 $('html,body').animate({scrollTop:tOffset},'slow'); 209 return false; 210 } 211 }); 212 213 $(window).one("load", function(event) { 214 $( window.location.hash ).scroll(); 215 }); 216 217 218 }); 219 220})(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.