<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">( function() {
	'use strict';
	// Compatibility with YITH WISHLIST PRO
	if ( typeof yith_wcwl_l10n != 'undefined' ) {
		yith_wcwl_l10n.enable_tooltip = false;
	}
	// Theme Functions
	function portoCalcSliderButtonsPosition( $parent, padding ) {
		var $buttons = $parent.find( '.show-nav-title .owl-nav' );
		if ( $buttons.length ) {
			if ( window.theme.rtl ) {
				$buttons.css( 'left', padding );
			} else {
				$buttons.css( 'right', padding );
			}
			if ( $buttons.closest( '.porto-products' ).length &amp;&amp; $buttons.closest( '.porto-products' ).parent().children( '.products-slider-title' ).length ) {
				var $title = $buttons.closest( '.porto-products' ).parent().children( '.products-slider-title' ), newMT = $title.offset().top - $parent.offset().top - parseInt( $title.css( 'padding-top' ), 10 ) - parseInt( $title.css( 'line-height' ), 10 ) / 2 + $buttons.children().outerHeight() - parseInt( $buttons.children().css( 'margin-top' ), 10 );
				$buttons.css( 'margin-top', newMT );
			}
		}
	}

	// Woocommerce Products Slider
	if ( typeof jQuery.fn.owlCarousel == 'function' ) {
		( function( theme, $ ) {

			theme = theme || {};

			var instanceName = '__wooProductsSlider';

			var WooProductsSlider = function( $el, opts ) {
				return this.initialize( $el, opts );
			};

			WooProductsSlider.defaults = {
				rtl: theme.rtl,
				autoplay: theme.slider_autoplay == '1' ? true : false,
				autoplayTimeout: theme.slider_speed ? theme.slider_speed : 5000,
				loop: theme.slider_loop,
				nav: false,
				navText: ["", ""],
				dots: false,
				autoplayHoverPause: true,
				items: 1,
				responsive: {},
				autoHeight: true,
				lazyLoad: true
			};

			WooProductsSlider.prototype = {
				initialize: function( $el, opts ) {
					if ( $el.data( instanceName ) ) {
						return this;
					}

					this.$el = $el;

					this
						.setData()
						.setOptions( opts )
						.build();

					return this;
				},

				setData: function() {
					this.$el.data( instanceName, true );

					return this;
				},

				setOptions: function( opts ) {
					this.options = $.extend( true, {}, WooProductsSlider.defaults, opts, {
						wrapper: this.$el
					} );

					return this;
				},

				calcOwlHeight: function( $el ) {
					var h = 0;
					$el.find( '.owl-item.active' ).each( function() {
						if ( h &lt; $( this ).height() )
							h = $( this ).height();
					} );
					$el.find( '.owl-stage-outer' ).height( h );
				},

				build: function() {
					var self = this,
						$el = this.options.wrapper,
						lg = this.options.lg,
						md = this.options.md,
						xs = this.options.xs,
						ls = this.options.ls,
						$slider_wrapper = $el.closest( '.slider-wrapper' ),
						single = this.options.single,
						dots = this.options.dots,
						nav = this.options.nav,
						responsive = {},
						items,
						// scrollwidth = 0 not using getscrollbarwidth
						scrollWidth = 0,
						count = $el.find( '&gt; *' ).length,
						w_xs = 576 - scrollWidth,
						w_md = 768 - scrollWidth,
						w_xl = theme.screen_xl - scrollWidth,
						w_sl = theme.screen_xxl - scrollWidth;

					if ( $el.find( '.product-col' ).get( 0 ) ) {
						portoCalcSliderButtonsPosition( $slider_wrapper, $el.find( '.product-col' ).css( 'padding-left' ) );
					}

					if ( single ) {
						items = 1;
					} else {
						items = lg ? lg : 1;
						if ( this.options.xl ) {
							responsive[w_sl] = { items: this.options.xl, loop: ( this.options.loop &amp;&amp; count &gt; this.options.xl ) ? true : false };
						}
						responsive[w_xl] = { items: items, loop: ( this.options.loop &amp;&amp; count &gt; items ) ? true : false };
						if ( md ) responsive[w_md] = { items: md, loop: ( this.options.loop &amp;&amp; count &gt; md ) ? true : false };
						if ( xs ) responsive[w_xs] = { items: xs, loop: ( this.options.loop &amp;&amp; count &gt; xs ) ? true : false };
						if ( ls ) responsive[0] = { items: ls, loop: ( this.options.loop &amp;&amp; count &gt; ls ) ? true : false };
					}

					this.options = $.extend( true, {}, this.options, {
						loop: ( this.options.loop &amp;&amp; count &gt; items ) ? true : false,
						items: items,
						responsive: responsive,
						onRefresh: function() {
							if ( $el.find( '.product-col' ).get( 0 ) ) {
								portoCalcSliderButtonsPosition( $slider_wrapper, $el.find( '.product-col' ).css( 'padding-left' ) );
							}
						},
						onInitialized: function() {
							if ( $el.find( '.product-col' ).get( 0 ) ) {
								portoCalcSliderButtonsPosition( $slider_wrapper, $el.find( '.product-col' ).css( 'padding-left' ) );
							}
							//$el.find('.cloned .porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad();

							if ( $el.find( '.owl-item.cloned' ).length ) {
								setTimeout( function() {
									var ins = $el.find( '.owl-item.cloned .porto-lazyload:not(.lazy-load-loaded)' ).themePluginLazyLoad( { effect: 'fadeIn', effect_speed: 400 } );
									if ( ins &amp;&amp; ins.loadAndDestroy ) {
										ins.loadAndDestroy();
									}
								}, 100 );
							}
						},
						touchDrag: ( count == 1 ) ? false : true,
						mouseDrag: ( count == 1 ) ? false : true
					} );

					// Auto Height Fixes
					if ( this.options.autoHeight ) {
						var thisobj = this;
						$( window ).on( 'resize', function() {
							thisobj.calcOwlHeight( $el );
						} );

						if ( theme.isLoaded ) {
							setTimeout( function() {
								thisobj.calcOwlHeight( $el );
							}, 100 );
						} else {
							$( window ).on( 'load', function() {
								thisobj.calcOwlHeight( $el );
							} );
						}
					}

					$el.owlCarousel( this.options );

					return this;
				}
			};

			// expose to scope
			$.extend( theme, {
				WooProductsSlider: WooProductsSlider
			} );

			// jquery plugin
			$.fn.themeWooProductsSlider = function( opts ) {
				return this.map( function() {
					var $this = $( this );

					if ( $this.data( instanceName ) ) {
						return $this;
					} else {
						return new theme.WooProductsSlider( $this, opts );
					}

				} );
			}

		} ).apply( this, [window.theme, jQuery] );
	}

	// Woocommerce Add to Cart, View Cart Events
	( function( theme, $ ) {

		var $supports_html5_storage;
		try {
			$supports_html5_storage = ( 'sessionStorage' in window &amp;&amp; window.sessionStorage !== null );

			window.sessionStorage.setItem( 'wc', 'test' );
			window.sessionStorage.removeItem( 'wc' );
		} catch ( err ) {
			$supports_html5_storage = false;
		}

		var setCartCreationTimestamp = function() {
			if ( $supports_html5_storage ) {
				sessionStorage.setItem( 'wc_cart_created', ( new Date() ).getTime() );
			}
		};

		var setCartHash = function( cart_hash ) {
			if ( $supports_html5_storage &amp;&amp; wc_cart_fragments_params ) {
				localStorage.setItem( wc_cart_fragments_params.cart_hash_key, cart_hash );
				sessionStorage.setItem( wc_cart_fragments_params.cart_hash_key, cart_hash );
			}
		};

		var initAjaxRemoveCartItem = function() {
			$( document ).off( 'click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product' ).on( 'click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product', function( e ) {
				e.preventDefault();
				var $this = $( this );
				var cart_id = $this.data( "cart_id" );
				var product_id = $this.data( "product_id" );
				$this.closest( 'li' ).find( '.ajax-loading' ).show();

				$.ajax( {
					type: 'POST',
					dataType: 'json',
					url: theme.ajax_url,
					data: {
						action: "porto_cart_item_remove",
						nonce: js_porto_vars.porto_nonce,
						cart_id: cart_id
					},
					success: function( response ) {
						var this_page = window.location.toString(),
							item_count = $( response.fragments['div.widget_shopping_cart_content'] ).find( '.mini_cart_item' ).length;

						this_page = this_page.replace( 'add-to-cart', 'added-to-cart' );
						updateCartFragment( response );
						$( document.body ).trigger( 'wc_fragments_refreshed' );
						$( '.viewcart-' + product_id ).removeClass( 'added' );
						$( '.porto_cart_item_' + cart_id ).remove();

						// Block widgets and fragments
						if ( item_count == 0 &amp;&amp; ( $( 'body' ).hasClass( 'woocommerce-cart' ) || $( 'body' ).hasClass( 'woocommerce-checkout' ) ) ) {
							$( '.page-content' ).fadeTo( 400, 0.8 ).block( {
								message: null,
								overlayCSS: {
									opacity: 0.2
								}
							} );
						} else {
							$( '.shop_table.cart, .shop_table.review-order, .updating, .cart_totals' ).fadeTo( 400, 0.8 ).block( {
								message: null,
								overlayCSS: {
									opacity: 0.2
								}
							} );
						}

						// Unblock
						$( '.widget_shopping_cart, .updating' ).stop( true ).css( 'opacity', '1' ).unblock();

						// Cart page elements
						if ( item_count == 0 &amp;&amp; ( $( 'body' ).hasClass( 'woocommerce-cart' ) || $( 'body' ).hasClass( 'woocommerce-checkout' ) ) ) {
							$( '.page-content' ).load( this_page + ' .page-content:eq(0) &gt; *', function() {
								$( '.page-content' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );
						} else {
							$( '.shop_table.cart' ).load( this_page + ' .shop_table.cart:eq(0) &gt; *', function() {
								$( '.shop_table.cart' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );

							$( '.cart_totals' ).load( this_page + ' .cart_totals:eq(0) &gt; *', function() {
								$( '.cart_totals' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );

							// Checkout page elements
							$( '.shop_table.review-order' ).load( this_page + ' .shop_table.review-order:eq(0) &gt; *', function() {
								$( '.shop_table.review-order' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );
						}
					}
				} );

				return false;
			} );
		};

		var refreshCartFragment = function() {
			initAjaxRemoveCartItem();
			if ( $.cookie( 'woocommerce_items_in_cart' ) &gt; 0 ) {
				$( '.hide_cart_widget_if_empty' ).closest( '.widget_shopping_cart' ).show();
			} else {
				$( '.hide_cart_widget_if_empty' ).closest( '.widget_shopping_cart' ).hide();
			}
		};

		var updateCartFragment = function( data ) {
			if ( data &amp;&amp; data.fragments ) {
				var fragments = data.fragments,
					cart_hash = data.cart_hash;

				$.each( fragments, function( key, value ) {
					$( key ).replaceWith( value );
				} );
				if ( typeof wc_cart_fragments_params === 'undefined' ) {
					return;
				}
				/* Storage Handling */
				if ( $supports_html5_storage ) {
					var prev_cart_hash = sessionStorage.getItem( 'wc_cart_hash' );

					if ( prev_cart_hash === null || prev_cart_hash === undefined || prev_cart_hash === '' ) {
						setCartCreationTimestamp();
					}
					sessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( fragments ) );
					setCartHash( cart_hash );
				}
			}
		};

		$( function() {

			refreshCartFragment();

			// add ajax cart loading
			$( document ).on( 'click', '.add_to_cart_button', function( e ) {
				var $this = $( this );
				if ( $this.is( '.product_type_simple' ) ) {
					if ( $this.attr( 'data-product_id' ) ) {
						$this.addClass( 'product-adding' );
					}
					// add to cart notifaction style 2, 3
					if ( $this.hasClass( 'viewcart-style-2' ) || $this.hasClass( 'viewcart-style-3' ) ) {
						$( 'body' ).append( '&lt;div id="loading-mask"&gt;&lt;div class="background-overlay"&gt;&lt;/div&gt;&lt;/div&gt;' );
						if ( !$( this ).closest( '.product' ).find( '.loader-container' ).length ) {
							$( this ).closest( '.product' ).find( '.product-image' ).append( '&lt;div class="loader-container"&gt;&lt;div class="loader"&gt;&lt;i class="porto-ajax-loader"&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;' );
						}
						$( this ).closest( '.product' ).find( '.loader-container' ).show();
					}
				}
			} );

			// add to cart action
			$( document ).on( 'click', 'span.add_to_cart_button', function( e ) {
				var $this = $( this );
				if ( $this.is( '.product_type_simple' ) ) {
					if ( !$this.attr( 'data-product_id' ) ) {
						window.location.href = $this.attr( 'href' );
					}
				} else {
					window.location.href = $this.attr( 'href' );
				}
			} );

			$( document.body ).on( 'added_to_cart', function() {
				$( 'ul.products li.product .added_to_cart, .porto-tb-item .added_to_cart' ).remove();
				initAjaxRemoveCartItem();
			} );

			$( document.body ).on( 'wc_cart_button_updated', function() {
				$( 'ul.products li.product .added_to_cart, .porto-tb-item .added_to_cart' ).remove();
			} );

			$( document.body ).on( 'wc_fragments_refreshed wc_fragments_loaded', function() {
				refreshCartFragment();
			} );

			$( document ).on( 'click', '.product-image .viewcart, .after-loading-success-message .viewcart', function( e ) {
				if ( wc_add_to_cart_params.cart_url ) {
					window.location.href = wc_add_to_cart_params.cart_url;
				}
				e.preventDefault();
			} );
			var porto_product_add_cart_timer = null;
			$( document ).on( 'added_to_cart', 'body', function( event ) {
				var $mc_item = $( '#mini-cart .cart-items' );
				if ( $mc_item.length ) {
					$mc_item.addClass( 'count-updating' );
					setTimeout( function() {
						$mc_item.removeClass( 'count-updating' );
					}, 1000 );
				}

				//add to cart notifaction style 2,3
				$( 'body #loading-mask' ).remove();

				$( '.add_to_cart_button.product-adding' ).each( function() {
					var $link = $( this );
					$link.removeClass( 'product-adding' );
					if ( $link.hasClass( 'viewcart-style-1' ) ) {
						$link.closest( '.product' ).find( '.viewcart' ).addClass( 'added' );
						$( '.minicart-offcanvas' ).addClass( 'minicart-opened' );
					} else {
						$link.closest( '.product' ).find( '.loader-container' ).hide();
						if ( $link.closest( 'li.outofstock' ).length ) {
							return;
						}
						var $msg;
						if ( $link.hasClass( 'viewcart-style-2' ) ) {
							$msg = $( '.after-loading-success-message .success-message-container' ).eq( 0 );
							$msg.find( '.product-name' ).text( $link.closest( '.product' ).find( '.woocommerce-loop-product__title' ).text() );
						} else {
							$msg = $( '.after-loading-success-message .success-message-container' ).last().clone().removeClass( 'd-none' );
							$msg.find( '.product-name' ).empty().append( $link.closest( '.product' ).find( '.product-loop-title, .post-title a' ).clone() );
						}
						$msg.find( '.msg-box img' ).remove();
						if ( $link.closest( '.product' ).find( '.product-image img' ).length ) {
							var $img = $link.closest( '.product' ).find( '.product-image img' ).eq( 0 );
							$( '&lt;img /&gt;' ).attr( 'src', $img.data( 'oi' ) ? $img.data( 'oi' ) : $img.attr( 'src' ) ).appendTo( $msg.find( '.msg-box' ) );
						}
						$( '.after-loading-success-message' ).eq( 0 ).stop().show();

						if ( $link.hasClass( 'viewcart-style-2' ) ) {
							if ( porto_product_add_cart_timer ) {
								clearTimeout( porto_product_add_cart_timer );
							}
							porto_product_add_cart_timer = setTimeout( function() { $( '.after-loading-success-message' ).eq( 0 ).hide(); }, 4000 );
						} else {
							$msg.prependTo( '.after-loading-success-message' );
							theme.requestFrame( function() {
								$msg.addClass( 'active' );
							} );
							setTimeout( function() { $msg.find( '.mfp-close' ).trigger( 'click' ); }, 5000 );
						}
					}
				} );
			} );

			$( '.after-loading-success-message .continue_shopping' ).on( 'click', function() {
				$( '.after-loading-success-message' ).eq( 0 ).fadeOut( 200 );
			} );
			$( '.after-loading-success-message' ).on( 'click', '.mfp-close', function() {
				var $obj = $( this ).closest( '.success-message-container' );
				$obj.removeClass( 'active' );
				theme.requestTimeout( function() {
					$obj.slideUp( 300, function() {
						$obj.remove();
					} );
				}, 350 );
			} );

			$( document.body ).on( 'click', '.variations_form .variations .filter-item-list .filter-color, .variations_form .variations .filter-item-list .filter-item', function( e ) {
				e.preventDefault();
				var $this = $( this ),
					$selector = $this.closest( 'ul' ).siblings( 'select' );
				if ( !$selector.length || $this.hasClass( 'disabled' ) ) {
					return;
				}
				var $li_obj = $this.closest( 'li' );
				if ( $li_obj.hasClass( 'active' ) ) {
					$li_obj.removeClass( 'active' );
					$selector.val( '' );
				} else {
					$li_obj.addClass( 'active' ).siblings().removeClass( 'active' );
					$selector.val( $this.data( 'value' ) );
				}
				$selector.trigger( 'change.wc-variation-form' );
			} );
			$( document ).on( 'wc_variation_form', '.variations_form', function() {
				$( this ).addClass( 'vf_init' );
				if ( $( this ).find( '.filter-item-list' ).length &lt; 1 ) {
					return;
				}
				$( this ).find( '.variations select' ).trigger( 'focusin' );
			} );
			$( document ).on( 'updated_wc_div', function() {
				$( '.woocommerce-cart-form .porto-lazyload' ).themePluginLazyLoad();
			} );
			$( document ).on( 'found_variation reset_data', '.variations_form', function( e, args ) {
				// attribute description
				var $this = $( this );
				if ( $this.find( '.product-attr-description' ).length ) {
					if ( typeof args == 'undefined' ) {
						$this.find( '.product-attr-description' ).removeClass( 'active' );
					} else {
						$this.find( '.product-attr-description' ).addClass( 'active' );
						$this.find( '.product-attr-description .attr-desc' ).removeClass( 'active' );
						$this.find( '.variations select' ).each( function() {
							var $obj = $( this );
							$this.find( '.product-attr-description .attr-desc[data-attrid="' + $obj.val() + '"]' ).addClass( 'active' );
						} );
					}
				}

				if ( $this.find( ".filter-item-list" ).length &lt; 1 ) {
					return;
				}
				$this.find( ".filter-item-list" ).each( function() {
					if ( $( this ).next( "select" ).length &lt; 1 ) {
						return;
					}
					var selector = $( this ).next( "select" ),
						//html = '',
						$list = $( this );
					$list.find( 'li.active' ).removeClass( 'active' );
					$list.find( '.filter-color, .filter-item' ).removeClass( 'enabled' ).removeClass( 'disabled' );
					selector.children( "option" ).each( function() {
						/*var isColor = typeof $(this).data('color') != 'undefined' ? true : false,
							isImage = typeof $(this).data('image') != 'undefined' ? true : false,
						spanClass = isColor ? "filter-color" : ( isImage ? "filter-item filter-image" : "filter-item" );*/
						if ( !$( this ).val() ) {
							return;
						}
						$list.find( '[data-value="' + $( this ).val() + '"]' ).addClass( 'enabled' );
						if ( $( this ).val() == selector.val() ) {
							$list.find( '[data-value="' + $( this ).val() + '"]' ).parent().addClass( 'active' );
						}
						/*html += '&lt;li';
						if ($(this).val() == selector.val()) {
							html += ' class="active"';
						}
						html += '&gt;&lt;a href="#" data-value="'+ escape( $(this).val() ) +'" class="' + spanClass + '"';
						if (isColor) {
							html += ' style="background-color: #' + escape( $(this).data('color').replace('#','') ) + '"';
						}
						if (isImage) {
							html += ' style="background-image:url(' + $(this).data('image') + ')"';
						}
						html += '&gt;';
						if (!isColor) {
							html += $(this).text();
						}
						html += '&lt;/a&gt;&lt;/li&gt;';*/
					} );
					$list.find( '.filter-color:not(.enabled), .filter-item:not(.enabled)' ).addClass( 'disabled' );
					//$(this).html(html);
				} );
			} );

			// daily sale
			$( document ).on( 'found_variation reset_data', '.variations_form', function( e, obj ) {
				var $wrapper = $( this ).closest( '.product' ),
					$timer = $wrapper.find( '.sale-product-daily-deal.for-some-variations' );
				if ( !$timer.length ) {
					$timer = $wrapper.find( '.porto-product-sale-timer' ).eq( 0 );
					if ( !$timer.length ) {
						return;
					}
				}
				if ( obj &amp;&amp; obj.is_purchasable &amp;&amp; typeof obj.porto_date_on_sale_to != 'undefined' &amp;&amp; obj.porto_date_on_sale_to ) {
					var saleTimer = $timer.find( '.porto_countdown-dateAndTime' );
					if ( saleTimer.data( 'terminal-date' ) != obj.porto_date_on_sale_to ) {
						var newDate = new Date( obj.porto_date_on_sale_to );
						saleTimer.porto_countdown( 'option', { until: newDate } );
						saleTimer.data( 'terminal-date', obj.porto_date_on_sale_to );
					}
					$timer.slideDown();
				} else {
					if ( $timer.is( ':hidden' ) ) {
						$timer.hide();
					} else {
						$timer.slideUp();
					}
				}
			} );

			$( 'body' ).on( 'click', '.product-attr-description &gt; a', function( e ) {
				e.preventDefault();
				$( this ).next().stop().slideToggle( 400 );
			} );

			// if product was already added to cart, show check icon in add to cart button and view cart button in single product page
			if ( $( document.body ).hasClass( 'single-product' ) ) {
				$( document ).on( 'woocommerce_variation_has_changed', '.variations_form', function( e, variation ) {
					$( document.body ).removeClass( 'single-add-to-cart' );
				} );
				$( document ).on( 'found_variation', '.variations_form', function( e, variation ) {
					try {
						var cart_items = JSON.parse( sessionStorage.getItem( wc_cart_fragments_params.fragment_name ) );
						if ( cart_items['div.widget_shopping_cart_content'] ) {
							var cart_item = $( cart_items['div.widget_shopping_cart_content'] ).find( '.porto-variation-' + variation.variation_id );
							if ( cart_item.length ) {
								theme.requestFrame( function() {
									$( document.body ).addClass( 'single-add-to-cart' );
								} );
							}
						}
					} catch ( e ) {
					}
				} );
			}

			// Mini Cart Quantity on Cart Popup or Offcanvas
			var timeout;

			$( document ).on( 'change input', '.cart_list .quantity .qty', function() {
				var input = $(this);
				var qtyVal = input.val();
				var itemID = input.parents( '.woocommerce-mini-cart-item' ).data( 'key' );
				var maxValue = input.attr( 'max' );
	
				clearTimeout( timeout );
	
				if ( parseInt( qtyVal ) &gt; parseInt( maxValue ) ) {
					qtyVal = maxValue;
				}
	
				timeout = setTimeout( function() {
					input.parents( '.mini_cart_item' ).find( '.ajax-loading' ).show();
					$.ajax( {
						url     : theme.ajax_url,
						data    : {
							action : 'porto_update_cart_item',
							item_id: itemID,
							qty    : qtyVal
						},
						success : function( data ) {
							if ( data &amp;&amp; data.fragments ) {
								updateCartFragment( data );
								$( document.body ).trigger( 'wc_fragments_refreshed' );
							}
							input.parents( '.mini_cart_item' ).find( '.ajax-loading' ).hide();
						},
						dataType: 'json',
						method  : 'GET'
					} );
				}, 500 );
			} );

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Product Image Slider
	( function( theme, $ ) {

		theme = theme || {};

		var duration = 300,
			flag = false;

		$.extend( theme, {

			WooProductImageSlider: {

				defaults: {
					elements: '.product-image-slider'
				},

				initialize: function( $elements ) {
					if ( !$.fn.owlCarousel ) return false;
					this.$elements = ( $elements || $( this.defaults.elements ) );
					if ( !this.$elements.length &amp;&amp; !$( '.product-images-block' ).length ) {
						return this;
					}

					this.build();

					return this;
				},

				build: function() {
					var self = this,
						thumbs_count = theme.product_thumbs_count;

					if ( theme.product_zoom &amp;&amp; ( !( 'ontouchstart' in document ) || ( ( 'ontouchstart' in document ) &amp;&amp; theme.product_zoom_mobile ) ) ) {
						var zoomConfig = {
							responsive: true,
							zoomWindowFadeIn: 200,
							zoomWindowFadeOut: 100,
							zoomType: js_porto_vars.zoom_type,
							cursor: 'grab'
						};

						if ( js_porto_vars.zoom_type == 'lens' ) {
							zoomConfig.scrollZoom = js_porto_vars.zoom_scroll;
							zoomConfig.lensSize = js_porto_vars.zoom_lens_size;
							zoomConfig.lensShape = js_porto_vars.zoom_lens_shape;
							zoomConfig.containLensZoom = js_porto_vars.zoom_contain_lens;
							zoomConfig.lensBorderSize = js_porto_vars.zoom_lens_border;
							zoomConfig.borderColour = js_porto_vars.zoom_border_color;
						}

						if ( js_porto_vars.zoom_type == 'inner' ) {
							zoomConfig.borderSize = 0;
						} else {
							zoomConfig.borderSize = js_porto_vars.zoom_border;
						}

						if ( !self.$elements.length ) {
							var $images_grid = $( '.product-images-block' );
							if ( $images_grid.length ) {
								$images_grid.find( 'img' ).each( function() {
									var $this = $( this );
									zoomConfig.zoomContainer = $this.parent();
									if ( $.fn.elevateZoom ) {
										$this.elevateZoom( zoomConfig );
									} else {
										setTimeout( function() {
											if ( $.fn.elevateZoom ) {
												$this.elevateZoom( zoomConfig );
											}
										}, 1000 );
									}
								} );
							}
						}
					}

					self.$elements.each( function() {
						var $this = $( this ),
							$product = $this.closest( '.product' );
						if ( !$product.length ) {
							$product = $this.closest( '.product_layout, .product-layout-image' ).eq( 0 );
						}
						var $thumbs_slider = $product.find( '.product-thumbs-slider' ),
							$thumbs = $product.find( '.product-thumbnails-inner' ),
							$thumbs_vertical_slider = $product.find( '.product-thumbs-vertical-slider' ),
							currentSlide = 0,
							count = $this.find( '&gt; *' ).length;

						$this.find( '&gt; *:first-child' ).imagesLoaded( function() {
							$thumbs_slider.owlCarousel( {
								rtl: theme.rtl,
								loop: false,
								autoplay: false,
								items: thumbs_count,
								nav: false,
								navText: ["", ""],
								dots: false,
								rewind: true,
								margin: 8,
								stagePadding: 1,
								lazyLoad: true,
								onInitialized: function() {
									self.selectThumb( null, $thumbs_slider, 0 );
									if ( $thumbs_slider.find( '.owl-item' ).length &gt;= thumbs_count )
										$thumbs_slider.append( '&lt;div class="thumb-nav"&gt;&lt;div class="thumb-prev"&gt;&lt;/div&gt;&lt;div class="thumb-next"&gt;&lt;/div&gt;&lt;/div&gt;' );
								}
							} ).on( 'click', '.owl-item', function() {
								self.selectThumb( $this, $thumbs_slider, $( this ).index() );
							} );
							if ( $thumbs_vertical_slider.length &gt; 0 &amp;&amp; typeof $.fn.slick == 'function' ) {
								var slickOptions = {
									dots: false,
									vertical: true,
									slidesToShow: thumbs_count,
									slidesToScroll: 1,
									infinite: false,
								}
								if ( thumbs_count &gt;= 5 ) {
									slickOptions['responsive'] = [
										{
											breakpoint: 992,
											settings: {
												slidesToShow: 4,
											}
										},
										{
											breakpoint: 768,
											settings: {
												slidesToShow: 3,
											}
										}
									]
								}
								$thumbs_vertical_slider.slick( slickOptions ).on( 'click', '.img-thumbnail', function() {
									self.selectVerticalSliderThumb( $this, $thumbs_vertical_slider, $( this ).data( 'slick-index' ) );
								} );
								self.selectVerticalSliderThumb( null, $thumbs_vertical_slider, 0 );
								if ( $thumbs_vertical_slider.find( '.porto-lazyload' ).length ) {
									theme.requestTimeout( function() {
										$thumbs_vertical_slider.find( '.slick-cloned .porto-lazyload:not(.lazy-load-loaded)' ).each( function() {
											$( this ).attr( 'src', $( this ).data( 'oi' ) ).removeAttr( 'data-oi' ).addClass( 'lazy-load-loaded' );
										} );
									}, 100 );
								}
							}

							self.selectVerticalThumb( null, $thumbs, 0 );
							$thumbs.off( 'click', '.img-thumbnail' ).on( 'click', '.img-thumbnail', function() {
								self.selectVerticalThumb( $this, $thumbs, $( this ).index() );
							} );

							$thumbs_slider.off( 'click', '.thumb-prev' ).on( 'click', '.thumb-prev', function( e ) {
								var currentThumb = $thumbs_slider.data( 'currentThumb' );
								self.selectThumb( $this, $thumbs_slider, --currentThumb );
							} );
							$thumbs_slider.off( 'click', '.thumb-next' ).on( 'click', '.thumb-next', function( e ) {
								var currentThumb = $thumbs_slider.data( 'currentThumb' );
								self.selectThumb( $this, $thumbs_slider, ++currentThumb );
							} );

							var links = [];
							if ( theme.product_image_popup ) {
								var i = 0;
								$this.find( 'img' ).each( function() {
									var slide = {};

									slide.src = $( this ).attr( 'href' );
									slide.title = $( this ).attr( 'alt' );

									links[i] = slide;
									i++;
								} );
							}

							var itemsCount = typeof $this.data( 'items' ) != 'undefined' ? $this.data( 'items' ) : 1,
								itemsResponsive = typeof $this.data( 'responsive' ) != 'undefined' ? $this.data( 'responsive' ) : {},
								centerItem = typeof $this.data( 'centeritem' ) != 'undefined' ? true : false,
								margin = typeof $this.data( 'margin' ) != 'undefined' ? $this.data( 'margin' ) : 0,
								loop = ( count &gt; 1 ) ? ( typeof $this.data( 'loop' ) != 'undefined' ? $this.data( 'loop' ) : true ) : false;
							for ( var itemCount in itemsResponsive ) {
								itemsResponsive[itemCount] = { items: itemsResponsive[itemCount] };
							}
							$this.owlCarousel( {
								rtl: theme.rtl,
								loop: loop,
								autoplay: false,
								items: itemsCount,
								margin: margin,
								responsive: itemsResponsive,
								autoHeight: true,
								nav: true,
								navText: ["", ""],
								dots: false,
								rewind: true,
								lazyLoad: true,
								center: centerItem,
								onInitialized: function() {
									if ( $this.find( '.owl-item.cloned' ).length ) {
										setTimeout( function() {
											var ins = $this.find( '.owl-item.cloned .porto-lazyload:not(.lazy-load-loaded)' ).themePluginLazyLoad( { effect: 'fadeIn', effect_speed: 400 } );
											if ( ins &amp;&amp; ins.loadAndDestroy ) {
												ins.loadAndDestroy();
											}
										}, 100 );
									}
									//$this.find('.cloned .porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad();
									if ( theme.product_zoom &amp;&amp; ( !( 'ontouchstart' in document ) || ( ( 'ontouchstart' in document ) &amp;&amp; theme.product_zoom_mobile ) ) ) {
										$this.find( 'img' ).each( function() {
											var $this = $( this );
											zoomConfig.zoomContainer = $this.parent();
											if ( $.fn.elevateZoom ) {
												$this.elevateZoom( zoomConfig );
											} else {
												setTimeout( function() {
													if ( $.fn.elevateZoom ) {
														$this.elevateZoom( zoomConfig );
													}
												}, 1000 );
											}
										} );
									}
								},
								onTranslate: function( event ) {
									currentSlide = event.item.index - $this.find( '.cloned' ).length / 2;
									currentSlide = ( currentSlide + event.item.count ) % event.item.count;
									self.selectThumb( null, $thumbs_slider, currentSlide );
									self.selectVerticalThumb( null, $thumbs, currentSlide );
									self.selectVerticalSliderThumb( null, $thumbs_vertical_slider, currentSlide );

									/*var $obj = event.relatedTarget.items(currentSlide).find('img.owl-lazy:not(.owl-lazy-loaded)');
									if ($obj.length) {
										var src = $obj.attr('href'),
											elevateZoom = $obj.data('elevateZoom'),
											smallImage = $obj.data('src') ? $obj.data('src') : $obj.attr('src');
										if (typeof elevateZoom != 'undefined') {
											elevateZoom.swaptheimage(smallImage, src);
										}
									}*/
								},
								onRefreshed: function() {
									if ( theme.product_zoom &amp;&amp; ( !( 'ontouchstart' in document ) || ( ( 'ontouchstart' in document ) &amp;&amp; theme.product_zoom_mobile ) ) ) {
										$this.find( 'img' ).each( function() {
											var $this = $( this ),
												src = typeof $this.attr( 'href' ) != 'undefined' ? $this.attr( 'href' ) : ( $this.data( 'oi' ) ? $this.data( 'oi' ) : $this.attr( 'src' ) ),
												elevateZoom = $this.data( 'elevateZoom' ),
												smallImage = $this.data( 'src' ) ? $this.data( 'src' ) : ( $this.data( 'oi' ) ? $this.data( 'oi' ) : $this.attr( 'src' ) );
											if ( typeof elevateZoom != 'undefined' ) {
												elevateZoom.startZoom();
												elevateZoom.swaptheimage( smallImage, src );
											} else if ( $.fn.elevateZoom ) {
												zoomConfig.zoomContainer = $this.parent();
												$this.elevateZoom( zoomConfig );
											}
										} );
									}
								}
							} );

							$this.data( 'links', links );

							if ( theme.product_image_popup ) {
								var $zoom_buttons = $this.siblings( '.zoom' );
								$zoom_buttons.off( 'click' ).on( 'click', function( e ) {
									e.preventDefault();
									if ( $.fn.magnificPopup ) {
										$.magnificPopup.close();
										$.magnificPopup.open( $.extend( true, {}, theme.mfpConfig, {
											items: $this.data( 'links' ),
											gallery: {
												enabled: true
											},
											type: 'image'
										} ), currentSlide );
									}
								} );
							}

						} );
					} );

					return self;
				},

				selectThumb: function( $image_slider, $thumbs_slider, index ) {
					if ( flag || !$thumbs_slider.length ) return;

					flag = true;
					var len = $thumbs_slider.find( '.owl-item' ).length,
						actives = [],
						i = 0;

					index = ( index + len ) % len;
					if ( $image_slider ) {
						$image_slider.trigger( 'to.owl.carousel', [index, duration, true] );
					}
					$thumbs_slider.find( '.owl-item' ).removeClass( 'selected' );
					$thumbs_slider.find( '.owl-item:eq(' + index + ')' ).addClass( 'selected' );
					$thumbs_slider.data( 'currentThumb', index );
					$thumbs_slider.find( '.owl-item.active' ).each( function() {
						actives[i++] = $( this ).index();
					} );
					if ( $.inArray( index, actives ) == -1 ) {
						if ( Math.abs( index - actives[0] ) &gt; Math.abs( index - actives[actives.length - 1] ) ) {
							$thumbs_slider.trigger( 'to.owl.carousel', [( index - actives.length + 1 ) % len, duration, true] );
						} else {
							$thumbs_slider.trigger( 'to.owl.carousel', [index % len, duration, true] );
						}
					}
					flag = false;
				},

				selectVerticalSliderThumb: function( $image_slider, $thumbs_vertical_slider, index ) {
					if ( flag || !$thumbs_vertical_slider.length ) return;
					flag = true;
					if ( 'undefined' == typeof $thumbs_vertical_slider[0].slick ) {
						return;
					}
					var len = $thumbs_vertical_slider[0].slick.slideCount,
						actives = [],
						i = 0;
					index = ( index + len ) % len;
					if ( $image_slider ) {
						$image_slider.trigger( 'to.owl.carousel', [index, duration, true] );
					}
					$thumbs_vertical_slider.find( '.img-thumbnail' ).removeClass( 'selected' );
					$thumbs_vertical_slider.find( '.img-thumbnail:eq(' + index + ')' ).addClass( 'selected' );
					$thumbs_vertical_slider.data( 'currentThumb', index );
					$thumbs_vertical_slider.find( '.img-thumbnail.slick-active' ).each( function() {
						actives[i++] = $( this ).index();
					} );
					if ( $.inArray( index, actives ) == -1 ) {
						if ( Math.abs( index - actives[0] ) &gt; Math.abs( index - actives[actives.length - 1] ) ) {
							$thumbs_vertical_slider.get( 0 ).slick.goTo( ( index - actives.length + 1 ) % len, false );
						} else {
							$thumbs_vertical_slider.get( 0 ).slick.goTo( index % len, false );
						}
					}
					flag = false;
				},

				selectVerticalThumb: function( $image_slider, $thumbs, index ) {
					if ( flag || !$thumbs.length ) return;
					flag = true;
					var len = $thumbs.find( '.img-thumbnail' ).length,
						i = 0;

					index = ( index + len ) % len;
					if ( $image_slider ) {
						$image_slider.trigger( 'to.owl.carousel', [index, duration, true] );
					}
					$thumbs.find( '.img-thumbnail' ).removeClass( 'selected' );
					$thumbs.find( '.img-thumbnail:eq(' + index + ')' ).addClass( 'selected' );
					$thumbs.data( 'currentThumb', index );
					flag = false;
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Quick View
	( function( theme, $ ) {

		theme = theme || {};

		$.extend( theme, {

			WooQuickView: {

				initialize: function() {

					this.events();

					return this;
				},

				events: function() {
					var self = this;

					$( document ).on( 'click', '.quickview', function( e ) {
						e.preventDefault();

						if ( !$.fn.elevateZoom &amp;&amp; !$( '#porto-script-jquery-elevatezoom' ).length ) {
							var js = document.createElement( 'script' );
							js.id = 'porto-script-jquery-elevatezoom';
							$( js ).appendTo( 'body' ).attr( 'src', js_porto_vars.ajax_loader_url.replace( '/images/ajax-loader@2x.gif', '/js/libs/jquery.elevatezoom.min.js' ) );
						}

						var $this = $( this ),
							pid = $this.attr( 'data-id' );

						function init_quick_view_window() {

							var args = {
								href: theme.ajax_url,
								ajax: {
									data: {
										action: 'porto_product_quickview',
										variation_flag: typeof wc_add_to_cart_variation_params !== 'undefined',
										pid: pid,
										nonce: js_porto_vars.porto_nonce
									}
								},
								type: 'ajax',
								helpers: {
									overlay: {
										locked: true,
										fixed: true
									}
								},
								tpl: {
									error: '&lt;p class="fancybox-error"&gt;' + theme.request_error + '&lt;/p&gt;',
									closeBtn: '&lt;a title="' + js_porto_vars.popup_close + '" class="fancybox-item fancybox-close" href="javascript:;"&gt;&lt;/a&gt;',
									next: '&lt;a title="' + js_porto_vars.popup_next + '" class="fancybox-nav fancybox-next" href="javascript:;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;',
									prev: '&lt;a title="' + js_porto_vars.popup_prev + '" class="fancybox-nav fancybox-prev" href="javascript:;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;'
								},
								autoSize: true,
								autoWidth: true,
								afterShow: function( flag ) {
									theme.requestTimeout( function() {
										if ( typeof flag == 'undefined' || flag ) {
											porto_woocommerce_init();
										}
										theme.WooProductImageSlider.initialize( $( '.quickview-wrap-' + pid ).find( '.product-image-slider' ) );

										// compatibility issue with Yith WooCommerce Booking form
										if ( $( document.body ).hasClass( 'yith-booking' ) ) {
											$( document ).trigger( 'yith-wcbk-init-booking-form' );
										}

										// Variation Form
										var form_variation = $( '.quickview-wrap-' + pid ).find( 'form.variations_form' );
										if ( form_variation.length &gt; 0 ) {
											form_variation.wc_variation_form();
										}
										$( document.body ).trigger( 'porto_init_countdown', [$( '.quickview-wrap-' + pid )] );

										// Ajax load at the first by Yith Wishlist Plugin
										if ( ( 'undefined' !== typeof yith_wcwl_l10n ) &amp;&amp; yith_wcwl_l10n.enable_ajax_loading ) {
											if ( $( '.fancybox-opened .wishlist-fragment' ).length ) {
												var options = {},
													$product = $( '.fancybox-opened .wishlist-fragment' ),
													id = $product.attr( 'class' ).split( ' ' ).filter( ( val ) =&gt; {
														return val.length &amp;&amp; val !== 'exists';
													} ).join( yith_wcwl_l10n.fragments_index_glue );
												options[id] = $product.data( 'fragment-options' );

												if ( !options ) {
													return;
												}

												var ajaxData = {
													action: yith_wcwl_l10n.actions.load_fragments,
													context: 'frontend',
													fragments: options
												};

												if ( typeof yith_wcwl_l10n.nonce != 'undefined' ) {
													ajaxData.nonce = yith_wcwl_l10n.nonce.load_fragments_nonce;
												}

												$.ajax( {
													ajaxData,
													method: 'post',
													success: function( data ) {
														if ( typeof data.fragments !== 'undefined' ) {
															$.each( data.fragments, function( i, v ) {
																var itemSelector = '.' + i.split( yith_wcwl_l10n.fragments_index_glue ).filter( ( val ) =&gt; { return val.length &amp;&amp; val !== 'exists' &amp;&amp; val !== 'with-count'; } ).join( '.' ),
																	toReplace = $( itemSelector );

																// find replace tempalte
																var replaceWith = $( v ).filter( itemSelector );

																if ( !replaceWith.length ) {
																	replaceWith = $( v ).find( itemSelector );
																}

																if ( toReplace.length &amp;&amp; replaceWith.length ) {
																	toReplace.replaceWith( replaceWith );
																}
															} );
														}
													},
													url: yith_wcwl_l10n.ajax_url
												} );
											}
										}
									}, 200 );
								},
								onUpdate: function() {
									theme.requestTimeout( function() {
										if ( js_porto_vars.use_skeleton_screen.indexOf( 'quickview' ) == -1 || !js_porto_vars.quickview_skeleton ) {
											porto_woocommerce_init();
										}
										var $slider = $( '.quickview-wrap-' + pid ).find( '.product-image-slider' );
										if ( typeof $slider.data( 'owl.carousel' ) != 'undefined' &amp;&amp; typeof $slider.data( 'owl.carousel' )._invalidated != 'undefined' )
											$slider.data( 'owl.carousel' )._invalidated.width = true;
										$slider.trigger( 'refresh.owl.carousel' );
										$( document.body ).trigger( 'porto_init_countdown', [$( '.quickview-wrap-' + pid )] );
									}, 300 );
								}
							};
							if ( js_porto_vars.use_skeleton_screen.indexOf( 'quickview' ) != -1 &amp;&amp; js_porto_vars.quickview_skeleton ) {
								delete args['href'];
								delete args['ajax'];
								args['type'] = 'inline';
								$.fancybox.open(
									js_porto_vars.quickview_skeleton,
									args
								);
								$.ajax( {
									url: theme.ajax_url,
									type: 'post',
									dataType: 'html',
									data: {
										action: 'porto_product_quickview',
										variation_flag: typeof wc_add_to_cart_variation_params !== 'undefined',
										pid: pid,
										nonce: js_porto_vars.porto_nonce
									},
									success: function( res ) {
										var $res = $( res );
										$res.imagesLoaded( function() {
											$( '.skeleton-body.product' ).replaceWith( $res );
											theme.WooQtyField.initialize();
											$( window ).trigger( 'resize' );
											args['afterShow'].call( false );
										} );
									}
								} );
							} else {
								$.fancybox( args );
							}
						}

						if ( $.fn.fancybox ) {
							init_quick_view_window();
						} else if ( !$( '#porto-script-jquery-fancybox' ).length ) {
							var js1 = document.createElement( 'script' );
							js1.id = 'porto-script-jquery-fancybox';
							$( js1 ).appendTo( 'body' ).on( 'load', function() {
								init_quick_view_window();
							} ).attr( 'src', js_porto_vars.ajax_loader_url.replace( '/images/ajax-loader@2x.gif', '/js/libs/jquery.fancybox.min.js' ) );
						}

						return false;
					} );

					// ajax add to cart on quickview
					if ( typeof wc_add_to_cart_params != 'undefined' ) {
						$( document.body ).on( 'click', '.single-product .single_add_to_cart_button:not(.disabled)', function( e ) {
							if ( $( this ).closest( '.single-product' ).hasClass( 'product-type-external' ) || $( this ).closest( '.single-product' ).hasClass( 'product-type-grouped' ) ) {
								return true;
							}
							e.preventDefault();

							var $button = $( this ),
								product_id = $button.val(),
								variation_id = $button.closest( 'form' ).find( 'input[name="variation_id"]' ).val(),
								quantity = $button.closest( 'form' ).find( 'input[name="quantity"]' ).val();
							if ( $button.hasClass( 'loading' ) ) {
								return false;
							}
							$button.removeClass( 'added' );
							$button.addClass( 'loading' );
							$button.parent().addClass( 'porto-ajax-loading' );
							if ( !$button.siblings( '.porto-loading-icon' ).length ) {
								$( '&lt;span class="porto-loading-icon"&gt;&lt;/span&gt;' ).insertAfter( $button );
							}

							var data = {
								action: 'porto_add_to_cart',
								product_id: variation_id ? variation_id : product_id,
								quantity: quantity
							};
							if ( variation_id ) {
								var $variations = $button.closest( 'form' ).find( '.variations select' );
								if ( $variations.length ) {
									$variations.each( function() {
										var name = $( this ).data( 'attribute_name' ),
											val = $( this ).val();
										if ( name &amp;&amp; val ) {
											data[name] = val;
										}
									} );
								}
							}

							// Trigger event.
							$( document.body ).trigger( 'adding_to_cart', [$button, data] );

							$.ajax( {
								type: 'POST',
								url: theme.ajax_url,
								data: data,
								dataType: 'json',
								success: function( response ) {
									$button.parent().removeClass( 'porto-ajax-loading' );
									if ( !response ) {
										return;
									}
									if ( response.error &amp;&amp; response.product_url ) {
										window.location = response.product_url;
										return;
									}
									// Redirect to cart option
									if ( wc_add_to_cart_params.cart_redirect_after_add === 'yes' ) {
										window.location = wc_add_to_cart_params.cart_url;
										return;
									}

									// Trigger event.
									$( document.body ).trigger( 'added_to_cart', [response.fragments, response.cart_hash, $button] );
								}
							} );
						} );
					}

					return self;
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Qty Field
	( function( theme, $ ) {

		theme = theme || {};

		$.extend( theme, {

			WooQtyField: {

				initialize: function() {

					this.build()
						.events();

					return this;
				},

				qty_handler: function() {
					var $obj = $( this );
					if ( $obj.closest( '.quantity' ).next( '.add_to_cart_button[data-quantity]' ).length ) {
						var count = $obj.val();
						if ( count ) {
							$obj.closest( '.quantity' ).next( '.add_to_cart_button[data-quantity]' ).attr( 'data-quantity', count );
						}
					}
				},

				build: function() {
					var self = this;

					// Quantity buttons
					$( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '&lt;button type="button" value="+" class="plus"&gt;+&lt;/button&gt;' ).prepend( '&lt;button type="button" value="-" class="minus"&gt;-&lt;/button&gt;' );

					// Target quantity inputs on product pages
					$( 'input.qty:not(.product-quantity input.qty)' ).each( function() {
						var min = parseFloat( $( this ).attr( 'min' ) );

						if ( min &amp;&amp; min &gt; 0 &amp;&amp; parseFloat( $( this ).val() ) &lt; min ) {
							$( this ).val( min );
						}
					} );

					$( 'input.qty:not(.product-quantity input.qty)' ).off( 'change', self.qty_handler ).on( 'change', self.qty_handler );

					$( document ).off( 'click', '.quantity .plus, .quantity .minus' ).on( 'click', '.quantity .plus, .quantity .minus', function() {

						// Get values
						var $qty = $( this ).closest( '.quantity' ).find( '.qty' ),
							currentVal = parseFloat( $qty.val() ),
							max = parseFloat( $qty.attr( 'max' ) ),
							min = parseFloat( $qty.attr( 'min' ) ),
							step = $qty.attr( 'step' );

						// Format values
						if ( !currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0;
						if ( max === '' || max === 'NaN' ) max = '';
						if ( min === '' || min === 'NaN' ) min = 0;
						if ( step === 'any' || step === '' || step === undefined || parseFloat( step ) === 'NaN' ) step = 1;

						// Change the value
						if ( $( this ).is( '.plus' ) ) {

							if ( max &amp;&amp; ( max == currentVal || currentVal &gt; max ) ) {
								$qty.val( max );
							} else {
								$qty.val( currentVal + parseFloat( step ) );
							}

						} else {

							if ( min &amp;&amp; ( min == currentVal || currentVal &lt; min ) ) {
								$qty.val( min );
							} else if ( currentVal &gt; 0 ) {
								$qty.val( currentVal - parseFloat( step ) );
							}

						}

						// Trigger change event
						$qty.trigger( 'change' );
					} );

					return self;
				},

				events: function() {
					var self = this;

					$( document ).ajaxComplete( function( event, xhr, options ) {
						self.build();
					} );

					return self;
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Variation Form
	( function( theme, $ ) {

		theme = theme || {};

		var duration = 300;

		$.extend( theme, {

			WooVariationForm: {

				initialize: function() {

					this.init().events();

					return this;
				},

				init: function() {
					$( '.variations_form' ).each( function() {
						var $variation_form = $( this ),
							$reset_variations = $variation_form.find( '.reset_variations' );

						if ( $reset_variations.css( 'visibility' ) == 'hidden' )
							$reset_variations.hide();
					} );
					return this;
				},

				events: function() {
					var self = this;

					$( document ).on( 'check_variations', '.variations_form', function( event, exclude, focus ) {
						var $variation_form = $( this ),
							$reset_variations = $variation_form.find( '.reset_variations' );

						if ( $reset_variations.css( 'visibility' ) == 'hidden' )
							$reset_variations.hide();
					} );

					$( document ).on( 'reset_image', '.variations_form', function( event ) {
						var $product = $( this ).closest( '.product, .product-col' ),
							$product_img = $product.find( 'div.product-images .woocommerce-main-image' );
						if ( $product.hasClass( 'product-col' ) ) { // shop pages
							$product_img = $product.find( 'div.product-image .inner img:first-child' );
						} else if ( $product.hasClass( 'porto-tb-item' ) ) { // in type builder
							$product_img = $product.find( '.porto-tb-featured-image img' ).eq( 0 );
						}
						var o_src = $product_img.attr( 'data-o_src' ),
							o_title = $product_img.attr( 'data-o_title' ),
							o_href = $product_img.attr( 'data-o_href' ),
							$thumb_img = $product.find( '.woocommerce-main-thumb' ),
							o_thumb_src = $thumb_img.attr( 'data-o_src' );

						var $image_slider = $product.find( '.product-image-slider' ),
							$thumbs_slider = $product.find( '.product-thumbs-slider' ),
							links;

						if ( $image_slider.length ) {
							$image_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							links = $image_slider.data( 'links' );
						}
						if ( $thumbs_slider.length ) {
							$thumbs_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							$thumbs_slider.find( '.owl-item:eq(0)' ).trigger( 'click' );
						}

						if ( o_src ) {
							$product_img
								.attr( 'src', o_src )
								.attr( 'srcset', '' )
								.attr( 'alt', o_title )
								.attr( 'href', o_href );

							$product_img.each( function() {
								var elevateZoom = $( this ).data( 'elevateZoom' );
								if ( typeof elevateZoom != 'undefined' ) {
									elevateZoom.swaptheimage( $( this ).attr( 'src' ), $( this ).attr( 'src' ) );
								}
							} );

							if ( theme.product_image_popup &amp;&amp; typeof links != 'undefined' ) {
								links[0].src = o_href;
								links[0].title = o_title;
							}
						}
						if ( o_thumb_src ) {
							$thumb_img.attr( 'src', o_thumb_src );
						}
					} );

					$( document ).on( 'found_variation', '.variations_form', function( event, variation ) {

						if ( typeof variation == 'undefined' ) {
							return;
						}

						var $product = $( this ).closest( '.product, .product-col' ),
							$image_slider = $product.find( '.product-image-slider' ),
							$thumbs_slider = $product.find( '.product-thumbs-slider' ),
							links;

						if ( $image_slider.length ) {
							$image_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							links = $image_slider.data( 'links' );
						}
						if ( $thumbs_slider.length ) {
							$thumbs_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							$thumbs_slider.find( '.owl-item:eq(0)' ).trigger( 'click' );
						}

						var $shop_single_image = $product.find( 'div.product-images .woocommerce-main-image' ).length ? $product.find( 'div.product-images .woocommerce-main-image' ) : $( '.single-product div.product-images .woocommerce-main-image' ),
							productimage = $shop_single_image.attr( 'data-o_src' ),
							imagetitle = $shop_single_image.attr( 'data-o_title' ),
							imagehref = $shop_single_image.attr( 'data-o_href' ),
							$shop_thumb_image = $product.find( '.woocommerce-main-thumb' ),
							thumbimage = $shop_thumb_image.attr( 'data-o_src' ),
							variation_image = variation.image_src,
							variation_link = variation.image_link,
							variation_title = variation.image_title,
							variation_thumb = variation.image_thumb;

						if ( $product.hasClass( 'product-col' ) ) { // shop pages
							$shop_single_image = $product.find( 'div.product-image .inner img:first-child' );
							variation_image = variation.image.thumb_src;
						} else if ( $product.hasClass( 'porto-tb-item' ) ) { // in type builder
							$shop_single_image = $product.find( '.porto-tb-featured-image img' ).eq( 0 );
							variation_image = variation.image.thumb_src;
						}

						if ( !productimage ) {
							productimage = $shop_single_image.attr( 'data-oi' ) ? $shop_single_image.attr( 'data-oi' ) : ( ( !$shop_single_image.attr( 'src' ) ) ? '' : $shop_single_image.attr( 'src' ) );
							$shop_single_image.attr( 'data-o_src', productimage );
						}

						if ( !imagehref ) {
							imagehref = ( !$shop_single_image.attr( 'href' ) ) ? '' : $shop_single_image.attr( 'href' );
							$shop_single_image.attr( 'data-o_href', imagehref );
						}

						if ( !imagetitle ) {
							imagetitle = ( !$shop_single_image.attr( 'alt' ) ) ? '' : $shop_single_image.attr( 'alt' );
							$shop_single_image.attr( 'data-o_title', imagetitle );
						}

						if ( !thumbimage ) {
							thumbimage = $shop_thumb_image.attr( 'data-oi' ) ? $shop_thumb_image.attr( 'data-oi' ) : ( ( !$shop_thumb_image.attr( 'src' ) ) ? '' : $shop_thumb_image.attr( 'src' ) );
							$shop_thumb_image.attr( 'data-o_src', thumbimage );
						}

						if ( variation_image ) {
							$shop_single_image.attr( 'src', variation_image );
							$shop_single_image.attr( 'srcset', '' );
							$shop_single_image.attr( 'alt', variation_title );
							$shop_single_image.attr( 'href', variation_link );
							$shop_thumb_image.attr( 'src', variation_thumb );
							if ( theme.product_image_popup &amp;&amp; typeof links != 'undefined' ) {
								links[0].src = variation_link;
								links[0].title = variation_title;
							}
						} else {
							$shop_single_image.attr( 'src', productimage );
							$shop_single_image.attr( 'srcset', '' );
							$shop_single_image.attr( 'alt', imagetitle );
							$shop_single_image.attr( 'href', imagehref );
							$shop_thumb_image.attr( 'src', thumbimage );
							if ( theme.product_image_popup &amp;&amp; typeof links != 'undefined' ) {
								links[0].src = imagehref;
								links[0].title = imagetitle;
							}
						}
						$shop_single_image.each( function() {
							var elevateZoom = $( this ).data( 'elevateZoom' );
							if ( typeof elevateZoom != 'undefined' ) {
								elevateZoom.swaptheimage( $( this ).attr( 'src' ), $( this ).attr( 'src' ) );
							}
						} );
					} );

					// fix scrolling to top issue on fancybox quickview whenever updating variation
					var porto_fb_update_trigger = null;
					$( document ).on( 'found_variation reset_image', '.variations_form', function( event, variation ) {
						if ( $( this ).closest( '.fancybox-inner' ).length &amp;&amp; $.fancybox ) {
							$( window ).off( 'resize.fb', $.fancybox.update );
							if ( porto_fb_update_trigger ) {
								theme.deleteTimeout( porto_fb_update_trigger );
							}
							porto_fb_update_trigger = theme.requestTimeout( function() {
								$( window ).on( 'resize.fb', $.fancybox.update );
								porto_fb_update_trigger = false;
							}, 160 );
						}
					} );

					return self;
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Events
	( function( theme, $ ) {

		theme = theme || {};

		$.extend( theme, {

			WooEvents: {

				initialize: function() {

					this.events();

					return this;
				},

				events: function() {
					var self = this;

					// wcml currency switcher
					$( '.wcml-switcher li' ).on( 'click', function() {
						if ( $( this ).parent().attr( 'disabled' ) == 'disabled' )
							return;
						var currency = $( this ).attr( 'rel' );
						self.loadCurrency( currency );
					} );

					// woocommerce currency switcher
					$( '.woocs-switcher li' ).on( 'click', function() {
						if ( $( this ).parent().attr( 'disabled' ) == 'disabled' )
							return;
						var currency = $( this ).attr( 'rel' );
						self.loadWoocsCurrency( currency );
					} );

					return self;
				},

				loadCurrency: function( currency ) {
					$( '.wcml-switcher' ).attr( 'disabled', 'disabled' );
					$( '.wcml-switcher' ).append( '&lt;li class="loading"&gt;&lt;/li&gt;' );
					var data = { action: 'wcml_switch_currency', currency: currency };
					$.ajax( {
						type: 'post',
						url: theme.ajax_url,
						data: {
							action: 'wcml_switch_currency',
							currency: currency
						},
						success: function( response ) {
							$( '.wcml-switcher' ).removeAttr( 'disabled' );
							$( '.wcml-switcher' ).find( '.loading' ).remove();
							window.location = window.location.href;
						}
					} );
				},

				loadWoocsCurrency: function( currency ) {
					$( '.woocs-switcher' ).attr( 'disabled', 'disabled' );
					$( '.woocs-switcher' ).append( '&lt;li class="loading"&gt;&lt;/li&gt;' );
					var l = window.location.href;
					l = l.split( '?' );
					l = l[0];
					var string_of_get = '?';
					woocs_array_of_get.currency = currency;

					if ( Object.keys( woocs_array_of_get ).length &gt; 0 ) {
						jQuery.each( woocs_array_of_get, function( index, value ) {
							string_of_get = string_of_get + "&amp;" + index + "=" + value;
						} );
					}
					window.location = l + string_of_get;
				},

				removeParameterFromUrl: function( url, parameter ) {
					return url
						.replace( new RegExp( '[?&amp;]' + parameter + '=[^&amp;#]*(#.*)?$' ), '$1' )
						.replace( new RegExp( '([?&amp;])' + parameter + '=[^&amp;]*&amp;' ), '$1' );
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );

	( function( theme, $ ) {

		$( document ).ready( function() {
			// Woocommerce Qty Field
			if ( typeof theme.WooQtyField !== 'undefined' ) {
				theme.WooQtyField.initialize();
			}

			// Woocommerce Quick View
			if ( typeof theme.WooQuickView !== 'undefined' ) {
				theme.WooQuickView.initialize();
			}

			// Woocommerce Events
			if ( typeof theme.WooEvents !== 'undefined' ) {
				theme.WooEvents.initialize();
			}

			// disable drop down
			if ( !( 'ontouchstart' in document ) ) {
				$( '.mini-cart' ).on( 'hide.bs.dropdown', function() {
					return false;
				} );
			} else {
				$( '#mini-cart .cart-head' ).on( 'click', function( e ) {
					$( this ).parent().toggleClass( 'open' );
				} );
				$( 'html,body' ).on( 'click', function( e ) {
					if ( $( '#mini-cart' ).hasClass( 'open' ) &amp;&amp; !$( e.target ).closest( '#mini-cart' ).length ) {
						$( '#mini-cart' ).removeClass( 'open' );
					}
				} );
			}

			$( document ).on( 'tabactivate', '.woocommerce-tabs', function( e, ui ) {
				var label = $( ui ).attr( 'aria-controls' );
				var panel = $( '[aria-labelledby="' + label + '"' );
				theme.refreshVCContent( panel );
			} );

		} );
	} ).apply( this, [window.theme, jQuery] );


	( function( theme, $, undefined ) {

		$( document ).ready( function() {

			/*===================================================================================*/
			/*  TOOLTIP FOR YITH WISHLIST, COMPARE, ADD TO CART, QUICK VIEW
			/*===================================================================================*/
			$( '.product-col .quickview, .product-col .add_to_cart_read_more, .product-col .add_to_cart_button, .product-col a.compare, .product-col .add_to_wishlist, .product-col .yith-wcwl-wishlistaddedbrowse &gt; a, .product-col .yith-wcwl-wishlistexistsbrowse &gt; a' ).each( function() {
				let _this = $( this );
				// Exclude
				let $productCol = _this.closest( '.product-col' );
				if ( _this.closest( '.porto-tb-woo-link' ).hasClass( 'no-tooltip' ) ) {
					return;
				}
				if ( _this.hasClass( 'add_to_cart_read_more' ) || _this.hasClass( 'add_to_cart_button' ) ) {
					if ( $productCol.hasClass( 'product-wq_onimage' ) || $productCol.hasClass( 'product-onimage' ) || $productCol.hasClass( 'product-outimage' ) || $productCol.hasClass( 'product-default' ) ) {
						return;
					}
					if ( _this.closest( 'ul.products' ).hasClass( 'list' ) ) {
						return;
					}
				}
				if ( _this.hasClass( 'quickview' ) ) {
					if ( $productCol.hasClass( 'product-wq_onimage' ) || $productCol.hasClass( 'product-onimage3' ) || $productCol.hasClass( 'product-onimage2' ) || $productCol.hasClass( 'product-onimage' ) || $productCol.hasClass( 'product-outimage_aq_onimage' ) ) {
						return;
					}
				}
				if ( ! _this.attr( 'title' ) ) {
					_this.attr( 'title', _this.text().trim() );
				}
				_this.tooltip();
			} );

			$( document ).on( 'yith_wcwl_init_after_ajax', function() {
				$( '.product-col .add_to_wishlist:not([data-bs-original-title]), .product-col .yith-wcwl-wishlistaddedbrowse &gt; a:not([data-bs-original-title]), .product-col .yith-wcwl-wishlistexistsbrowse &gt; a:not([data-bs-original-title])' ).each( function() {
					let _this = $( this );
					if ( ! _this.attr( 'title' ) ) {
						_this.attr( 'title', _this.text().trim() );
					}
					_this.tooltip();
				} );
			} );
			// Woocommerce Variation Form
			theme.WooVariationForm.initialize();

			// Woocommerce Product Image Slider
			if ( typeof theme.initAsync == 'function' ) {
				theme.WooProductImageSlider.initialize();
				porto_woocommerce_init();
			} else {
				$.when( theme.asyncDeferred ).done( function() {
					theme.WooProductImageSlider.initialize();
					porto_woocommerce_init();
				} );
			}

			$( window ).on( 'vc_reload', function() {
				porto_woocommerce_init();
				$( '.type-product' ).addClass( 'product' );
			} );

			// Add wishlist popup
			/*if ( !$( '#yith-wcwl-popup-message' ).length ) {
				$( 'body' ).prepend( $( '&lt;div&gt;' ).attr( 'id', 'yith-wcwl-popup-message' ).html( '&lt;div id="yith-wcwl-message"&gt;&lt;/div&gt;' ).hide() );
			}*/

			// shop horizontal filter
			$( document ).on( 'click', '.porto-product-filters-toggle a', function( e ) {
				e.preventDefault();
				$( this ).closest( '.porto-product-filters-toggle' ).toggleClass( 'opened' );
				var $products_wrapper = $( this ).closest( '#main' ).find( '.main-content' ).find( 'ul.products' ), offset, $main = $( this ).closest( '#main' ).find( '.main-content-wrap' );
				$main.toggleClass( 'opened' );
				if ( $main.hasClass( 'opened' ) ) {
					offset = -1;
				} else {
					offset = 1;
				}
				if ( $products_wrapper.hasClass( 'grid' ) ) {
					var cols_lg_index = 0, cols_md_index = 0, width_lg_index = 0, width_md_index = 0;
					for ( var i = 1; i &lt;= 8; i++ ) {
						if ( !cols_lg_index &amp;&amp; $products_wrapper.hasClass( 'pcols-lg-' + i ) ) {
							cols_lg_index = i;
							if ( i + offset &gt;= 1 ) {
								$products_wrapper.removeClass( 'pcols-lg-' + i );
								$products_wrapper.addClass( 'pcols-lg-' + ( i + offset ) );
							}
						}
						if ( !cols_md_index &amp;&amp; $products_wrapper.hasClass( 'pcols-md-' + i ) ) {
							cols_md_index = i;
							if ( i + offset &gt;= 1 ) {
								$products_wrapper.removeClass( 'pcols-md-' + i );
								if ( offset === -1 ) {
									$products_wrapper.addClass( 'pcols-sm-' + i );
								}
								$products_wrapper.addClass( 'pcols-md-' + ( i + offset ) );
							}
						}
						if ( !width_lg_index &amp;&amp; $products_wrapper.hasClass( 'pwidth-lg-' + i ) ) {
							width_lg_index = i;
							if ( i + offset &gt;= 1 ) {
								$products_wrapper.removeClass( 'pwidth-lg-' + i );
								$products_wrapper.addClass( 'pwidth-lg-' + ( i + offset ) );
							}
						}
						if ( !width_md_index &amp;&amp; $products_wrapper.hasClass( 'pwidth-md-' + i ) ) {
							width_md_index = i;
							if ( i + offset &gt;= 1 ) {
								$products_wrapper.removeClass( 'pwidth-md-' + i );
								$products_wrapper.addClass( 'pwidth-md-' + ( i + offset ) );
							}
						}
					}
				}
				theme.requestTimeout( function() {
					$( window ).trigger( 'scroll' );
					// Update Carousel
					$( document ).find( '.owl-carousel' ).each( function( e ) {
						var $this = $( this );
						if ( $this.data( 'owl.carousel' ) ) {
							$this.trigger( 'refresh.owl.carousel' );
						}
					} );
					// Update Swiper
					$( document ).find( '.swiper-container' ).each( function( e ) {
						var $this = $( this ),
							$instance = $this.data( 'swiper' );
						if ( $instance ) {
							$instance.update();
						}
					} );
				}, 300 );

				if ( $main.hasClass( 'opened' ) ) {
					$.cookie( 'porto_horizontal_filter', 'opened' );
				} else {
					$.cookie( 'porto_horizontal_filter', 'closed' );
				}
				theme.refreshStickySidebar( true );

				return false;
			} );
			if ( $.cookie &amp;&amp; 'opened' == $.cookie( 'porto_horizontal_filter' ) &amp;&amp; $( '#main .porto-products-filter-body' ).length &amp;&amp; !theme.isTablet() ) {
				$( '.porto-product-filters-toggle a' ).trigger( 'click' );
				$( '#main .porto-products-filter-body [data-plugin-sticky]:not(.manual)' ).addClass( 'manual' );
				setTimeout( function() {
					var $obj = $( '#main .porto-products-filter-body [data-plugin-sticky].manual' ),
						pluginOptions = $obj.data( 'plugin-options' );
					$obj.removeClass( 'manual' ).themeSticky( pluginOptions );
					theme.requestTimeout( function() {
						$( window ).trigger( 'scroll' );
					}, 100 );
				}, 500 );
			}

			$( document ).on( 'click', '.porto-product-filters.style2 .widget-title', function( e ) {
				e.preventDefault();
				if ( $( this ).next().is( ':hidden' ) ) {
					$( '.porto-product-filters.style2 .widget-title' ).next().hide();
					$( '.porto-product-filters.style2 .widget' ).removeClass( 'opened' );
					$( this ).next().show();
					$( this ).next().find( 'input[type="text"]:first-child' ).focus();
				} else {
					$( this ).next().hide();
				}
				$( this ).parent().toggleClass( 'opened' );
				return false;
			} );
			$( 'body' ).on( 'click', function( e ) {
				if ( !$( e.target ).is( '.porto-product-filters' ) &amp;&amp; !$( e.target ).is( '.porto-product-filters *' ) ) {
					$( '.porto-product-filters.style2 .widget-title' ).next().hide();
					$( '.porto-product-filters.style2 .widget' ).removeClass( 'opened' );
				}
			} );

			// Perform AJAX login on form submit
			$( 'body' ).on( 'click', '#login-form-popup form .woocommerce-Button', function( e ) {
				var $this = $( this ),
					$form = $this.closest( 'form' ),
					isLogin = $this.hasClass( 'login-btn' );
				if ( !isLogin &amp;&amp; !$this.hasClass( 'register-btn' ) ) {
					isLogin = $form.hasClass( 'login' );
				}
				$form.find( '#email' ).val( $form.find( '#username' ).val() );
				$form.find( 'p.status' ).show().text( 'Please wait...' ).addClass( 'loading' );
				$form.find( 'button[type=submit]' ).attr( 'disabled', 'disabled' );
				$.ajax( {
					type: 'POST',
					dataType: 'json',
					url: theme.ajax_url,
					data: $form.serialize() + '&amp;action=porto_account_login_popup_' + ( isLogin ? 'login' : 'register' ),
					success: function( data ) {
						$form.find( 'p.status' ).html( data.message.replace( '/&lt;script.*?\/script&gt;/s', '' ) ).removeClass( 'loading' );
						$form.find( 'button[type=submit]' ).removeAttr( 'disabled' );
						if ( data.loggedin === true ) {
							window.location.reload();
						}
					}
				} );
				e.preventDefault();
			} );

			// shortcodes
			var $ajax_tab_cache = {};
			$( document ).on( 'click', '.porto-products.show-category .product-categories a', function( e ) {
				e.preventDefault();
				var $this = $( this ), $form = $this.closest( '.porto-products' ).find( '.pagination-form' ), id = $this.closest( '.porto-products' ).attr( 'id' ), group = [];
				$( this ).parent().siblings().removeClass( 'current' );
				$( this ).parent().addClass( 'current' );
				if ( typeof $this.data( 'sort_id' ) != 'undefined' ) {
					$form.find( 'input[name="orderby"]' ).val( $this.data( 'sort_id' ) );
					group = $this.data( 'sort_id' );
					$form.find( 'input[name="category"]' ).val( '' );
				}
				if ( typeof $this.data( 'cat_id' ) != 'undefined' ) {
					if ( typeof $this.data( 'sort_id' ) == 'undefined' ) {
						$form.find( 'input[name="orderby"]' ).val( $form.find( 'input[name="original_orderby"]' ).val() );
						group = $form.find( 'input[name="original_orderby"]' ).val();
					}
					if ( typeof $form.data( 'original_cat_id' ) == 'undefined' ) {
						$form.data( 'original_cat_id', $form.find( 'input[name="category"]' ).val() );
						group = $form.find( 'input[name="category"]' ).val();
					}
					if ( $this.data( 'cat_id' ) ) {
						$form.find( 'input[name="category"]' ).val( $this.data( 'cat_id' ) );
						group = $this.data( 'cat_id' );
					} else {
						if ( $form.data( 'original_cat_id' ) ) {
							$form.find( 'input[name="category"]' ).val( $form.data( 'original_cat_id' ) );
							group = $form.data( 'original_cat_id' );
						} else {
							$form.find( 'input[name="category"]' ).val( '' );
							group = '';
						}
					}
				}
				var data = $form.serialize() + '&amp;product-page=1&amp;action=porto_woocommerce_shortcodes_products&amp;nonce=' + js_porto_vars.porto_nonce;
				$this.closest( '.porto-products' ).find( 'ul.products' ).trigger( 'porto_update_products', [data, '', $this, id, group] );
			} );
			$( document ).on( 'click', '.porto-products .page-numbers a', function( e ) {
				var $this = $( this ), pagination_style,
					$shop_container = $this.closest( '.porto-products' ).find( 'ul.products' ),
					cur_page = $shop_container.data( 'cur_page' ),
					max_page = $shop_container.data( 'max_page' ),
					$form = $this.closest( '.porto-products' ).find( '.pagination-form' );
				e.preventDefault();
				if ( $this.closest( '.pagination' ).hasClass( 'load-more' ) ) {
					if ( !cur_page || !max_page || ++cur_page &gt; max_page ) {
						return;
					}
					pagination_style = 'load_more';
					$this.data( 'text', $this.text() );
					$this.text( js_porto_vars.loader_text );
				} else {
					var url = new RegExp( "product-page(=|/)([^(&amp;|/)]*)", "i" ).exec( this.href );
					cur_page = url &amp;&amp; unescape( url[2] ) || "";
					pagination_style = 'default';
				}
				var page_var = cur_page ? '&amp;product-page=' + escape( cur_page ) : '', data = $form.serialize() + page_var + '&amp;action=porto_woocommerce_shortcodes_products&amp;nonce=' + js_porto_vars.porto_nonce;
				$shop_container.trigger( 'porto_update_products', [data, pagination_style, $this] );
				if ( 'default' == pagination_style ) {
					theme.scrolltoContainer( $shop_container );
				}
			} );
			$( document ).on( 'porto_update_products', 'ul.products', function( e, data, pagination_style, $obj, id, group ) {
				var $this = $( this );
				// ajax tab
				if ( undefined == $ajax_tab_cache[id] || -1 == Object.keys( $ajax_tab_cache[id] ).indexOf( group ) ) {
					porto_ajax_load_products( $this, data, pagination_style, $ajax_tab_cache, id, group );
				} else {
					var response = $ajax_tab_cache[id][group];
					//animation
					$this.css( 'opacity', 0 );
					$this.animate(
						{
							'opacity': 1,
						},
						400,
						function() {
							$this.css( 'opacity', '' );
						}
					);

					porto_ajax_load_products_success( $this, response, pagination_style );
				}
			} );
		} );
		
		$( document ).on( 'porto_theme_init', function() {
		
			// sticky add to cart
			var $sticky_product_obj = $( '.single-product .sticky-product' ),
				is_elementor_editor = $( document.body ).hasClass( 'elementor-editor-active' );

			var init_sticky_add_to_cart_fn = function( $sticky_product_obj, is_elementor_editor ) {
				if ( is_elementor_editor &amp;&amp; elementorFrontend &amp;&amp; elementorFrontend.hooks ) {
					elementorFrontend.hooks.addAction( 'frontend/element_ready/porto_cp_addcart_sticky.default', function( $obj ) {
						$sticky_product_obj = $( '.single-product .sticky-product' );
						window.dispatchEvent( new Event( 'scroll' ) );
					} );
				}

				window.addEventListener( 'scroll', function() {
					var scrollTop = $( window ).scrollTop(),
						offset = theme.adminBarHeight() + theme.StickyHeader.sticky_height;
					if ( $( 'form.cart' ).length &amp;&amp; $( 'form.cart' ).offset().top + $( 'form.cart' ).height() / 2 &lt;= scrollTop + offset ) {
						$sticky_product_obj.removeClass( 'hide' );
						if ( !$sticky_product_obj.hasClass( 'pos-bottom' ) ) {
							$sticky_product_obj.css( 'top', offset );
						}
					} else {
						$sticky_product_obj.addClass( 'hide' );
					}
				}, { passive: true } );
				$sticky_product_obj.find( '.add-to-cart .button' ).on( 'click', function( e ) {
					e.preventDefault();
					if ( $sticky_product_obj.find( '.add-to-cart .qty' ).length ) {
						$( '.single-product form .quantity .qty' ).filter(function() {
							if ( $( this ).closest( '.product-col' ).length ) {
								return false;
							}
							return true;
						}).val( $sticky_product_obj.find( '.add-to-cart .qty' ).val() );
					}
					$( '.single-product form .single_add_to_cart_button' ).filter(function() {
						if ( $( this ).closest( '.product-col' ).length ) {
							return false;
						}
						return true;
					}).eq(0).trigger( 'click' );
				} );
				$( '.single-product .entry-summary .quantity' ).clone().prependTo( '.single-product .sticky-product .add-to-cart' );

				var origin_img = $sticky_product_obj.find( '.sticky-image img' ).data( 'oi' ) ? $sticky_product_obj.find( '.sticky-image img' ).data( 'oi' ) : $sticky_product_obj.find( '.sticky-image img' ).attr( 'src' ),
					origin_price = $sticky_product_obj.find( '.price' ).html(),
					origin_stock = $sticky_product_obj.find( '.availability' ).html(),
					is_variation = false;
				$( document ).on( 'found_variation reset_data', '.variations_form', function( e, obj ) {
					if ( obj ) {
						is_variation = true;
						$sticky_product_obj.find( '.sticky-image img' ).attr( 'src', obj.image_thumb ? obj.image_thumb : origin_img );
						$sticky_product_obj.find( '.price' ).replaceWith( obj.price_html );
						$sticky_product_obj.find( '.availability' ).html( obj.availability_html ? obj.availability_html : origin_stock );
					} else if ( is_variation ) {
						is_variation = false;
						$sticky_product_obj.find( '.sticky-image img' ).attr( 'src', origin_img );
						$sticky_product_obj.find( '.price' ).html( origin_price );
						$sticky_product_obj.find( '.availability' ).html( origin_stock );
					}
				} );
			};
			if ( $sticky_product_obj.length || is_elementor_editor ) {
				init_sticky_add_to_cart_fn( $sticky_product_obj, is_elementor_editor );
			} else {
				$( document.body ).on( 'porto_elementor_editor_init', function() {
					var $sticky_product_obj = $( '.single-product .sticky-product' ),
						is_elementor_editor = $( document.body ).hasClass( 'elementor-editor-active' );
					if ( $sticky_product_obj.length || is_elementor_editor ) {
						init_sticky_add_to_cart_fn( $sticky_product_obj, is_elementor_editor );
					}
				} );
			}

			// sticky filter on mobile
			if ( 1 === $( '.shop-loop-before' ).length &amp;&amp; $( '.mobile-sidebar' ).length ) {
				var porto_progress_obj = $( '.porto-scroll-progress.fixed-under-header' ),
					porto_progress_height = 0;
				if ( porto_progress_obj.length ) {
					var flag = false;
					if ( porto_progress_obj.is( ':hidden' ) ) {
						porto_progress_obj.show();
						flag = true;
					}
					porto_progress_height = porto_progress_obj.height();
					if ( flag ) {
						porto_progress_obj.hide();
					}
				} else {
					porto_progress_height = 0;
				}

				var init_filter_sticky = function() {
					var $obj = $( '.shop-loop-before' ),
						prevScrollPos = $obj.data('prev-pos') ? $obj.data('prev-pos') : 0,
						scrollUpOffset = 0,
						$pageWrapper = $( '.page-wrapper' );
					if ( !$obj.prev( '.filter-placeholder' ).length ) {
						$( '&lt;div class="filter-placeholder m-0"&gt;&lt;/div&gt;' ).insertBefore( $obj );
					}
					var $ph = $obj.prev( '.filter-placeholder' ),
						scrollTop = $( window ).scrollTop(),
						offset = theme.adminBarHeight() + theme.StickyHeader.sticky_height + porto_progress_height - 1,
						objHeight = $obj.outerHeight() + parseInt( $obj.css( 'margin-bottom' ) );
					if ( $( '.page-wrapper' ).hasClass( 'sticky-scroll-up' ) &amp;&amp; ! $( 'html' ).hasClass( 'porto-search-opened' )) {
						if ( scrollTop &gt;= prevScrollPos ) {
							$obj.addClass('scroll-down');
						} else {
							$obj.removeClass('scroll-down');
						}
						// Header is scroll-up Sticky Type
						scrollUpOffset = - theme.StickyHeader.sticky_height;
						if ( 'undefined' == typeof ( theme.StickyHeader.sticky_height ) ) {
							$obj.data( 'prev-pos', 0 );
						} else {
							// The transition of Sticky isn't working in this area
							var $transitionOffset = ( offset &gt; 100 ) ? offset : 100;
							if ( $ph.offset().top + objHeight + $transitionOffset &lt; scrollTop + offset + scrollUpOffset ) {
								$obj.addClass( 'sticky-ready' );
							} else {
								$obj.removeClass( 'sticky-ready' );
							}
							$obj.data( 'prev-pos', scrollTop );
						}
					}
					if ( $( 'html.filter-sidebar-opened' ).length ) {
						$ph.css( 'height', '' );
						return;
					}
					if ( ( $ph.offset().top + objHeight &lt; scrollTop + offset + scrollUpOffset ) ) {
						if ( ! $pageWrapper.hasClass( 'sticky-scroll-up' ) || ( $pageWrapper.hasClass( 'sticky-scroll-up' ) &amp;&amp; 0 !== prevScrollPos ) ) {
							$ph.css( 'height', objHeight );
							$obj.css( 'top', offset );
							$obj.addClass( 'sticky' );
						}
					} else {
						$ph.css( 'height', '' );
						$obj.removeClass( 'sticky' ).css( 'top', '' );
					}
				};
				if ( window.innerWidth &lt; 992 ) {
					window.removeEventListener( 'scroll', init_filter_sticky );
					window.addEventListener( 'scroll', init_filter_sticky, { passive: true } );
					init_filter_sticky();
				}
				var request_timer = null,
					old_win_width = window.innerWidth;
				$( window ).on( 'resize', function() {
					if ( old_win_width != window.innerWidth ) {
						if ( request_timer ) {
							theme.deleteTimeout( request_timer );
							request_timer = false;
						}
						if ( window.innerWidth &lt; 992 ) {
							request_timer = theme.requestTimeout( function() {
								window.removeEventListener( 'scroll', init_filter_sticky );
								window.addEventListener( 'scroll', init_filter_sticky, { passive: true } );
								$( window ).trigger( 'scroll' );
							}, 100 );
						} else {
							window.removeEventListener( 'scroll', init_filter_sticky );
							$( '.shop-loop-before' ).removeClass( 'sticky' ).css( 'top', '' ).prev( '.filter-placeholder' ).css( 'height', '' );
						}
						old_win_width = window.innerWidth;
					}
				} );
			}
		} );

		// cart page accordion
		$( '.cart-v2 .cart_totals .accordion-toggle.out' ).removeClass( 'out' );
		$( document ).ajaxComplete( function( event, xhr, options ) {
			$( '.cart-v2 .cart_totals .accordion-toggle.out' ).each( function() {
				if ( $( $( this ).attr( 'href' ) ).length &amp;&amp; $( $( this ).attr( 'href' ) ).is( ':hidden' ) ) {
					$( this ).removeClass( 'collapsed' );
					$( $( this ).attr( 'href' ) ).addClass( 'show' );
				}
			} );
		} );

		// porto products filter element
		$( '.porto_products_filter_form .btn-submit' ).on( 'click', function( e ) {
			e.preventDefault();
			var data = $( this ).closest( 'form' ).serializeArray(),
				submit_data = '';
			for ( var i in data ) {
				var param = data[i];
				if ( param.value ) {
					if ( submit_data ) {
						submit_data += '&amp;';
					}
					submit_data += param.name + '=' + param.value;
					if ( 'min_price' == param.name ) {
						var max_price = $( this ).closest( 'form' ).find( '.porto_dropdown_price_range option:selected' ).data( 'maxprice' );
						if ( max_price ) {
							submit_data += '&amp;max_price=' + max_price;
						}
					}
				}
			}
			location.href = $( this ).closest( 'form' ).attr( 'action' ) + '?' + submit_data;
		} );

		// yith wishlist
		if ( $( '.wishlist_table.responsive' ).length ) {
			$( window ).on( 'resize', function() {
				var media = window.matchMedia( '(max-width: 768px)' ),
					$wishlist_table = $( '.wishlist_table.responsive' );
				if ( $wishlist_table.hasClass( 'traditional' ) ) {
					if ( media.matches ) {
						$wishlist_table.addClass( 'mobile' );
					} else {
						$wishlist_table.removeClass( 'mobile' );
					}
				}
			} );
		}

		// pre-order
		if ( js_porto_vars.pre_order ) {
			var porto_pre_order = {
				init: function() {
					this.$add_to_cart_btn = $( '.product-summary-wrap .single_add_to_cart_button' );
					this.add_to_cart_label = this.$add_to_cart_btn.html();
					$( '.product-summary-wrap form.variations_form' ).on( 'show_variation', function( e, v, p ) {
						if ( v.porto_pre_order ) {
							porto_pre_order.$add_to_cart_btn.html( v.porto_pre_order_label );
							if ( v.porto_pre_order_date ) {
								$( this ).find( '.woocommerce-variation-description' ).append( v.porto_pre_order_date );
							}
						} else {
							porto_pre_order.$add_to_cart_btn.html( porto_pre_order.add_to_cart_label );
						}
					} ).on( 'hide_variation', function() {
						porto_pre_order.$add_to_cart_btn.html( porto_pre_order.add_to_cart_label );
					} );
				}
			};
			if ( $( 'div.product.skeleton-loading' ).length ) {
				$( 'div.product.skeleton-loading' ).on( 'skeleton-loaded', function() {
					porto_pre_order.init();
				} );
			} else {
				porto_pre_order.init();
			}
		}

		// refresh yith wishlist
		if ( $( '#header .my-wishlist .wishlist-count' ).length ) {
			$( document.body ).on( 'added_to_wishlist removed_from_wishlist added_to_cart', function( e ) {
				var $obj = $( '#header .my-wishlist .wishlist-count' );
				if ( $obj.text() ) {
					$.ajax( {
						type: 'POST',
						dataType: 'json',
						url: theme.ajax_url,
						data: {
							action: 'porto_refresh_wishlist_count',
							nonce: js_porto_vars.porto_nonce,
						},
						success: function( response ) {
							if ( response || 0 === response ) {
								$obj.addClass( 'count-updating' ).text( Number( response ) );
								setTimeout( function() {
									$obj.removeClass( 'count-updating' );
								}, 1000 );
							}
						}
					} );
				}
			} );
		}

		// fix contact form 7 role="alert" issue in cart page
		if ( $( document.body ).hasClass( 'woocommerce-cart' ) &amp;&amp; $( '.wpcf7 .screen-reader-response' ).length ) {
			$( '.wpcf7 .screen-reader-response' ).attr( 'role', '' );
		}

		// fix dokan search vendor
		$( '#dokan-store-listing-filter-form-wrap .store-search-input' ).on( 'keydown', function( e ) {
			if ( e.which &amp;&amp; event.which == 13 ) {
				$( this ).closest( 'form' ).find( '#apply-filter-btn' ).trigger( 'click' );
				e.preventDefault();
			}
		} );

		// add spinner to block
		if ( $.fn.block ) {
			var funcBlock = $.fn.block;
			$.fn.block = function( opts ) {
				if ( this.hasClass( 'yith-wcwl-add-to-wishlist' ) ) {
					this.children().addClass( 'pe-none opacity-6' );
					return this;
				}
				if ( this.is( '.woocommerce-checkout' ) ) {
					this.append( '&lt;div class="loader-container d-block"&gt;&lt;div class="loader"&gt;&lt;i class="porto-ajax-loader"&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;' );
				}
				return funcBlock.call( this, opts );
			}

			var funcUnblock = $.fn.unblock;
			$.fn.unblock = function( opts ) {
				if ( this.hasClass( 'yith-wcwl-add-to-wishlist' ) ) {
					this.children().removeClass( 'pe-none opacity-6' );
					return this;
				}
				funcUnblock.call( this, opts );
				this.is( '.processing' ) || ( this.is( '.woocommerce-checkout' ) &amp;&amp; this.children( '.loader-container' ).remove() );
				return this;
			}
		}
	} )( window.theme, jQuery );

	// Compare
	( function( theme, $ ) {
		theme = theme || {};
		$.extend( theme, {
			porto_comapre_add_query_arg: function( key, value ) {
				key = escape( key ); value = escape( value );

				var s = document.location.search;
				var kvp = key + "=" + value;

				var r = new RegExp( "(&amp;|\\?)" + key + "=[^\&amp;]*" );

				s = s.replace( r, "$1" + kvp );

				if ( !RegExp.$1 ) { s += ( s.length &gt; 0 ? '&amp;' : '?' ) + kvp; };

				//again, do what you will here
				return s;
			}
		} );
		$( document ).ready( function() {
			$( 'body' ).on( 'click', '.wishlist_table a.compare.added', function( e ) {
				e.preventDefault();
				$( 'body' ).trigger( 'yith_woocompare_open_popup', { response: theme.porto_comapre_add_query_arg( 'action', yith_woocompare.actionview ) + '&amp;iframe=true' } );
			} );
			// Redefine "add to compare" function because they do not use async ajax.
			$( document )
				.off( 'click', '.product a.compare:not(.added)' )
				.on( 'click', '.product a.compare:not(.added), .wishlist_table a.compare:not(.added)', function( e ) {
					e.preventDefault();
					if ( typeof theme.comparePopup != 'undefined' ) {
						theme.comparePopup.initialize( $( this ) );
					}

					var button = $( this ),
						data = {
							action: yith_woocompare.actionadd,
							id: button.data( 'product_id' ),
							context: 'frontend'
						},
						widget_list = $( '.yith-woocompare-widget ul.products-list' );

					button.addClass( 'added' );

					// do ajax
					$.ajax( {
						type: 'post',
						url: yith_woocompare.ajaxurl.toString().replace( '%%endpoint%%', yith_woocompare.actionadd ),
						data: data,
						dataType: 'json',
						success: function( response ) {

							// increase compare count
							$( '.yith-woocompare-open .compare-count' ).each( function() {
								this.innerHTML = parseInt( this.innerHTML ) + 1;
							} );
							var added_icon_html = '';
							if ( button.data( 'added_icon' ) ) {
								added_icon_html += '&lt;i class="' + button.data( 'added_icon' ) + '"&gt;&lt;/i&gt;';
							}
							var added_label = yith_woocompare.added_label;
							if ( 'hide' == button.data( 'hide_title' ) ) {
								added_label = '';
							}
							button.attr( 'href', response.table_url )
								.html( !button.data( 'icon_pos' ) ? added_icon_html + added_label : added_label + added_icon_html );
							// add the product in the widget
							widget_list.html( response.widget_table );

							if ( ( typeof yith_woocompare != 'undefined' ) &amp;&amp; ( 'yes' == yith_woocompare.auto_open ) ) {
								button.trigger( 'click' );
							}
						}
					} ).fail( function() {
						button.removeClass( 'added' );
					} );
				} );
		} );
		$( 'body' ).on( 'click', 'a.yith-woocompare-open, .product a.compare.added, .wishlist_table a.compare.added', function() {
			var scrollbarWidth = window.innerWidth - document.body.clientWidth;
			$( 'html' ).css( { 'overflow': 'hidden', 'margin-right': scrollbarWidth } );
		} );
		// remove margin-right
		$( 'body' ).on( 'click', '.yith_woocompare_colorbox #cboxClose, #cboxOverlay', function() {
			$( 'html' ).css( { 'overflow': '', 'margin-right': '' } );
		} );
		// decrease compare count
		$( 'body' ).on( 'yith_woocompare_open_popup', function() {
			setTimeout( function() {
				if ( $( 'body' ).find( 'iframe' ).length ) {
					var childWindow = $( 'body' ).find( '#cboxLoadedContent iframe' )[0].contentWindow;
					if ( childWindow.jQuery ) {
						childWindow.jQuery( childWindow ).on( 'yith_woocompare_product_removed', function() {
							$( '.yith-woocompare-open .compare-count' ).each( function() {
								this.innerHTML = Math.max( 0, parseInt( this.innerHTML ) - 1 );
							} );
						} );
					}
				}
			}, 2000 );
		} );
	} )( window.theme, window.jQuery );

} )();

function porto_woocommerce_init( $wrap ) {
	'use strict';

	if ( !$wrap ) {
		$wrap = jQuery( document.body );
	}
	// Woo Widget Toggle
	( function( $ ) {

		if ( $.fn.themeWooWidgetToggle ) {

			$( function() {
				$wrap.find( '.widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter, .widget-woof, .porto_widget_price_filter, #wcfmmp-store .widget.sidebar-box, #wcfmmp-store-lists-sidebar .sidebar-box' ).find( '.widget-title' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeWooWidgetToggle( opts );
				} );
			} );

		}

		// Woo Widget Accordion
		if ( $.fn.themeWooWidgetAccordion ) {

			$( function() {
				$wrap.find( '.widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter, .widget-woof, #wcfmmp-store .widget.sidebar-box, #wcfmmp-store-lists-sidebar .sidebar-box' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeWooWidgetAccordion( opts );
				} );
			} );

		}

		// Woo Products Slider
		if ( $.fn.themeWooProductsSlider ) {

			$( function() {
				var $direct_carousels = $wrap.find( '.products-slider:not(.manual)' ).filter( function() {
					if ( $( this ).closest( '.porto-carousel:not(.owl-loaded)' ).length ) {
						return false;
					}
					return true;
				} );
				var $parent_carousel = $wrap.find( '.porto-carousel:not(.owl-loaded)' ).filter( function() {
					if ( $( this ).find( '.products-slider:not(.manual)' ).length ) {
						return true;
					}
					return false;
				} );
				if ( $parent_carousel.length ) {
					$parent_carousel.one( 'initialized.owl.carousel', function() {
						$( this ).find( '.products-slider:not(.manual)' ).each( function() {
							var $this = $( this );
							$this.themeWooProductsSlider( $this.data( 'plugin-options' ) );
						} );
					} );
				}

				$direct_carousels.each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					setTimeout( function() {
						$this.themeWooProductsSlider( opts );
					}, 0 );
				} );
			} );
		}

	} )( jQuery );
}

function porto_woocommerce_variations_init( $parent_obj ) {
	'use strict';

	theme.requestTimeout( function() {
		var form_variation = $parent_obj.find( 'form.variations_form:not(.vf_init)' );
		if ( form_variation.length &amp;&amp; jQuery.fn.wc_variation_form ) {
			form_variation.each( function() {
				var data_a = jQuery._data( this, 'events' );
				if ( !data_a || !data_a['show_variation'] ) {
					jQuery( this ).wc_variation_form();
				}
			} );
		}
	}, 100 );
}
function porto_ajax_load_products( $obj, data, pagination_style, $ajax_tab_cache, id, group ) {
	'use strict';
	( function( $ ) {
		if ( $obj.hasClass( 'loading' ) ) {
			return;
		}
		$obj.addClass( 'loading' );
		if ( 'load_more' != pagination_style ) {
			$obj.addClass( 'yith-wcan-loading' );
			if ( !$obj.children( '.porto-loading-icon' ).length ) {
				$obj.append( '&lt;i class="porto-loading-icon"&gt;&lt;/i&gt;' );
			}
		}
		if ( $ajax_tab_cache[id] == undefined ) {
			$ajax_tab_cache[id] = {};
		}
		$.ajax( {
			url: theme.ajax_url,
			data: data,
			type: 'post',
			success: function( response ) {
				//cache
				if ( $( response ).length ) {
					$ajax_tab_cache[id][group] = $( response ).html();
				} else {
					$ajax_tab_cache[id][group] = '';
				}
				porto_ajax_load_products_success( $obj, response, pagination_style );
			},
			complete: function() {
				$obj.removeClass( 'loading' );
			}
		} );
	} )( jQuery );
}

function porto_ajax_load_products_success( $obj, success, pagination_style ) {
	'use strict';

	( function( $ ) {
		let _successProducts = $( success ).find( 'ul.products' );
		if ( $obj.data( 'cur_page' ) &amp;&amp; _successProducts.data( 'cur_page' ) ) {
			$obj.data( 'cur_page', _successProducts.data( 'cur_page' ) );
		}
		if ( ! ( $obj.hasClass( 'grid-creative' ) &amp;&amp; typeof $obj.attr( 'data-plugin-masonry' ) != 'undefined' ) ) {
			_successProducts.children( ':not(.grid-col-sizer)' ).addClass( 'fadeInUp animated' );
		}
		if ( 'load_more' == pagination_style ) {
			$obj.append( _successProducts.html() );
		} else {
			if ( $obj.hasClass( 'owl-carousel' ) ) {
				$obj.parent().css( 'min-height', $obj.parent().height() );
			}
			if ( $obj.hasClass( 'grid-creative' ) &amp;&amp; typeof $obj.attr( 'data-plugin-masonry' ) != 'undefined' ) {
				$obj.isotope( 'remove', $obj.children() );
				$obj.find( '.grid-col-sizer' ).remove();
				var newItems = _successProducts.children();
				$obj.append( newItems );
				$obj.isotope( 'appended', newItems );
				$obj.imagesLoaded( function() {
					$obj.isotope( 'layout' );
				} );
			} else {
				if ( $( success ).length ) {
					$obj.html( _successProducts.html() );
				} else {
					$obj.html( '' );
				}
			}
		}

		if ( $obj.hasClass( 'owl-carousel' ) &amp;&amp; $.fn.themeWooProductsSlider ) {
			$obj.trigger( 'destroy.owl.carousel' );
			theme.requestTimeout( function() {
				var pluginOptions = $obj.data( 'plugin-options' ), opts;
				if ( pluginOptions )
					opts = pluginOptions;
				$obj.data( '__wooProductsSlider', '' ).themeWooProductsSlider( opts );
				$obj.parent().css( 'min-height', '' );
			}, 100 );
		}
		if ( $obj.closest( '.porto-products' ).find( '.shop-loop-after' ).length ) {
			if ( $( success ).find( '.shop-loop-after' ).length ) {
				$obj.closest( '.porto-products' ).find( '.shop-loop-after' ).replaceWith( $( success ).find( '.shop-loop-after' ) );
			} else {
				$obj.closest( '.porto-products' ).find( '.shop-loop-after' ).remove();
			}
		}
		if ( typeof $obj.data( 'infinitescroll' ) != 'undefined' ) {
			var infinitescrollData = $obj.data( 'infinitescroll' );
			infinitescrollData.options.state.currPage = 1;
			$obj.data( 'infinitescroll', infinitescrollData );
		}
		$obj.removeClass( 'yith-wcan-loading' );
		if ( 'load_more' == pagination_style &amp;&amp; typeof $obj != 'undefined' &amp;&amp; typeof $obj.data( 'text' ) != 'undefined' ) {
			$obj.text( $obj.data( 'text' ) );
		}
		$( document ).trigger( "yith-wcan-ajax-filtered" );
	} )( jQuery );
}
</pre></body></html>