jQuery(document).ready(function(e){var d=e('<span style="">Tax in %<abbr title="Use this to insert gross prices for the products. Bear in mind that this is only javascript calculation and you need to set proper tax rules in your opencart in order to have effect on the front end. The prices are stored in the database as net amount. This also apply on special and discount price fields"><i class="fa fa-question-circle-o"></i></abbr>: </span><input type="text" name="tax_rate" id="tax-rate" value="" style="margin-right: 15px;" size="5" class="form-control text-right"/>');d.on("keyup",function(){setCookie("pe-tax",e(this).val(),365);e("input.gross-price-field").each(b)});e(".language-selector").before(d).parent().addClass("form-inline");var c=getCookie("pe-tax");if(c!==null){e("#tax-rate").val(c)}var b=function(){if(e(this).val().length>0){e(this).next().val(Number(Number(e(this).val())*(1+(Number(e("#tax-rate").val()/100)))).toFixed(4))}};var a=function(){e(this).hide();var f=e('<input type="text" value="" style="text-align: right;">');if(e(this).val().length>0){f.val(Number(Number(e(this).val())*(1+(Number(e("#tax-rate").val()/100)))).toFixed(4))}e(f).focusout(function(){e(this).prev().val(Number(Number(e(this).val())/(1+(Number(e("#tax-rate").val()/100)))).toFixed(4));e(this).val(Number(e(this).val()).toFixed(4));e(this).prev().trigger("change");e(this).prev().trigger("focusout")});e(this).after(f)};e("input.gross-price-field").each(a);e("#form-product-extra").on("product-extra-reload",function(){e(this).find("input.gross-price-field").each(a)});setInterval(function(){e(".product-extra-table").each(function(){if(typeof(e(this).attr("changed"))=="undefined"){e(this).find("input.gross-price-field").each(a);e(this).attr("changed",0)}})},1000)});