/*! impleCode Product Scripts Manages product related scripts (c) 2017 impleCode - https://implecode.com */ function ic_switch_popstate_tabs( e ){var t = "product_description"; if ( "" !== window.location.hash )ic_enter_tab( t = ( t = window.location.hash ).replace( "_tab", "" ).replace( "#", "" ), o = jQuery( ".boxed .after-product-details h3[data-tab_id=" + t + "]" ) ); else{var o = jQuery( ".boxed .after-product-details h3:first-of-type" ); o.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( ){jQuery( this ).append( jQuery( this ).find( ".ic_accordion_content_container" ).html( ) ), jQuery( this ).find( ".ic_accordion_content_container" ).remove( )} ), 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( ){jQuery( this ).prepend( jQuery( this ).find( "a" ).text( ) ), jQuery( this ).find( "a" ).remove( ), jQuery( this ).addClass( "catalog-header" ); var e = jQuery( this ).data( "tab_id" ); jQuery( ".boxed .after-product-details #" + e ).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( "#", "" ), t = jQuery( ".boxed .after-product-details > #" + e + " > .catalog-header" ); t.length?( t.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 ( ic_accordion_initial_hide( ), jQuery( this ).hasClass( "open" ) )history.pushState( {}, document.title, window.location.pathname ), jQuery( this ).removeClass( "open" ); else{var e = jQuery( this ).parent( "div" ).attr( "id" ); window.location.hash = e + "_tab", jQuery( ".boxed .after-product-details > div .catalog-header" ).removeClass( "open" ), jQuery( this ).parent( "div" ).children( ).show( ), jQuery( this ).addClass( "open" )}var t = jQuery( "html, body" ); t.on( "scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove", function( ){t.stop( )} ), t.animate( {scrollTop:jQuery( this ).offset( ).top}, 2e3, function( ){t.off( "scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove" )} )} ), 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 e = "
"; if ( jQuery( ".boxed .after-product-details > div" ).each( function( ){var t = jQuery( this ), o = t.attr( "id" ); t.addClass( "ic_tab_content" ); var i = t.find( "> h3.catalog-header" ); i.length && ( e = e + "

" + i.html( ) + "

", i.remove( ) )} ), e += "
", jQuery( ".boxed .after-product-details" ).prepend( e ), "" !== window.location.hash ){var t = window.location.hash.replace( "_tab", "" ).replace( "#", "" ), o = jQuery( ".boxed .after-product-details .ic_tabs > h3[data-tab_id='" + t + "']" ); o.length?ic_enter_tab( t, o ):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, t ){if ( !jQuery( "#" + e ).hasClass( "active" ) ){var o = e + "_tab"; window.location.hash !== "#" + o && ( window.location.hash = o ), jQuery( ".boxed .after-product-details .ic_tab_content.active" ).hide( ), jQuery( "#" + e ).show( ), jQuery( ".boxed .after-product-details *" ).removeClass( "active" ), jQuery( "#" + e ).addClass( "active" ), t.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 ){var t = e.offset( ).top; return jQuery( window ).scrollTop( ) < t}function reponsive_product_catalog( ){jQuery( "body" ).width( ) < 1e3?( jQuery( "article.al_product" ).addClass( "responsive" ), jQuery( ".product-list" ).addClass( "responsive" ) ):( jQuery( "article.al_product" ).removeClass( "responsive" ), jQuery( ".product-list" ).removeClass( "responsive" ) )}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, t ){return void 0 !== e?e:t}jQuery( document ).ready( function( e ){reponsive_product_catalog( ), initialize_ic_tabs( ), setTimeout( "modern_grid_font_size()", 0 ), e( window ).resize( function( ){void 0 === e( document.activeElement ).attr( "type" ) && ( reponsive_product_catalog( ), redefine_ic_tabs( ), setTimeout( "modern_grid_font_size()", 0 ) )} ), "object" == typeof colorbox && e( ".a-product-image" ).length && e( ".a-product-image" ).colorbox( product_object.lightbox_settings ), jQuery( "body" ).on( "change", ".ic_self_submit", function( ){jQuery( this ).parent( "form" ).submit( )} ), jQuery( ".dismiss-empty-bar" ).click( function( e ){e.preventDefault( ); var t = {action:"hide_empty_bar_message"}; jQuery.post( product_object.ajaxurl, t, function( ){jQuery( "div.product-sort-bar" ).hide( "slow" )} )} ), jQuery.ic = {hooks:{action:{}, filter:{}}, addAction:function( e, t, o ){jQuery.ic.addHook( "action", e, t, o )}, addFilter:function( e, t, o ){jQuery.ic.addHook( "filter", e, t, o )}, doAction:function( e, t ){jQuery.ic.doHook( "action", e, null, t )}, applyFilters:function( e, t, o ){return jQuery.ic.doHook( "filter", e, t, o )}, removeAction:function( e, t ){jQuery.ic.removeHook( "action", e, t )}, removeFilter:function( e, t ){jQuery.ic.removeHook( "filter", e, t )}, addHook:function( e, t, o, i ){void 0 == jQuery.ic.hooks[e][t] && ( jQuery.ic.hooks[e][t] = [] ); var a = jQuery.ic.hooks[e][t]; void 0 == i && ( i = t + "_" + a.length ), jQuery.ic.hooks[e][t].push( {tag:i, callable:o} )}, doHook:function( e, t, o, i ){if ( void 0 != jQuery.ic.hooks[e][t] )for ( var a = jQuery.ic.hooks[e][t], r = 0; r < a.length; r++ )"action" == e?a[r].callable( i ):o = a[r].callable( o, i ); if ( "filter" == e )return o}, removeHook:function( e, t, o ){if ( void 0 != jQuery.ic.hooks[e][t] )for ( var i = jQuery.ic.hooks[e][t], a = i.length - 1; a >= 0; a-- )void 0 != o && o != i[a].tag || i.splice( a, 1 )}}} );