1jQuery(document).ready(function(){ 2 3 /*register page js - start*/ 4 jQuery('#next_step').on('touchstart click',function(){ 5 jQuery('.cstm_payment_fields').css('display','block'); 6 jQuery('#next_step').css('display','none'); 7 }); 8 9 jQuery('#rcp_gateway_paypal').on('click',function(){ 10 jQuery('.rcp_message').css('display','none'); 11 jQuery('#rcp_gateway_paypal').prop('checked', true); 12 jQuery('#rcp_gateway_stripe').prop('checked', false); 13 jQuery('.cstm_card_form').css('display','none'); 14 jQuery('#rcp_submit').css('background-image','url("https://slideuplift.com/wp-content/uploads/2021/02/cstm_paypal.png")'); 15 jQuery('#rcp_submit').css('background-color','transparent'); 16 jQuery('#rcp_submit').css('background-repeat','no-repeat'); 17 jQuery('#rcp_submit').css('background-size','contain'); 18 jQuery('#rcp_submit').val(''); 19 }); 20 21 jQuery('#rcp_gateway_stripe').on('click',function(){ 22 jQuery('.rcp_message').css('display','none'); 23 jQuery('#rcp_gateway_stripe').prop('checked', true); 24 jQuery('#rcp_gateway_paypal').prop('checked', false); 25 jQuery('.cstm_card_form').css('display','block'); 26 jQuery('#rcp_submit').attr('style', 'background-color: #F58522;color: white;width: 58%;border: none;font-size: 15px;height: 42px;'); 27 jQuery('#rcp_submit').val('Complete Payment'); 28 }); 29 /*register page js - end*/ 30 31 // Mobile Navigation 32 // jQuery('.nav-toggle').click(function(){ 33 // jQuery('.mob-nav').slideToggle(); 34 // jQuery('.header').toggleClass('menu-visible') 35 // jQuery('body').toggleClass('disable-scroll'); 36 // }); 37 38 var originalContent = $('#navToggle').html(); // Save the original content 39 40 jQuery('.nav-toggle').click(function () { 41 var navToggle = jQuery(this); 42 43 if (navToggle.hasClass('is-svg')) { 44 // Restore original content and hide SVG 45 navToggle.removeClass('is-svg').html(originalContent); 46 } else { 47 // Remove spans and add SVG 48 navToggle.addClass('is-svg').html('<svg xmlns="http://www.w3.org/2000/svg" width="33" height="33" viewBox="0 0 33 33" fill="none"><path d="M6.47217 4.52783L4.52783 6.47217L14.5557 16.5L4.52783 26.5278L6.47217 28.4722L16.5 18.4443L26.5278 28.4722L28.4722 26.5278L18.4443 16.5L28.4722 6.47217L26.5278 4.52783L16.5 14.5557L6.47217 4.52783Z" fill="black"/></svg>'); 49 } 50 51 jQuery('.mob-nav').animate({ width: 'toggle' }); 52 jQuery('.header').toggleClass('menu-visible'); 53 jQuery('body').toggleClass('disable-scroll'); 54 }); 55 56 'use strict'; 57 // ------------------------------------------------------------- 58 // Scroll slider 59 // ------------------------------------------------------------- 60 function galler_slider() { 61 jQuery('.product_gallery_slider_wrapper').each(function() { 62 var $frame = jQuery(this).find('.product_gallery_slider'); 63 var $slide = $frame.children('ul').eq(0); 64 var $wrap = $frame.parent(); 65 // Call Sly on frame 66 $frame.sly({ 67 horizontal: 1, 68 itemNav: 'basic', 69 smart: 1, 70 activateOn: 'click', 71 mouseDragging: 1, 72 touchDragging: 1, 73 releaseSwing: 1, 74 scrollBar: $wrap.find('.scrollbar'), 75 scrollBy: 1, 76 pagesBar: $wrap.find('.pages'), 77 activatePageOn: 'click', 78 speed: 300, 79 elasticBounds: 1, 80 easing: 'easeOutExpo', 81 dragHandle: 1, 82 dynamicHandle: 1, 83 clickBar: 1, 84 // Buttons 85 forward: $wrap.find('.forward'), 86 backward: $wrap.find('.backward'), 87 prev: $wrap.find('.prev'), 88 next: $wrap.find('.next'), 89 prevPage: $wrap.find('.prevPage'), 90 nextPage: $wrap.find('.nextPage') 91 }); 92 }); 93 } 94 galler_slider(); 95 96 jQuery('.edd_price_options, .modal-content').find('label').each(function() { 97 jQuery(this).removeAttr("for"); 98 if(jQuery(this).find('input').is(':checked')){ 99 jQuery(this).parent().addClass('checked'); 100 } else { 101 jQuery(this).parent().removeClass('checked'); 102 } 103 jQuery(this).click(function() { 104 if(jQuery(this).parents('.edd_price_options').hasClass('edd_multi_mode')) { 105 if(jQuery(this).find('input[type="checkbox"]').is(':checked')){ 106 jQuery(this).parent().addClass('checked'); 107 } else { 108 jQuery(this).parent().removeClass('checked'); 109 } 110 } else { 111 if(jQuery(this).find('input[type="radio"]').is(':checked')){ 112 jQuery(this).parent().addClass('checked').siblings('li').removeClass('checked'); 113 } else { 114 jQuery(this).parent().removeClass('checked'); 115 } 116 } 117 }) 118 }); 119 jQuery('label.selectit').each(function() { 120 jQuery(this).removeAttr("for"); 121 if(jQuery(this).find('input').is(':checked')){ 122 jQuery(this).addClass('checked'); 123 } else { 124 jQuery(this).removeClass('checked'); 125 } 126 jQuery(this).click(function() { 127 if(jQuery(this).find('input[type="checkbox"]').is(':checked')){ 128 jQuery(this).addClass('checked'); 129 } else { 130 jQuery(this).removeClass('checked'); 131 } 132 }) 133 }); 134 135 136 137 138 139 jQuery('.parallax-section').each(function() { 140 jQuery(this).parallax("50%", 0.1); 141 }); 142 if( typeof(prettyPhoto) === 'function' ){ 143 jQuery("a[rel^='prettyPhoto']").prettyPhoto({ 144 allow_resize: true, slideshow:5000, autoplay_slideshow:true, social_tools:false, hideflash: true, showTitle: false, 145 }); 146 } 147
148 jQuery('.sidebar-trigger').click(function(){ 149 jQuery('.woocom-sidebar').toggleClass('sidebar-visible') 150 }) 151}); 152function responsiveNav() { 153 winWidth = jQuery(window).width(); 154 if(winWidth <= 1251) { 155 jQuery('.shop-nav').appendTo('.col-shop'); 156 jQuery('#nav').appendTo('.mob-nav'); 157 jQuery('.nav-toggle').show(); 158 jQuery('#mob-nav-btn').show(); 159 jQuery("#mobile-toggle").appendTo(".mobile-menu"); 160 jQuery('.header').addClass('responsive-nav'); 161 162 /* Pratipada added menu code start here */ 163 jQuery("li:has(ul)").click(function(e){ 164 e.preventDefault(); // Stop the link from following 165 166 // Only slide up other menus, keeping the clicked one open 167 jQuery(this).siblings().children(".sub-menu").slideUp(); 168 jQuery(this).siblings().children(".mega-menu").slideUp(); 169 170 // Find the child ul and slideToggle 171 jQuery(this).children(".sub-menu").slideToggle(); 172 jQuery(this).children(".mega-menu").slideToggle(); 173 174 e.stopImmediatePropagation(); 175 }); 176 177 // Prevent click events inside submenus from propagating upwards 178 jQuery('li ul').click(function(e) { 179 e.stopImmediatePropagation(); 180 }); 181 /* Pratipada added menu code end here */ 182} else { 183 jQuery('#nav').appendTo('.col-nav'); 184 jQuery('.shop-nav').appendTo('#nav'); 185 jQuery("#nav ul.menu > li").mouseenter( function(){ 186 jQuery(this).addClass('active-nav'); 187 var subMenu = jQuery(this).children('.sub-menu'); 188 subMenu.css('z-index','2000'); 189 if(jQuery(this).hasClass('menu-item-has-mega-menu')){ 190 jQuery(this).children('.mega-menu').addClass('mega-menu-visible'); 191 } 192 }); 193 jQuery("#nav ul.menu > li").mouseleave( function(){ 194 jQuery(this).removeClass('active-nav'); 195 var subMenu = jQuery(this).children('.sub-menu'); 196 setTimeout( function(){ 197 subMenu.css('z-index','0'); 198 },500); 199 }); 200 jQuery('.header').removeClass('responsive-nav'); 201 jQuery('.nav-toggle').hide(); 202 jQuery('menunav1').show(); 203 } 204 205} 206 207function firstSectionPadding() { 208 winWidth = jQuery(window).width(); 209 headerHeight = jQuery('#header').outerHeight(); 210 headerWraperHeight = jQuery('.header-wrapper').outerHeight(); 211 if(jQuery('body').hasClass('home')) { 212 if(jQuery('body').hasClass('header-overlay' || 'header-sticky')) { 213 jQuery('#header').next('.section').animate({'padding-top': headerHeight + 80}); 214 if(!jQuery('.fw-page-builder-content').find('.section:first-child').hasClass('cover-pages')){ 215 jQuery('.fw-page-builder-content').find('.section:first-child').animate({'padding-top': headerWraperHeight + 80}); 216 } 217 }; 218 } 219} 220// Full height section 221function fullHeight() { 222 wnHeight = jQuery(window).height(); 223 winWidth = jQuery(window).width(); 224 //if(winWidth > 767 & wnHeight > 599) { 225 jQuery('.cover-pages').each(function() { 226 jQuery('.cover-pages').animate({'min-height': wnHeight}).addClass('covered'); 227 }); 228 229 // Centered elements 230 jQuery('.cover-pages').each(function() { 231 var centered = jQuery(this).find('.centered'); 232 var thisHeight = jQuery(centered).height(); 233 if(jQuery(this).hasClass('no-padding')) { 234 var paddingTop = 0; 235 } else { 236 var paddingTop = 72; 237 } 238 if(thisHeight < wnHeight) { 239 margin = wnHeight - thisHeight - paddingTop; 240 centered.animate({'padding-top': margin/2}) 241 } 242 }); 243 //} 244} 245 246 247// quick contact form trigger 248function quickContact() { 249 jQuery('.qw-title').click(function() { 250 jQuery(this).next('.quick-window').toggleClass('quick-window-active').slideToggle(); 251 jQuery(this).parent('.quick-contact').toggleClass('qw-active'); 252 }); 253} 254 255function cartWidget() { 256 winWidth = jQuery(window).width(); 257 if(winWidth > 599) { 258 // Do nothing 259 } else {
260 /*jQuery('.cart-btn').click(function(){ 261 if(jQuery(this).parent('.cart-widget').hasClass('cw-active')) { 262 jQuery(this).parent('.cart-widget').removeClass('cw-active'); 263 jQuery('body').css({"overflow":'auto'}); 264 } else { 265 jQuery(this).parent('.cart-widget').addClass('cw-active'); 266 jQuery('body').css({"overflow":'hidden'}); 267 } 268 });*/ 269 } 270} 271 272// Checking for quick contact form validation errors. 273function quickContactErrorCheck(){ 274 var errorFlag=0; 275 clearQuickContactErrors(); 276 if((jQuery("#qc-name").val() == null || jQuery("#qc-name").val() == "") ){ 277 jQuery(".olam_name").fadeIn().html("Enter your name"); 278 errorFlag=1; 279 } 280 if((jQuery("#qc-email").val() == null || jQuery("#qc-email").val() == "") ){ 281 jQuery(".olam_email").fadeIn().html("Enter your email"); 282 errorFlag=1; 283 } 284 if((jQuery("#qc-message").val() == null || jQuery("#qc-message").val() == "") ){ 285 jQuery(".olam_message").fadeIn().html("Enter your message"); 286 errorFlag=1; 287 } 288 return errorFlag; 289} 290 291// Checking for contact form validation errors. 292 293function contactErrorCheck(){ 294 var errorFlag=0; 295 clearContactErrors(); 296 if((jQuery("#c-name").val() == null || jQuery("#c-name").val() == "") ){ 297 jQuery(".olam-c-name").fadeIn().html("Enter your name"); 298 errorFlag=1; 299 } 300 if((jQuery("#c-email").val() == null || jQuery("#c-email").val() == "") ){ 301 jQuery(".olam-c-email").fadeIn().html("Enter your email"); 302 errorFlag=1; 303 } 304 if((jQuery("#c-message").val() == null || jQuery("#c-message").val() == "") ){ 305 jQuery(".olam-c-message").fadeIn().html("Enter your message"); 306 errorFlag=1; 307 } 308 return errorFlag; 309} 310 311// validate email function 312function validateEmail(email) { 313 var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; 314 return re.test(email); 315} 316// Clearing quick contact validation errors. 317function clearQuickContactErrors(){ 318 jQuery(".olam_name").fadeOut().html(""); 319 jQuery(".olam_email").fadeOut().html(""); 320 jQuery(".olam_message").fadeOut().html(""); 321} 322 323// Clearing contact validation errors. 324function clearContactErrors(){ 325 jQuery(".olam-c-name").fadeOut().html(""); 326 jQuery(".olam-c-email").fadeOut().html(""); 327 jQuery(".olam-c-message").fadeOut().html(""); 328} 329 330function formFields() { 331 jQuery(this).find('#edd-user-login-wrap, #edd-user-pass-wrap').addClass('field-holder'); 332 jQuery('#edd-email-wrap, #edd-first-name-wrap, #edd-last-name-wrap, .user_pass, #edd-card-address-wrap, #edd-card-address-2-wrap, #edd-card-city-wrap, #edd-card-zip-wrap, #edd-card-number-wrap, #edd-card-cvc-wrap, #edd-card-name-wrap, #card-expiration').addClass('field-holder'); 333 jQuery('.comment-form-author, .comment-form-email, .comment-form-url, .comment-form-comment, .comment_form_review_title').addClass('field-holder'); 334 jQuery('#edd-user-login-wrap, #edd-user-pass-wrap, #edd-user-pass-confirm-wrap, #edd-user-login-wrap, #edd-user-pass-wrap, .form-row, .user_pass').addClass('field-holder'); 335 jQuery('#edd-card-country-wrap, #edd-card-state-wrap').addClass('field-holder holder-focus, .form-row.validate-state'); 336 337 jQuery('#edd-stripe-manage-cards, #edd-stripe-manage-cards').addClass('boxed'); 338 jQuery('#edd-stripe-manage-cards fieldset, #edd-stripe-manage-cards fieldset').addClass('boxed-body'); 339 jQuery('.card-address-fields span, .card-expiration-fields, .card-address-fields p').addClass('field-holder'); 340 jQuery('#edd-stripe-add-new-card p').addClass('field-holder'); 341 342 // Keep the label out of the input field if value is not empty by default 343 // jQuery('input, textarea').each(function(){ 344 // var parent = jQuery(this).parent(); 345 // var parents = jQuery(this).parents('.fes-el'); 346 // if(parent.hasClass('field-holder')){ 347 // parent.addClass('holder-focus'); 348 // } 349 // if(parents.hasClass('field-holder')){ 350 // parents.addClass('holder-focus'); 351 // } 352 // }); 353 jQuery('div#edd_checkout_login_register input,div#edd_checkout_login_register textarea').each(function(){ 354 var parent = jQuery(this).parent(); 355 var parents = jQuery(this).parents('.fes-el'); 356 if(parent.hasClass('field-holder')){ 357 jQuery(this).removeAttr('placeholder');
358 parent.addClass('holder-focus'); 359 } 360 if(parents.hasClass('field-holder')){ 361 jQuery(this).removeAttr('placeholder'); 362 parents.addClass('holder-focus'); 363 } 364 }); 365 // Keep the label out of select field 366 jQuery('select').each(function(){ 367 var parent = jQuery(this).parent(); 368 var parents = jQuery(this).parents('.fes-el'); 369 var woo_parents = jQuery(this).parents('.form-row'); 370 if(!jQuery(this).hasClass('multiselect')) { 371 if(parent.hasClass('field-holder')){ 372 parent.addClass('holder-focus'); 373 } 374 if(parents.hasClass('field-holder')){ 375 parents.addClass('holder-focus'); 376 } 377 if(woo_parents.hasClass('field-holder')){ 378 woo_parents.addClass('holder-focus'); 379 } 380 } 381 }); 382 383 jQuery('.fes-ajax-form').each(function() { 384 var heading = jQuery(this).prev('h1'); 385 var fesForm = jQuery(this).find('.fes-form'); 386 heading.insertBefore(fesForm) 387 }); 388 389 jQuery('.fes-el').each(function() { 390 jQuery(this).find('.fes-help').insertAfter(jQuery(this)); 391 }) 392} 393function megaMenuWidth() { 394 winWidth = jQuery(window).width(); 395 // Navigation 396 if(winWidth > 1251) { 397 /** 398 * Mega Menu 399 */ 400 jQuery(function ($) { 401 function hoverIn() { 402 var a = jQuery(this); 403 var nav = a.closest('#nav'); 404 var mega = a.find('.mega-menu'); 405 var offset = rightSide(nav) - leftSide(a); 406 // mega.width(Math.min(rightSide(nav), columns(mega)*180)); 407 // mega.css('left', Math.min(0, offset - mega.width())); 408 } 409 function hoverOut() {} 410 function columns(mega) { 411 var columns = 0; 412 mega.children('.mega-menu-row').each(function () { 413 columns = Math.max(columns, $(this).children('.mega-menu-col').length); 414 }); 415 return columns; 416 } 417 function leftSide(elem) { 418 return elem.offset().left; 419 } 420 function rightSide(elem) { 421 return elem.offset().left + elem.width(); 422 } 423 $('#nav .menu-item-has-mega-menu').hover(hoverIn, hoverOut); 424 }); 425 } 426} 427 428jQuery(document).ready(function() { 429 430 // EDD ajax cart 431 jQuery(document.body).on('click', '.edd-add-to-cart, .edd-remove-from-cart', function(){ 432 olamMiniCartSetDelay(); 433 }); 434 435 // Quick Contact Submit 436 jQuery("#olam-quick-contact").submit(function(e){ 437 e.preventDefault(); 438 if(quickContactErrorCheck()==0){ 439 jQuery.ajax({ 440 type: 'POST', 441 url:ajaxurl, 442 data: jQuery("#olam-quick-contact").serialize()+'&action=olam_quickcontact_action', 443 success: function( result ) { 444 jQuery(".quickcontact-success").html("Your query submitted succesfully!"); 445 jQuery(".quickcontact-success").fadeIn(); 446 447 } 448 }); 449 } 450 }); 451 452 // Contact Submit 453 jQuery(".olam-contact").submit(function(e){ 454 e.preventDefault(); 455 if(contactErrorCheck()==0){ 456 jQuery.ajax({ 457 type: 'POST', 458 url:ajaxurl, 459 data: jQuery(".olam-contact").serialize()+'&action=olam_contact_action', 460 success: function( result ) { 461 jQuery(".contact-success").html("Your query submitted succesfully!"); 462 jQuery(".contact-success").fadeIn(); 463 464 } 465 }); 466 } 467 }); 468 469 winWidth = jQuery(window).width(); 470 471 // Pie Charts 472 var element = jQuery('.chart'); 473 jQuery(element).each(function() { 474 jQuery(this).appear(function() { 475 jQuery('.chart').easyPieChart({ 476 barColor: olam_main_ajax.piecolor, 477 trackColor: '#f5f5f5', 478 scaleColor: false, 479 lineWidth: 65, 480 lineCap: 'butt', 481 size: 130, 482 onStep: function(from, to, percent) { 483 this.el.children[0].innerHTML = Math.round(percent) + ('%'); 484 } 485 }); 486 }); 487 }); 488 489 // Quick contact window 490 quickContact(); 491 492 // Padding top of first section 493 firstSectionPadding(); 494 495 megaMenuWidth(); 496 497 // Lightbox login 498 jQuery('.login-trigger').click(function() { 499 jQuery('#loginBox').fadeIn(); 500 jQuery('body').css({'overflow':'hidden'}); 501 }) 502 jQuery('.author-contact-button').click(function() { 503 jQuery('#authorContact').fadeIn(); 504 jQuery('body').css({'overflow':'hidden'}); 505 }) 506 jQuery('.toggle-signup').click(function() { 507 jQuery('.signin-area, .signup-area').slideToggle(); 508 jQuery(this).toggleClass('signup-active'); 509 }); 510 jQuery('.lightbox-close').click(function(){ 511 jQuery('.lightbox-wrapper').fadeOut(); 512 jQuery('body').css({'overflow':'auto'}); 513 }); 514 515 // Cart Widget 516 cartWidget(); 517 518 // Progress bar Horizontal 519 jQuery('.progress-bar').each(function(){ 520 jQuery(this).appear(function() { 521 var $this = jQuery(this); 522 var progressWidth = $this.attr('data-width'); 523 $this.delay(100).animate({'width':progressWidth + '%', }, 200); 524 }); 525 }); 526 // Progress bar Vertical 527 jQuery('.v-progress').each(function(){ 528 jQuery(this).appear(function() { 529 var $this = jQuery(this); 530 var progressWidth = $this.attr('data-height'); 531 $this.delay(100).animate({'height':progressWidth + '%',}, 200); 532 }); 533 }); 534
535 // Live counter 536 jQuery('.countdown').each(function () { 537 jQuery(this).appear(function() { 538 var $this = jQuery(this); 539 jQuery({ Counter: 0 }).animate({ Counter: $this.text() }, { 540 duration: 3000, 541 easing: 'swing', 542 step: function () { 543 $this.text(Math.ceil(this.Counter)); 544 } 545 }); 546 }); 547 }); 548 549 // Scroll to top button 550 wnHeight = jQuery(window).height(); 551 //Check to see if the window is top if not then display button 552 jQuery(window).scroll(function(){ 553 if (jQuery(this).scrollTop() > wnHeight/2) { 554 jQuery('.scroll-top').fadeIn(); 555 } else { 556 jQuery('.scroll-top').fadeOut().removeClass('scrolling'); 557 } 558 }); 559 560 //Click event to scroll to top 561 jQuery('.scroll-top').click(function(){ 562 jQuery('html, body').animate({scrollTop : 0},800); 563 jQuery(this).addClass('scrolling'); 564 }); 565 566 // Append navigation based on window width 567 responsiveNav(); 568 569 jQuery('.product-search-form').find('input[type="text"]').focus(function(){ 570 jQuery(this).parents('.product-search-form').addClass('search-focus'); 571 }) 572 jQuery('.product-search-form').find('input[type="text"]').focusout(function(){ 573 jQuery(this).parents('.product-search-form').removeClass('search-focus'); 574 }) 575 576 577if ( jQuery('.item-options a').length > 0) { 578 itemOption.tooltip(); 579} 580 581 jQuery('.item-name').each(function(){ 582 var nameWidth = jQuery(this).width(); 583 jQuery(this).animate({'width':nameWidth}); 584 }); 585 586 formFields(); 587 588}); 589 590function olamMiniCartSetDelay() { 591 592 setTimeout(function () { olamMiniCartShowContents(); }, 1000); 593} 594 595function olamMiniCartShowContents() {
596 jQuery('.cart-widget').load(olam_main_ajax.ajaxurl+'?action=olam_main_ajax&_wpnonce='+olam_main_ajax.nonce); 597 jQuery('.olam-cart-count').load(olam_main_ajax.ajaxurl+'?action=olam_main_ajax&cart_count=1&_wpnonce='+olam_main_ajax.nonce); 598} 599 600// Function on window resize 601jQuery(window).resize(function(){ 602 responsiveNav(); 603 firstSectionPadding(); 604 fullHeight(); 605 megaMenuWidth(); 606}); 607 608jQuery(document).ready(function(){ 609 megaMenuWidth(); 610 jQuery('.fes-el').each(function() { 611 if(jQuery(this).hasClass('user_pass')) { 612 jQuery(this).css({'background':'none'}); 613 jQuery(this).find('.fes-label:first-child, .fes-fields:nth-child(2)').wrapAll( "<div class='field-holder'></div>" ); 614 jQuery(this).find('.fes-label:nth-child(2), .fes-fields:nth-child(3)').wrapAll( "<div class='field-holder'></div>" ); 615 } else { 616 jQuery(this).addClass('field-holder'); 617 } 618 }); 619 formFields(); 620 // Full height sections 621 // Keep the label out of the input field if value is not empty by default 622 623 624 jQuery('div#edd_checkout_login_register input,div#edd_checkout_login_register textarea').each(function(){ 625 var parent = jQuery(this).parent(); 626 var parents = jQuery(this).parents('.fes-el'); 627 if(parent.hasClass('field-holder')){ 628 jQuery(this).removeAttr('placeholder'); 629 parent.addClass('holder-focus'); 630 } 631 if(parents.hasClass('field-holder')){ 632 jQuery(this).removeAttr('placeholder'); 633 parents.addClass('holder-focus'); 634 } 635 }); 636 637 // Keep the label out of select field 638 jQuery('select').each(function(){ 639 var parent = jQuery(this).parent(); 640 var parents = jQuery(this).parents('.fes-el'); 641 var woo_parents = jQuery(this).parents('.form-row'); 642 if(parent.hasClass('field-holder')){ 643 parent.addClass('holder-focus'); 644 } 645 if((jQuery(this).val() != null) && (jQuery(this).val().length === 0)) { 646 parents.addClass('holder-focus'); 647 } 648 if(woo_parents.hasClass('field-holder')){ 649 woo_parents.addClass('holder-focus'); 650 if(jQuery(this).val().length === 0) { 651 jQuery(this).parents('.field-holder').removeClass('holder-focus'); 652 } 653 } 654 }); 655 656 657 // Dynamic form 658 jQuery("body").bind("DOMNodeInserted", function() { 659 formFields(); 660 }); 661 662 jQuery('.comment-form').find('textarea').attr('rows','1'); 663 664 wnHeight = jQuery(window).height(); 665 fullHeight(); 666}) 667 668wnHeight = jQuery(window).height(); 669headerHeight = jQuery('#header').height(); 670// Bootstrap js 671// jQuery('body.header-sticky').find('#header').affix({ 672// offset: { 673// top: 1, 674// } 675// }); 676 677 678if( (jQuery('.preloader-wrapper').length) >0){ 679 jQuery(window).on("load", function() { 680 setTimeout(function(){ 681 jQuery('.preloader-wrapper').fadeOut(); 682 }, 1000); 683 }); 684} 685 686 687 688//Olam Popup registration form Progress Bar 689jQuery(".btn-white").on("click", function() { 690 var progressBtn = jQuery('.btn-pro'); 691 var promain = jQuery(this); 692 if (!progressBtn.hasClass("active")) { 693 progressBtn.addClass("active"); 694 setTimeout(function() { 695 progressBtn.removeClass("active"); 696 }, 2000); 697 }; 698 if (!promain.hasClass("active")) { 699 promain.addClass("active"); 700 setTimeout(function() { 701 promain.removeClass("active"); 702 }, 2000); 703 } 704}); 705 706 707// multi slider 708jQuery('.slider-wrapper').each(function(){ 709 var carousel_slider = jQuery(this).find('.carousel-slider'); 710 var carousel_thumb = jQuery(this).find('.thumb-nav'), 711 flag = false, 712 duration = 300; 713 714 var $items = carousel_slider.data('items'); 715 var $items_md = $items; 716 var $items_sm = $items; 717 var $items_xs = $items; 718 var $items_md = carousel_slider.data('items-md'); 719 var $items_sm = carousel_slider.data('items-sm'); 720 var $items_xs = carousel_slider.data('items-xs'); 721 var $navType = carousel_slider.data('nav'); 722 var $navDots = carousel_slider.data('dots'); 723 var $navAuto = carousel_slider.data('auto'); 724 var $navLoop = carousel_slider.data('loop'); 725 carousel_slider.owlCarousel({ 726 autoplayTimeout:2000, 727 autoplayHoverPause:true, 728 singleItem:true, 729 items:$items, 730 autoplay:$navAuto, 731 autoplay:false, 732 loop: $navLoop,//owl.children().length > 1, 733 dots:$navDots, 734 nav: $navType,//owl.children().length > 1, 735 responsive : { 736 0 : { 737 items: $items_xs 738 }, 739 600 : { 740 items: $items_sm 741 }, 742 992 : { 743 items: $items_md 744 }, 745 1199 : { 746 items: $items 747 } 748 } 749 }).on('changed.owl.carousel', syncPosition) 750 751 var $thumb_items = carousel_thumb.data('items'); 752 carousel_thumb.owlCarousel({ 753 items:$thumb_items, 754 center: false, 755 responsiveClass:true, 756 dots:false, 757 nav:false, 758 afterInit : function(el){ 759 el.find(".owl-item").eq(0).addClass("synced"); 760 } 761 }) 762 .on('click', '.owl-item', function () { 763 carousel_slider.trigger('to.owl.carousel', [jQuery(this).index(), duration, true]); 764 }) 765 .on('changed.owl.carousel', function (e) { 766 if (!flag) { 767 flag = true; 768 carousel_slider.trigger('to.owl.carousel', [e.item.index, duration, true]); 769 flag = false;
770 } 771 }); 772 carousel_thumb.find('.owl-item:first-child').addClass("current"); 773 function syncPosition(el) { 774 //if you set loop to false, you have to rmuta this next line 775 //var current = el.item.index; 776 777 //if you disable loop you have to comment this block 778 if (!flag) { 779 flag = true; 780 carousel_thumb.trigger('to.owl.carousel', [el.item.index, duration, true]); 781 flag = false; 782 } 783 var count = el.item.count-1; 784 var current = Math.round(el.item.index); 785 if(current < 0){ 786 current = count; 787 } 788 if(current > count){ 789 current = 0; 790 } 791 //end block 792 793 carousel_thumb 794 .find(".owl-item") 795 .removeClass("current") 796 .eq(current) 797 .addClass("current"); 798 } 799 800 801 // Custom Navigation Events 802 jQuery(".nav-left").click(function(){ 803 var carousel_slider = jQuery(this).parents('.slider-wrapper').find(".carousel-slider"); 804 carousel_slider.trigger('prev.owl.carousel'); 805 }) 806 jQuery(".nav-right").click(function(){ 807 var carousel_slider = jQuery(this).parents('.slider-wrapper').find(".carousel-slider"); 808 carousel_slider.trigger('next.owl.carousel'); 809 }); 810});
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.