1// console.log('%c Proudly Crafted with ZiOn.', 'background: #222; color: #bada55');. 2 3/* ---------------------------------------------- /* 4 * Preloader 5 /* ---------------------------------------------- */ 6(function(){ 7 jQuery( window ).on( 8 'load', 9 function() { 10 jQuery( '.loader' ).fadeOut(); 11 jQuery( '.page-loader' ).delay( 350 ).fadeOut( 'slow' ); 12 13 jQuery( ".theme-main-slider" ).focusin( 14 function(){ 15 jQuery( '.navbar-collapse' ).removeClass( 'show' ); 16 } 17 ); 18 jQuery( ".theme-page-header-area" ).focusin( 19 function(){ 20 jQuery( '.navbar-collapse' ).removeClass( 'show' ); 21 } 22 ); 23 24 // Slider JS. 25 jQuery( "#slider-demo" ).owlCarousel( 26 { 27 navigation : true, // Show next and prev buttons. 28 slideSpeed : 300, 29 /* autoplay : 7000, */ 30 smartSpeed: 1000, 31 autoplayTimeout: 2500, 32 autoplayHoverPause:true, 33 singleItem:true, 34 mouseDrag: true, 35 loop:true, // loop is true up to 1199px screen. 36 nav:true, // is true across all sizes. 37 margin:0, // margin 10px till 960 breakpoint. 38 autoHeight: true, 39 responsiveClass:true, // Optional helper class. Add 'owl-reponsive-' + 'breakpoint' class to main element. 40 items: 1, 41 dots: false, 42 navText: ["<i class='fa fa-long-arrow-left'></i>","<i class='fa fa-long-arrow-right'></i>"] 43 } 44 ); 45 46 } 47 ); 48 49 jQuery( document ).ready( 50 function() { 51 52 /* ---------------------------------------------- /* 53 * WOW Animation When You Scroll 54 /* ---------------------------------------------- */ 55 56 /* wow = new WOW({ 57 mobile: false 58 }); 59 wow.init(); */ 60 61 /* ---------------------------------------------- /* 62 * Scroll top 63 /* ---------------------------------------------- */ 64 65 jQuery( window ).scroll( 66 function() { 67 if (jQuery( this ).scrollTop() > 100) { 68 jQuery( '.page-scroll-up' ).fadeIn(); 69 } else { 70 jQuery( '.page-scroll-up' ).fadeOut(); 71 } 72 } 73 ); 74 75 jQuery( '.page-scroll-up' ).click( 76 function () { 77 jQuery( "html, body" ).animate( 78 { 79 scrollTop: 0 80 }, 81 700 82 ); 83 return false; 84 } 85 ); 86 87 jQuery( 'a[href="#totop"]' ).click( 88 function() { 89 jQuery( 'html, body' ).animate( { scrollTop: 0 }, 'slow' ); 90 return false; 91 } 92 ); 93 94 /* ---------------------------------------------- /* 95 * Initialization General Scripts for all pages 96 /* ---------------------------------------------- */ 97 98 var homeSection = jQuery( '.home-section' ), 99 navbar = jQuery( '.navbar-custom' ), 100 navHeight = navbar.height(), 101 worksgrid = jQuery( '#works-grid' ), 102 width = Math.max( jQuery( window ).width(), window.innerWidth ), 103 mobileTest = false; 104 105 if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( navigator.userAgent )) { 106 mobileTest = true; 107 } 108 109 buildHomeSection( homeSection ); 110 navbarAnimation( navbar, homeSection, navHeight ); 111 navbarSubmenu( width ); 112 hoverDropdown( width, mobileTest ); 113 114 jQuery( window ).resize( 115 function() { 116 var width = Math.max( jQuery( window ).width(), window.innerWidth ); 117 buildHomeSection( homeSection ); 118 hoverDropdown( width, mobileTest ); 119 } 120 ); 121 122 /* ---------------------------------------------- /* 123 * Home section height 124 /* ---------------------------------------------- */ 125 126 function buildHomeSection(homeSection) { 127 if (homeSection.length > 0) { 128 if (homeSection.hasClass( 'home-full-height' )) { 129 homeSection.height( jQuery( window ).height() ); 130 } else { 131 homeSection.height( jQuery( window ).height() * 0.85 ); 132 } 133 } 134 } 135 136 /* ---------------------------------------------- /* 137 * Transparent navbar animation 138 /* ---------------------------------------------- */ 139 140 function navbarAnimation(navbar, homeSection, navHeight) { 141 var topScroll = jQuery( window ).scrollTop(); 142 if (navbar.length > 0 && homeSection.length > 0) { 143 if (topScroll >= navHeight) { 144 navbar.removeClass( 'navbar-transparent' ); 145 } else { 146 navbar.addClass( 'navbar-transparent' ); 147 } 148 } 149 } 150 151 /* ---------------------------------------------- /* 152 * Navbar submenu 153 /* ---------------------------------------------- */ 154 155 function navbarSubmenu(width) { 156 if (width > 991) { 157 jQuery( '.navbar-custom .navbar-nav > li.dropdown' ).hover( 158 function() { 159 var MenuLeftOffset = jQuery( '.dropdown-menu', jQuery( this ) ).offset().left; 160 var Menu1LevelWidth = jQuery( '.dropdown-menu', jQuery( this ) ).width();
161 if (width - MenuLeftOffset < Menu1LevelWidth * 2) { 162 jQuery( this ).children( '.dropdown-menu' ).addClass( 'leftauto' ); 163 } else { 164 jQuery( this ).children( '.dropdown-menu' ).removeClass( 'leftauto' ); 165 } 166 if (jQuery( '.dropdown', jQuery( this ) ).length > 0) { 167 var Menu2LevelWidth = jQuery( '.dropdown-menu', jQuery( this ) ).width(); 168 if (width - MenuLeftOffset - Menu1LevelWidth < Menu2LevelWidth) { 169 jQuery( this ).children( '.dropdown-menu' ).addClass( 'left-side' ); 170 } else { 171 jQuery( this ).children( '.dropdown-menu' ).removeClass( 'left-side' ); 172 } 173 } 174 } 175 ); 176 } 177 } 178 179 /* ---------------------------------------------- /* 180 * Navbar hover dropdown on desctop 181 /* ---------------------------------------------- */ 182 183 function hoverDropdown(width, mobileTest) { 184 if ((width > 991) && (mobileTest !== true)) { 185 jQuery( '.navbar-custom .navbar-nav > li.dropdown, .navbar-custom li.dropdown > ul > li.dropdown' ).removeClass( 'open' ); 186 var delay = 0; 187 var setTimeoutConst; 188 jQuery( '.navbar-custom .navbar-nav > li.dropdown, .navbar-custom li.dropdown > ul > li.dropdown' ).hover( 189 function() { 190 var jQuerythis = jQuery( this ); 191 setTimeoutConst = setTimeout( 192 function() { 193 jQuerythis.addClass( 'open' ); 194 jQuerythis.find( '.dropdown-toggle' ).addClass( 'disabled' ); 195 }, 196 delay 197 ); 198 }, 199 function() { 200 clearTimeout( setTimeoutConst ); 201 jQuery( this ).removeClass( 'open' ); 202 jQuery( this ).find( '.dropdown-toggle' ).removeClass( 'disabled' ); 203 } 204 ); 205 } else { 206 jQuery( '.navbar-custom .navbar-nav > li.dropdown, .navbar-custom li.dropdown > ul > li.dropdown' ).unbind( 'mouseenter mouseleave' ); 207 jQuery( '.navbar-custom [data-toggle=dropdown]' ).not( '.binded' ).addClass( 'binded' ).on( 208 'click', 209 function(event) { 210 event.preventDefault(); 211 event.stopPropagation(); 212 jQuery( this ).parent().siblings().removeClass( 'open' ); 213 jQuery( this ).parent().siblings().find( '[data-toggle=dropdown]' ).parent().removeClass( 'open' ); 214 jQuery( this ).parent().toggleClass( 'open' ); 215 } 216 ); 217 } 218 } 219 220 /* ---------------------------------------------- /* 221 * Navbar collapse on click 222 /* ---------------------------------------------- */ 223 224 jQuery( document ).on( 225 'click', 226 '.navbar-collapse.in', 227 function(e) { 228 if ( jQuery( e.target ).is( 'a' ) && jQuery( e.target ).attr( 'class' ) != 'dropdown-toggle' ) { 229 jQuery( this ).collapse( 'hide' ); 230 } 231 } 232 ); 233 234 } 235 ); 236})( 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.