'+result.snippet+'
'+'VIEW'+'"+messages+"
"} $('.alertWrapper').hide().removeClass('hide').slideDown("fast");$('.message_holder').html(output);scroll_to('.mainContentWrapper');} function scroll_to(location){$('html,body').animate({scrollTop:$(location).offset().top});} function recalculate_total(){var total=0;$('.product_search_categories').each(function(){if(this.offsetParent===null){} else{$(this).find('.product_search_subcategories').each(function(){if(this.offsetParent===null){} else{$(this).find('.product_search_subcategories_in').each(function(){if(this.offsetParent===null){} else{$(this).find('.product_search_voltage').each(function(){if(this.offsetParent===null){} else{total=total+1;}});}});}});}});var text='(0 Results)';if(total==1){text='(1 Result)';} else if(total>1){text='('+total+' Results)';} $("#number_of_results").html(text);} $(function(){var existing_card=$('.existing_card');var new_card=$('.new_card');if($('.with_arrow').length>0){$('.with_arrow').click(function(e){if($(this).hasClass("arrow_up")){$(this).removeClass("arrow_up");$(this).addClass("arrow_down");} else{$(this).removeClass("arrow_down");$(this).addClass("arrow_up");} $('.top_content').slideToggle();e.preventDefault();});} $('.delete_cart_item').click(function(e){e.preventDefault();var item=$(this).data('item');var sku=$(this).data('sku');var name=$(this).data('name');var price=$(this).data('price');var quantity=$(this).data('quantity');var total=$(this).data('total');$(this).parents('.cartItemWrapper').fadeOut("normal");dataLayer.push({ecommerce:null});dataLayer.push({event:"remove_from_cart",ecommerce:{currency:"USD",value:total,items:[{item_id:sku,item_name:name,item_brand:"Bodine Electric Company",price:price,quantity:quantity}]}});$.post("/index.php",{action:"cart_delete_cart_item",item:item},function(data){if(data.quantity>=1){$('.cartItems').html(data.quantity);$('#subtotal_holder').html("$"+data.subtotal.toFixed(2));$('.item_row_'+item).remove();}else{window.location="/cart/";}});});$('.cart_update_quantity').change(function(){var item=$(this).data('item');var quantity=$(this).val();$.post("/index.php",{action:"cart_update_cart_item_quantity",item:item,quantity:quantity},function(data){$('.cart_item_total_'+item).html("$"+data.price.toFixed(2));$('#subtotal_holder').html("$"+data.subtotal.toFixed(2));});});$('select[name=comp]').change(function(){console.log('temp ');var value=$('select[name=comp]').val();if(value!=="true"){existing_card.removeClass("hide");new_card.removeClass("hide");}else{existing_card.addClass("hide");new_card.addClass("hide");}});$('select[name=billing_country]').change(function(){if($('#checkout').length>0){$("select[name='billing_state']").val('');if($('#account_details')){set_address_optgroups_details();}else{set_address_optgroups();}}});$('select[name=shipping_country]').change(function(){$("select[name='shipping_state']").val('');if($('#account_details')){set_address_optgroups_details();}else{set_address_optgroups();}});function set_address_optgroups(){console.log('set_address_optgroups ');var billing='#cart_checkout_billing_details';var shipping='#cart_checkout_shipping_details';var billing_country=$(billing+" select[name='billing_country']").val();$(billing+" select[name='billing_state'] optgroup").hide();$('#states_billing_'+billing_country).show();var shipping_country=$(shipping+" select[name='shipping_country']").val();$(shipping+" select[name='shipping_state'] optgroup").hide();$('#states_shipping_'+shipping_country).show();} function set_address_optgroups_details(){console.log('set_address_optgroups_details ');var billing_country=$("select[name='billing_country']").val();$("select[name='billing_state'] optgroup").hide();$('#states_billing_'+billing_country).show();var shipping_country=$("select[name='shipping_country']").val();$("select[name='shipping_state'] optgroup").hide();$('#states_shipping_'+shipping_country).show();} function set_payment(){console.log('set_payment ');if($("#step6").find("select[name='payment_id']").val()>0){new_card.addClass("hide");existing_card.removeClass("hide");}} $('#promo_submit').click(function(e){console.log('promo_submit ');e.preventDefault();clear_messages();var action='cart_checkout_promo';var promo_code=$("input[name='promo_code']").val();var comment=$("textarea[name='comments']").val();$.post("/index.php",{ajax:true,action:action,promo_code:promo_code,comment:comment},function(data){if(data.error===false){location.reload();}else{show_messages(data.error_messages);}});});if($('#account_details')){console.log('account_details ');set_address_optgroups_details();} $('#create_account').click(function(){console.log('create_account ');$('#returning_customer').hide();$('#new_customer').show();});var sliders=[];$('.lightSlider').each(function(){sliders.push($(this).lightSlider({item:4,autoWidth:false,slideMove:1,slideMargin:25,addClass:'',mode:"slide",useCSS:true,cssEasing:'ease',easing:'linear',speed:400,auto:false,loop:false,slideEndAnimation:true,pause:2000,keyPress:false,controls:true,prevHtml:'',nextHtml:'',rtl:false,adaptiveHeight:false,vertical:false,verticalHeight:500,vThumbWidth:100,thumbItem:10,pager:false,gallery:false,galleryMargin:5,thumbMargin:5,currentPagerPosition:'middle',enableTouch:true,enableDrag:true,freeMove:true,swipeThreshold:40,responsive:[{breakpoint:968,settings:{item:3,slideMove:1,slideMargin:10}},{breakpoint:580,settings:{item:2,slideMove:1}}],onBeforeStart:function(el){},onSliderLoad:function(el){},onBeforeSlide:function(el){},onAfterSlide:function(el){},onBeforeNextSlide:function(el){},onBeforePrevSlide:function(el){}}));$(this).removeClass('loading');});$('.psc--prev').click(function(){var num=$(this).parent('.productSlider__controls').data('num');var slider=sliders[num];slider.goToPrevSlide();});$('.psc--next').click(function(){var num=$(this).parent('.productSlider__controls').data('num');var slider=sliders[num];slider.goToNextSlide();});$('.pscp--prev').click(function(){var num=$(this).parent('.productSlider__controls').data('num');var slider=sliders[num];slider.goToPrevSlide();});$('.pscp--next').click(function(){var num=$(this).parent('.productSlider__controls').data('num');var slider=sliders[num];slider.goToNextSlide();});$('#product_search').click(function(){var search_options=$('#search_options');search_options.slideToggle();});var torque_select=$('#torque');var power_select=$('#power');$('input[name="torque-units"]').change(function(){torque_units=$('input[name="torque-units"]:checked').val();$.post('/',{action:'get_torque_options',torque_units:torque_units},function(data){torque_select.empty().append(data);});});$('input[name="power-units"]').change(function(){power_units=$('input[name="power-units"]:checked').val();$.post('/',{action:'get_power_options',power_units:power_units},function(data){power_select.empty().append(data);});});var filter_inputs=$('.product_search_filter');var categories=$('.product_search_categories');var sub_categories_pr=$('.product_search_subcategories');var sub_categories_pr_in=$('.product_search_subcategories_in');var product_voltage=$('.product_search_voltage');var default_value="default";filter_inputs.click(function(){document.getElementById("sub_menu_title").innerHTML=$(this).val()+' Sub-Category:';var search_subcategory_filter_select_1=document.getElementById("sub_menu_list_1");search_subcategory_filter_select_1.classList.remove("active_productSearch");var search_subcategory_filter_select_2=document.getElementById("sub_menu_list_2");search_subcategory_filter_select_2.classList.remove("active_productSearch");var search_subcategory_filter_select_3=document.getElementById("sub_menu_list_3");search_subcategory_filter_select_3.classList.remove("active_productSearch");var search_subcategory_filter_select_4=document.getElementById("sub_menu_list_4");search_subcategory_filter_select_4.classList.remove("active_productSearch");if($(this).val()=='AC Products'){$("#sub_menu_list_1").val(default_value);search_subcategory_filter_select_1.classList.add("active_productSearch");} else if($(this).val()=='DC Products'){$("#sub_menu_list_2").val(default_value);search_subcategory_filter_select_2.classList.add("active_productSearch");} else if($(this).val()=='Brushless DC Products'){$("#sub_menu_list_3").val(default_value);search_subcategory_filter_select_3.classList.add("active_productSearch");} else if($(this).val()=='Motion Controls'){$("#sub_menu_list_4").val(default_value);search_subcategory_filter_select_4.classList.add("active_productSearch");} var search_subcategory_voltage_select_1=document.getElementById("sub_menu_voltage_1");search_subcategory_voltage_select_1.classList.remove("active_productSearch");var search_subcategory_voltage_select_2=document.getElementById("sub_menu_voltage_2");search_subcategory_voltage_select_2.classList.remove("active_productSearch");var search_subcategory_voltage_select_3=document.getElementById("sub_menu_voltage_3");search_subcategory_voltage_select_3.classList.remove("active_productSearch");var search_subcategory_voltage_title=document.getElementById("sub_cat_voltage");search_subcategory_voltage_title.classList.remove("active_productSearch_voltage_title");if($(this).val()=='AC Products'){$("#sub_menu_voltage_1").val(default_value);search_subcategory_voltage_select_1.classList.add("active_productSearch");search_subcategory_voltage_title.classList.add("active_productSearch_voltage_title");} else if($(this).val()=='DC Products'){$("#sub_menu_voltage_2").val(default_value);search_subcategory_voltage_select_2.classList.add("active_productSearch");search_subcategory_voltage_title.classList.add("active_productSearch_voltage_title");} else if($(this).val()=='Brushless DC Products'){$("#sub_menu_voltage_3").val(default_value);search_subcategory_voltage_select_3.classList.add("active_productSearch");search_subcategory_voltage_title.classList.add("active_productSearch_voltage_title");} var search_subcategory_filter=document.getElementById("search_subcategory_filter");search_subcategory_filter.classList.add("active_productSearch");var visible_categories=[];filter_inputs.each(function(){if($(this).is(':checked')){console.log($(this).val());visible_categories.push($(this).val());}});sub_categories_pr.each(function(){$(this).show();});sub_categories_pr_in.each(function(){$(this).show();});product_voltage.each(function(){$(this).show();});categories.each(function(){if(visible_categories.length===0||$.inArray($(this).data('category'),visible_categories)!==-1){$(this).show();}else{$(this).hide();}});recalculate_total();});var sub_categories=$('.productSearch__subcatselect');sub_categories.change(function(){var temp_subcat_value=$(this).val();console.log($(this).val());sub_categories_pr.each(function(){if(temp_subcat_value=='default'){$(this).show();} else{if($(this).data('subcategory')==temp_subcat_value){$(this).show();}else{$(this).hide();}}});recalculate_total();});var sub_categories_voltage=$('.productSearch__subcatselect_voltage');sub_categories_voltage.change(function(){var temp_voltage_value=$(this).val();sub_categories_pr_in.each(function(){if(temp_voltage_value=='default'){$(this).show();} else{var temp_voltage_for_group=$(this).data('voltage').split('/');if(temp_voltage_for_group.indexOf(temp_voltage_value)!=-1){$(this).show();}else{$(this).hide();}}});product_voltage.each(function(){if(temp_voltage_value=='default'){$(this).show();} else{if($(this).data('voltage')==temp_voltage_value){$(this).show();}else{$(this).hide();}}});recalculate_total();});});$('input[name="card_number"]').keyup(function(){if($('input[name="card_number"]').val().charAt(0)==5){$('#card_type').val('mc');} else if($('input[name="card_number"]').val().charAt(0)==6){$('#card_type').val('dis');} else if($('input[name="card_number"]').val().charAt(0)==3){$('#card_type').val('ae');} else{$('#card_type').val('visa');}});$('#checkout_as_guest').click(function(){console.log('checkout_as_guest ');$.post('/checkout/',{action:'login_as_guest'},function(){});});$('#submit_js_accessories').click(function(){console.log(document.getElementById("quantity").value);var max_num=Number(document.getElementById("quantity").value)+1;var original_max_num=Number(document.getElementById("quantity").value);var selects=document.getElementsByClassName('quantity_accessory');var temp_html='';for(var temp_i=0;temp_i<11;temp_i++){if(temp_i==original_max_num){temp_html=temp_html+'';} else{temp_html=temp_html+'';}} var i;for(i=0;i'+' Billing Information'+document.getElementById("print_billing_row_1").innerHTML+''+document.getElementById("print_billing_row_2").innerHTML+' '+document.getElementById("print_billing_row_3").innerHTML+' '+document.getElementById("print_billing_row_4").innerHTML+' | '+' Shipping Information'+document.getElementById("print_shipping_row_1").innerHTML+''+document.getElementById("print_shipping_row_2").innerHTML+' '+document.getElementById("print_shipping_row_3").innerHTML+' '+document.getElementById("print_shipping_row_4").innerHTML+' | '+' Payment Method'+document.getElementById("print_payment_row_1").innerHTML+''+document.getElementById("print_payment_row_2").innerHTML+' '+document.getElementById("print_payment_row_3").innerHTML+' |
Cart Items | Qty | Item Price | Item Total | |
---|---|---|---|---|
'+' | '+document.getElementById("receipt_title_print_"+i).innerHTML+' | '+document.getElementById("receipt_qty_print_"+i).innerHTML+' | '+document.getElementById("receipt_price_print_"+i).innerHTML+' | '+document.getElementById("receipt_total_print_"+i).innerHTML+' |
Headquarters: 201 Northfield Road | Northfield, Illinois 60093 U.S.A. | Tel 773.478.3515 | Fax 773.478.3232\n'+'Manufacturing: 19225 Kapp Drive | Peosta, IA 52068 U.S.A. | Tel 563.583.8326 | Fax 563.583.3319\n'+'www.bodine-electric.com | info@bodine-electric.com
'+' Billing Information'+document.getElementById("print_billing_row_1").innerHTML+''+document.getElementById("print_billing_row_2").innerHTML+' '+document.getElementById("print_billing_row_3").innerHTML+' '+document.getElementById("print_billing_row_4").innerHTML+' | '+' Shipping Information'+document.getElementById("print_shipping_row_1").innerHTML+''+document.getElementById("print_shipping_row_2").innerHTML+' '+document.getElementById("print_shipping_row_3").innerHTML+' '+document.getElementById("print_shipping_row_4").innerHTML+' | '+' Payment Method'+document.getElementById("print_payment_row_1").innerHTML+''+document.getElementById("print_payment_row_2").innerHTML+' '+document.getElementById("print_payment_row_3").innerHTML+' |
Cart Items | Qty | Item Price | Item Total | |
---|---|---|---|---|
'+' | '+document.getElementById("receipt_title_print_"+i).innerText+' | '+document.getElementById("receipt_qty_print_"+i).innerText+' | '+document.getElementById("receipt_price_print_"+i).innerText+' | '+document.getElementById("receipt_total_print_"+i).innerText+' |
HEADQUARTERS: 201 NORTHFIELD ROAD | NORTHFIELD, ILLINOIS 60093 U.S.A. | TEL 773.478.3515 | FAX 773.478.3232\n'+'MANUFACTURING: 19225 KAPP DRIVE | PEOSTA, IA 52068 U.S.A. | TEL 563.583.8326 | FAX 563.583.3319\n'+'www.bodine-electric.com | info@bodine-electric.com