Home / Shop
Expert Witness Services
$1.00 - $1,000,000.00


Maximum purchase amount of 100000000 is allowed
Manufacturer: Innovation Insurance Group
- Description
var img = new Image( ); var img_width = 400; var img_height = 400; var img_ratio = 1; var tier_quantities = []; var tier_prices = [];jQuery( '.ec_details_main_image_17_5195498' ).mousemove( function( e ){ var parentOffset = jQuery( this ).parent( ).offset( ); var mouse_x = e.pageX - parentOffset.left; var mouse_y = e.pageY - parentOffset.top; var div_width = jQuery( this ).width( ); var div_height = jQuery( this ).height( ); var x_val = '-' + ( ( img_width - div_width ) * ( mouse_x / div_width ) ) + 'px'; var y_val = '-' + ( ( img_height - div_height ) * ( mouse_y / div_height ) ) + 'px'; jQuery( '.ec_details_magbox_image_17_5195498' ).css( 'background-position', x_val + ' ' + y_val ); } ); jQuery( '.ec_details_main_image_17_5195498' ).hover( function( ){ img = new Image( ); img.onload = function( ){ img_width = this.width; img_height = this.height; img_ratio = img_height / img_width; jQuery( '.ec_details_magbox' ).css( 'width', jQuery( '.ec_details_main_image_17_5195498' ).width( ) + 'px' ).css( 'height', jQuery( '.ec_details_main_image_17_5195498' ).height( ) + 'px' ); jQuery( '.ec_details_magbox_image_17_5195498' ).css( 'width', jQuery( '.ec_details_main_image_17_5195498' ).width( ) + 'px' ).css( 'height', jQuery( '.ec_details_main_image_17_5195498' ).height( ) + 'px' ); } img.src = jQuery( this ).find( 'img' ).attr( 'src' ); jQuery( '.ec_details_magbox_17_5195498' ).fadeIn( 'fast' ); }, function( ){ jQuery( '.ec_details_magbox_17_5195498' ).fadeOut( 'fast' ); } );jQuery( '.ec_details_thumbnail_17_5195498' ).click( function( e ){ var src = jQuery( this ).find( 'img' ).attr( 'src' ); jQuery( '.ec_details_thumbnail_17_5195498' ).removeClass( 'ec_active' ); jQuery( this ).addClass( 'ec_active' ); jQuery( '.ec_details_main_image_17_5195498' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_large_popup_main_17_5195498' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_magbox_image_17_5195498' ).css( 'background', 'url( "' + src + '" ) no-repeat' ); }); jQuery( '.ec_details_large_popup_thumbnail_17_5195498' ).click( function( e ){ var src = jQuery( this ).find( 'img' ).attr( 'src' ); jQuery( '.ec_details_large_popup_thumbnail_17_5195498' ).removeClass( 'ec_active' ); jQuery( this ).addClass( 'ec_active' ); jQuery( '.ec_details_thumbnail_17_5195498' ).removeClass( 'ec_active' ); jQuery( '.ec_details_main_image_17_5195498' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_large_popup_main_17_5195498' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_magbox_image_17_5195498' ).css( 'background', 'url( "' + src + '" ) no-repeat' ); }); jQuery( '.ec_minus' ).click( function( ){ ec_details_base_adjust_price_17_5195498( );} ); jQuery( '.ec_plus' ).click( function( ){ ec_details_base_adjust_price_17_5195498( );} ); jQuery( document.getElementById( 'ec_quantity_17_5195498' ) ).change( function( ){ ec_details_base_adjust_price_17_5195498( );} ); jQuery( document.getElementById( 'ec_donation_amount_17_5195498' ) ).change( function( ){ ec_details_base_adjust_price_17_5195498( );} ); jQuery( '.ec_details_tab_17_5195498' ).click( function( ){ jQuery( '.ec_details_tab_17_5195498' ).removeClass( 'ec_active' ); jQuery( this ).addClass( 'ec_active' ); jQuery( '.ec_details_extra_area_17_5195498' ).children( 'div' ).each( function( ){ jQuery( this ).hide( ) } ); if( jQuery( this ).hasClass( 'ec_description' ) ) jQuery( '.ec_details_description_tab_17_5195498' ).show( ); else if( jQuery( this ).hasClass( 'ec_specifications' ) ) jQuery( '.ec_details_specifications_tab_17_5195498' ).show( ); else if( jQuery( this ).hasClass( 'ec_customer_reviews' ) ) jQuery( '.ec_details_customer_reviews_tab_17_5195498' ).show( ); else jQuery( '.ec_details_' + jQuery( this ).attr( 'data-tab-id' ) + '_tab' ).show( ); } ); jQuery( '.ec_details_swatches > li.ec_option1_17_5195498' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = jQuery( this ).attr( 'data-optionitem-id' ); var quantity = jQuery( this ).attr( 'data-optionitem-quantity' ); ec_option1_image_change_17_5195498( optionitem_id_1, quantity ); jQuery( '.ec_details_swatches > li.ec_option1_17_5195498' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option1_17_5195498.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option1_17_5195498' ) ).val( optionitem_id_1 ); ec_details_base_adjust_price_17_5195498( ); } } ); jQuery( '.ec_details_swatches > li.ec_option2_17_5195498' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = 0; if( jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).length ){ optionitem_id_1 = jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_17_5195498' ).val( ); } var optionitem_id_2 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option2_17_5195498' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option2_17_5195498.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option2_17_5195498' ) ).val( optionitem_id_2 ); ec_details_base_adjust_price_17_5195498( ); } } ); jQuery( '.ec_details_swatches > li.ec_option3_17_5195498' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = 0; if( jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).length ){ optionitem_id_1 = jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_17_5195498' ).val( ); } var optionitem_id_2 = 0; if( jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).length ){ optionitem_id_2 = jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_2 = jQuery( '.ec_details_combo.ec_option2_17_5195498' ).val( ); } var optionitem_id_3 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option3_17_5195498' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option3_17_5195498.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option3_17_5195498' ) ).val( optionitem_id_3 ); ec_details_base_adjust_price_17_5195498( ); } } ); jQuery( '.ec_details_swatches > li.ec_option4_17_5195498' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = 0; if( jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).length ){ optionitem_id_1 = jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_17_5195498' ).val( ); } var optionitem_id_2 = 0; if( jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).length ){ optionitem_id_2 = jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_2 = jQuery( '.ec_details_combo.ec_option2_17_5195498' ).val( ); } var optionitem_id_3 = 0; if( jQuery( '.ec_details_swatches > li.ec_option3_17_5195498.ec_selected' ).length ){ optionitem_id_3 = jQuery( '.ec_details_swatches > li.ec_option3_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_3 = jQuery( '.ec_details_combo.ec_option3_17_5195498' ).val( ); } var optionitem_id_4 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option4_17_5195498' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option4_17_5195498.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option4_17_5195498' ) ).val( optionitem_id_4 ); ec_details_base_adjust_price_17_5195498( ); } } ); jQuery( '.ec_details_swatches > li.ec_option5_17_5195498' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_5 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option5_17_5195498' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option5_17_5195498.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option5_17_5195498' ) ).val( optionitem_id_5 ); ec_details_base_adjust_price_17_5195498( ); } } ); jQuery( '.ec_details_combo.ec_option1_17_5195498' ).change( function( ){ var optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_17_5195498' ).val( ); var quantity = jQuery( '.ec_details_combo.ec_option1_17_5195498 option:selected' ).attr( 'data-optionitem-quantity' ); ec_option1_image_change_17_5195498( optionitem_id_1, quantity ); jQuery( '.ec_option1_17_5195498.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_combo.ec_option2_17_5195498' ).change( function( ){ jQuery( '.ec_option2_17_5195498.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_combo.ec_option3_17_5195498' ).change( function( ){ jQuery( '.ec_option3_17_5195498.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_combo.ec_option4_17_5195498' ).change( function( ){ jQuery( '.ec_option4_17_5195498.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_combo.ec_option5_17_5195498' ).change( function( ){ jQuery( '.ec_option5_17_5195498.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_checkbox_row > input, .ec_details_radio_row > input' ).click( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_combo > .ec_details_option_data > select' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_date > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_file > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_text > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_textarea > .ec_details_option_data > textarea' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_grid_row > input' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_swatches > li.ec_advanced' ).click( function( ){ var optionitem_id = jQuery( this ).attr( 'data-optionitem-id' ); var option_id = jQuery( this ).attr( 'data-option-id' ); var product_id = '17'; jQuery( document.getElementById( 'ec_option_' + option_id + "_" + product_id + "_5195498" ) ).val( optionitem_id ); jQuery( '.ec_details_swatches > li.ec_option_' + option_id + "_" + product_id + "_5195498" ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( document.getElementById( 'ec_details_option_row_error_' + option_id + "_" + product_id + "_5195498" ) ).hide( ); ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_dimensions1 > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_dimensions2 > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( '.ec_details_option_row.ec_option_type_dimensions2 > .ec_details_option_data > select' ).change( function( ){ ec_details_advanced_adjust_price_17_5195498( ); } ); jQuery( document ).ready( function( ){ ec_details_base_adjust_price_17_5195498( ); ec_details_advanced_adjust_price_17_5195498( ); } ); function ec_details_base_adjust_price_17_5195498( ){ if( jQuery( document.getElementById( 'ec_base_price_17_5195498' ) ).length == 0 ) return; var base_price = Number( jQuery( document.getElementById( 'ec_base_price_17_5195498' ) ).html( ) ); var option1_price_adj = 0; var option2_price_adj = 0; var option3_price_adj = 0; var option4_price_adj = 0; var option5_price_adj = 0; var option1_price_add = 0; var option2_price_add = 0; var option3_price_add = 0; var option4_price_add = 0; var option5_price_add = 0; var option1_price_override = -1; var option2_price_override = -1; var option3_price_override = -1; var option4_price_override = -1; var option5_price_override = -1; // Option 1 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).length ){ option1_price_adj = jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-price' ); option1_price_add = jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option1_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option1_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option1_17_5195498' ).length ){ option1_price_adj = jQuery( '.ec_details_combo.ec_option1_17_5195498 option:selected' ).attr( 'data-optionitem-price' ); option1_price_add = jQuery( '.ec_details_combo.ec_option1_17_5195498 option:selected' ).attr( 'data-optionitem-price-onetime' ); option1_price_override = Number( jQuery( '.ec_details_combo.ec_option1_17_5195498 option:selected' ).attr( 'data-optionitem-price-override' ) ); option1_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option1_17_5195498 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 2 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).length ){ option2_price_adj = jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).attr( 'data-optionitem-price' ); option2_price_add = jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option2_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option2_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option2_17_5195498.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option2_17_5195498' ).length ){ option2_price_adj = jQuery( '.ec_details_combo.ec_option2_17_5195498 option:selected' ).attr( 'data-optionitem-price' ); option2_price_add = jQuery( '.ec_details_combo.ec_option2_17_5195498 option:selected' ).attr( 'data-optionitem-price-onetime' ); option2_price_override = Number( jQuery( '.ec_details_combo.ec_option2_17_5195498 option:selected' ).attr( 'data-optionitem-price-override' ) ); option2_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option2_17_5195498 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 3 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option3_17_5195498.ec_selected' ).length ){ option3_price_adj = jQuery( '.ec_details_swatches > li.ec_option3_17_5195498.ec_selected' ).attr( 'data-optionitem-price' ); option3_price_add = jQuery( '.ec_details_swatches > li.ec_option3_17_5195498.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option3_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option3_17_5195498.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option3_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option3_17_5195498.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option3_17_5195498' ).length ){ option3_price_adj = jQuery( '.ec_details_combo.ec_option3_17_5195498 option:selected' ).attr( 'data-optionitem-price' ); option3_price_add = jQuery( '.ec_details_combo.ec_option3_17_5195498 option:selected' ).attr( 'data-optionitem-price-onetime' ); option3_price_override = Number( jQuery( '.ec_details_combo.ec_option3_17_5195498 option:selected' ).attr( 'data-optionitem-price-override' ) ); option3_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option3_17_5195498 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 4 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option4_17_5195498.ec_selected' ).length ){ option4_price_adj = jQuery( '.ec_details_swatches > li.ec_option4_17_5195498.ec_selected' ).attr( 'data-optionitem-price' ); option4_price_add = jQuery( '.ec_details_swatches > li.ec_option4_17_5195498.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option4_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option4_17_5195498.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option4_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option4_17_5195498.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option4_17_5195498' ).length ){ option4_price_adj = jQuery( '.ec_details_combo.ec_option4_17_5195498 option:selected' ).attr( 'data-optionitem-price' ); option4_price_add = jQuery( '.ec_details_combo.ec_option4_17_5195498 option:selected' ).attr( 'data-optionitem-price-onetime' ); option4_price_override = Number( jQuery( '.ec_details_combo.ec_option4_17_5195498 option:selected' ).attr( 'data-optionitem-price-override' ) ); option4_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option4_17_5195498 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 5 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option5_17_5195498.ec_selected' ).length ){ option5_price_adj = jQuery( '.ec_details_swatches > li.ec_option5_17_5195498.ec_selected' ).attr( 'data-optionitem-price' ); option5_price_add = jQuery( '.ec_details_swatches > li.ec_option5_17_5195498.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option5_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option5_17_5195498.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option5_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option5_17_5195498.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option5_17_5195498' ).length ){ option5_price_adj = jQuery( '.ec_details_combo.ec_option5_17_5195498 option:selected' ).attr( 'data-optionitem-price' ); option5_price_add = jQuery( '.ec_details_combo.ec_option5_17_5195498 option:selected' ).attr( 'data-optionitem-price-onetime' ); option5_price_override = Number( jQuery( '.ec_details_combo.ec_option5_17_5195498 option:selected' ).attr( 'data-optionitem-price-override' ) ); option5_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option5_17_5195498 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } var num_decimals = 2; var decimal_symbol = '.'; var grouping_symbol = ','; var new_price = base_price + Number( option1_price_adj ) + Number( option2_price_adj ) + Number( option3_price_adj ) + Number( option4_price_adj ) + Number( option5_price_adj ); var order_price = Number( option1_price_add ) + Number( option2_price_add ) + Number( option3_price_add ) + Number( option4_price_add ) + Number( option5_price_add ); var override_price = -1; if( option1_price_override > -1 ) override_price = option1_price_override; else if( option2_price_override > -1 ) override_price = option2_price_override; else if( option3_price_override > -1 ) override_price = option3_price_override; else if( option4_price_override > -1 ) override_price = option4_price_override; else if( option5_price_override > -1 ) override_price = option5_price_override; if( override_price > -1 ){ jQuery( document.getElementById( 'ec_final_price_17_5195498' ) ).html( ec_details_format_money( override_price ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price ) ); } ); }else{ jQuery( document.getElementById( 'ec_final_price_17_5195498' ) ).html( ec_details_format_money( new_price ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); } if( order_price != 0 ){ jQuery( '.ec_details_added_price_17_5195498' ).show( ); jQuery( document.getElementById( 'ec_added_price_17_5195498' ) ).html( ec_details_format_money( order_price ) ); }else{ jQuery( '.ec_details_added_price_17_5195498' ).hide( ); } } function ec_details_advanced_adjust_price_17_5195498( ){ if( jQuery( document.getElementById( 'ec_base_price_17_5195498' ) ).length == 0 ) return; var base_price = Number( jQuery( document.getElementById( 'ec_base_price_17_5195498' ) ).html( ) ); // Get a quantity in case we need to use in calculating price var current_quantity = 1; if( jQuery( document.getElementById( 'ec_quantity_17_5195498' ) ).length > 0 ){ current_quantity = jQuery( document.getElementById( 'ec_quantity_17_5195498' ) ).val( ); } if( jQuery( '.ec_details_grid_row > input' ).length > 0 ){ current_quantity = 0; jQuery( '.ec_details_grid_row > input' ).each( function( ){ current_quantity = current_quantity + Number( jQuery( this ).val( ) ); } ); } for( var i=0; i<tier_quantities.length; i++ ){ if( tier_quantities[i] input:checked' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ checkbox_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ checkbox_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_option_row.ec_option_type_combo > .ec_details_option_data > select option:selected' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ combo_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ combo_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_option_row.ec_option_type_date > .ec_details_option_data > input' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ date_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ date_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } } ); jQuery( '.ec_details_option_row.ec_option_type_file > .ec_details_option_data > input' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ file_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ file_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } } ); jQuery( '.ec_details_swatch.ec_advanced.ec_selected' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ swatch_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ swatch_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_radio_row > input:checked' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ radio_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ radio_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_option_row.ec_option_type_text > .ec_details_option_data > input' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ text_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ text_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-per-character' ) > 0 ){ var num_characters = Number( jQuery( this ).val( ).replace( / /g, '' ).length ); var price_per_char = Number( jQuery( this ).attr( 'data-optionitem-price-per-character' ) ); text_adj = text_adj + ( num_characters * price_per_char ); } } } ); jQuery( '.ec_details_option_row.ec_option_type_textarea > .ec_details_option_data > textarea' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ textarea_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ textarea_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-per-character' ) > 0 ){ var num_characters = Number( jQuery( this ).val( ).replace( / /g, '' ).length ); var price_per_char = Number( jQuery( this ).attr( 'data-optionitem-price-per-character' ) ); textarea_adj = textarea_adj + ( num_characters * price_per_char ); } } } ); jQuery( '.ec_details_grid_row > input' ).each( function( ){ if( jQuery( this ).val( ) > 0 ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ grid_adj += ( Number( jQuery( this ).attr( 'data-optionitem-price' ) ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ grid_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } } ); jQuery( '.ec_dimensions_width' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' ){ has_sq_footage = true; var option_id = jQuery( this ).attr( 'data-option-id' ); var product_id = '17'; var width = jQuery( document.getElementById( 'ec_option_' + option_id + '_' + product_id + "_5195498" + '_width' ) ).val( ); var sub_width = 0; if( jQuery( document.getElementById( 'ec_option_' + option_id + '_' + product_id + "_5195498" + '_sub_width' ) ).length ) var sub_width = jQuery( document.getElementById( 'ec_option_' + option_id + '_' + product_id + "_5195498" + '_sub_width' ) ).val( ); var height = jQuery( document.getElementById( 'ec_option_' + option_id + '_' + product_id + "_5195498" + '_height' ) ).val( ); var sub_height = 0; if( jQuery( document.getElementById( 'ec_option_' + option_id + '_' + product_id + "_5195498" + '_sub_height' ) ).length ) var sub_height = jQuery( document.getElementById( 'ec_option_' + option_id + '_' + product_id + "_5195498" + '_sub_height' ) ).val( ); if( width != "" && height != "" ) sq_footage = ec_details_get_sq_footage_17_5195498( width, sub_width, height, sub_height ) * Number( jQuery( document.getElementById( 'ec_quantity_17_5195498' ) ).val( ) ); } } ); var new_price = ( base_price + Number( checkbox_adj ) + Number( combo_adj ) + Number( date_adj ) + Number( file_adj ) + Number( swatch_adj ) + Number( grid_adj ) + Number( radio_adj ) + Number( text_adj ) + Number( textarea_adj ) ); var new_price_sqft = new_price * sq_footage; var override_price_final = override_price + Number( checkbox_adj ) + Number( combo_adj ) + Number( date_adj ) + Number( file_adj ) + Number( swatch_adj ) + Number( grid_adj ) + Number( radio_adj ) + Number( text_adj ) + Number( textarea_adj ); var override_price_sqft = override_price_final * sq_footage; var order_price = Number( checkbox_add ) + Number( combo_add ) + Number( date_add ) + Number( file_add ) + Number( swatch_add ) + Number( grid_add ) + Number( radio_add ) + Number( text_add ) + Number( textarea_add ); if( override_price > -1 ){ jQuery( document.getElementById( 'ec_final_price_17_5195498' ) ).html( ec_details_format_money( override_price_sqft ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); }else{ jQuery( document.getElementById( 'ec_final_price_17_5195498' ) ).html( ec_details_format_money( new_price_sqft ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); } if( price_multiplier > 1 && override_price > -1 ){ jQuery( document.getElementById( 'ec_final_price_17_5195498' ) ).html( ec_details_format_money( override_price_sqft * Number( price_multiplier ) ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); }else if( price_multiplier > 1 ){ jQuery( document.getElementById( 'ec_final_price_17_5195498' ) ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_17_5195498' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); } if( order_price != 0 ){ jQuery( '.ec_details_added_price_17_5195498' ).show( ); jQuery( document.getElementById( 'ec_added_price_17_5195498' ) ).html( ec_details_format_money( order_price ) ); }else{ jQuery( '.ec_details_added_price_17_5195498' ).hide( ); } } function ec_details_get_sq_footage_17_5195498( width, sub_width, height, sub_height ){ var sub_width_decimal = ec_details_get_sub_dimension_decimal_17_5195498( sub_width ); width = Number( Number( width ) + sub_width_decimal ) / 12; var sub_height_decimal = ec_details_get_sub_dimension_decimal_17_5195498( sub_height ); height = Number( Number( height ) + sub_height_decimal ) / 12; return width*height; } function ec_details_get_sub_dimension_decimal_17_5195498( sub_dimension ){ if( sub_dimension == "0" ){ return 0; }else if( sub_dimension == "1/16" ){ return .0625; }else if( sub_dimension == "1/8" ){ return .1250; }else if( sub_dimension == "3/16" ){ return .1875; }else if( sub_dimension == "1/4" ){ return .2500; }else if( sub_dimension == "5/16" ){ return .3125; }else if( sub_dimension == "3/8" ){ return .3750; }else if( sub_dimension == "7/16" ){ return .4375; }else if( sub_dimension == "1/2" ){ return .5000; }else if( sub_dimension == "9/16" ){ return .5625; }else if( sub_dimension == "5/8" ){ return .6250; }else if( sub_dimension == "11/16" ){ return .6875; }else if( sub_dimension == "3/4" ){ return .7500; }else if( sub_dimension == "13/16" ){ return .8125; }else if( sub_dimension == "7/8" ){ return .8750; }else if( sub_dimension == "15/16" ){ return .9375; }else{ return 0; } } function ec_details_format_money( price, num_decimals, grouping_symbol, decimal_symbol ){ var currency_symbol = '$'; var num_decimals = 2; var decimal_symbol = '.'; var grouping_symbol = ','; var conversion_rate = '1'; var symbol_location = 1; var currency_code = 'USD'; var show_currency_code = '0'; price = ec_pricing_round( price * Number( conversion_rate ), num_decimals ); var n = price, num_decimals = isNaN(num_decimals = Math.abs(num_decimals)) ? 2 : num_decimals, decimal_symbol = decimal_symbol == undefined ? "." : decimal_symbol, grouping_symbol = grouping_symbol == undefined ? "," : grouping_symbol, i = parseInt(n = price.toFixed( num_decimals ) ) + "", j = (j = i.length) > 3 ? j % 3 : 0; var formatted = (j ? i.substr(0, j) + grouping_symbol : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + grouping_symbol) + (num_decimals ? decimal_symbol + Math.abs(n - i).toFixed(num_decimals).slice(2) : ""); if( symbol_location ){ formatted = currency_symbol + formatted; }else{ formatted = formatted + currency_symbol; } if( show_currency_code == '1' ){ formatted = currency_code + ' ' + formatted; } return formatted; }; function ec_pricing_round(number, places) { var multiplier = Math.pow(10, places+2); // get two extra digits var fixed = Math.floor(number*multiplier); // convert to integer fixed += 50; // round down on anything less than x.xxx50 fixed = Math.floor(fixed/100); // chop off last 2 digits return fixed/Math.pow(10, places); } function ec_details_submit_inquiry_17_5195498( ){ var errors = 0; if( document.getElementById( 'ec_inquiry_name_17_5195498' ) ){ if( jQuery( document.getElementById( 'ec_inquiry_name_17_5195498' ) ).val( ) == "" || jQuery( document.getElementById( 'ec_inquiry_email_17_5195498' ) ).val( ) == "" || jQuery( document.getElementById( 'ec_inquiry_message_17_5195498' ) ).val( ) == "" ){ jQuery( document.getElementById( 'ec_details_inquiry_error_17_5195498' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_inquiry_error_17_5195498' ) ).hide( ); } } if( jQuery( document.getElementById( 'ec_grecaptcha_response_inquiry' ) ).length ){ var recaptcha_response = jQuery( document.getElementById( 'ec_grecaptcha_response_inquiry' ) ).val( ); if( !recaptcha_response.length ){ jQuery( '#ec_product_details_inquiry_recaptcha > div' ).css( 'border', '1px solid red' ); errors++; }else{ jQuery( '#ec_product_details_inquiry_recaptcha > div' ).css( 'border', 'none' ); } } if( !ec_details_add_to_cart_17_5195498( ) ){ errors++; } if( errors > 0 ) return false; else{ jQuery( document.getElementById( 'ec_inquiry_loader_17_5195498' ) ).show( ); jQuery( document.getElementById( 'ec_inquiry_loader_bg_17_5195498' ) ).show( ); return true; } } function ec_details_add_to_cart_17_5195498( ){ var errors = 0; // Basic Option 1 Error Check if( jQuery( '.ec_details_swatch.ec_option1_17_5195498' ).length && !jQuery( '.ec_option1_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option1_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option1_17_5195498' ).length && jQuery( '.ec_details_combo.ec_option1_17_5195498' ).val( ) == '0' ){ jQuery( '.ec_option1_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option1_17_5195498.ec_details_option_row_error' ).hide( ); } // Basic Option 2 Error Check if( jQuery( '.ec_details_swatch.ec_option2_17_5195498' ).length && !jQuery( '.ec_option2_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option2_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option2_17_5195498' ).length && jQuery( '.ec_details_combo.ec_option2.ec_option2_17_5195498' ).val( ) == '0' ){ jQuery( '.ec_option2_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option2_17_5195498.ec_details_option_row_error' ).hide( ); } // Basic Option 3 Error Check if( jQuery( '.ec_details_swatch.ec_option3_17_5195498' ).length && !jQuery( '.ec_option3_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option3_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option3_17_5195498' ).length && jQuery( '.ec_details_combo.ec_option3.ec_option3_17_5195498' ).val( ) == '0' ){ jQuery( '.ec_option3_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option3_17_5195498.ec_details_option_row_error' ).hide( ); } // Basic Option 4 Error Check if( jQuery( '.ec_details_swatch.ec_option4_17_5195498' ).length && !jQuery( '.ec_option4_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option4_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option4_17_5195498' ).length && jQuery( '.ec_details_combo.ec_option4.ec_option4_17_5195498' ).val( ) == '0' ){ jQuery( '.ec_option4_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option4_17_5195498.ec_details_option_row_error' ).hide( ); } // Basic Option 5 Error Check if( jQuery( '.ec_details_swatch.ec_option5_17_5195498' ).length && !jQuery( '.ec_option5_17_5195498.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option5_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option5_17_5195498' ).length && jQuery( '.ec_details_combo.ec_option5.ec_option5_17_5195498' ).val( ) == '0' ){ jQuery( '.ec_option5_17_5195498.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option5_17_5195498.ec_details_option_row_error' ).hide( ); } // --------Advanced Option Checks---------- // // Select Box Check var advanced_select_rows = jQuery( '.ec_details_option_row.ec_option_type_combo.ec_option_type_combo_5195498' ); advanced_select_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).val( ) == '0' ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); } } } ); // Check Box Check var advanced_checkbox_rows = jQuery( '.ec_details_option_row.ec_option_type_checkbox.ec_option_type_checkbox_5195498' ); advanced_checkbox_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var selected_checkboxes = jQuery( "input.ec_option_" + jQuery( this ).attr( 'data-option-id' ) + ":checked" ); if( selected_checkboxes.length ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Date Box Check var advanced_date_rows = jQuery( '.ec_details_option_row.ec_option_type_date.ec_option_type_date_5195498' ); advanced_date_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).val( ) == "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); } } } ); // File Upload Check var advanced_file_rows = jQuery( '.ec_details_option_row.ec_option_type_file.ec_option_type_file_5195498' ); advanced_file_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).val( ) ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Swatch Check var advanced_swatch_rows = jQuery( '.ec_details_option_row.ec_option_type_swatch.ec_option_type_swatch_5195498' ); advanced_swatch_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var advanced_selected_swatches = jQuery( ".ec_details_swatch.ec_option_" + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' + ".ec_selected" ); if( advanced_selected_swatches.length ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Radio Button Check var advanced_radio_rows = jQuery( '.ec_details_option_row.ec_option_type_radio.ec_option_type_radio_5195498' ); advanced_radio_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var selected_radios = jQuery( "input[name='ec_option_" + jQuery( this ).attr( 'data-option-id' ) + "']:checked" ); if( selected_radios.length ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Text Box Check var advanced_text_rows = jQuery( '.ec_details_option_row.ec_option_type_text.ec_option_type_text_5195498' ); advanced_text_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Text Area Check var advanced_textarea_rows = jQuery( '.ec_details_option_row.ec_option_type_textarea.ec_option_type_textarea_5195498' ); advanced_textarea_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Quantity Grid Check var advanced_grid_rows = jQuery( '.ec_details_option_row.ec_option_type_grid.ec_option_type_grid_5195498' ); advanced_grid_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var grid_items = jQuery( ".ec_details_grid_row > input" ); var total_grid_quantity = 0; grid_items.each( function( ){ total_grid_quantity += jQuery( this ).val( ); } ); if( total_grid_quantity > 0 ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Dimensions Type 1 Check var advanced_dimensions_rows = jQuery( '.ec_details_option_row.ec_option_type_dimensions1.ec_option_type_dimensions1_5195498' ); advanced_dimensions_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required // Test Width + Height if( jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' + '_width' ) ).val( ) != "" && jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' + '_height' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // Dimensions Type 2 Check var advanced_dimensions_rows = jQuery( '.ec_details_option_row.ec_option_type_dimensions2.ec_option_type_dimensions2_5195498' ); advanced_dimensions_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '17' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required // Test Width + Height if( jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' + '_width' ) ).val( ) != "" && jQuery( document.getElementById( 'ec_option_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' + '_height' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_17_5195498' ) ).show( ); errors++; } } } ); // -------END Advanced Option Checks------- // // -------START GIFT CARD CHECK ----------- // var gift_card_errors = 0; if( document.getElementById( 'ec_giftcard_to_name_17_5195498' ) && jQuery( document.getElementById( 'ec_giftcard_to_name_17_5195498' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( document.getElementById( 'ec_giftcard_to_email_17_5195498' ) && jQuery( document.getElementById( 'ec_giftcard_to_email_17_5195498' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( document.getElementById( 'ec_giftcard_from_name_17_5195498' ) && jQuery( document.getElementById( 'ec_giftcard_from_name_17_5195498' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( document.getElementById( 'ec_giftcard_message_17_5195498' ) && jQuery( document.getElementById( 'ec_giftcard_message_17_5195498' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( gift_card_errors ){ jQuery( document.getElementById( 'ec_details_giftcard_error_17_5195498' ) ).show( ); }else{ jQuery( document.getElementById( 'ec_details_giftcard_error_17_5195498' ) ).hide( ); } // -------END GIFT CARD CHECK ----------- // // -------START DONATION CHECK ----------- // if( document.getElementById( 'ec_donation_amount_17_5195498' ) ){ if( isNaN( jQuery( document.getElementById( 'ec_donation_amount_17_5195498' ) ).val( ) ) || Number( jQuery( document.getElementById( 'ec_donation_amount_17_5195498' ) ).val( ) ) < 0.01 ){ jQuery( document.getElementById( 'ec_details_donation_error_17_5195498' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_donation_error_17_5195498' ) ).hide( ); } } // -------END DONATION CHECK ----------- // // -------START INQUIRY CHECK ----------- // if( document.getElementById( 'ec_inquiry_name' ) ){ if( jQuery( document.getElementById( 'ec_inquiry_name' ) ).val( ) == "" || jQuery( document.getElementById( 'ec_inquiry_email' ) ).val( ) == "" || jQuery( document.getElementById( 'ec_inquiry_message' ) ).val( ) == "" ){ jQuery( document.getElementById( 'ec_details_inquiry_error' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_inquiry_error' ) ).hide( ); } } // -------END INQUIRY CHECK ----------- // // Stock Quantity Check var entered_quantity = Number( jQuery( document.getElementById( 'ec_quantity_17_5195498' ) ).val( ) ); var allowed_quantity = 9999999999999; if( jQuery( document.getElementById( 'ec_details_stock_quantity' ) ).length ){ allowed_quantity = Number( jQuery( document.getElementById( 'ec_details_stock_quantity' ) ).html( ) ); } // Backorder Check if( allowed_quantity allowed_quantity ){ jQuery( document.getElementById( 'ec_addtocart_quantity_exceeded_error_17_5195498' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_addtocart_quantity_exceeded_error_17_5195498' ) ).hide( ); } // Minimum Quantity Check var min_quantity = 1; if( entered_quantity 0 && entered_quantity > max_quantity ){ jQuery( document.getElementById( 'ec_addtocart_quantity_maximum_error_17_5195498' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_addtocart_quantity_maximum_error_17_5195498' ) ).hide( ); } if( errors > 0 ) return false; else return true; } jQuery( '.ec_details_review_input_17_5195498' ).hover( function( ){ var score = jQuery( this ).attr( 'data-review-score' ); jQuery( '.ec_details_review_input_17_5195498' ).removeClass( 'ec_product_details_star_on' ).addClass( 'ec_product_details_star_off' ); for( var i=0; i li.ec_option2_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option3_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option4_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option5_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option2_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option3_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option4_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option5_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( document.getElementById( 'ec_details_stock_quantity_17_5195498' ) ).html( quantity ); jQuery( document.getElementById( 'ec_option_loading_2_17_5195498' ) ).show( ); var next_options = jQuery( '.ec_details_swatches > li.ec_option2_17_5195498' ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_2_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option2_17_5195498 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option2_17_5195498' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_2_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ if( i > 0 ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i-1].quantity ) if( json_data[i-1].quantity > 0 ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); }else{ jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } }else{ jQuery( this ).attr( 'data-optionitem-quantity', quantity ); } i++; } ); } } ); } } function option2_selected_17_5195498( optionitem_id_1, optionitem_id_2, quantity ){ jQuery( '.ec_details_swatches > li.ec_option3_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option4_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option5_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option3_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option4_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option5_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_option2_17_5195498.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_details_stock_quantity_17_5195498' ) ).html( quantity ); var next_options = jQuery( '.ec_details_swatches > li.ec_option3_17_5195498' ); jQuery( document.getElementById( 'ec_option_loading_3_17_5195498' ) ).show( ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_3_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option3_17_5195498 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option3_17_5195498' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_3_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ if( i > 0 ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i-1].quantity ); if( json_data[i-1].quantity > 0 ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); }else{ jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } }else{ jQuery( this ).attr( 'data-optionitem-quantity', quantity ); } i++; } ); } } ); } } function option3_selected_17_5195498( optionitem_id_1, optionitem_id_2, optionitem_id_3, quantity ){ jQuery( '.ec_details_swatches > li.ec_option4_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option5_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option4_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option5_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_option3_17_5195498.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_details_stock_quantity_17_5195498' ) ).html( quantity ); var next_options = jQuery( '.ec_details_swatches > li.ec_option4_17_5195498' ); jQuery( document.getElementById( 'ec_option_loading_4_17_5195498' ) ).show( ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_4_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option4_17_5195498 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option4_17_5195498' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_4_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ if( i > 0 ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i-1].quantity ); if( json_data[i-1].quantity > 0 ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); }else{ jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } }else{ jQuery( this ).attr( 'data-optionitem-quantity', quantity ); } i++; } ); } } ); } } function option4_selected_17_5195498( optionitem_id_1, optionitem_id_2, optionitem_id_3, optionitem_id_4, quantity ){ jQuery( '.ec_details_swatches > li.ec_option5_17_5195498' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option5_17_5195498' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_option4.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_details_stock_quantity_17_5195498' ) ).html( quantity ); var next_options = jQuery( '.ec_details_swatches > li.ec_option5_17_5195498' ); jQuery( document.getElementById( 'ec_option_loading_5_17_5195498' ) ).show( ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, optionitem_id_4: optionitem_id_4, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_5_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option5_17_5195498 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, optionitem_id_4: optionitem_id_4, product_id: '17', nonce: '4f68ea25a3' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option5_17_5195498' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_5_17_5195498' ) ).hide( ); var i=0; next_options.each( function( ){ if( i > 0 ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i-1].quantity ); if( json_data[i-1].quantity > 0 ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); }else{ jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } }else{ jQuery( this ).attr( 'data-optionitem-quantity', quantity ); } i++; } ); } } ); } } function ec_submit_product_review_17_5195498( ){ var review_title = jQuery( document.getElementById( 'ec_review_title_17_5195498' ) ).val( ); var review_score = 0; for( var i=1; i<=5; i++ ){ if( jQuery( document.getElementById( 'ec_details_review_star' + i + '_17_5195498' ) ).hasClass( 'ec_product_details_star_on' ) ){ review_score++; } } var review_message = jQuery( document.getElementById( 'ec_review_message_17_5195498' ) ).val( ); if( review_title != "" && review_score != 0 && review_message != "" ){ // Submit a filled out review jQuery( document.getElementById( 'ec_details_customer_review_loader_17_5195498' ) ).show( ); jQuery( document.getElementById( 'ec_details_review_error_17_5195498' ) ).hide( ); var data = { action: 'ec_ajax_insert_customer_review', review_title: review_title, review_score: review_score, review_message: review_message, product_id: '17', nonce: 'ef0e38a659' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( document.getElementById( 'ec_details_customer_review_loader_17_5195498' ) ).hide( ); jQuery( document.getElementById( 'ec_review_title_17_5195498' ) ).val( "" ); jQuery( document.getElementById( 'ec_review_message_17_5195498' ) ).val( "" ); jQuery( document.getElementById( 'ec_details_review_star1_17_5195498' ) ).removeClass( 'ec_product_details_star_on' ).addClass( 'ec_product_details_star_off' ); jQuery( document.getElementById( 'ec_details_review_star2_17_5195498' ) ).removeClass( 'ec_product_details_star_on' ).addClass( 'ec_product_details_star_off' ); jQuery( document.getElementById( 'ec_details_review_star3_17_5195498' ) ).removeClass( 'ec_product_details_star_on' ).addClass( 'ec_product_details_star_off' ); jQuery( document.getElementById( 'ec_details_review_star4_17_5195498' ) ).removeClass( 'ec_product_details_star_on' ).addClass( 'ec_product_details_star_off' ); jQuery( document.getElementById( 'ec_details_review_star5_17_5195498' ) ).removeClass( 'ec_product_details_star_on' ).addClass( 'ec_product_details_star_off' ); jQuery( document.getElementById( 'ec_details_submit_review_button_row_17_5195498' ) ).hide( ); jQuery( document.getElementById( 'ec_details_review_submitted_button_row_17_5195498' ) ).show( ); jQuery( document.getElementById( 'ec_details_customer_review_success_17_5195498' ) ).show( ).delay( 1500 ).fadeOut( 'slow' ); } } ); }else{ // Something is missing, display error. jQuery( document.getElementById( 'ec_details_review_error_17_5195498' ) ).show( ); } }
Product successfully added to your cart.View Cart
-
Expert Witness Services
$1.00 - $1,000,000.00Successfully Added to your Shopping CartAdding to Cart...