/*! impleCode Product Scripts Manages product related scripts (c) 2020 impleCode - https://implecode.com */ function ic_adjust_responsive_filters_height( ){var e = jQuery( ".responsive-filters" ).outerHeight( ), i = jQuery( ".product-list" ).outerHeight( ); i < e && ( jQuery( ".responsive-filters .responsive-filters-section-content" ).css( "max-height", i + "px" ), jQuery( ".responsive-filters .responsive-filters-section-content" ).css( "overflow", "auto" ) )}function ic_close_icons_hidden_content( ){jQuery( ".ic-catalog-bar" ).each( function( ){var e = jQuery( this ).find( ".ic-bar-icon" ), i = e.find( ".ic-icon-hidden-content" ); 0 < i.length?i.slideUp( 300, function( ){e.find( ".ic-icon-url" ).show( )} ):e.find( ".ic-icon-url" ).show( )} )}function ic_apply_magnifier( ){if ( "function" == typeof jQuery( ".ic_magnifier" ).elevateZoom )if ( !jQuery( ".ic_magnifier" ).length || jQuery( ".responsive .ic_magnifier" ).length || jQuery( ".ic_magnifier.magnigier_on" ).length ){if ( jQuery( ".ic_magnifier.magnigier_on" ).length && jQuery( ".responsive .ic_magnifier" ).length ){jQuery( ".ic_magnifier.magnigier_on" ).data( "elevateZoom" ).changeState( "disable" )} else if ( jQuery( ".ic_magnifier.magnigier_on" ).length && !jQuery( ".responsive .ic_magnifier" ).length ){jQuery( ".ic_magnifier.magnigier_on" ).data( "elevateZoom" ).changeState( "enable" )}} else{var e = 11; jQuery( ".boxed .ic_magnifier" ).length && ( e = 1 ), jQuery( ".ic_magnifier" ).elevateZoom( {cursor:"pointer", responsive:!0, zoomWindowPosition:e} ), jQuery( ".ic_magnifier" ).addClass( "magnigier_on" )}}function ic_apply_range_slider( e ){var i = e.data( "unit" ), t = e.data( "min" ), o = e.data( "max" ), r = e.data( "current-min" ), n = e.data( "current-max" ); e.ionRangeSlider( {type:"double", min:t, max:o, from:r, to:n, postfix:" " + i, grid:!0, hide_min_max:!0, onFinish:function( ){e.closest( "form" ).submit( ), e.closest( ".product_size_filter" ).addClass( "active" )}} )}function ic_define_hooks( ){void 0 === jQuery.ic && ( jQuery.ic = {hooks:{action:{}, filter:{}}, addAction:function( e, i, t ){jQuery.ic.addHook( "action", e, i, t )}, addFilter:function( e, i, t ){jQuery.ic.addHook( "filter", e, i, t )}, doAction:function( e, i ){jQuery.ic.doHook( "action", e, null, i )}, applyFilters:function( e, i, t ){return jQuery.ic.doHook( "filter", e, i, t )}, removeAction:function( e, i ){jQuery.ic.removeHook( "action", e, i )}, removeFilter:function( e, i ){jQuery.ic.removeHook( "filter", e, i )}, addHook:function( e, i, t, o ){null == jQuery.ic.hooks[e][i] && ( jQuery.ic.hooks[e][i] = [] ); var r = jQuery.ic.hooks[e][i]; null == o && ( o = i + "_" + r.length ), jQuery.ic.hooks[e][i].push( {tag:o, callable:t} )}, doHook:function( e, i, t, o ){if ( null != jQuery.ic.hooks[e][i] )for ( var r = jQuery.ic.hooks[e][i], n = 0; n < r.length; n++ )"action" == e?r[n].callable( o ):t = r[n].callable( t, o ); if ( "filter" == e )return t}, removeHook:function( e, i, t ){if ( null != jQuery.ic.hooks[e][i] )for ( var o = jQuery.ic.hooks[e][i], r = o.length - 1; 0 <= r; r-- )null != t && t != o[r].tag || o.splice( r, 1 )}} )}function ic_switch_popstate_tabs( e ){var i = "product_description"; "" !== window.location.hash?ic_enter_tab( i = ( i = window.location.hash ).replace( "_tab", "" ).replace( "#", "" ), jQuery( ".boxed .after-product-details h3[data-tab_id=" + i + "]" ) ):jQuery( ".boxed .after-product-details h3:first-of-type" ).hasClass( "active" ) || ( set_default_ic_tab( ), history.replaceState( "", document.title, window.location.pathname + window.location.search ) )}function initialize_ic_tabs( ){jQuery( ".boxed" ).length && ( jQuery( window ).on( "popstate", ic_switch_popstate_tabs ), jQuery( ".boxed" ).hasClass( "responsive" )?ic_accordion( ):jQuery( ".boxed" ).length && ic_tabs( ), jQuery( document ).trigger( "ic_tabs_initialized" ) )}function redefine_ic_tabs( ){jQuery( ".boxed .after-product-details" ).hasClass( "ic_accordion_container" )?( jQuery( ".boxed .after-product-details > div" ).each( function( ){var e = jQuery( this ).find( ".ic_accordion_content_container" ); e.show( ), e.removeClass( "ic_accordion_content_container" )} ), jQuery( ".after-product-details" ).removeClass( "ic_accordion_container" ) ):jQuery( ".boxed .after-product-details" ).hasClass( "ic_tabs_container" ) && ( jQuery( ".boxed .after-product-details .ic_tabs h3" ).each( function( ){var e = jQuery( this ).find( "a" ); jQuery( this ).prepend( e.text( ) ), e.remove( ), jQuery( this ).addClass( "catalog-header" ); var i = jQuery( this ).data( "tab_id" ); jQuery( ".boxed .after-product-details #" + i ).prepend( jQuery( this ) )} ), jQuery( ".boxed .after-product-details > div" ).removeClass( "ic_tab_content" ).css( "display", "" ), jQuery( ".boxed .after-product-details .ic_tabs" ).remove( ), jQuery( ".after-product-details" ).removeClass( "ic_tabs_container" ) ), initialize_ic_tabs( )}function ic_accordion( ){if ( jQuery( ".boxed .after-product-details > div" ).each( function( ){jQuery( this ).children( ).wrapAll( "
" ), jQuery( this ).find( ".catalog-header" ).prependTo( jQuery( this ) )} ), ic_accordion_initial_hide( ), "" !== window.location.hash ){var e = window.location.hash.replace( "_tab", "" ).replace( "#", "" ), i = jQuery( ".boxed .after-product-details > #" + e + " > .catalog-header" ); i.length?( i.addClass( "open" ), jQuery( ".boxed .after-product-details > #" + e + " .ic_accordion_content_container" ).show( ) ):ic_open_default_accordion( )} else ic_open_default_accordion( ); jQuery( ".boxed.responsive .after-product-details .catalog-header" ).unbind( "click" ), jQuery( ".boxed.responsive .after-product-details .catalog-header" ).click( function( ){if ( jQuery( this ).hasClass( "open" ) )history.pushState( {}, document.title, window.location.pathname ), jQuery( this ).removeClass( "open" ), jQuery( this ).next( ".ic_accordion_content_container" ).hide( ); else{var t = 0, o = 0; jQuery( ".boxed.responsive .after-product-details .catalog-header.open" ).each( function( ){var e = jQuery( this ).next( ".ic_accordion_content_container" ); t += jQuery( this ).next( ".ic_accordion_content_container" ).height( ); var i = jQuery( this )[0].getBoundingClientRect( ).top; o < i && ( o = i ), e.hide( ), jQuery( this ).removeClass( "open" )} ); var e = jQuery( window ).scrollTop( ), i = jQuery( this )[0].getBoundingClientRect( ).top, r = jQuery( this ).parent( "div" ).attr( "id" ); window.location.hash = r + "_tab", jQuery( this ).parent( "div" ).children( ).show( ), jQuery( this ).addClass( "open" )}( i < t && o < i || !is_element_visible( jQuery( this ) ) ) && jQuery( "html" ).animate( {scrollTop:e - t}, 0, function( ){} )} ), jQuery( ".boxed .after-product-details" ).addClass( "ic_accordion_container" )}function ic_open_default_accordion( ){jQuery( ".boxed .after-product-details > div:first-child .ic_accordion_content_container" ).show( ), jQuery( ".boxed .after-product-details > div:first-child .catalog-header" ).addClass( "open" )}function ic_accordion_initial_hide( ){jQuery( ".boxed.responsive .after-product-details > div" ).each( function( ){jQuery( this ).find( ".ic_accordion_content_container" ).hide( ), jQuery( this ).find( ".catalog-header" ).show( )} )}function ic_tabs( ){if ( !jQuery( ".boxed .after-product-details" ).hasClass( "ic_tabs_container" ) ){var o = "
"; if ( jQuery( ".boxed .after-product-details > div" ).each( function( ){var e = jQuery( this ), i = e.attr( "id" ); e.addClass( "ic_tab_content" ); var t = e.find( "> h3.catalog-header" ); t.length && ( o = o + "

" + t.html( ) + "

", t.remove( ) )} ), o += "
", jQuery( ".boxed .after-product-details" ).prepend( o ), "" !== window.location.hash ){var e = window.location.hash.replace( "_tab", "" ).replace( "#", "" ), i = jQuery( ".boxed .after-product-details .ic_tabs > h3[data-tab_id='" + e + "']" ); i.length?ic_enter_tab( e, i ):set_default_ic_tab( )} else set_default_ic_tab( ); jQuery( ".boxed .after-product-details .ic_tabs > h3" ).unbind( "click" ), jQuery( ".boxed .after-product-details .ic_tabs > h3" ).click( function( e ){e.preventDefault( ), ic_enter_tab( jQuery( this ).data( "tab_id" ), jQuery( this ) )} ), jQuery( ".boxed .after-product-details" ).addClass( "ic_tabs_container" )}}function ic_enter_tab( e, i ){if ( !i.hasClass( "active" ) ){var t = e + "_tab"; window.location.hash !== "#" + t && ( window.location.hash = t ), jQuery( ".boxed .after-product-details .ic_tab_content.active" ).hide( ), jQuery( "#" + e ).show( ), jQuery( ".boxed .after-product-details *" ).removeClass( "active" ), jQuery( "#" + e ).addClass( "active" ), i.addClass( "active" )}}function set_default_ic_tab( ){jQuery( ".boxed .after-product-details .ic_tabs > h3" ).removeClass( "active" ), jQuery( ".boxed .after-product-details > .ic_tab_content" ).removeClass( "active" ).hide( ), jQuery( ".boxed .after-product-details .ic_tabs > h3:first-child" ).addClass( "active" ), jQuery( ".boxed .after-product-details > .ic_tab_content:first" ).addClass( "active" ).show( )}function is_element_visible( e ){if ( 0 === e.length )return!1; var i = e.offset( ).top; return jQuery( window ).scrollTop( ) < i}function reponsive_product_catalog( ){var e = jQuery( "body" ).width( ); e < 1e3?( jQuery( ".al_product, .product-list" ).addClass( "responsive" ), jQuery.ic.doAction( "ic_change_responsive", "0" ) ):1e3 <= e && ( jQuery( ".al_product, .product-list" ).removeClass( "responsive" ), jQuery.ic.doAction( "ic_change_responsive", "1" ) )}function modern_grid_font_size( ){var e = .08 * jQuery( ".modern-grid-element" ).width( ); e < 16 && ( jQuery( ".modern-grid-element h3" ).css( "font-size", e ), jQuery( ".modern-grid-element .product-price" ).css( "font-size", e ), e *= .8, jQuery( ".modern-grid-element .product-attributes table" ).css( "font-size", e ) )}function ic_defaultFor( e, i ){return void 0 !== e?e:i}function ic_responsive_filters_bar( e ){if ( "0" == ( e = void 0 !== e?e:"1" ) || jQuery( ".product-list" ).hasClass( "responsive" ) || jQuery( ".product-list" ).hasClass( "grouped-filters" ) ){if ( !( i = jQuery( ".responsive-filters" ).html( ) ) && 0 < jQuery( "#product_filters_bar .filter-widget" ).length && !i && 0 < jQuery( "#product_filters_bar .filter-widget:not(.widget_product_categories):not(.product_search)" ).length ){var i = '"; var t = '
' + product_object.filter_button_label + "
"; jQuery( "#product_filters_bar .clear-both" ).before( t ), jQuery( "#product_filters_bar .clear-both" ).before( i )}} else jQuery( ".responsive-filters" ).hide( ), jQuery( "#product_filters_bar .filter-widget" ).show( )}ic_define_hooks( ), jQuery( document ).ready( function( i ){ic_define_hooks( ), reponsive_product_catalog( ), initialize_ic_tabs( ), setTimeout( "modern_grid_font_size()", 0 ), jQuery.ic.addAction( "ic_change_responsive", function( ){redefine_ic_tabs( )} ), i( window ).resize( function( ){void 0 === i( document.activeElement ).attr( "type" ) && ( reponsive_product_catalog( ), setTimeout( "modern_grid_font_size()", 0 ), ic_apply_magnifier( ) )} ), "object" == typeof colorbox && i( ".a-product-image" ).length && i( ".a-product-image" ).colorbox( product_object.lightbox_settings ), ic_apply_magnifier( ), jQuery( "body" ).on( "change", ".ic_self_submit", function( ){var e = jQuery( this ).closest( "form" ); ( 0 === e.find( '[type="submit"]' ).length || 0 < e.find( '[type="submit"]' ).not( ":visible" ).length ) && e.submit( )} ), jQuery( ".dismiss-empty-bar" ).click( function( e ){e.preventDefault( ); jQuery.post( product_object.ajaxurl, {action:"hide_empty_bar_message"}, function( ){jQuery( "div.product-sort-bar" ).hide( "slow" )} )} ), jQuery( ".al-box" ).on( "click", ".notice-dismiss", function( ){var e = jQuery( this ).closest( ".al-box" ); e.css( "opacity", "0.5" ); var i = e.data( "hash" ); if ( void 0 !== i ){var t = {action:"ic_ajax_hide_message", hash:i}; jQuery.post( product_object.ajaxurl, t, function( ){e.hide( "slow" )} )}} ), ic_responsive_filters_bar( ), i( "body" ).on( "reload", ".product-size-filter-container", function( ){var e = i( this ); e.removeClass( "toReload" ), e.find( ".ic-range-slider" ).each( function( ){ic_apply_range_slider( i( this ) )} )} ), i( ".product-size-filter-container.toReload" ).trigger( "reload" ), i( "body" ).on( "reload", ".product-sort-bar", function( ){} ), i.ic.addAction( "ic_change_responsive", function( e ){ic_responsive_filters_bar( e )} ), i.ic.addAction( "ic_self_submit", function( ){reponsive_product_catalog( ), i( ".product-size-filter-container.toReload" ).trigger( "reload" )} ), i.ic.addAction( "ic_self_submit_before", function( ){jQuery( ".responsive-filters" ).hide( )} ), jQuery( "body" ).on( "click", ".responsive-filters-button", function( ){jQuery( ".responsive-filters" ).is( ":visible" )?jQuery( ".responsive-filters" ).hide( ):( jQuery( ".responsive-filters" ).show( ), 1 === jQuery( ".responsive-filters-section" ).length && ( jQuery( ".responsive-filters-section-content" ).show( ), jQuery( ".responsive-filters-section-title" ).addClass( "open" ) ), jQuery( ".responsive-filters .responsive-filters-section-content" ).find( ".filter-active" ).each( function( ){jQuery( this ).closest( ".responsive-filters-section-content" ).show( ), jQuery( this ).closest( ".responsive-filters-section-title" ).addClass( "open" )} ), ic_adjust_responsive_filters_height( ) )} ), jQuery( "body" ).click( function( e ){var i = jQuery( ".responsive-filters-button, .responsive-filters" ); i.is( e.target ) || 0 !== i.has( e.target ).length || jQuery( ".responsive-filters" ).hide( )} ), jQuery( "body" ).on( "click", ".responsive-filters-section-title", function( ){jQuery( ".responsive-filters-section-content" ).hide( ), jQuery( this ).hasClass( "open" )?jQuery( ".responsive-filters-section-title" ).removeClass( "open" ):( jQuery( ".responsive-filters-section-title" ).removeClass( "open" ), jQuery( this ).addClass( "open" ), jQuery( this ).next( ".responsive-filters-section-content" ).show( ) ), ic_adjust_responsive_filters_height( )} ), jQuery( ".ic-icon-url.ic-show-content" ).click( function( e ){e.preventDefault( ); var i = jQuery( this ).closest( ".ic-bar-icon" ).find( ".ic-icon-hidden-content" ); jQuery( ".ic-icon-url" ).hide( ), i.slideToggle( 300 )} ), jQuery( document ).mouseup( function( e ){var i = jQuery( ".ic-icon-url.ic-show-content, .ic-icon-hidden-content" ), t = jQuery( ".ic-popup-close" ); i.is( e.target ) || 0 !== i.has( e.target ).length?t.is( e.target ) && ic_close_icons_hidden_content( ):ic_close_icons_hidden_content( )} )} );