1(function($){ 2 "use strict"; 3 4 // Popup Sinlge Gallery 5 if( $('.woocommerce-product-gallery__image').length && typeof Fancybox != 'undefined' ){ 6 Fancybox.bind("[data-fancybox]", { 7 // Your options go here 8 }); 9 } 10 11 // Login 12 $('.ova-login-register-woo li a').on('click', function(){ 13 var type = $(this).data('type'); 14 $('.ova-login-register-woo li').removeClass('active'); 15 $(this).parent('li').addClass('active'); 16 if( type === 'login' ){ 17 $('.woocommerce #customer_login .woocommerce-form.woocommerce-form-login').css('display', 'block'); 18 $('.woocommerce #customer_login .woocommerce-form.woocommerce-form-register').css('display', 'none'); 19 } else if( type === 'register' ){ 20 $('.woocommerce #customer_login .woocommerce-form.woocommerce-form-register').css('display', 'block'); 21 $('.woocommerce #customer_login .woocommerce-form.woocommerce-form-login').css('display', 'none'); 22 } 23 }) 24 25 /* Gallery Slideshow */ 26 $('.ova-product-gallery-slideshow').each( function() { 27 var that = $(this); 28 var options = that.data('options') ? that.data('options') : {}; 29 30 var responsive_value = { 31 0:{ 32 items:1, 33 nav:false, 34 dots:true, 35 }, 36 768:{ 37 items: 2, 38 }, 39 1025:{ 40 items: options.items, 41 }, 42 1300:{ 43 items: options.items, 44 } 45 }; 46 47 that.owlCarousel({ 48 autoWidth: options.autoWidth, 49 margin: options.margin, 50 items: options.items, 51 loop: options.loop, 52 autoplay: options.autoplay, 53 autoplayTimeout: options.autoplayTimeout, 54 center: options.center, 55 lazyLoad: options.lazyLoad, 56 nav: options.nav, 57 dots: options.dots, 58 autoplayHoverPause: options.autoplayHoverPause, 59 slideBy: options.slideBy, 60 smartSpeed: options.smartSpeed, 61 rtl: options.rtl, 62 animateOut: "fadeOut", 63 navText:[ 64 '<i aria-hidden="true" class="'+ options.nav_left +'"></i>', 65 '<i aria-hidden="true" class="'+ options.nav_right +'"></i>' 66 ], 67 responsive: responsive_value, 68 }); 69 70 that.find('.gallery-fancybox').on('click', function() { 71 var index = $(this).data('index'); 72 var gallery_data = $(this).closest('.ova-product-gallery-popup').find('.ova-data-gallery').data('gallery'); 73 74 Fancybox.show(gallery_data, { 75 Image: { 76 Panzoom: { 77 zoomFriction: 0.7, 78 maxScale: function () { 79 return 3; 80 }, 81 }, 82 }, 83 startIndex: index, 84 }); 85 }); 86 }); 87 88 /* Forms */ 89 $('.ova-forms-product').each( function() { 90 var that = $(this); 91 var item = that.find('.tabs .item'); 92 93 var special_offers = that.find('.special-offers'); 94 var special_price = that.find('.special-price'); 95 var close_popup = that.find('.close-popup'); 96 97 if ( item.length > 0 ) { 98 item.each( function( index ) { 99 if ( index == 0 ) { 100 $(this).addClass('active'); 101 var id = $(this).data('id'); 102 $(id).show(); 103 } 104 }); 105 } 106 107 item.on('click', function() { 108 item.removeClass('active'); 109 $(this).addClass('active'); 110 var id = $(this).data('id'); 111 112 if ( id == '#booking-form' ) { 113 that.find('#request-form').hide(); 114 } 115 116 if ( id == '#request-form' ) { 117 that.find('#booking-form').hide(); 118 } 119 120 $(id).show(); 121 }); 122 123 // Special offer & weekdays 124 special_offers.on('click', function() { 125 $(this).find('.special-price').css('display', 'block'); 126 }); 127 128 var view_discount = that.find('.view-discount-price'); 129 view_discount.on('click', function() { 130 var discount_class = $(this).data('discount') 131 var table_discount = $(this).closest('.boby-price').find('.'+discount_class); 132 table_discount.slideToggle("slow"); 133 }); 134 135 var weekdays = that.find('.weekdays'); 136 var weekdays_price = that.find('.table-week-wrapper'); 137 weekdays.on('click', function() { 138 $(this).find('.table-week-wrapper').css('display', 'block'); 139 }); 140 141 // window click 142 $(window).click( function(e) { 143 if ( e.target.className == 'special-price' || e.target.className == 'close-popup' ) { 144 special_price.hide(); 145 } 146 147 if ( e.target.className == 'table-week-wrapper' || e.target.className == 'close-popup' ) { 148 weekdays_price.hide(); 149 } 150 }); 151 }); 152 153 /* Tabs */ 154 $('.ova-tabs-product').each( function() { 155 var that = $(this); 156 var item = that.find('.tabs .item'); 157 158 if ( item.length > 0 ) { 159 item.each( function( index ) { 160 if ( index == 0 ) { 161 $(this).addClass('active'); 162 var id = $(this).data('id'); 163 $(id).show(); 164 } 165 }); 166 } 167 168 item.on('click', function() { 169 item.removeClass('active'); 170 $(this).addClass('active'); 171 var id = $(this).data('id'); 172 173 if ( id == '#ova-product-description' ) { 174 that.find('#ova-product-conditions-and-rules, #ova-product-review, #ova-product-video').hide(); 175 } 176 177 if ( id == '#ova-product-conditions-and-rules' ) { 178 that.find('#ova-product-description, #ova-product-review, #ova-product-video').hide(); 179 } 180 181 if ( id == '#ova-product-video' ) { 182 that.find('#ova-product-description, #ova-product-review, #ova-product-conditions-and-rules').hide(); 183 } 184 185 if ( id == '#ova-product-review' ) { 186 that.find('#ova-product-conditions-and-rules, #ova-product-description, #ova-product-video').hide(); 187 } 188 189 $(id).show(); 190 }); 191 }); 192 193 /* Related Products */ 194 $(".ova-content-single-product .elementor-ralated-slide .elementor-ralated").each(function(){ 195 var owlsl = $(this) ; 196 var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {}; 197 198 var responsive_value = { 199 0:{ 200 items:1, 201 dots: true, 202 nav: false 203 }, 204 576:{ 205 items:1, 206 }, 207 767: { 208 items:2, 209 }, 210 960:{ 211 items:owlsl_ops.items - 1, 212 }, 213 1200:{ 214 items:owlsl_ops.items 215 } 216 }; 217 218 owlsl.owlCarousel({ 219 margin: owlsl_ops.margin, 220 items: owlsl_ops.items, 221 loop: owlsl_ops.loop,
222 autoplay: owlsl_ops.autoplay, 223 autoplayTimeout: owlsl_ops.autoplayTimeout, 224 nav: owlsl_ops.nav, 225 dots: owlsl_ops.dots, 226 autoplayHoverPause: owlsl_ops.autoplayHoverPause, 227 slideBy: owlsl_ops.slideBy, 228 smartSpeed: owlsl_ops.smartSpeed, 229 rtl: owlsl_ops.rtl, 230 navText:[ 231 '<i class="' + owlsl_ops.nav_left + '">', 232 '<i class="' + owlsl_ops.nav_right + '">', 233 ], 234 responsive: responsive_value, 235 }); 236 237 /* Fixed WCAG */ 238 owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous"); 239 owlsl.find(".owl-nav button.owl-next").attr("title", "Next"); 240 owlsl.find(".owl-dots button").attr("title", "Dots"); 241 242 }); 243 244})(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.