$(function() {

     if($('.AJAX_attr').length > 0)
     {
              var orig_price = parseFloat($('.price').html().substring(1,100).replace(",",""));
              var vat = parseFloat($('.AJAX_vat').val());

              $('.AJAX_attr').each(function() {

               this.addonPrice = 0;

              });

              $('.AJAX_attr').change(function() {

               var newprice = orig_price;
               $('.AJAX_attr').each(function() {

                var tmp2 = $('option:selected',this).html().replace(",","").split("-");

				var tmpprice = parseFloat(tmp2[1].trim().substring(1,100));
				
                if(tmpprice > -1)
                {

                     newprice = (newprice + tmpprice); 

                }

               });
               $('.price').html('&pound;' + newprice.toFixed(2));
               var vatPrice = newprice + ( newprice * (vat / 100 ));
               $('.vatPrice').html('&pound;' + vatPrice.toFixed(2) + '');

          });
     }
	 
	

});
