1(function($){ 2 "use strict"; 3 4 $(window).on('elementor/frontend/init', function () { 5 /* Menu Shrink */ 6 elementorFrontend.hooks.addAction('frontend/element_ready/ova_menu.default', function() { 7 // Opent nav 8 $('.ova_menu_clasic .ova_openNav' ).on( 'click', function() { 9 $(this).closest('.ova_wrap_nav').find('.ova_nav').removeClass('hide'); 10 $(this).closest('.ova_wrap_nav').find( '.ova_nav' ).addClass('show'); 11 $('.ova_menu_clasic .ova_closeCanvas').css('width', '100%'); 12 $('body').css('background-color', 'rgba(0,0,0,0.4)'); 13 }); 14 15 // Close nav 16 $('.ova_menu_clasic .ova_closeNav' ).on( 'click', function() { 17 $(this).closest('.ova_wrap_nav').find('.ova_nav').removeClass('show'); 18 $(this).closest('.ova_wrap_nav').find('.ova_nav').addClass('hide'); 19 $('.ova_closeCanvas').css('width', '0'); 20 $('body').css('background-color', 'transparent'); 21 }); 22 23 // Display in mobile 24 $('.ova_menu_clasic li.menu-item button.dropdown-toggle').off('click').on( 'click', function() { 25 $(this).parent().find('.dropdown-menu').first().toggle('fast'); 26 }); 27 28 // Sticky menu - Desktop 29 if ( $('.ovamenu_shrink').length > 0 && $( 'body' ).data('elementor-device-mode') == 'desktop' ) { 30 if ( !$('.show_mask_header').hasClass( 'mask_header_shrink' ) ) { 31 $('<div class="show_mask_header mask_header_shrink" style="position: relative; height: 0;"></div>').insertAfter('.ovamenu_shrink'); 32 } 33 34 // Get header 35 var header = $('.ovamenu_shrink'); 36 37 if ( header.length > 0 ) { 38 // Header height 39 var height = header.height(); 40 41 $(window).scroll( function() { 42 var scroll = $(this).scrollTop(); 43 44 if ( scroll >= height+150 ) { 45 header.addClass( 'active_fixed' ); 46 $('.mask_header_shrink').css('height', height); 47 } else { 48 header.removeClass('active_fixed'); 49 $('.mask_header_shrink').css('height', '0'); 50 } 51 }); 52 } 53 } 54 55 // Sticky menu - Mobile 56 if ( $('.ovamenu_shrink_mobile').length > 0 && $( 'body' ).data('elementor-device-mode') != 'desktop' ) { 57 if ( !$('.show_mask_header_mobile').hasClass( 'mask_header_shrink_mobile' ) ) { 58 $('<div class="show_mask_header_mobile mask_header_shrink_mobile" style="position: relative; height: 0;"></div>').insertAfter('.ovamenu_shrink_mobile'); 59 } 60 61 // Get header 62 var header = $('.ovamenu_shrink_mobile'); 63 64 if ( header.length > 0 ) { 65 // Header height 66 var height = header.height(); 67 68 $(window).scroll( function() { 69 var scroll = $(this).scrollTop(); 70 71 if ( scroll >= height+150 ) { 72 header.addClass( 'active_fixed' ); 73 $('.mask_header_shrink_mobile').css('height', height); 74 } else { 75 header.removeClass('active_fixed'); 76 $('.mask_header_shrink_mobile').css('height', '0'); 77 } 78 }); 79 } 80 } 81 82 // Hover item 83 if ( $(window).width() > 1024 ) { 84 $('.ova_menu_clasic .ova_nav li.menu-item').each( function() { 85 var subMenu = $(this).children('.dropdown-menu'); 86 87 if ( subMenu.length > 0 ) { 88 var level = parseInt( $(this).attr('menu-level') ); 89 90 // Mouseenter 91 $(this).on( 'mouseenter', function() { 92 var subMenu = $(this).children('.dropdown-menu'); 93 94 if ( subMenu.length > 0 ) { 95 var level = parseInt( $(this).attr('menu-level') ); 96 97 // Set position 98 setPosition(subMenu, level, 'mouseenter'); 99 } 100 }); 101 102 // Mouseleave 103 $(this).on( 'mouseleave', function() { 104 var subMenu = $(this).children('.dropdown-menu'); 105 106 if ( subMenu.length > 0 ) { 107 var level = parseInt( $(this).attr('menu-level') ); 108 109 // Set position 110 setPosition(subMenu, level, 'mouseleave'); 111 } 112 }); 113 } 114 }); 115 116 // Set position function 117 function setPosition( that = null, level = 0, event = '' ) { 118 if ( that && that.length > 0 ) { 119 var right = $(window).width() - (that.outerWidth() + that.offset().left); 120 121 // Mouseenter 122 if ( right < 0 && 'mouseenter' == event ) { 123 if ( level > 1 ) { 124 that.css('left', 'auto'); 125 that.css('right', '100%'); 126 } else { 127 that.css('left', 'auto'); 128 that.css('right', 0); 129 } 130 } 131 132 // Mouseleave 133 if ( right > 0 && 'mouseleave' == event ) { 134 if ( level > 1 ) { 135 that.css('left', '100%'); 136 that.css('right', 'auto'); 137 } else { 138 that.css('left', 0); 139 that.css('right', 'auto'); 140 } 141 } 142 } 143 } 144 } 145 146 $( window ).load(function() { 147 canvas_bg_mobile(); 148 }); 149 150 $( window ).resize(function() { 151 canvas_bg_mobile(); 152 }); 153 154 // Canvas background for mobile 155 function canvas_bg_mobile() { 156 var ovaNav = $(document).find( '.ova_menu_clasic .ova_wrap_nav .ova_nav' ); 157 158 if ( $(window).width() <= 1024 ) { 159 ovaNav.addClass( 'canvas_bg_mobile' ); 160 } else { 161 ovaNav.removeClass( 'canvas_bg_mobile' ); 162 } 163 } 164 }); 165 166 /* Search Popup */ 167 elementorFrontend.hooks.addAction('frontend/element_ready/ova_search_popup.default', function() { 168 $('.ova_wrap_search_popup i' ).on( 'click', function() { 169 $(this).closest('.ova_wrap_search_popup').addClass('show'); 170 }); 171 172 $('.btn_close').on( 'click', function() { 173 $(this).closest('.ova_wrap_search_popup').removeClass('show'); 174 }); 175 }); /* End Search Popup */ 176 177 /* Skill bar */ 178 elementorFrontend.hooks.addAction('frontend/element_ready/ova_skill_bar.default', function() { 179 $('.skillbar').appear(); 180 $(document.body).on( 'appear', '.skillbar', function() { 181 jQuery(this).find('.skillbar-bar').animate({ 182 width:jQuery(this).attr('data-percent'), 183 },3000); 184 185 jQuery(this).find('.percent').animate({ 186 left: jQuery(this).attr('data-percent') 187 },{ 188 duration: 3000, 189 step: function( now, fx ){ 190 // console.log( 'now: ' + now ); 191 var data = Math.round(now); 192 $(this).find('.relative span').html(data + '%'); 193 } 194 }); 195 }); 196 }); /* End skill bar */ 197 198 /* Form email */ 199 elementorFrontend.hooks.addAction('frontend/element_ready/ova_form_mail.default', function() { 200 $('.ova-form-mail input[type="submit"]').on( 'click', function(e) { 201 var that = $(this); 202 var flag = true; 203 204 $('.ova-form-mail .con .input .error').css({'display':'none'}); 205 that.closest('.ova-form-mail').find('.field').each(function( index ) { 206 if ( $(this).hasClass('required') && $(this).val() == '' ) { 207 flag = false;
208 $(this).parent('.input').children('.error').css({'display':'block'}); 209 } 210 }); 211 212 if( !flag ) { 213 e.preventDefault(); 214 return false; 215 } 216 }); 217 }); /* End email */ 218 219 /* Testimonial */ 220 elementorFrontend.hooks.addAction('frontend/element_ready/ova_testimonial.default', function() { 221 $(".slide-testimonials").each( function() { 222 var owlsl = $(this) ; 223 var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {}; 224 225 var responsive_value = { 226 0:{ 227 items:1, 228 nav:false 229 }, 230 576:{ 231 items:1 232 }, 233 992:{ 234 items:1 235 }, 236 1170:{ 237 items:owlsl_ops.items 238 } 239 }; 240 241 owlsl.owlCarousel({ 242 autoWidth: owlsl_ops.autoWidth, 243 margin: owlsl_ops.margin, 244 items: owlsl_ops.items, 245 loop: owlsl_ops.loop, 246 autoplay: owlsl_ops.autoplay, 247 autoplayTimeout: owlsl_ops.autoplayTimeout, 248 center: owlsl_ops.center, 249 nav: owlsl_ops.nav, 250 dots: owlsl_ops.dots, 251 thumbs: owlsl_ops.thumbs, 252 autoplayHoverPause: owlsl_ops.autoplayHoverPause, 253 slideBy: owlsl_ops.slideBy, 254 smartSpeed: owlsl_ops.smartSpeed, 255 navText:[ 256 '<i class="fa fa-angle-left" ></i>', 257 '<i class="fa fa-angle-right" ></i>' 258 ], 259 responsive: responsive_value, 260 }); 261 262 /* Fixed WCAG */ 263 owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous"); 264 owlsl.find(".owl-nav button.owl-next").attr("title", "Next"); 265 owlsl.find(".owl-dots button").attr("title", "Dots"); 266 }); 267 }); /* End testimonial */ 268 269 /* Slide*/ 270 elementorFrontend.hooks.addAction('frontend/element_ready/ova_slide.default', function(){ 271 $(".ova-slide .slide").each(function(){ 272 var owlsl = $(this) ; 273 var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {}; 274 275 var responsive_value = { 276 0:{ 277 items:owlsl_ops.items_mobile, 278 nav:false 279 }, 280 768:{ 281 items:2 282 }, 283 1025:{ 284 items:owlsl_ops.items 285 } 286 }; 287 288 owlsl.owlCarousel({ 289 autoWidth: owlsl_ops.autoWidth, 290 margin: owlsl_ops.margin, 291 items: owlsl_ops.items, 292 loop: owlsl_ops.loop, 293 autoplay: owlsl_ops.autoplay, 294 autoplayTimeout: owlsl_ops.autoplayTimeout, 295 center: owlsl_ops.center, 296 nav: owlsl_ops.nav, 297 dots: owlsl_ops.dots, 298 thumbs: owlsl_ops.thumbs, 299 autoplayHoverPause: owlsl_ops.autoplayHoverPause, 300 slideBy: owlsl_ops.slideBy, 301 smartSpeed: owlsl_ops.smartSpeed, 302 navText:[ 303 '<i class="fa fa-angle-left" ></i>', 304 '<i class="fa fa-angle-right" ></i>' 305 ], 306 responsive: responsive_value, 307 }); 308 309 }); 310 }); /* End ova_slide */ 311 312 /* ova_blog_slide */ 313 elementorFrontend.hooks.addAction('frontend/element_ready/ova_blog_slide.default', function(){ 314 $(".blog-slide").each(function(){ 315 var owlsl = $(this) ; 316 var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {}; 317 var responsive_value = { 318 0:{ 319 items:1, 320 nav:false, 321 autoplayHoverPause:false 322 }, 323 576:{ 324 items:1, 325 autoplayHoverPause:false 326 }, 327 992:{ 328 items:2, 329 nav:false 330 }, 331 1170:{ 332 items:owlsl_ops.items 333 } 334 }; 335 336 owlsl.owlCarousel({ 337 autoWidth: owlsl_ops.autoWidth, 338 margin: owlsl_ops.margin, 339 items: owlsl_ops.items, 340 loop: owlsl_ops.loop, 341 autoplay: owlsl_ops.autoplay, 342 autoplayTimeout: owlsl_ops.autoplayTimeout, 343 center: owlsl_ops.center, 344 nav: owlsl_ops.nav, 345 dots: owlsl_ops.dots, 346 thumbs: owlsl_ops.thumbs, 347 autoplayHoverPause: owlsl_ops.autoplayHoverPause,
348 slideBy: owlsl_ops.slideBy, 349 smartSpeed: owlsl_ops.smartSpeed, 350 navText:[ 351 '<i class="arrow_carrot-left" ></i>', 352 '<i class="arrow_carrot-right" ></i>' 353 ], 354 responsive: responsive_value, 355 }); 356 357 /* Fixed WCAG */ 358 owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous"); 359 owlsl.find(".owl-nav button.owl-next").attr("title", "Next"); 360 owlsl.find(".owl-dots button").attr("title", "Dots"); 361 }); 362 }); /* End ova_blog_slide */ 363 364 /* contact */ 365 elementorFrontend.hooks.addAction('frontend/element_ready/ova_contact_slide.default', function(){ 366 $(".slide-contact").each(function(){ 367 var owlsl = $(this) ; 368 var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {}; 369 370 var responsive_value = { 371 0:{ 372 items:1, 373 nav:false 374 }, 375 576:{ 376 items:1 377 }, 378 992:{ 379 items:2 380 }, 381 1170:{ 382 items:owlsl_ops.items 383 } 384 }; 385 386 owlsl.owlCarousel({ 387 autoWidth: owlsl_ops.autoWidth, 388 margin: owlsl_ops.margin, 389 items: owlsl_ops.items, 390 loop: owlsl_ops.loop, 391 autoplay: owlsl_ops.autoplay, 392 autoplayTimeout: owlsl_ops.autoplayTimeout, 393 center: owlsl_ops.center, 394 nav: true, 395 dots: owlsl_ops.dots, 396 thumbs: owlsl_ops.thumbs, 397 autoplayHoverPause: owlsl_ops.autoplayHoverPause, 398 slideBy: owlsl_ops.slideBy, 399 smartSpeed: owlsl_ops.smartSpeed, 400 navText:[ 401 '<i class="arrow_carrot-left" ></i>', 402 '<i class="arrow_carrot-right" ></i>' 403 ], 404 responsive: responsive_value, 405 }); 406 407 /* Fixed WCAG */ 408 owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous"); 409 owlsl.find(".owl-nav button.owl-next").attr("title", "Next"); 410 owlsl.find(".owl-dots button").attr("title", "Dots"); 411 412 }); 413 }); /* End contact */ 414 415 /* Time Coundown */ 416 elementorFrontend.hooks.addAction('frontend/element_ready/ova_time_countdown.default', function() { 417 var date = $('.due_date').data('day').split(' '); 418 var day = date[0].split('-'); 419 var time = date[1].split(':'); 420 var date_countdown = new Date( day[0], day[1]-1, day[2], time[0], time[1] ); 421 $('.due_date').countdown({until: date_countdown, format: 'DHMS'}); 422 }); 423 424 /* History */ 425 elementorFrontend.hooks.addAction('frontend/element_ready/ova_history.default', function(){ 426 if ( $('.ova-history.scroll_animation').length > 0 ) { 427 $(window).scroll( function() { 428 var wS = $(this).scrollTop(); 429 430 $('.ova-history .wp-item').each( function() { 431 var hT = $(this).offset().top; 432 var hH = $(this).outerHeight(); 433 var wH = $(window).height(); 434 435 if ( wS + 250 > (hT+hH-wH) ) { 436 $(this).addClass('active'); 437 } 438 }); 439 }); 440 } else { 441 $('.ova-history .wp-item').each( function() { 442 $(this).addClass('active'); 443 }); 444 } 445 }); 446 447 /* Title slide */ 448 elementorFrontend.hooks.addAction('frontend/element_ready/ova_title.default', function() { 449 $(".title-slide").each( function() { 450 var owlsl = $(this) ; 451 var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {}; 452 453 var responsive_value = { 454 0:{ 455 items:1, 456 nav:true 457 }, 458 576:{ 459 items:1, 460 nav:true 461 }, 462 992:{ 463 items:1, 464 nav:true 465 }, 466 1170:{ 467 items:owlsl_ops.items 468 } 469 }; 470 471 owlsl.owlCarousel({ 472 autoWidth: owlsl_ops.autoWidth, 473 margin: owlsl_ops.margin, 474 items: owlsl_ops.items, 475 loop: owlsl_ops.loop, 476 autoplay: owlsl_ops.autoplay, 477 autoplayTimeout: owlsl_ops.autoplayTimeout, 478 center: owlsl_ops.center, 479 nav: owlsl_ops.nav, 480 dots: owlsl_ops.dots, 481 thumbs: owlsl_ops.thumbs, 482 autoplayHoverPause: owlsl_ops.autoplayHoverPause,
483 slideBy: owlsl_ops.slideBy, 484 smartSpeed: owlsl_ops.smartSpeed, 485 navText:[ 486 '<i class="arrow_carrot-left" ></i>', 487 '<i class="arrow_carrot-right" ></i>' 488 ], 489 responsive: responsive_value, 490 }); 491 492 /* Fixed WCAG */ 493 owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous"); 494 owlsl.find(".owl-nav button.owl-next").attr("title", "Next"); 495 }); 496 }); /* End Title slide */ 497 498 /* Tabs */ 499 elementorFrontend.hooks.addAction('frontend/element_ready/ova_tabs.default', function() { 500 function activeTab(obj) { 501 $('.tab-wrapper ul li').removeClass('active'); 502 503 $(obj).addClass('active'); 504 505 var id = $(obj).find('a').attr('href'); 506 507 $('.tab-item').hide(); 508 $(id) .show(); 509 } 510 511 $('.tab li').click(function(){ 512 activeTab(this); 513 return false; 514 }); 515 516 activeTab($('.tab li:first-child')); 517 }); 518 519 /* Give */ 520 elementorFrontend.hooks.addAction('frontend/element_ready/ova_give_donations.default', function() { 521 if ( $(".archive_give_donation .media .video").length > 0 ) { 522 $(".archive_give_donation .media .video").fancybox({ 523 iframe : { 524 css : { 525 maxWidth : '80%', 526 } 527 } 528 }); 529 } 530 }); 531 532 /* ova_iso */ 533 elementorFrontend.hooks.addAction('frontend/element_ready/ova_iso.default', function() { 534 var $grid = $('.ova_isotope').isotope({ 535 itemSelector: '.grid-item', 536 percentPosition: true, 537 masonry: { 538 // use element for option 539 columnWidth: '.grid-sizer' 540 } 541 }); 542 543 $(window).resize(function(){ 544 $grid.isotope('layout'); 545 }); 546 547 $( document ).ready(function() { 548 $grid.isotope('layout'); 549 }); 550 }); 551 552 /* ova_page_menu */ 553 elementorFrontend.hooks.addAction('frontend/element_ready/ova_menu_page.default', function() { 554 $('.ova_menu_page.type3').each( function() { 555 var toggle = $(this).find('.dropdown-toggle'); 556 557 toggle.off('click').on( 'click', function() { 558 $(this).parent().find('.dropdown-menu').first().toggle('fast'); 559 }); 560 }); 561 }); 562 563 }); 564})(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.