1/* BTN EFFECT RIPPLE PLUGIN */ 2(function($) { 3 "use strict"; 4 5 6 7 var AquaObj = { 8 tb_featured_video:function(){ 9 var _light_box_video = $('#ro-play-button'); 10 if( _light_box_video.length === 0 ) return; 11 $('[data-toggle="tooltip"]').tooltip(); 12 var _template = '<div class="tb-overlay-bg"><div class="tb-overlay-container"><div class="tb-overlay-content"><div class="tb-iframe-scaler"><iframe class=" mfp-iframe" =""="" src="//www.youtube.com/embed/VIDEOID?autoplay=1" frameborder="0" allowfullscreen=""></iframe></div></div></div></div>'; 13 _light_box_video.on('click', function(e){ 14 e.preventDefault(); 15 var id = AquaObj.get_video_id( $(this).attr('href') ); 16 if( id.length > 0 ){ 17 _template = _template.replace( 'VIDEOID', id ); 18 $('body').append(_template).find('.tb-overlay-bg').fadeIn(200); 19 } 20 }); 21 AquaObj.tb_close_overlay(); 22 }, 23 tb_close_overlay: function(){ 24 $('body').on('click','.tb-overlay-content', function(e){ 25 e.stopPropagation(); 26 }).on('click','.tb-overlay-container', function(){ 27 $(this).parent().fadeOut( function(){ 28 $(this).remove(); 29 }); 30 }) 31 }, 32 get_video_id:function(url){ 33 var id = url.match( /^.*?(?:player.|www.)?(?:vimeo\.com|youtu(?:be\.com|\.be))\/(?:video\/|embed\/|watch\?v=)?([A-Za-z0-9._%-]*)(?:\&\S+)?/ ); 34 return id[1]; 35 }, 36 tb_gallery_grid: function(){ 37 $( window ).load(function() { 38 $( '#gallery_grid_widget' ).gridrotator( { 39 rows : 2, 40 columns : 3, 41 animType : 'fadeInOut', 42 animSpeed : 500, 43 animEasingOut : 'linear', 44 animEasingIn : 'linear', 45 interval : 3000, 46 slideshow : true, 47 onhover : false, 48 w1024 : { 49 rows : 2, 50 columns : 3 51 }, 52 53 w768 : { 54 rows : 2, 55 columns : 3 56 }, 57 58 w480 : { 59 rows : 2, 60 columns : 3 61 }, 62 63 w320 : { 64 rows : 2, 65 columns : 3 66 }, 67 68 w240 : { 69 rows : 2, 70 columns : 3 71 }, 72 } ); 73 }); 74 }, 75 tb_grid_instagram: function(){ 76 $( window ).load(function() { 77 $( '#instagram_feed' ).gridrotator( { 78 rows : 1, 79 columns : 6, 80 animType : 'fadeInOut', 81 w1024 : { 82 rows : 1, 83 columns : 6 84 }, 85 86 w768 : { 87 rows : 2, 88 columns : 3 89 }, 90 91 w480 : { 92 rows : 2, 93 columns : 3 94 }, 95 96 w320 : { 97 rows : 2, 98 columns : 3 99 }, 100 101 w240 : { 102 rows : 2, 103 columns : 3 104 }, 105 } ); 106 }); 107 }, 108 tb_wrap_carousel: function( _element ){ 109 if( _element.length === 0 ) return; 110 _element.parent().addClass('tb-wrap-carousel'); 111 }, 112 tb_carousel: function( items, element, marg = 10, assiged ){ 113 var _element = $(element+items); 114 if( _element.length === 0 && assiged ){ 115 _element = $(element); 116 AquaObj.assiged = true; 117 } 118 if( _element.length === 0 ) return; 119 var _carousel_ops = { 120 loop:true, 121 margin: marg, 122 navText:['<i class="fa fa-caret-left"></i>', '<i class="fa fa-caret-right"></i>'], 123 dots:true, 124 responsiveClass:true, 125 responsive:{ 126 0:{ 127 items:1, 128 }, 129 768:{ 130 items: ( items > 2 ) ? ( items - 2 ) : ( items > 1 ) ? ( items - 1) : items, 131 }, 132 992:{ 133 items: ( items > 1 ) ? ( items - 1 ) : items, 134 }, 135 1200:{ 136 items:items, 137 nav:true, 138 } 139 } 140 }; 141 142 _element.find('.owl-carousel').owlCarousel( _carousel_ops ); 143 144 //AquaObj.tb_set_pos_owlnav( _element ); 145 AquaObj.tb_wrap_carousel( _element ); 146 }, 147 tb_set_pos_owlnav: function( _element ){ 148 if( _element.length === 0 ) return; 149 _element.on('mouseenter', function(){ 150 if( ! AquaObj.set_pos ){ 151 var top = _element.find('.tb-image').first().height()/2; 152 if( top ){ 153 _element.find('.owl-prev').css('top', top).next('.owl-next').css('top', top); 154 } 155 AquaObj.set_pos = true; 156 } 157 }) 158 159 }, 160 161 tb_light_box: function(){ 162 var _template = '<div class="tb-overlay-bg"><div class="tb-overlay-container"><div class="tb-overlay-content content-lightbox"><div class="portfolio-lightbox"><img class="img-responsive" src="IMGURL"><button title="Close (Esc)" type="button" class="tb-close"><i class="fa fa-times"></i></button></div></div></div></div>'; 163 $('body .tb-open-lighth-box').on('click', function(e){ 164 e.preventDefault(); 165 var img = $(this).data('src'); 166 if( img.length > 0 ){ 167 $('body').append(_template.replace( 'IMGURL', img )).find('.tb-overlay-bg').fadeIn(200); 168 } 169 }); 170 $('body').on('click','button.tb-close', function(e){ 171 e.preventDefault(); 172 $('body').find('.tb-overlay-bg').fadeOut( function(){ 173 if( $(this).attr('id') == 'appointment-popup'){ 174 $(this).fadeOut(); 175 }else{ 176 $(this).remove(); 177 } 178 }) 179 }) 180 }, 181 tb_comment:function(){ 182 var _comment_form = $("#commentform"); 183 if( _comment_form.lenght === 0 ) return; 184 // change textarea position 185 _comment_form.find('.form-submit').before(_comment_form.find('.comment-form-comment').detach()); 186 }, 187 tb_porfolio_masonry: function(){ 188 var _masonry = $('.grid-portfolio'); 189 if( _masonry.length === 0 ) return; 190 var _masonry = _masonry.masonry({ 191 itemSelector: '.grid-item', 192 percentPosition: true, 193 gutter: 10, 194 columnWidth: 2, 195 196 }); 197 }, 198 199 tb_gallery_masonry: function(){ 200 var _masonry = $('.grid-gallery.tpl2'); 201 if( _masonry.length === 0 ) return; 202 var _gallery_masonry = _masonry.masonry({ 203 percentPosition: true, 204 itemSelector: '.grid-item', 205 columnWidth: 1, 206 }); 207 208 }, 209 tb_post_ajax: function( action, data ){ 210 data = { 211 'action': 'tb'+action, 212 'data': data 213 }; 214 return $.post( the_ajax_script.ajaxurl, data ); 215 }, 216 tb_cal_body: function(){ 217 var _cal_form_result = $('.cal_body_result'); 218 if( _cal_form_result.lenght === 0 ) return; 219 var _cal_form = $('.cal_body_form'); 220 if( _cal_form.lenght === 0 ) return; 221 var _btn_cal = _cal_form.find('.btn-calc'); 222 if( _btn_cal.lenght === 0 ) return; 223 //_btn_cal.on('click', function(e){ 224 //e.preventDefault(); 225 226 var _form = $(_btn_cal).closest('form'); 227 if( _form.length === 0 ) return; 228 229 var data = {}, 230 _this = $(this); 231 data.bust = _form.find('#bust').val(); 232 data.waist = _form.find('#waist').val(); 233 data.hips = _form.find('#hips').val(); 234 _cal_form_result.addClass('blog-more-ajax-loading'); 235 $.ajax({ 236 type: "POST", 237 url: variable_js.ajax_url, 238 data: {action: 'tb_render_cal_body', data: data}, 239 success: function(data){ 240 _cal_form_result.removeClass('blog-more-ajax-loading'); 241 _cal_form_result.empty().append(data); 242 } 243 }) 244 //}) 245 }, 246 tb_set_stick_bar:function( header_offset ){ 247 AquaObj._header_offset = ( header_offset ) ? header_offset : ( ( AquaObj._header_offset ) ? AquaObj._header_offset : ( $('.tb-header-wrap .header-menu').length > 0 ) ? $('.tb-header-wrap .header-menu').height() : 0 ); 248 if( AquaObj._header_offset ){ 249 setTimeout(function(){ 250 if ($(window).scrollTop() > AquaObj._header_offset/2 || ($(window).scrollTop() + $(window).height()) > ($(document).height() - 5) ) { 251 $('body').addClass('tb-stick-active'); 252 } else { 253 $('body').removeClass('tb-stick-active'); 254 } 255 }, 500) 256 } 257 }, 258 tb_run_ready:function(){ 259 AquaObj.tb_carousel( 4, '.tb-classes-carousel' ); 260 AquaObj.tb_carousel( 3, '.tb-classes-carousel', 30 );
261 AquaObj.tb_carousel( 4, '.tb-product-carousel' ); 262 AquaObj.tb_carousel( 3, '.tb-product-carousel', 30 ); 263 AquaObj.tb_carousel( 2, '.tb-product-carousel' ); 264 AquaObj.tb_carousel( 4, '.tb-events-carousel' ); 265 AquaObj.tb_carousel( 3, '.tb-events-carousel', 30 ); 266 AquaObj.tb_carousel( 2, '.tb-events-carousel', 30 ); 267 AquaObj.tb_carousel( 1, '.tb-events-carousel', true ); 268 AquaObj.tb_carousel( 1, '.tb-blog-carousel', 10 ); 269 AquaObj.tb_carousel( 1, '.jws-theme-twitter-widget'); 270 AquaObj.tb_featured_video(); 271 AquaObj.tb_gallery_grid(); 272 AquaObj.tb_grid_instagram(); 273 274 AquaObj.tb_light_box(); 275 //AquaObj.tb_cal_body(); 276 AquaObj.tb_comment(); 277 //AquaObj.tb_porfolio_masonry(); 278 }, 279 }; 280 !(function($){ 281 function tbripple(elem, opts){ 282 this.thisEl = $(elem), 283 this.opts = $.extend({ 284 version: "1.0.0" 285 }, opts); 286 this.init(); 287 } 288 tbripple.prototype = { 289 init: function(){ 290 if(this.thisEl.is('[disable]') == true){ return; } 291 var tbripple = this; 292 var ripple = $('<span>').addClass('ripple').css({width: 100, height: 100}); 293 this.thisEl.append(ripple); 294 this.thisEl.bind('click', function(e){ 295 var p = tbripple.thisEl.offset(); 296 var position = { x: p.left, y: p.top } 297 var mPosition = { x: e.pageX - 50, y: e.pageY - 50 } 298 ripple.removeClass('animate'); 299 setTimeout(function(){ 300 ripple.css({ 301 left: mPosition.x - position.x, 302 top: mPosition.y - position.y, 303 }).addClass('animate'); 304 }, 20) 305 }) 306 } 307 } 308 $.fn.tbripple = function(opts){ 309 return $(this).each(function(){ 310 new tbripple(this, opts); 311 }) 312 } 313 })(jQuery) 314 /* CAROUSEL PARAMOVE PLUGIN */ 315 !(function($){ 316 function paramove(elem, $otps){ 317 this.element = $(elem); 318 this.otps = $.extend({ 319 version: '1.0.0', 320 selector: '' 321 }, $otps) 322 this.animate(); 323 } 324 paramove.prototype = { 325 animate: function(){ 326 var paramove = this, 327 thisEl = this.element, 328 elemP = thisEl.offset(), 329 elemC = {}, 330 mouse = {}; 331 thisEl.css({ translate: '0s' }); 332 this.element.on({ 333 mousemove: function(event){ 334 m = { x: (event.pageX - elemP.left), y: (event.pageY - elemP.top) }; 335 elemC = { w: (thisEl.width() / 2), h: (thisEl.height() / 2) }; 336 x = (m.x > elemC.w)? ((m.x - elemC.w) * -1) : (elemC.w - m.x); 337 y = (m.y > elemC.h)? ((m.y - elemC.h) * -1) : (elemC.h - m.y); 338 console.log(event.clientX - elemP.left); 339 if(paramove.otps.selector){ 340 thisEl.find(paramove.otps.selector).css({ 341 transform: 'translate3d({0}px, {1}px, 0)'.format(x / 50, y / 50) 342 }); 343 }else{ 344 thisEl.children().css({ 345 transform: 'translate3d({0}px, {1}px, 0)'.format(x / 50, y / 50) 346 }); 347 } 348 }, 349 mouseout: function(){ 350 if(paramove.otps.selector){ 351 thisEl.find(paramove.otps.selector).css({ 352 transform: 'translate3d({0}px, {1}px, 0)'.format(0, 0) 353 }); 354 }else{ 355 thisEl.children().css({ 356 transform: 'translate3d({0}px, {1}px, 0)'.format(0, 0) 357 }); 358 } 359 } 360 }) 361 } 362 } 363 $.fn.paramove = function($otps){ 364 return this.each(function(){ 365 new paramove(this, $otps); 366 }) 367 } 368 String.prototype.format = function () { 369 var args = arguments; 370 return this.replace(/\{\{|\}\}|\{(\d+)\}/g, function (m, n) { 371 if (m == "{{") { return "{"; } 372 if (m == "}}") { return "}"; } 373 return args[n]; 374 }); 375 }; 376 })(jQuery) 377 /* IMG BLUR PLUGIN */ 378 !(function($){ 379 function tbblur(elem, opts){ 380 this.thisEL = $(elem); 381 this.opts = $.extend({ 382 version: '1.0.0' 383 }, opts); 384 this.init(); 385 } 386 tbblur.prototype = { 387 init: function(){ 388 var tbblur = this, 389 canvas = document.createElement('canvas'), 390 ctx = canvas.getContext("2d"), 391 e = 2; 392 tbblur.params_img = { w: 0, h: 0 }; 393 tbblur.img = tbblur.thisEL.find('img'); 394 $(window).resize(function(){ 395 tbblur.params_img.w = parseInt(tbblur.img.css('width')); 396 tbblur.params_img.h = parseInt(tbblur.img.css('height')); 397 canvas.width = tbblur.params_img.w; 398 canvas.height = tbblur.params_img.h; 399 ctx.drawImage(tbblur.img.get(0), 0, 0, tbblur.params_img.w, tbblur.params_img.h); 400 ctx.globalAlpha = 0.5; 401 for(var t = -e; t <= e; t += 3) { 402 for(var n = -e; n <= e; n += 3) { 403 ctx.drawImage(canvas, n, t, tbblur.params_img.w, tbblur.params_img.h); 404 var blob = n >= 0 && t >= 0 && ctx.drawImage(canvas, -(n-1), -(t-1), tbblur.params_img.w, tbblur.params_img.h); 405 } 406 } 407 }).trigger('resize'); 408 tbblur.thisEL.append(canvas); 409 } 410 } 411 $.fn.tbblur = function(opts){ 412 return $(this).each(function(){ 413 new tbblur(this, opts); 414 }) 415 } 416 })(jQuery) 417 jQuery(document).ready(function($) { 418 419 $('#wpadminbar').addClass('aqua_adminbar'); 420 421 AquaObj.tb_run_ready(); 422 423 function ROtesttimonialSlider($elem) { 424 if ($elem.length) { 425 $elem.flexslider({ 426 controlNav: true, 427 directionNav: true 428 }); 429 } 430 } 431 ROtesttimonialSlider($('#ro-testimonial-slider')); 432 function ROtesttimonialSlider2() { 433 $('#ro-testimonial-1').flexslider({ 434 animation: "slide", 435 animationLoop: true, 436 controlNav: true, 437 slideshow: true, 438 directionNav: false 439 }); 440 } 441 ROtesttimonialSlider2(); 442 function ROtesttimonialSlider3() { 443 $('#ro-testimonial-2').flexslider({ 444 animation: "slide", 445 controlNav: false, 446 directionNav: true 447 }); 448 } 449 ROtesttimonialSlider3(); 450 function ROimgSlider() { 451 $('#ro-images-slider').flexslider({ 452 animation: "slide", 453 animationLoop: false, 454 itemWidth: 200, 455 controlNav: false, 456 directionNav: true, 457 minItems: 2, 458 move: 1, 459 maxItems: 8 460 }); 461 } 462 ROimgSlider(); 463 464 function ROTestimonialSlider() { 465 466 $('#tb-testimonial-image').flexslider({ 467 animation: "slide", 468 controlNav: false, 469 startAt: 1, 470 animationLoop: false, 471 controlNav: "thumbnails", 472 directionNav: true, 473 slideshow: false, 474 }); 475 } 476 477 ROTestimonialSlider(); 478 function ROzoomImage() { 479 var $window = $(window); 480 $("#Ro_zoom_image > img").elevateZoom({ 481 zoomType: "lens", 482 responsive: true, 483 containLensZoom: true, 484 cursor: 'pointer', 485 gallery:'Ro_gallery_0', 486 borderSize: 3, 487 borderColour: "#84C340", 488 galleryActiveClass: "ro-active", 489 loadingIcon: 'http://www.elevateweb.co.uk/spinner.gif' 490 }); 491 $("#Ro_zoom_image > img").on("click", function(e) { 492 var ez = $('#Ro_zoom_image > img').data('elevateZoom'); 493 $.fancybox(ez.getGalleryList()); 494 return false;
495 }); 496 } 497 ROzoomImage(); 498 function ROincremental(){ 499 var _increment = $('.tb-incremental'); 500 if( _increment.length === 0 ) return; 501 _increment.each( function(){ 502 $(this).find('.counter').counterUp({ 503 delay: 10, 504 time: 1000 505 }); 506 }) 507 } 508 509 if($('.ro-service-wrap.tpl10').length > 0){ 510 $('.ro-service-wrap.tpl10').hover(function (e) { 511 e.preventDefault(); 512 $('body').find('.ro-service-wrap').removeClass('active'); 513 $(this).addClass('active'); 514 }); 515 } 516 ROincremental(); 517 function ROheadervideo() { 518 $("#ro-play-button").on("click", function(e){ 519 e.preventDefault(); 520 $.fancybox({ 521 'padding' : 0, 522 'autoScale': false, 523 'transitionIn': 'none', 524 'transitionOut': 'none', 525 'title': this.title, 526 'width': 720, 527 'height': 405, 528 'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), 529 'type': 'swf', 530 'swf': { 531 'wmode': 'transparent', 532 'allowfullscreen': 'true' 533 } 534 }); 535 }); 536 } 537 538 function ROBlogCarousel() { 539 $('#tb-blog-image').flexslider({ 540 animation: "slide", 541 controlNav: false, 542 animationLoop: false, 543 controlNav: "thumbnails", 544 directionNav: false, 545 slideshow: false, 546 }); 547 548 var _nav_thumb = $('.flex-control-nav'); 549 if( _nav_thumb.length === 0) return; 550 _nav_thumb.find('li').append("<p class='light_opacity'></p>"); 551 } 552 ROBlogCarousel(); 553 //ROheadervideo(); 554 function ROEasingMoving() { 555 var $root = $('html, body'); 556 $('#nav > li > a, .ro-follow-button').on('click', function() { 557 var href = $.attr(this, 'href'); 558 if(href.substring(0,1)=='#'){ 559 $root.animate({ 560 scrollTop: ($(href).offset().top) 561 }, 500, function() { 562 window.location.hash = href; 563 }); 564 return false; 565 } 566 }); 567 } 568 ROEasingMoving(); 569 570 var _opensearch = $('.widget_mini_icon'); 571 function openSearch() { 572 573 $('.icon_search_wrap').on('click', function(e) { 574 e.preventDefault(); 575 $(this).next('.widget_searchform_content').addClass('open'); 576 $(".search-form input[type=text]" ).focus(); 577 }); 578 $(".search-form").click(function(e){ 579 e.stopPropagation(); 580 }); 581 $('body').on('click','.widget_searchform_content', function(e){ 582 e.preventDefault(); 583 $('body').find('.widget_searchform_content').removeClass('open'); 584 }) 585 $('.search-form').on('click','.close', function(e){ 586 e.preventDefault(); 587 $(this).closest('.widget_searchform_content').removeClass('open'); 588 e.stopPropagation(); 589 }); 590 591 } 592 if( _opensearch.length ){ 593 openSearch(); 594 } 595 596 //Date picker 597 function RODatePicker() { 598 if ($('#rtb-date_custom').length) { 599 $('#rtb-date_custom').datepicker(); 600 } 601 } 602 RODatePicker(); 603 604 /*Header stick*/ 605 function ROHeaderStick() { 606 if( $('.header-menu').length > 0 ){ 607 if($( '.tb-header-wrap' ).hasClass( 'tb_stick_header' )) { 608 AquaObj.tb_set_stick_bar(); 609 $(window).on('scroll load resize', function() { 610 AquaObj.tb_set_stick_bar(); 611 }); 612 } 613 } 614 } 615 ROHeaderStick(); 616 617 $(".blog-desc").each(function() { 618 $(this).dotdotdot(); 619 }); 620 $(window).on('resize', function() { 621 $(".blog-desc").each(function() { 622 $(this).dotdotdot(); 623 }); 624 }); 625 // Back to top btn 626 var tb_back_to_top = jQuery('#tb_back_to_top'); 627 var window_height = jQuery(window).height(); 628 jQuery(window).scroll(function () { 629 /* back to top */ 630 var scroll_top = $(window).scrollTop(); 631 if (scroll_top < window_height) { 632 tb_back_to_top.addClass('no-active').removeClass('active'); 633 } else { 634 tb_back_to_top.removeClass('no-active').addClass('active'); 635 } 636 }); 637 tb_back_to_top.click(function () { 638 jQuery("html, body").animate({ 639 scrollTop: 0 640 }, 1500); 641 }); 642 // switch currency 643 $(document).on("click",".dd-select",function(){ 644 console.log('ok'); 645 $('.dd-pointer').each(function(){ 646 if($(this).hasClass('dd-pointer-up')){ 647 $(this).closest('.dd-select').addClass('active'); 648 }else{ 649 $(this).closest('.dd-select').removeClass('active'); 650 } 651 }) 652 }) 653 // Hook cart success 654 jQuery('.add_to_cart_button').click(function(e){ 655 var $_this = jQuery(this);
656 var $_cart = jQuery('.widget_mini_cart_wrap'); 657 $_cart.removeClass('animate_cart'); 658 var cart = jQuery('.tb_right_fx_wrap .widget_shopping_cart'); 659 jQuery(document).ajaxSuccess(function(e, xhr, settings) { 660 //console.log(settings.data); 661 if(!$('.widget_mini_cart_wrap').is(":visible")){ 662 $('.widget_mini_cart_wrap').show(); 663 } 664 if(typeof(settings.data)!='undefined'){ 665 if(settings.data.indexOf('woocommerce_add_to_cart') > -1){ 666 console.log('yay!'); 667 $_cart.addClass('animate_cart'); 668 } 669 } 670 $('.widget_mini_cart_wrap').removeClass('tb-cart-empty'); 671 }); 672 }) 673 /* Btn menu click */ 674 jQuery('#ro-hamburger').click(function(){ 675 jQuery('body').toggleClass('ro-main-nav-opened'); 676 $('.ro-main-nav-opened .menu-list.active ul li.menu-item-has-children >a').on('click',function(e) { 677 e.preventDefault(); 678 //console.log("preventDefault"); 679 }); 680 }) 681 jQuery('.tb_right_fx_wrap .wg-title').click(function(e){ 682 e.stopPropagation(); 683 jQuery(this).toggleClass( "active" ); 684 jQuery('.tb_right_fx_wrap .widget_shopping_cart_content').toggleClass( "active" ); 685 }) 686 $('body').click(function (e) { 687 var target = $(e.target); 688 if (target.parents('.tb_right_fx_wrap').length == 0 && !target.hasClass('tb_right_fx_wrap')) { 689 $('.tb_right_fx_wrap .wg-title,.tb_right_fx_wrap .widget_shopping_cart_content').removeClass('active'); 690 } 691 }); 692 // Same Height 693 jQuery('.row').each(function() { 694 if (jQuery(this).hasClass('same-height')) { 695 var height = jQuery(this).children().height(); 696 jQuery(this).children().each(function() { 697 jQuery(this).css('min-height', height); 698 }); 699 } 700 }); 701 // Same Height 702 703 // Color box 704 jQuery(".view-image").colorbox({rel:'colorbox', maxWidth:'90%', maxHeight:'90%' }); 705 // Mixitup 706 if ($.fn.mixItUp) { $('#Container').mixItUp(); } 707 // Ripple 708 jQuery('.tbripple').tbripple(); 709 if (jQuery('.tb-blog-image .blog-note-top').length > 0){ 710 jQuery('.tb-blog-image .blog-note-top').on('click', function(e){ 711 e.preventDefault(); 712 $(this).parent().fadeOut('slow', function(){ 713 $(this).remove(); 714 }); 715 }) 716 } 717 $('body').on('click focus', '#rtb-date, #rtb-time', function(e){ 718 var $this = $(this), 719 top = $(window).scrollTop(); 720 setTimeout(function(){ 721 $(window).scrollTop(top); 722 }, 10) 723 $('.picker__holder').unbind('click').bind('click', function(){ 724 setTimeout(function(){ 725 $(window).scrollTop(top); 726 }, 10) 727 }) 728 }) 729 //countdown 730 var $tb_countdown_js = $('.tb-countdown-js'); 731 if($tb_countdown_js.length > 0){ 732 $tb_countdown_js.each(function(){ 733 var $this = $(this), 734 dateEnd = $this.data('countdown'); 735 $this.countdown(dateEnd, function(event){ 736 var $this = $(this).html(event.strftime('' 737 + '<span class="tb-box-countdown"><span>%m</span> <p>Months</p></span> ' 738 + '<span class="tb-box-countdown"><span>%d</span> <p>Days</p></span> ' 739 + '<span class="tb-box-countdown"><span>%H</span> <p>Hours</p></span> ' 740 + '<span class="tb-box-countdown"><span>%M</span> <p>Minutes</p></span> ' 741 + '<span class="tb-box-countdown"><span>%S</span> <p>Seconds</p></span>')); 742 }); 743 }) 744 } 745 //checkout 746 $('.ro-checkout-process .ro-hr-line .ro-tab-1, .ro-customer-info .ro-edit-customer-info').click(function(){ 747 var process1 = $('.ro-checkout-process .ro-hr-line .ro-tab-1'); 748 process1.parent().parent().removeClass('ro-process-2'); 749 process1.parent().parent().addClass('ro-process-1'); 750 $('.ro-checkout-panel .ro-panel-1').css('display', 'block'); 751 $('.ro-checkout-panel .ro-panel-2').css('display', 'none'); 752 }); 753 $('.ro-checkout-process .ro-hr-line .ro-tab-2, .ro-checkout-panel .ro-btn-2').click(function(){ 754 var process2 = $('.ro-checkout-process .ro-hr-line .ro-tab-2'); 755 process2.parent().parent().removeClass('ro-process-1'); 756 process2.parent().parent().addClass('ro-process-2'); 757 $('.ro-checkout-panel .ro-panel-1').css('display', 'none'); 758 $('.ro-checkout-panel .ro-panel-2').css('display', 'block'); 759 }); 760 }); 761 jQuery(window).load(function(){ 762 // Paramove carousel 763 764 AquaObj.tb_cal_body(); 765 AquaObj.tb_porfolio_masonry(); 766 AquaObj.tb_gallery_masonry(); 767 setTimeout(function(){ 768 jQuery('.js-paramove').each(function(){ 769 jQuery(this).paramove({ selector: jQuery(this).data('paramove-target') }); 770 }) 771 }, 1000) 772 // Image blur 773 if( jQuery('.tbblur').length > 0 ) 774 jQuery('.tbblur').tbblur(); 775 // func active tabs default 776 jQuery('.wpb_tabs').each(function(){ 777 var wpb_tabs_nav = $(this).find('.wpb_tabs_nav'), 778 active_num = wpb_tabs_nav.data('active-tab'); 779 wpb_tabs_nav.find('li').eq(parseInt(active_num) - 1).trigger('click'); 780 }) 781 var $nice_scroll_class_js = $('.nice-scroll-class-js'); 782 if($nice_scroll_class_js.length > 0 && $.fn.niceScroll !== undefined){ 783 $nice_scroll_class_js.each(function(){ 784 $(this).niceScroll(); 785 }) 786 } 787 // caculate height product 788 var maxHeight = 0; 789 jQuery(".tb-products-list .tb-product-items .tb-product-item").each(function(){ 790 if (jQuery(this).height() > maxHeight) { maxHeight = jQuery(this).height(); } 791 }); 792 jQuery(".tb-products-list .tb-product-items .tb-product-item").height(maxHeight); 793 }) 794})(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.