1( function( $ ) { 2"use strict"; 3 /*------------------------------------------------------------------ 4 [Table of contents] 5 6 1. Auto Height Function 7 2. Validateemail Function 8 3. Animate Init 9 4. Preloader 10 5. Parallax Init 11 6. Apps Craft Top Menu Offset 12 7. Apps Craft Footer Menu Offset 13 8. Apps Craft Sync Slider 14 9. Apps Craft Video pop UP 15 10. Apps Craft Video Background 16 11. Apps Craft Welcome Slider 17 12. Apps Craft Accordion 18 13. Contact Form 19 14. Newsletter Subscription 20 15. Skrollr Init 21 16. Sticky Menu 22 17. 3D Slider 23 18. Apps Craft - MENU TOGGLE INIT 24 19. Apps Craft - Parallax on mouseover 25 26 27 -------------------------------------------------------------------*/ 28 29 /*=============================================== 30 1. Auto Height Function 31 ================================================*/ 32 function autoHeight( ) { 33 var why_choose_img = $( '.apps-craft-why-chose-img' ), 34 why_choose_txt = $( '.apps-craft-why-choose-us-container' ), 35 apps_craft_welcome_screen_short = $( '.apps-craft-v7 .apps-craft-welcome-section-screen-short' ), 36 apps_craft_welcome_screen_short_wraper = $( '.apps-craft-v7 .apps-craft-welcome-screenshort' ), 37 w_height = $( window ).height( ); 38 if ( w_height > 700 ) { 39 apps_craft_welcome_screen_short.css( 'height', '600px' ); 40 apps_craft_welcome_screen_short_wraper.css( 'height', '100vh' ); 41 } else { 42 apps_craft_welcome_screen_short.css( 'height', '650px' ); 43 apps_craft_welcome_screen_short_wraper.css( 'height', 'auto' ); 44 } 45 46 why_choose_txt.css( 'height', why_choose_img.outerHeight( ) ); 47 } 48 49 // browser detect function 50 function msieversion( ) { 51 var ua = window.navigator.userAgent; 52 var msie = ua.indexOf( "MSIE" ); 53 if ( msie > 0 ) // If Internet Explorer, return version number 54 { 55 alert( parseInt( ua.substring( msie + 5, ua.indexOf( ".", msie ) ) ) ); 56 } 57 else if ( !!navigator.userAgent.match( /Trident\/7\./ ) || window.navigator.userAgent.indexOf( "Edge" ) > - 1 ) 58 { 59 $( '.apps-craft-accordion .panel-title a' ).addClass( 'ienternet_explore' ); 60 $( '.apps-craft-footer-section' ).addClass( 'footer-bgcolor' ); 61 } 62 return false; 63 } 64 65 /*=============================================== 66 2. Validateemail Function 67 ================================================*/ 68 function validateEmail( email ) { 69 var re = /^[a-z][a-zA-Z0-9_.]*(\.[a-zA-Z][a-zA-Z0-9_.]*)?@[a-z][a-zA-Z-0-9]*\.[a-z]+(\.[a-z]+)?$/; 70 return re.test( email ); 71 } 72 73 autoHeight( ); 74 /*=============================================== 75 3. Animate Init 76 ================================================*/ 77 new WOW( ).init( ); 78 $( window ).on( 'load', function( ) { 79 msieversion( ); 80 autoHeight( ); 81 /*=============================================== 82 4. Preloader 83 ================================================*/ 84 $( '#preloader' ).fadeOut( 450 ); 85 } ); // end on.load event 86 87 88 89 90 91 $( document ).ready( function( ){ 92 msieversion( ); 93 autoHeight( ); 94 /*=============================================== 95 5. Parallax Init 96 ================================================*/ 97 if ( $( '#apps_craft_animation' ).length > 0 ) { 98 $( '#apps_craft_animation' ).parallax( ); 99 } 100 101 // #apps_craft_animation-2 For Index Version 5 102 if ( $( '#apps_craft_animation-2' ).length > 0 ) { 103 $( '#apps_craft_animation-2' ).parallax( ); 104 } 105 106 /*=============================================== 107 6. Apps Craft Top Menu Offset 108 ================================================*/ 109 if ( $( '.apps-craft-main-menu-area' ).length > 0 ) { 110 jQuery( '.apps-craft-main-menu-area' ).find( 'a[href*="#"]:not([href="#"])' ).click( function ( ) { 111 if ( location.pathname.replace( /^\//, '' ) == this.pathname.replace( /^\//, '' ) && location.hostname == this.hostname ) { 112 var target = $( this.hash ); 113 target = target.length ? target : $( '[name=' + this.hash.slice( 1 ) + ']' ); 114 if ( target.length ) { 115 $( 'html,body' ).animate( { 116 scrollTop: ( target.offset( ).top - 0 ) 117 }, 500, "easeInOutCirc" ); 118 if ( $( '.navbar-toggle' ).css( 'display' ) != 'none' ) { 119 $( this ).parents( '.container' ).find( ".navbar-toggle" ).trigger( "click" ); 120 } 121 return false;
122 } 123 } 124 } ); 125 } // End is_exists 126 127 128 /*=============================================== 129 8. Apps Craft Sync Slider 130 ================================================*/ 131 132 if ( $( '#apps-craft-commentor-slider' ).length > 0 ) { 133 134 var sync1 = $( "#apps-craft-commentor-slider" ); 135 var sync2 = $( "#apps-craft-testimonial-thumb" ); 136 sync1.owlCarousel( { 137 singleItem : true, 138 // slideSpeed : 1000, 139 pagination:false, 140 navigation: false, 141 addClassActive : true, 142 afterAction : syncPosition, 143 responsiveRefreshRate : 200, 144 transitionStyle : "fade", 145 } ); 146 $( ".next" ).on( 'click', function( ){ 147 sync1.trigger( 'owl.next' ); 148 } ); 149 $( ".prev" ).on( 'click', function( ){ 150 sync1.trigger( 'owl.prev' ); 151 } ); 152 sync2.owlCarousel( { 153 items : 3, 154 itemsDesktop : [1199, 3], 155 itemsDesktopSmall : [979, 3], 156 itemsTablet : [768, 3], 157 itemsMobile : [479, 1], 158 pagination:false, 159 navigation: false, 160 responsiveRefreshRate : 100, 161 afterInit : function( el ){ 162 el.find( ".owl-item" ).eq( 0 ).addClass( "synced" ); 163 } 164 } ); 165 function syncPosition( el ){ 166 var current = this.currentItem; 167 $( "#apps-craft-testimonial-thumb" ) 168 .find( ".owl-item" ) 169 .removeClass( "synced" ) 170 .eq( current ) 171 .addClass( "synced" ) 172 if ( $( "#apps-craft-testimonial-thumb" ).data( "owlCarousel" ) !== undefined ){ 173 center( current ) 174 } 175 } 176 177 $( "#apps-craft-testimonial-thumb" ).on( "click", ".owl-item", function( e ){ 178 e.preventDefault( ); 179 var number = $( this ).data( "owlItem" ); 180 sync1.trigger( "owl.goTo", number ); 181 } ); 182 function center( number ){ 183 var sync2visible = sync2.data( "owlCarousel" ).owl.visibleItems; 184 var num = number; 185 var found = false; 186 for ( var i in sync2visible ){ 187 if ( num === sync2visible[i] ){ 188 var found = true; 189 } 190 } 191 192 if ( found === false ){ 193 if ( num > sync2visible[sync2visible.length - 1] ){ 194 sync2.trigger( "owl.goTo", num - sync2visible.length + 2 ) 195 } else{ 196 if ( num - 1 === - 1 ){ 197 num = 0; 198 } 199 sync2.trigger( "owl.goTo", num ); 200 } 201 } else if ( num === sync2visible[sync2visible.length - 1] ){ 202 sync2.trigger( "owl.goTo", sync2visible[1] ) 203 } else if ( num === sync2visible[0] ){ 204 sync2.trigger( "owl.goTo", num - 1 ) 205 } 206 207 } 208 } // Apps Craft Sync Slider 209 210 /*=============================================== 211 9. Apps Craft Video pop UP 212 ================================================*/ 213 if ( $( '.apps-craft-popup-video' ).length > 0 ) { 214 $( '.apps-craft-popup-video' ).magnificPopup( { 215 disableOn: 700, 216 type: 'iframe', 217 mainClass: 'mfp-fade', 218 removalDelay: 160, 219 preloader: true, 220 fixedContentPos: false 221 } ); 222 } // Apps Craft Video Pop UP 223 224 225 226 /*=============================================== 227 11. Apps Craft Welcome Slider 228 ================================================*/ 229 if ( $( '#apps-craft-welcome-slider' ).length > 0 ) { 230 var owl1 = $( "#apps-craft-welcome-slider" ); 231 owl1.owlCarousel( { 232 slideSpeed : 300, 233 paginationSpeed : 400, 234 items : 1, 235 itemsDesktop : [1199, 1], 236 itemsDesktopSmall : [979, 1], 237 itemsTablet : [768, 1], 238 itemsMobile : [479, 1], 239 touchDrag: true, 240 mouseDrag: true, 241 pagination: true, 242 navigation: false, 243 addClassActive: true, 244 } ); 245 } 246 247 248 $( "#showcaseSlider" ).owlCarousel( { 249 250 pagination: true, 251 navigation : false, // Show next and prev buttons 252 slideSpeed : 300, 253 paginationSpeed : 400, 254 singleItem:true 255 256 } ); 257 /*=============================================== 258 12. Apps Craft Accordion 259 ================================================*/ 260 if ( $( '.apps-craft-accordion .panel-title' ).length > 0 ) { 261 $( '.apps-craft-accordion .panel-title' ).click( function( ){ 262 $( '.apps-craft-accordion .panel-title' ).removeClass( 'click' ); 263 $( this ).addClass( 'click' ); 264 } ); 265 } 266 267 /*=============================================== 268 13. Contact Form 269 ================================================*/ 270 271 if ( $( '#apps-craft-form' ).length > 0 ) { 272
273 var apps_craft_contact_btn = $( '#apps-craft-input-send' ), 274 apps_craft_form = $( '#apps-craft-form' ); 275 apps_craft_form.on( 'submit', function( e ){ 276 e.preventDefault( ); 277 $( '.apps_craft_error, .apps-craft-success-message, .apps-craft-loader' ).remove( ); 278 $( '.form-group input' ).removeClass( 'apps_craft_input_error' ); 279 var apps_craft_input_name = $( '#apps-craft-input-name' ), 280 apps_craft_input_email = $( '#apps-craft-input-email' ), 281 apps_craft_input_message = $( '#apps-craft-input-message' ), 282 apps_craft_error = false, 283 self = $( this ); 284 if ( apps_craft_input_email.val( ) === '' ){ 285 apps_craft_input_email.before( '<div class="apps_craft_error">Email Address Should not be emtpy.</div>' ).hide( ).fadeIn( ); 286 apps_craft_input_email.addClass( 'apps_craft_input_error' ); 287 apps_craft_error = true; 288 } else if ( !validateEmail( apps_craft_input_email.val( ).toLowerCase( ) ) ){ 289 apps_craft_input_email.before( '<div class="apps_craft_error">Email Address Should be valid.</div>' ).hide( ).fadeIn( ); 290 apps_craft_input_email.addClass( 'apps_craft_input_error' ); 291 apps_craft_error = true; 292 } else if ( apps_craft_input_message.val( ) === '' ){ 293 apps_craft_input_message.before( '<div class="apps_craft_error">Message Should not be emtpy.</div>' ).hide( ).fadeIn( ); 294 apps_craft_input_message.addClass( 'apps_craft_input_error' ); 295 apps_craft_error = true; 296 } 297 298 if ( apps_craft_error === false ){ 299 apps_craft_contact_btn.before( '<span class="apps-craft-loader apps-craft-loader1"></span>' ).hide( ).fadeIn( ); 300 $.ajax( { 301 type: "POST", 302 url: "php/contact-form.php", 303 data: { 304 'apps_craft_input_name' : apps_craft_input_name.val( ), 305 'apps_craft_input_email' : apps_craft_input_email.val( ), 306 'apps_craft_input_message' : apps_craft_input_message.val( ) 307 }, 308 success: function( result ){ 309 apps_craft_contact_btn.after( '<div class="apps-craft-success-message">' + result + '</div>' ).hide( ).fadeIn( ); 310 $( ".apps-craft-loader" ).fadeOut( "normal", function( ) { 311 $( this ).remove( ); 312 } ); 313 } 314 } ); 315 } 316 } ); 317 } 318 319 /*=============================================== 320 14. Newsletter Subscription 321 ================================================*/ 322 323 if ( $( '.mc-form' ).length ){ 324 $( '.mc-form' ).each( function( index ){ 325 var formthis = $( this ).ajaxChimp( { 326 url: subsLink, 327 callback: callbackFunction 328 } ); 329 function callbackFunction( resp ){ 330 formthis.find( 'label' ).addClass( 'apps-craft-subscribed-label' ); 331 } 332 } ); 333 } 334 335 336 /*=============================================== 337 15. Skrollr Init 338 ================================================*/ 339 var mySkrollr = skrollr.init( { 340 forceHeight: false, 341 easings: { 342 easeOutBack: function ( p, s ) { 343 s = 1.70158; 344 p = p - 1; 345 return ( p * p * ( ( s + 1 ) * p + s ) + 1 ); 346 } 347 }, 348 mobileCheck: function( ) { 349 //hack - forces mobile version to be off 350 return false; 351 } 352 } ); 353 /*-------------------------------------------------------------- 354 20. RIPPLES CANVAS 355 --------------------------------------------------------------*/ 356 if ( $( '.apps-craft-v8' ).length > 0 ) { 357 $( document ).ready( function( ){ 358 $( '.apps-craft-v8' ).ripples( { 359 resolution: 512, 360 dropRadius: 10, //px 361 perturbance: 0.04, 362 interactive: true 363 } ); 364// setInterval( function ( ) { 365// var $el = ripples; 366// var x = Math.random( ) * $el.outerWidth( ); 367// var y = Math.random( ) * $el.outerHeight( ); 368// var dropRadius = 20; 369// var strength = 0.04 + Math.random( ) * 0.04; 370// $el.ripples( 'drop', x, y, dropRadius, strength ); 371// }, 3000 ); 372 } ); 373 } 374 375 376 } ); // End Document Ready 377 378 379 /*=============================================== 380 16. Sticky Menu 381 ================================================*/ 382 383 $( window ).scroll( function( ){ 384 if ( $( window ).scrollTop( ) > 50 ) { 385 $( '.apps-craft-main-menu-area' ).addClass( 'sticky-menu' ); 386 } else { 387 $( '.apps-craft-main-menu-area' ).removeClass( 'sticky-menu' ); 388 } 389 } ); // End Scroll Function 390 391 392 $( window ).on( 'resize', function( ){ 393 autoHeight( ); 394 } ); // End Resize 395 396 397 398 /*-------------------------------------------------------------- 399 18. Apps Craft - MENU TOGGLE INIT 400 --------------------------------------------------------------*/ 401 var apps_main_menu_icon = $( "#apps-craft-main-menu-icon" ), 402 apps_main_menu_nave = $( '#apps-craft-menu' ), 403 apps_main_menu_link = $( "#apps-craft-menu ul li a" ); 404 if ( apps_main_menu_icon.length > 0 ){ 405 apps_main_menu_icon.on( 'click', function( ){ 406 apps_main_menu_nave.slideToggle( 500 ); 407 } ); 408 } 409 410 411 function appscraft_menu_toggle( ){ 412 if ( $( window ).width( ) <= 767 ){ 413 apps_main_menu_link.on( 'click', function( ){ 414 apps_main_menu_nave.slideToggle( 'fast' ); 415 } ); 416 } 417 } 418 419 420 if ( apps_main_menu_link.length > 0 ){ 421 appscraft_menu_toggle( ); 422 } 423 424 $( window ).on( 'resize', appscraft_menu_toggle ); 425 /*-------------------------------------------------------------- 426 19. Apps Craft - Parallax on mouseover 427 --------------------------------------------------------------*/ 428 $( document ).on( "mousemove", function( e ) { 429 $( '.apps-craft-welcome-content.parallax' ).parallax( - 40, e ); 430 $( '.apps-craft-welcome-screenshort.parallax' ).parallax( 40, e ); 431 } ); // end document mouvemove 432 433 434 /*-------------------------------------------------------------- 435 20. Apps Craft - V9 Screenshot 436 --------------------------------------------------------------*/ 437 438// Home 9 promo header carousel
439 if ( $( '.swiper-container.one' ).length > 0 ) { 440 var swiper = new Swiper( '.swiper-container.one', { 441 autoplay: 3000, 442 speed: 3000, 443 effect: 'coverflow', 444 loop: true, 445 centeredSlides: true, 446 slidesPerView: 'auto', 447 coverflow: { 448 rotate: 0, 449 stretch: 100, 450 depth: 300, 451 modifier: 1.5, 452 slideShadows : false, 453 } 454 } ); 455 } 456 457// App screenshot carousel Home 9 458 if ( $( '.swiper-container.two' ).length > 0 ) { 459 var swiper = new Swiper( '.swiper-container.two', { 460 pagination: '.swiper-pagination', 461 paginationClickable: true, 462 effect: 'coverflow', 463 loop: true, 464 centeredSlides: true, 465 slidesPerView: 'auto', 466 coverflow: { 467 rotate: 0, 468 stretch: 100, 469 depth: 150, 470 modifier: 1.5, 471 slideShadows : false, 472 } 473 } ); 474 } 475 } )( 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.