function update_price(){$.ajax({url:$("form[name='MainForm']").attr('action'),data:$("form[name='MainForm']").serialize()+'&btnupdateprice.x=0&btnupdateprice.y=0',type:'POST',cache:false,success:function(response){var errors=$(response).find("#listOfErrorsSpan");var result=$(response).find(".colors_pricebox:eq(0)");$(".colors_pricebox:eq(0)").replaceWith('<table width="100%" cellspacing="0" cellpadding="0" border="0" class="colors_pricebox">'+result.html()+'</table>');$('#listOfErrorsSpan').replaceWith('<span id="listOfErrorsSpan">'+errors.html()+'</span>');}});}
$(function(){$("select[name^='SELECT___'],input[name^='SELECT___'][type='radio']").each(function(){$(this).change(function(){update_price();});});$("a[href^='javascript:change_option']").each(function(){$(this).click(function(){var result_href=$(this).attr('href').match(/\'(.*?)\'/)[1];var result_val=$(this).attr('href').match(/\,(.*?)\)/)[1];change_option(result_href,result_val);update_price();return false;});});});
