'); $('.prcccst').addClass('prccst1'); $('.prccst1').removeClass('prccst'); $("#helptext_red_prod").hide(); $('#zipcodeapply').val(0); return false; } } function formatNumber (num) { num=parseFloat(num).toFixed(2); return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");}function addvalue(id,val,tot,quote,dd,shipname,days,taxes){var tax="";if(document.getElementById('tax')){	tax=document.getElementById('tax').innerHTML;} if(taxes!=parseFloat(tax.replace("$","")) && taxes!=0){ if(document.getElementById('tax')){ document.getElementById('tax').innerHTML="$"+taxes.toFixed(2); tax=document.getElementById('tax').innerHTML; } } var pid=document.getElementById('product_id').value;if(val=='0.00'){ var freeshiptext=getshippingtext(val); document.getElementById('ship_val').innerHTML=freeshiptext; $('#ship_val').addClass('prccst1');$('#ship_val').removeClass('prccst'); }else{ document.getElementById('ship_val').innerHTML="$"+val; $('#ship_val').addClass('prccst'); $('#ship_val').removeClass('prccst1');}document.getElementById('delvry_date').innerHTML=dd;$('.del_date').html(dd);$('div[class*="block"]').removeClass('faster_active');$('div[class="block'+id+'"]').addClass('faster_active');$('div[id*="update_text"]').html('Choose');$('div[id="update_text'+id+'"]').html('Selected');$("#fbContent #update_text"+id).html('Selected');$('div[id*="textmonth"]').html('GET IT BY');$('div[id="textmonth'+id+'"]').html('GET IT');$("#fbContent #textmonth"+id).html('GET IT');var step;for (step = 1; step < 4; step++) {if(step!=id){$("#fbContent #update_text"+step).html('Choose');$("#fbContent #textmonth"+step).html('GET IT BY');} if(step!=id && step ');	changeassortqty(qtyvalue,"qty"+ theID);	} if(char_end == '+'){ document.getElementById("quantity").disabled=false; $('#quantity').change(); if(qtyvalue>qty_get){ document.getElementById("quantity").disabled=true; } }else{ $('#quantity').change(); }	productchangeimage(theID,1);	quantityboxselect();	if($('#selected_product_image').length !=0 ) {	$("#selected_product_image").html('');	} document.getElementById('product_color' ).value='61609'; });function automaticfix(){ $('.clsrsml').removeClass('edited'); $('#quantity').change();}$(document).on('blur','.clsrsml input[type=text]',function(event){ if($(this).attr('data-value')!=$(this).val()){$(this).parents(".clsrsml").addClass('edited'); $(this).attr('data-value',$(this).val()); }});$(document).on('change','#quantity',function(event){selectpmsoption(3);});$(document).on('blur change','#quantity',function(event){disableassort();var theID = $("input:radio:checked[name='productcolor_rr']").attr("id");if(window.lastElementClicked=="INPUT" && window.lastElementClickedId=="quantity"){	if(event.type=="focusout"){$("#blank_default").val(1);	}}if(theID=='r2'){$(document).click(function(event) { window.lastElementClicked = event.target.nodeName; window.lastElementClickedId = event.target.id;});var qty_get = $('#quantity').val();var qtyvalue=qty_get;var c=qty_get.length;var char_end=qtyvalue.charAt(c-1);if(char_end == '+'){ if(document.getElementById("quantitytxt").value!=''){ qtyvalue = document.getElementById("quantitytxt").value; }else{ qtyvalue = qtyvalue.replace('+',''); }}var totalPrice=0;var totaltext="";$('.colorlargegroup .clsrsml.active').each(function(i) { var theID = $(this).attr("data-id"); totalPrice+=parseInt($(this).children("input[id='qty" + theID + "']").val()); totaltext+=parseInt($(this).children("input[id='qty" + theID + "']").val())+'+';});if(totaltext!=''){totaltext = totaltext.slice(0, -1);}var editedtotalPrice=0;$('.colorlargegroup .clsrsml.edited').each(function(i) { var theID = $(this).attr("data-id"); editedtotalPrice+=parseInt($(this).children("input[id='qty" + theID + "']").val());});if($('#blankchecked').val()==2){ var assortminqty=24; var assortincrument=12;}else{var assortminqty=24; var assortincrument=12;}$('.assotedqtynote').remove();$('.colorlargegroup').prepend('