diff --git a/bower.json b/bower.json index ccea751..273240f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "nutrition-label-jquery-plugin", - "version": "7.0.9", + "version": "7.0.10", "homepage": "https://github.com/nutritionix/nutrition-label", "authors": [ "Leo Joseph Gajitos ", diff --git a/changelog.txt b/changelog.txt index a49542b..337c3db 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,11 @@ +version 7.0.10 - August 1, 2017 + + - fixed a minor oversight where the default vitamin d unit was coded mg when it should have been mcg https://github.com/nutritionix/nutrition-label/issues/75#issuecomment-319099495 + +------------------------------------------------------------------------------------------------------ +------------------------------------------------------------------------------------------------------ + version 7.0.9 - July 30, 2017 - made some changes on the 2018 version based on the discussion here diff --git a/dist/css/nutritionLabel-min.css b/dist/css/nutritionLabel-min.css index cebc381..8511bca 100644 --- a/dist/css/nutritionLabel-min.css +++ b/dist/css/nutritionLabel-min.css @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | diff --git a/dist/css/nutritionLabel.css b/dist/css/nutritionLabel.css index 696be54..991b711 100644 --- a/dist/css/nutritionLabel.css +++ b/dist/css/nutritionLabel.css @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | diff --git a/dist/js/nutritionLabel-min.js b/dist/js/nutritionLabel-min.js index 94e49dc..4f0703c 100644 --- a/dist/js/nutritionLabel-min.js +++ b/dist/js/nutritionLabel-min.js @@ -9,11 +9,11 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | * | ***************************************************************************************************************************************************+ */ -;(function($){$.fn.nutritionLabel=function(option,settings){if(typeof option==="object"){settings=option;init(settings,$(this))}else{if(typeof option==="string"&&option!==""){if(option==="destroy"){new NutritionLabel().destroy($(this))}else{if(option==="hide"){new NutritionLabel().hide($(this))}else{if(option==="show"){new NutritionLabel().show($(this))}else{var values=[];var elements=this.each(function(){var data=$(this).data("_nutritionLabel");if(data){if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){data.settings[option]=settings;init(data.settings,$(this))}else{values.push(data.settings[option])}}}else{if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){$.fn.nutritionLabel.defaultSettings[option]=settings;init(null,$(this))}}}});if(values.length===1){return values[0]}return values.length>0?values:elements}}}}else{if(typeof option==="undefined"||option===""){init(settings,$(this))}}}};$.fn.nutritionLabel.defaultSettings={width:280,allowCustomWidth:false,widthCustom:"auto",allowNoBorder:false,allowFDARounding:false,allowGoogleAnalyticsEventLog:false,gooleAnalyticsFunctionName:"ga",userFunctionNameOnQuantityChange:null,userFunctionOnQuantityChange:null,hideNotApplicableValues:false,brandName:"Brand where this item belongs to",scrollLongIngredients:false,scrollHeightComparison:100,scrollHeightPixel:95,decimalPlacesForNutrition:1,decimalPlacesForDailyValues:0,decimalPlacesForQuantityTextbox:1,scrollLongItemName:true,scrollLongItemNamePixel:36,scrollLongItemNamePixel2018Override:32,showBottomLink:false,urlBottomLink:"http://www.nutritionix.com",nameBottomLink:"Nutritionix",valueServingUnitQuantity:1,valueServingSizeUnit:"",showServingUnitQuantityTextbox:true,itemName:"Item / Ingredient Name",showServingUnitQuantity:true,hideTextboxArrows:false,originalServingUnitQuantity:0,nutritionValueMultiplier:1,totalContainerQuantity:1,calorieIntake:2000,dailyValueTotalFat:65,dailyValueSatFat:20,dailyValueCholesterol:300,dailyValueSodium:2400,dailyValuePotassium:3500,dailyValuePotassium_2018:4700,dailyValueCarb:300,dailyValueFiber:25,dailyValueCalcium:1300,dailyValueIron:18,dailyValueVitaminD:20,dailyValueAddedSugar:50,showCalories:true,showFatCalories:true,showTotalFat:true,showSatFat:true,showTransFat:true,showPolyFat:false,showMonoFat:false,showCholesterol:true,showSodium:true,showPotassium:false,showPotassium_2018:true,showTotalCarb:true,showFibers:true,showSugars:true,showAddedSugars:true,showProteins:true,showVitaminA:true,showVitaminC:true,showVitaminD:true,showCalcium:true,showIron:true,showAmountPerServing:true,showServingsPerContainer:false,showItemName:true,showBrandName:false,showIngredients:true,showCalorieDiet:false,showCustomFooter:false,showDisclaimer:false,scrollDisclaimerHeightComparison:100,scrollDisclaimer:95,valueDisclaimer:"Please note that these nutrition values are estimated based on our standard serving portions. As food servings may have a slight variance each time you visit, please expect these values to be with in 10% +/- of your actual meal. If you have any questions about our nutrition calculator, please contact Nutritionix.",ingredientLabel:"INGREDIENTS:",valueCustomFooter:"",naCalories:false,naFatCalories:false,naTotalFat:false,naSatFat:false,naTransFat:false,naPolyFat:false,naMonoFat:false,naCholesterol:false,naSodium:false,naPotassium:false,naPotassium_2018:false,naTotalCarb:false,naFibers:false,naSugars:false,naAddedSugars:false,naProteins:false,naVitaminA:false,naVitaminC:false,naVitaminD:false,naCalcium:false,naIron:false,valueServingWeightGrams:0,valueServingPerContainer:1,valueCalories:0,valueFatCalories:0,valueTotalFat:0,valueSatFat:0,valueTransFat:0,valuePolyFat:0,valueMonoFat:0,valueCholesterol:0,valueSodium:0,valuePotassium:0,valuePotassium_2018:0,valueTotalCarb:0,valueFibers:0,valueSugars:0,valueAddedSugars:0,valueProteins:0,valueVitaminA:0,valueVitaminC:0,valueVitaminD:0,valueCalcium:0,valueIron:0,unitCalories:"",unitFatCalories:"",unitTotalFat:"g",unitSatFat:"g",unitTransFat:"g",unitPolyFat:"g",unitMonoFat:"g",unitCholesterol:"mg",unitSodium:"mg",unitPotassium:"mg",unitPotassium_base:"mg",unitPotassium_percent:"%",unitTotalCarb:"g",unitFibers:"g",unitSugars:"g",unitAddedSugars:"g",unitProteins:"g",unitVitaminA:"%",unitVitaminC:"%",unitVitaminD_base:"mg",unitVitaminD_percent:"%",unitCalcium:"%",unitCalcium_base:"mg",unitCalcium_percent:"%",unitIron:"%",unitIron_base:"mg",unitIron_percent:"%",valueCol1CalorieDiet:2000,valueCol2CalorieDiet:2500,valueCol1DietaryTotalFat:0,valueCol2DietaryTotalFat:0,valueCol1DietarySatFat:0,valueCol2DietarySatFat:0,valueCol1DietaryCholesterol:0,valueCol2DietaryCholesterol:0,valueCol1DietarySodium:0,valueCol2DietarySodium:0,valueCol1DietaryPotassium:0,valueCol2DietaryPotassium:0,valueCol1DietaryTotalCarb:0,valueCol2DietaryTotalCarb:0,valueCol1Dietary:0,valueCol2Dietary:0,textNutritionFacts:"Nutrition Facts",textDailyValues:"Daily Value",textServingSize:"Serving Size:",textServingsPerContainer:"Servings Per Container",textAmountPerServing:"Amount Per Serving",textCalories:"Calories",textFatCalories:"Calories from Fat",textTotalFat:"Total Fat",textSatFat:"Saturated Fat",textTransFat:"Trans Fat",textPolyFat:"Polyunsaturated Fat",textMonoFat:"Monounsaturated Fat",textCholesterol:"Cholesterol",textSodium:"Sodium",textPotassium:"Potassium",textPotassium_2018:"Potas.",textTotalCarb:"Total Carbohydrates",textFibers:"Dietary Fiber",textSugars:"Sugars",textAddedSugars1:"Includes ",textAddedSugars2:" Added Sugars",textProteins:"Protein",textVitaminA:"Vitamin A",textVitaminC:"Vitamin C",textVitaminD:"Vit. D",textCalcium:"Calcium",textIron:"Iron",ingredientList:"None",textPercentDailyPart1:"Percent Daily Values are based on a",textPercentDailyPart2:"calorie diet",textPercentDaily2018VersionPart1:"The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. ",textPercentDaily2018VersionPart2:" calories a day is used for general nutrition advice.",textGoogleAnalyticsEventCategory:"Nutrition Label",textGoogleAnalyticsEventActionUpArrow:"Quantity Up Arrow Clicked",textGoogleAnalyticsEventActionDownArrow:"Quantity Down Arrow Clicked",textGoogleAnalyticsEventActionTextbox:"Quantity Textbox Changed",showLegacyVersion:true};function NutritionLabel(settings,$elem){this.nutritionLabel=null;this.settings=settings;this.$elem=$elem;return this}function cleanSettings(settings){var numericIndex=["width","scrollHeightComparison","scrollHeightPixel","decimalPlacesForNutrition","decimalPlacesForDailyValues","calorieIntake","dailyValueTotalFat","dailyValueSatFat","dailyValueCholesterol","dailyValueSodium","dailyValuePotassium","dailyValueCarb","dailyValueFiber","valueServingSize","valueServingWeightGrams","valueServingPerContainer","valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueCol1CalorieDiet","valueCol2CalorieDiet","valueCol1DietaryTotalFat","valueCol2DietaryTotalFat","valueCol1DietarySatFat","valueCol2DietarySatFat","valueCol1DietaryCholesterol","valueCol2DietaryCholesterol","valueCol1DietarySodium","valueCol2DietarySodium","valueCol1DietaryPotassium","valueCol2DietaryPotassium","valueCol1DietaryTotalCarb","valueCol2DietaryTotalCarb","valueCol1Dietary","valueCol2Dietary","valueServingUnitQuantity","scrollLongItemNamePixel","scrollLongItemNamePixel2018Override","decimalPlacesForQuantityTextbox","valueAddedSugars","dailyValueVitaminD","dailyValueCalcium","dailyValueIron","valueVitaminD"];$.each(settings,function(index,value){if(jQuery.inArray(index,numericIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}}});if(settings.valueServingUnitQuantity<0){settings.valueServingUnitQuantity=0}return settings}function updateNutritionValueWithMultiplier(settings){var nutritionIndex=["valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueServingWeightGrams","valueAddedSugars","valueVitaminD","valuePotassium_2018"];$.each(settings,function(index,value){if(jQuery.inArray(index,nutritionIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}settings[index]=parseFloat(settings[index])*parseFloat(settings.valueServingUnitQuantity)*parseFloat(settings.nutritionValueMultiplier)}});if(parseFloat(settings.valueServingUnitQuantity)==0){settings.valueServingPerContainer=0}else{if(!isNaN(settings.valueServingPerContainer)&&settings.valueServingPerContainer!=undefined){settings.valueServingPerContainer=parseFloat(settings.totalContainerQuantity)/parseFloat(settings.valueServingUnitQuantity)}}return settings}function init(settings,$elem){var $settings=$.extend({},$.fn.nutritionLabel.defaultSettings,settings||{});$settings.totalContainerQuantity=parseFloat($settings.valueServingPerContainer)*parseFloat($settings.valueServingUnitQuantity);var $originalCleanSettings=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,settings||{}));$originalCleanSettings.totalContainerQuantity=parseFloat($originalCleanSettings.valueServingPerContainer)*parseFloat($originalCleanSettings.valueServingUnitQuantity);$settings=cleanSettings($settings);$originalCleanSettings=cleanSettings($originalCleanSettings);$settings.nutritionValueMultiplier=$settings.valueServingUnitQuantity<=0?1:1/$settings.valueServingUnitQuantity;var $updatedsettings=updateNutritionValueWithMultiplier($settings);$settings.originalServingUnitQuantity=$updatedsettings.valueServingUnitQuantity;if($updatedsettings.valueServingUnitQuantity<=0){$originalCleanSettings.valueServingUnitQuantity=1;$updatedsettings=updateNutritionValueWithMultiplier($originalCleanSettings);$updatedsettings.valueServingUnitQuantity=1}var nutritionLabel=new NutritionLabel($updatedsettings,$elem);if($updatedsettings.showLegacyVersion){updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,true,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate(".unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)}})}}else{updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,false,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)}})}}$elem.data("_nutritionLabel",nutritionLabel)}function updateTheSettingsAfterAnEvent($localSettings,localSettings){var $localSettingsHolder=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,localSettings||{}));$localSettingsHolder.originalServingUnitQuantity=$localSettings.originalServingUnitQuantity;$localSettingsHolder.totalContainerQuantity=$localSettings.totalContainerQuantity;$localSettingsHolder.nutritionValueMultiplier=$localSettingsHolder.valueServingUnitQuantity<=0?1:1/$localSettingsHolder.valueServingUnitQuantity;return $localSettingsHolder}function addScrollToItemDiv($elem,$settings,localNameClass,forLegacyLabel){var local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel);if(!forLegacyLabel){local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel2018Override)}if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").val()!=undefined){if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+".inline").css({"margin-left":"3.90em",height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if(forLegacyLabel){if($("#"+$elem.attr("id")+" ."+localNameClass).height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass).css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if($("#"+$elem.attr("id")+" ."+localNameClass+" div").height()>=local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+" div").css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}}}function notApplicableHover($elem){if($elem.attr("id")!==undefined&&$elem.attr("id")!==""){$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$("#"+$elem.attr("id")+" .naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$("#"+$elem.attr("id")+" .naTooltip").hide()})}else{$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$(".naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$(".naTooltip").hide()})}}function updateScrollingFeature($localElem,$localSettings,localIDToScroll,localScrollHeightComparison,localScrollHeight){if($localElem.attr("id")!==undefined&&$localElem.attr("id")!==""){$parentElement=$("#"+$localElem.attr("id")+" #"+localIDToScroll).parent()}else{$parentElement=$("#"+localIDToScroll).parent()}if($parentElement.innerHeight()>localScrollHeightComparison){$parentElement.addClass("scroll").css({height:localScrollHeight+"px"})}}function updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,forInitialization){var ingredientListID="ingredientList";var calcDisclaimerTextID="calcDisclaimerText";var nameElementClass="name";if(!forLegacyLabel){ingredientListID="nf-ingredientList";calcDisclaimerTextID="nf-calcDisclaimerText";nameElementClass="nf-item-name"}if(!forInitialization){$localSettings=updateNutritionValueWithMultiplier($localSettings);nutritionLabel=new NutritionLabel($localSettings,$elem)}if(forLegacyLabel){$elem.html(nutritionLabel.generateLegacy())}else{$elem.html(nutritionLabel.generate2018())}if($localSettings.showIngredients&&$localSettings.scrollLongIngredients){updateScrollingFeature($elem,$localSettings,ingredientListID,$localSettings.scrollHeightComparison,$localSettings.scrollHeightPixel)}if($localSettings.showDisclaimer){updateScrollingFeature($elem,$localSettings,calcDisclaimerTextID,$localSettings.scrollDisclaimerHeightComparison,$localSettings.scrollDisclaimer)}notApplicableHover($elem);if($localSettings.scrollLongItemName){addScrollToItemDiv($elem,$localSettings,nameElementClass,forLegacyLabel)}if(!forInitialization){return $localSettings}}function handleQuantityChange($localSettings,source,previousValue,newValue){var handler;if($localSettings.userFunctionOnQuantityChange){handler=$localSettings.userFunctionOnQuantityChange}else{if($localSettings.userFunctionNameOnQuantityChange){handler=window[$localSettings.userFunctionNameOnQuantityChange]}}if(typeof handler==="function"){handler(source,previousValue,newValue)}}function changeQuantityTextbox($thisTextbox,$localSettings,nutritionLabel,$elem,forLegacyLabel){var nixLabelBeforeQuantityID="nixLabelBeforeQuantity";if(!forLegacyLabel){nixLabelBeforeQuantityID="nf-nixLabelBeforeQuantity"}var previousValue=parseFloat($("#"+$elem.attr("id")+" #"+nixLabelBeforeQuantityID).val());textBoxValue=!regIsPosNumber($thisTextbox.val())?previousValue:parseFloat($thisTextbox.val());$thisTextbox.val(textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=textBoxValue;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionTextbox)}handleQuantityChange($localSettings,"textbox",previousValue.toFixed($localSettings.decimalPlacesForQuantityTextbox),textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox))}function changeQuantityByArrow($thisQuantity,changeValueBy,$localSettings,nutritionLabel,$elem,forLegacyLabel){var unitQuantityBoxClass="unitQuantityBox";if(!forLegacyLabel){unitQuantityBoxClass="nf-unitQuantityBox"}var currentQuantity=parseFloat($thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val());if(isNaN(currentQuantity)){currentQuantity=1}var beforeCurrentQuantityWasChanged=currentQuantity;if(currentQuantity<=1&&changeValueBy==-1){changeValueBy=-0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<1&&changeValueBy==1){changeValueBy=0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<=2&¤tQuantity>1&&changeValueBy==-1){currentQuantity=1}else{currentQuantity+=changeValueBy}}}if(currentQuantity<0){currentQuantity=0}$thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val(currentQuantity.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=currentQuantity;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){if(changeValueBy>0){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionUpArrow)}else{window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionDownArrow)}}handleQuantityChange($localSettings,changeValueBy>0?"up arrow":"down arrow",beforeCurrentQuantityWasChanged,currentQuantity)}function roundToNearestNum(input,nearest){if(nearest<0){return Math.round(input*nearest)/nearest}else{return Math.round(input/nearest)*nearest}}function roundCalories(toRound,decimalPlace){toRound=roundCaloriesRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundFat(toRound,decimalPlace){toRound=roundFatRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundSodium(toRound,decimalPlace){toRound=roundSodiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundPotassium(toRound,decimalPlace){toRound=roundPotassiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundCholesterol(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCholesterolRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 5"}return toRound}function roundCarbFiberSugarProtein(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCarbFiberSugarProteinRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 1"}return toRound}function roundCaloriesRule(toRound){if(toRound<5){return 0}else{if(toRound<=50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundFatRule(toRound){if(toRound<0.5){return 0}else{if(toRound<5){return roundToNearestNum(toRound,0.5)}else{return roundToNearestNum(toRound,1)}}}function roundSodiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundPotassiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundCholesterolRule(toRound){if(toRound<2){return 0}else{if(toRound<=5){return false}else{return roundToNearestNum(toRound,5)}}}function roundCarbFiberSugarProteinRule(toRound){if(toRound<0.5){return 0}else{if(toRound<1){return false}else{return roundToNearestNum(toRound,1)}}}function roundVitaminsCalciumIron(toRound){if(toRound>0){if(toRound<10){return roundToNearestNum(toRound,2)}else{if(toRound<50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}else{return 0}}function regIsPosNumber(fData){return new RegExp("(^[0-9]+[.]?[0-9]+$)|(^[0-9]+$)").test(fData)}function itemNameHtmlLegacy($localSettings){for(x=1;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var tabTemp=localTab1;var localNutritionLabel=itemNameClass="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'
\n';localNutritionLabel+=localTab2+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab2+'
\n\n';tabTemp=localTab2;var itemNameClass="inline"}}localNutritionLabel+=tabTemp+'
';localNutritionLabel+=$localSettings.itemName;if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="
\n";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'
\n\n'}}return localNutritionLabel}function sevingUnitQuantityHtmlLegacy($localSettings){for(x=1;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){localNutritionLabel+=localTab1+'
\n';if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab2+'
\n';localNutritionLabel+=localTab3+'
'+$localSettings.textServingSize+"
\n";localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n";var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="unitHasTextbox";gramsAddedClass="gramsHasTextbox";localNutritionLabel+=localTab3+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab4+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}localNutritionLabel+=localTab3+'
'+$localSettings.valueServingSizeUnit+"
\n"}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab3+'
('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)
\n"}localNutritionLabel+=localTab2+'
\n\n'}else{localServingSizeIsHidden=true}if($localSettings.showServingsPerContainer){if($localSettings.valueServingPerContainer>0){localNutritionLabel+=localTab2+"
"+$localSettings.textServingsPerContainer+" "+parseFloat($localSettings.valueServingPerContainer.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}else{localServingContainerIsHidden=true}}else{localServingContainerIsHidden=true}localNutritionLabel+=localTab1+'
\n\n'}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}function calorieDietHtmlLegacy($localSettings){for(x=2;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab2+'\n';localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";return localNutritionLabel+=localTab2+"
 Calories"+$localSettings.valueCol1CalorieDiet+""+$localSettings.valueCol2CalorieDiet+"
Total FatLess than"+$localSettings.valueCol1DietaryTotalFat+"g"+$localSettings.valueCol2DietaryTotalFat+"g
   Saturated FatLess than"+$localSettings.valueCol1DietarySatFat+"g"+$localSettings.valueCol2DietarySatFat+"g
CholesterolLess than"+$localSettings.valueCol1DietaryCholesterol+"mg"+$localSettings.valueCol2DietaryCholesterol+"mg
SodiumLess than"+$localSettings.valueCol1DietarySodium+"mg"+$localSettings.valueCol2DietarySodium+"mg
PotassiumLess than"+$localSettings.valueCol1DietaryPotassium+"mg"+$localSettings.valueCol2DietaryPotassium+"mg
Total Carbohydrate "+$localSettings.valueCol1DietaryTotalCarb+"g"+$localSettings.valueCol2DietaryTotalCarb+"g
   Dietary "+$localSettings.valueCol1Dietary+"g"+$localSettings.valueCol2Dietary+"g
\n"}function ingredientsHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtmlLegacy($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateAttributeWithoutPercentageHtmlLegacy($localSettings,valueIndex,unitIndex,naIndex,attributeText,localTabValue,lineClass,attributeDisplayType,itemPropValue,localExtraTab,roundFunctionName){var localNaValue='';var localNutritionLabel=localTabValue+'
';if(attributeDisplayType==1){localNutritionLabel+=""+$localSettings[attributeText]+' '}else{if(attributeDisplayType==2){localNutritionLabel+=$localSettings[attributeText]+" "}else{if(attributeDisplayType==3){localNutritionLabel+=localExtraTab+$localSettings[attributeText]+' '}else{if(attributeDisplayType==4){localNutritionLabel+=$localSettings[attributeText]+' '}else{if(attributeDisplayType==5){localNutritionLabel+=localExtraTab+'
\n'}}}}}localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];if(attributeDisplayType==1||attributeDisplayType==4){localNutritionLabel+="
\n"}else{if(attributeDisplayType==2){localNutritionLabel+="
\n"}else{if(attributeDisplayType==3){localNutritionLabel+="\n"+localTabValue+"\n"}else{if(attributeDisplayType==5){localNutritionLabel+="\n";localNutritionLabel+=localExtraTab+$localSettings[attributeText]+"\n";localNutritionLabel+=localTabValue+"\n"}}}}return localNutritionLabel}function generateAttributeWithPercentageHtmlLegacy($localSettings,valueIndex,dailyValueIndex,unitIndex,naIndex,attributeTexts,lineClass,itemPropValue,roundFunctionName,roundFunctionRuleName,boldName){for(x=1;x<3;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab2+'
';localNutritionLabel+=$localSettings[naIndex]?localNaValue:""+parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="
\n";if(boldName){localNutritionLabel+=localTab2+""+$localSettings[attributeTexts]+' '}else{localNutritionLabel+=localTab2+$localSettings[attributeTexts]+' '}localNutritionLabel+=($localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex])+"\n";return localNutritionLabel+=localTab1+"
\n"}function generateAttributeHtml2018Version($localSettings,valueIndex,unitIndex,naIndex,attributeText,itemPropValue,topDivClass,showPercentageCode,roundFunctionName,roundFunctionRuleName,labelClass,valueClass,dailyValueIndex){for(x=1;x<4;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';if(showPercentageCode){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="\n"}if(valueIndex!="valueAddedSugars"){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[attributeText];localNutritionLabel+="\n";localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n"}else{localNutritionLabel+=localTab2+'\n';localNutritionLabel+=$localSettings.textAddedSugars1+"\n";localNutritionLabel+=localTab3+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n";localNutritionLabel+=$localSettings.textAddedSugars2;localNutritionLabel+="\n"}return localNutritionLabel+=localTab1+"
\n"}function ingredientsHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtml2018Version($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateHtmlAndComputeValueGivenThePercentage($localSettings,valueIndex,dailyValueIndex,unitIndex_base,unitIndex_percent,naIndex,attributeTexts){var localNaValue='';var localNutritionLabel='
\n';localNutritionLabel+=$localSettings[attributeTexts]+" ";localNutritionLabel+=($localSettings[naIndex]?localNaValue:(parseFloat(($localSettings[valueIndex]/100)*$localSettings[dailyValueIndex]).toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_base]+' '+$localSettings[valueIndex].toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_percent]+""))+"\n";return localNutritionLabel+="
\n"}function itemNameHtml2018($localSettings){for(x=3;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var itemNameClass="";localNutritionLabel="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){var hideArrowsClass="";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden";hideArrowsClass="nf-fixed-serving "}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n\n';var itemNameClass=hideArrowsClass}else{if(!$localSettings.showServingUnitQuantity){itemNameClass+="no-indent"}}}else{itemNameClass+="no-indent"}localNutritionLabel+=localTab3+'
\n';if($localSettings.showServingUnitQuantity&&$localSettings.originalServingUnitQuantity>0&&$localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){localNutritionLabel+=localTab4+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+'('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)\n"}}localNutritionLabel+=localTab4+"
\n";localNutritionLabel+=localTab5+$localSettings.itemName+"\n";if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="\n"+localTab4+"
\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel}function sevingUnitQuantityHtml2018($localSettings){for(x=3;x<7;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab3+"
\n";localNutritionLabel+=localTab4+$localSettings.textServingSize;localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";var servingSizeDivAlreadyClosed=false;var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="nf-unitHasTextbox";gramsAddedClass="nf-gramsHasTextbox";servingSizeDivAlreadyClosed=true;localNutritionLabel+="\n"+localTab3+"
\n\n";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab5+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden"}localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n"}}if(!$localSettings.showItemName){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab6+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}localNutritionLabel+=localTab5+"
\n"}}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";if(($localSettings.valueServingSizeUnit==""||$localSettings.valueServingSizeUnit==null)&&$localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}}}if(!servingSizeDivAlreadyClosed){localNutritionLabel+=localTab3+"\n\n"}}else{localServingSizeIsHidden=true}}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}NutritionLabel.prototype={generateLegacy:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium=$this.settings.naPotassium?false:$this.settings.showPotassium;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminA=$this.settings.naVitaminA?false:$this.settings.showVitaminA;$this.settings.showVitaminC=$this.settings.naVitaminC?false:$this.settings.showVitaminC;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";if($this.settings.showItemName){nutritionLabel+=itemNameHtmlLegacy($this.settings)}var sevingUnitQuantityHtmlLegacyResult=sevingUnitQuantityHtmlLegacy($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtmlLegacyResult.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtmlLegacyResult.servingContainerIsHidden;nutritionLabel+=sevingUnitQuantityHtmlLegacyResult.nutritionLabel;if((!$this.settings.showItemName&&!$this.settings.showServingUnitQuantity)||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)){nutritionLabel+=tab1+'
\n'}nutritionLabel+=tab1+'
\n';if($this.settings.showAmountPerServing){nutritionLabel+=tab1+'
';nutritionLabel+=""+$this.settings.textAmountPerServing+"";nutritionLabel+="
\n"}nutritionLabel+=tab1+'
\n';if($this.settings.showFatCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueFatCalories","unitFatCalories","naFatCalories","textFatCalories",tab2,"fr",2,"","","roundCalories")}if($this.settings.showCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalories","unitCalories","naCalories","textCalories",tab2,"",1,"calories","","roundCalories")}else{if($this.settings.showFatCalories){nutritionLabel+=tab2+"
 
\n"}}nutritionLabel+=tab1+"
\n";nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
';nutritionLabel+="% "+$this.settings.textDailyValues+"*";nutritionLabel+="
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalFat","dailyValueTotalFat","unitTotalFat","naTotalFat","textTotalFat","line","fatContent","roundFat","roundFatRule",true)}if($this.settings.showSatFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSatFat","dailyValueSatFat","unitSatFat","naSatFat","textSatFat","line indent","saturatedFatContent","roundFat","roundFatRule",false)}if($this.settings.showTransFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat",tab1,"line indent",3,"transFatContent",tab2,"roundFat")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueCholesterol","dailyValueCholesterol","unitCholesterol","naCholesterol","textCholesterol","line","cholesterolContent","roundCholesterol","roundCholesterolRule",true)}if($this.settings.showSodium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSodium","dailyValueSodium","unitSodium","naSodium","textSodium","line","sodiumContent","roundSodium","roundSodiumRule",true)}if($this.settings.showPotassium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valuePotassium","dailyValuePotassium","unitPotassium","naPotassium","textPotassium","line","potassiumContent","roundPotassium","roundPotassiumRule",true)}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalCarb","dailyValueCarb","unitTotalCarb","naTotalCarb","textTotalCarb","line","carbohydrateContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",true)}if($this.settings.showFibers){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueFibers","dailyValueFiber","unitFibers","naFibers","textFibers","line indent","fiberContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",false)}if($this.settings.showSugars){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueSugars","unitSugars","naSugars","textSugars",tab1,"line indent",4,"sugarContent","","roundCarbFiberSugarProtein")}if($this.settings.showProteins){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueProteins","unitProteins","naProteins","textProteins",tab1,"line",1,"proteinContent","","roundCarbFiberSugarProtein")}nutritionLabel+=tab1+'
\n';if($this.settings.showVitaminA){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminA","unitVitaminA","naVitaminA","textVitaminA",tab1,"line vitaminA",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showVitaminC){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminC","unitVitaminC","naVitaminC","textVitaminC",tab1,"line vitaminC",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showCalcium){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalcium","unitCalcium","naCalcium","textCalcium",tab1,"line calcium",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showIron){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueIron","unitIron","naIron","textIron",tab1,"line iron",5,"",tab2,"roundVitaminsCalciumIron")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+'* '+$this.settings.textPercentDailyPart1+" "+$this.settings.calorieIntake+" "+$this.settings.textPercentDailyPart2+".\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtmlLegacy($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtmlLegacy($this.settings)}nutritionLabel+=tab2+'
\n\n';if($this.settings.showCalorieDiet){nutritionLabel+=calorieDietHtmlLegacy($this.settings)}nutritionLabel+=tab1+'
\n\n';if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtmlLegacy($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'},generate2018:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium_2018=$this.settings.naPotassium_2018?false:$this.settings.showPotassium_2018;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showAddedSugars=$this.settings.naAddedSugars?false:$this.settings.showAddedSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminD=$this.settings.naVitaminD?false:$this.settings.showVitaminD;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";var sevingUnitQuantityHtml2018Result=sevingUnitQuantityHtml2018($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtml2018Result.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtml2018Result.servingContainerIsHidden;var showLineDiv=$this.settings.showItemName||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)||(!$this.settings.showItemName&&$this.settings.originalServingUnitQuantity>0&&$this.settings.valueServingWeightGrams>0)||($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0);if(showLineDiv){nutritionLabel+=tab1+'
\n'}if($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0){nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+parseFloat($this.settings.valueServingPerContainer.toFixed($this.settings.decimalPlacesForNutrition));nutritionLabel+=" "+$this.settings.textServingsPerContainer+"\n";nutritionLabel+=tab2+"
\n\n"}nutritionLabel+=tab2+'
\n';nutritionLabel+=sevingUnitQuantityHtml2018Result.nutritionLabel;if($this.settings.showItemName){nutritionLabel+=itemNameHtml2018($this.settings)}nutritionLabel+=tab2+'
\n\n';if(showLineDiv){nutritionLabel+=tab1+'
\n\n'}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
Amount per serving
\n';if($this.settings.showCalories){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCalories","unitCalories","naCalories","textCalories","calories","nf-calories",false,"roundCalories","","","nf-pr","")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'% Daily Value*\n';nutritionLabel+=tab1+"
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalFat","unitTotalFat","naTotalFat","textTotalFat","fatContent","nf-line",true,"roundFat","roundFatRule","nf-highlight","","dailyValueTotalFat")}if($this.settings.showSatFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSatFat","unitSatFat","naSatFat","textSatFat","saturatedFatContent","nf-line nf-indent",true,"roundFat","roundFatRule","","","dailyValueSatFat")}if($this.settings.showTransFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat","transFatContent","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCholesterol","unitCholesterol","naCholesterol","textCholesterol","cholesterolContent","nf-line",true,"roundCholesterol","roundCholesterolRule","nf-highlight","","dailyValueCholesterol")}if($this.settings.showSodium){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSodium","unitSodium","naSodium","textSodium","cholesterolContent","nf-line",true,"roundSodium","roundSodiumRule","nf-highlight","","dailyValueSodium")}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalCarb","unitTotalCarb","naTotalCarb","textTotalCarb","carbohydrateContent","nf-line",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","nf-highlight","","dailyValueCarb")}if($this.settings.showFibers){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueFibers","unitFibers","naFibers","textFibers","fiberContent","nf-line nf-indent",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueFiber")}if($this.settings.showSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSugars","unitSugars","naSugars","textSugars","sugarContent","nf-line nf-indent",false,"roundCarbFiberSugarProtein","","","","")}if($this.settings.showAddedSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueAddedSugars","unitAddedSugars","naAddedSugars","textAddedSugars1","","nf-line nf-indent2",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueAddedSugar")}if($this.settings.showProteins){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueProteins","unitProteins","naProteins","textProteins","proteinContent","nf-line",false,"roundCarbFiberSugarProtein","","nf-highlight","","")}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n'}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab2+'
\n';if($this.settings.showVitaminD){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueVitaminD","dailyValueVitaminD","unitVitaminD_base","unitVitaminD_percent","naVitaminD","textVitaminD")}if($this.settings.showCalcium){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueCalcium","dailyValueCalcium","unitCalcium_base","unitCalcium_percent","naCalcium","textCalcium")}if($this.settings.showIron){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueIron","dailyValueIron","unitIron_base","unitIron_percent","naIron","textIron")}if($this.settings.showPotassium_2018){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valuePotassium_2018","dailyValuePotassium_2018","unitPotassium_base","unitPotassium_percent","naPotassium_2018","textPotassium_2018")}nutritionLabel+=tab2+"
\n"}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+"
\n"}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+$this.settings.textPercentDaily2018VersionPart1;nutritionLabel+=$this.settings.calorieIntake;nutritionLabel+=$this.settings.textPercentDaily2018VersionPart2+"\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtml2018Version($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtml2018Version($this.settings)}nutritionLabel+=tab1+"
\n";if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtml2018Version($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'}}})(jQuery); \ No newline at end of file +;(function($){$.fn.nutritionLabel=function(option,settings){if(typeof option==="object"){settings=option;init(settings,$(this))}else{if(typeof option==="string"&&option!==""){if(option==="destroy"){new NutritionLabel().destroy($(this))}else{if(option==="hide"){new NutritionLabel().hide($(this))}else{if(option==="show"){new NutritionLabel().show($(this))}else{var values=[];var elements=this.each(function(){var data=$(this).data("_nutritionLabel");if(data){if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){data.settings[option]=settings;init(data.settings,$(this))}else{values.push(data.settings[option])}}}else{if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){$.fn.nutritionLabel.defaultSettings[option]=settings;init(null,$(this))}}}});if(values.length===1){return values[0]}return values.length>0?values:elements}}}}else{if(typeof option==="undefined"||option===""){init(settings,$(this))}}}};$.fn.nutritionLabel.defaultSettings={width:280,allowCustomWidth:false,widthCustom:"auto",allowNoBorder:false,allowFDARounding:false,allowGoogleAnalyticsEventLog:false,gooleAnalyticsFunctionName:"ga",userFunctionNameOnQuantityChange:null,userFunctionOnQuantityChange:null,hideNotApplicableValues:false,brandName:"Brand where this item belongs to",scrollLongIngredients:false,scrollHeightComparison:100,scrollHeightPixel:95,decimalPlacesForNutrition:1,decimalPlacesForDailyValues:0,decimalPlacesForQuantityTextbox:1,scrollLongItemName:true,scrollLongItemNamePixel:36,scrollLongItemNamePixel2018Override:32,showBottomLink:false,urlBottomLink:"http://www.nutritionix.com",nameBottomLink:"Nutritionix",valueServingUnitQuantity:1,valueServingSizeUnit:"",showServingUnitQuantityTextbox:true,itemName:"Item / Ingredient Name",showServingUnitQuantity:true,hideTextboxArrows:false,originalServingUnitQuantity:0,nutritionValueMultiplier:1,totalContainerQuantity:1,calorieIntake:2000,dailyValueTotalFat:65,dailyValueSatFat:20,dailyValueCholesterol:300,dailyValueSodium:2400,dailyValuePotassium:3500,dailyValuePotassium_2018:4700,dailyValueCarb:300,dailyValueFiber:25,dailyValueCalcium:1300,dailyValueIron:18,dailyValueVitaminD:20,dailyValueAddedSugar:50,showCalories:true,showFatCalories:true,showTotalFat:true,showSatFat:true,showTransFat:true,showPolyFat:false,showMonoFat:false,showCholesterol:true,showSodium:true,showPotassium:false,showPotassium_2018:true,showTotalCarb:true,showFibers:true,showSugars:true,showAddedSugars:true,showProteins:true,showVitaminA:true,showVitaminC:true,showVitaminD:true,showCalcium:true,showIron:true,showAmountPerServing:true,showServingsPerContainer:false,showItemName:true,showBrandName:false,showIngredients:true,showCalorieDiet:false,showCustomFooter:false,showDisclaimer:false,scrollDisclaimerHeightComparison:100,scrollDisclaimer:95,valueDisclaimer:"Please note that these nutrition values are estimated based on our standard serving portions. As food servings may have a slight variance each time you visit, please expect these values to be with in 10% +/- of your actual meal. If you have any questions about our nutrition calculator, please contact Nutritionix.",ingredientLabel:"INGREDIENTS:",valueCustomFooter:"",naCalories:false,naFatCalories:false,naTotalFat:false,naSatFat:false,naTransFat:false,naPolyFat:false,naMonoFat:false,naCholesterol:false,naSodium:false,naPotassium:false,naPotassium_2018:false,naTotalCarb:false,naFibers:false,naSugars:false,naAddedSugars:false,naProteins:false,naVitaminA:false,naVitaminC:false,naVitaminD:false,naCalcium:false,naIron:false,valueServingWeightGrams:0,valueServingPerContainer:1,valueCalories:0,valueFatCalories:0,valueTotalFat:0,valueSatFat:0,valueTransFat:0,valuePolyFat:0,valueMonoFat:0,valueCholesterol:0,valueSodium:0,valuePotassium:0,valuePotassium_2018:0,valueTotalCarb:0,valueFibers:0,valueSugars:0,valueAddedSugars:0,valueProteins:0,valueVitaminA:0,valueVitaminC:0,valueVitaminD:0,valueCalcium:0,valueIron:0,unitCalories:"",unitFatCalories:"",unitTotalFat:"g",unitSatFat:"g",unitTransFat:"g",unitPolyFat:"g",unitMonoFat:"g",unitCholesterol:"mg",unitSodium:"mg",unitPotassium:"mg",unitPotassium_base:"mg",unitPotassium_percent:"%",unitTotalCarb:"g",unitFibers:"g",unitSugars:"g",unitAddedSugars:"g",unitProteins:"g",unitVitaminA:"%",unitVitaminC:"%",unitVitaminD_base:"mcg",unitVitaminD_percent:"%",unitCalcium:"%",unitCalcium_base:"mg",unitCalcium_percent:"%",unitIron:"%",unitIron_base:"mg",unitIron_percent:"%",valueCol1CalorieDiet:2000,valueCol2CalorieDiet:2500,valueCol1DietaryTotalFat:0,valueCol2DietaryTotalFat:0,valueCol1DietarySatFat:0,valueCol2DietarySatFat:0,valueCol1DietaryCholesterol:0,valueCol2DietaryCholesterol:0,valueCol1DietarySodium:0,valueCol2DietarySodium:0,valueCol1DietaryPotassium:0,valueCol2DietaryPotassium:0,valueCol1DietaryTotalCarb:0,valueCol2DietaryTotalCarb:0,valueCol1Dietary:0,valueCol2Dietary:0,textNutritionFacts:"Nutrition Facts",textDailyValues:"Daily Value",textServingSize:"Serving Size:",textServingsPerContainer:"Servings Per Container",textAmountPerServing:"Amount Per Serving",textCalories:"Calories",textFatCalories:"Calories from Fat",textTotalFat:"Total Fat",textSatFat:"Saturated Fat",textTransFat:"Trans Fat",textPolyFat:"Polyunsaturated Fat",textMonoFat:"Monounsaturated Fat",textCholesterol:"Cholesterol",textSodium:"Sodium",textPotassium:"Potassium",textPotassium_2018:"Potas.",textTotalCarb:"Total Carbohydrates",textFibers:"Dietary Fiber",textSugars:"Sugars",textAddedSugars1:"Includes ",textAddedSugars2:" Added Sugars",textProteins:"Protein",textVitaminA:"Vitamin A",textVitaminC:"Vitamin C",textVitaminD:"Vit. D",textCalcium:"Calcium",textIron:"Iron",ingredientList:"None",textPercentDailyPart1:"Percent Daily Values are based on a",textPercentDailyPart2:"calorie diet",textPercentDaily2018VersionPart1:"The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. ",textPercentDaily2018VersionPart2:" calories a day is used for general nutrition advice.",textGoogleAnalyticsEventCategory:"Nutrition Label",textGoogleAnalyticsEventActionUpArrow:"Quantity Up Arrow Clicked",textGoogleAnalyticsEventActionDownArrow:"Quantity Down Arrow Clicked",textGoogleAnalyticsEventActionTextbox:"Quantity Textbox Changed",showLegacyVersion:true};function NutritionLabel(settings,$elem){this.nutritionLabel=null;this.settings=settings;this.$elem=$elem;return this}function cleanSettings(settings){var numericIndex=["width","scrollHeightComparison","scrollHeightPixel","decimalPlacesForNutrition","decimalPlacesForDailyValues","calorieIntake","dailyValueTotalFat","dailyValueSatFat","dailyValueCholesterol","dailyValueSodium","dailyValuePotassium","dailyValueCarb","dailyValueFiber","valueServingSize","valueServingWeightGrams","valueServingPerContainer","valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueCol1CalorieDiet","valueCol2CalorieDiet","valueCol1DietaryTotalFat","valueCol2DietaryTotalFat","valueCol1DietarySatFat","valueCol2DietarySatFat","valueCol1DietaryCholesterol","valueCol2DietaryCholesterol","valueCol1DietarySodium","valueCol2DietarySodium","valueCol1DietaryPotassium","valueCol2DietaryPotassium","valueCol1DietaryTotalCarb","valueCol2DietaryTotalCarb","valueCol1Dietary","valueCol2Dietary","valueServingUnitQuantity","scrollLongItemNamePixel","scrollLongItemNamePixel2018Override","decimalPlacesForQuantityTextbox","valueAddedSugars","dailyValueVitaminD","dailyValueCalcium","dailyValueIron","valueVitaminD"];$.each(settings,function(index,value){if(jQuery.inArray(index,numericIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}}});if(settings.valueServingUnitQuantity<0){settings.valueServingUnitQuantity=0}return settings}function updateNutritionValueWithMultiplier(settings){var nutritionIndex=["valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueServingWeightGrams","valueAddedSugars","valueVitaminD","valuePotassium_2018"];$.each(settings,function(index,value){if(jQuery.inArray(index,nutritionIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}settings[index]=parseFloat(settings[index])*parseFloat(settings.valueServingUnitQuantity)*parseFloat(settings.nutritionValueMultiplier)}});if(parseFloat(settings.valueServingUnitQuantity)==0){settings.valueServingPerContainer=0}else{if(!isNaN(settings.valueServingPerContainer)&&settings.valueServingPerContainer!=undefined){settings.valueServingPerContainer=parseFloat(settings.totalContainerQuantity)/parseFloat(settings.valueServingUnitQuantity)}}return settings}function init(settings,$elem){var $settings=$.extend({},$.fn.nutritionLabel.defaultSettings,settings||{});$settings.totalContainerQuantity=parseFloat($settings.valueServingPerContainer)*parseFloat($settings.valueServingUnitQuantity);var $originalCleanSettings=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,settings||{}));$originalCleanSettings.totalContainerQuantity=parseFloat($originalCleanSettings.valueServingPerContainer)*parseFloat($originalCleanSettings.valueServingUnitQuantity);$settings=cleanSettings($settings);$originalCleanSettings=cleanSettings($originalCleanSettings);$settings.nutritionValueMultiplier=$settings.valueServingUnitQuantity<=0?1:1/$settings.valueServingUnitQuantity;var $updatedsettings=updateNutritionValueWithMultiplier($settings);$settings.originalServingUnitQuantity=$updatedsettings.valueServingUnitQuantity;if($updatedsettings.valueServingUnitQuantity<=0){$originalCleanSettings.valueServingUnitQuantity=1;$updatedsettings=updateNutritionValueWithMultiplier($originalCleanSettings);$updatedsettings.valueServingUnitQuantity=1}var nutritionLabel=new NutritionLabel($updatedsettings,$elem);if($updatedsettings.showLegacyVersion){updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,true,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate(".unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)}})}}else{updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,false,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)}})}}$elem.data("_nutritionLabel",nutritionLabel)}function updateTheSettingsAfterAnEvent($localSettings,localSettings){var $localSettingsHolder=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,localSettings||{}));$localSettingsHolder.originalServingUnitQuantity=$localSettings.originalServingUnitQuantity;$localSettingsHolder.totalContainerQuantity=$localSettings.totalContainerQuantity;$localSettingsHolder.nutritionValueMultiplier=$localSettingsHolder.valueServingUnitQuantity<=0?1:1/$localSettingsHolder.valueServingUnitQuantity;return $localSettingsHolder}function addScrollToItemDiv($elem,$settings,localNameClass,forLegacyLabel){var local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel);if(!forLegacyLabel){local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel2018Override)}if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").val()!=undefined){if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+".inline").css({"margin-left":"3.90em",height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if(forLegacyLabel){if($("#"+$elem.attr("id")+" ."+localNameClass).height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass).css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if($("#"+$elem.attr("id")+" ."+localNameClass+" div").height()>=local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+" div").css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}}}function notApplicableHover($elem){if($elem.attr("id")!==undefined&&$elem.attr("id")!==""){$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$("#"+$elem.attr("id")+" .naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$("#"+$elem.attr("id")+" .naTooltip").hide()})}else{$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$(".naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$(".naTooltip").hide()})}}function updateScrollingFeature($localElem,$localSettings,localIDToScroll,localScrollHeightComparison,localScrollHeight){if($localElem.attr("id")!==undefined&&$localElem.attr("id")!==""){$parentElement=$("#"+$localElem.attr("id")+" #"+localIDToScroll).parent()}else{$parentElement=$("#"+localIDToScroll).parent()}if($parentElement.innerHeight()>localScrollHeightComparison){$parentElement.addClass("scroll").css({height:localScrollHeight+"px"})}}function updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,forInitialization){var ingredientListID="ingredientList";var calcDisclaimerTextID="calcDisclaimerText";var nameElementClass="name";if(!forLegacyLabel){ingredientListID="nf-ingredientList";calcDisclaimerTextID="nf-calcDisclaimerText";nameElementClass="nf-item-name"}if(!forInitialization){$localSettings=updateNutritionValueWithMultiplier($localSettings);nutritionLabel=new NutritionLabel($localSettings,$elem)}if(forLegacyLabel){$elem.html(nutritionLabel.generateLegacy())}else{$elem.html(nutritionLabel.generate2018())}if($localSettings.showIngredients&&$localSettings.scrollLongIngredients){updateScrollingFeature($elem,$localSettings,ingredientListID,$localSettings.scrollHeightComparison,$localSettings.scrollHeightPixel)}if($localSettings.showDisclaimer){updateScrollingFeature($elem,$localSettings,calcDisclaimerTextID,$localSettings.scrollDisclaimerHeightComparison,$localSettings.scrollDisclaimer)}notApplicableHover($elem);if($localSettings.scrollLongItemName){addScrollToItemDiv($elem,$localSettings,nameElementClass,forLegacyLabel)}if(!forInitialization){return $localSettings}}function handleQuantityChange($localSettings,source,previousValue,newValue){var handler;if($localSettings.userFunctionOnQuantityChange){handler=$localSettings.userFunctionOnQuantityChange}else{if($localSettings.userFunctionNameOnQuantityChange){handler=window[$localSettings.userFunctionNameOnQuantityChange]}}if(typeof handler==="function"){handler(source,previousValue,newValue)}}function changeQuantityTextbox($thisTextbox,$localSettings,nutritionLabel,$elem,forLegacyLabel){var nixLabelBeforeQuantityID="nixLabelBeforeQuantity";if(!forLegacyLabel){nixLabelBeforeQuantityID="nf-nixLabelBeforeQuantity"}var previousValue=parseFloat($("#"+$elem.attr("id")+" #"+nixLabelBeforeQuantityID).val());textBoxValue=!regIsPosNumber($thisTextbox.val())?previousValue:parseFloat($thisTextbox.val());$thisTextbox.val(textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=textBoxValue;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionTextbox)}handleQuantityChange($localSettings,"textbox",previousValue.toFixed($localSettings.decimalPlacesForQuantityTextbox),textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox))}function changeQuantityByArrow($thisQuantity,changeValueBy,$localSettings,nutritionLabel,$elem,forLegacyLabel){var unitQuantityBoxClass="unitQuantityBox";if(!forLegacyLabel){unitQuantityBoxClass="nf-unitQuantityBox"}var currentQuantity=parseFloat($thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val());if(isNaN(currentQuantity)){currentQuantity=1}var beforeCurrentQuantityWasChanged=currentQuantity;if(currentQuantity<=1&&changeValueBy==-1){changeValueBy=-0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<1&&changeValueBy==1){changeValueBy=0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<=2&¤tQuantity>1&&changeValueBy==-1){currentQuantity=1}else{currentQuantity+=changeValueBy}}}if(currentQuantity<0){currentQuantity=0}$thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val(currentQuantity.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=currentQuantity;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){if(changeValueBy>0){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionUpArrow)}else{window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionDownArrow)}}handleQuantityChange($localSettings,changeValueBy>0?"up arrow":"down arrow",beforeCurrentQuantityWasChanged,currentQuantity)}function roundToNearestNum(input,nearest){if(nearest<0){return Math.round(input*nearest)/nearest}else{return Math.round(input/nearest)*nearest}}function roundCalories(toRound,decimalPlace){toRound=roundCaloriesRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundFat(toRound,decimalPlace){toRound=roundFatRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundSodium(toRound,decimalPlace){toRound=roundSodiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundPotassium(toRound,decimalPlace){toRound=roundPotassiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundCholesterol(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCholesterolRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 5"}return toRound}function roundCarbFiberSugarProtein(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCarbFiberSugarProteinRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 1"}return toRound}function roundCaloriesRule(toRound){if(toRound<5){return 0}else{if(toRound<=50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundFatRule(toRound){if(toRound<0.5){return 0}else{if(toRound<5){return roundToNearestNum(toRound,0.5)}else{return roundToNearestNum(toRound,1)}}}function roundSodiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundPotassiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundCholesterolRule(toRound){if(toRound<2){return 0}else{if(toRound<=5){return false}else{return roundToNearestNum(toRound,5)}}}function roundCarbFiberSugarProteinRule(toRound){if(toRound<0.5){return 0}else{if(toRound<1){return false}else{return roundToNearestNum(toRound,1)}}}function roundVitaminsCalciumIron(toRound){if(toRound>0){if(toRound<10){return roundToNearestNum(toRound,2)}else{if(toRound<50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}else{return 0}}function regIsPosNumber(fData){return new RegExp("(^[0-9]+[.]?[0-9]+$)|(^[0-9]+$)").test(fData)}function itemNameHtmlLegacy($localSettings){for(x=1;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var tabTemp=localTab1;var localNutritionLabel=itemNameClass="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'
\n';localNutritionLabel+=localTab2+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab2+'
\n\n';tabTemp=localTab2;var itemNameClass="inline"}}localNutritionLabel+=tabTemp+'
';localNutritionLabel+=$localSettings.itemName;if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="
\n";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'
\n\n'}}return localNutritionLabel}function sevingUnitQuantityHtmlLegacy($localSettings){for(x=1;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){localNutritionLabel+=localTab1+'
\n';if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab2+'
\n';localNutritionLabel+=localTab3+'
'+$localSettings.textServingSize+"
\n";localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n";var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="unitHasTextbox";gramsAddedClass="gramsHasTextbox";localNutritionLabel+=localTab3+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab4+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}localNutritionLabel+=localTab3+'
'+$localSettings.valueServingSizeUnit+"
\n"}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab3+'
('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)
\n"}localNutritionLabel+=localTab2+'
\n\n'}else{localServingSizeIsHidden=true}if($localSettings.showServingsPerContainer){if($localSettings.valueServingPerContainer>0){localNutritionLabel+=localTab2+"
"+$localSettings.textServingsPerContainer+" "+parseFloat($localSettings.valueServingPerContainer.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}else{localServingContainerIsHidden=true}}else{localServingContainerIsHidden=true}localNutritionLabel+=localTab1+'
\n\n'}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}function calorieDietHtmlLegacy($localSettings){for(x=2;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab2+'\n';localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";return localNutritionLabel+=localTab2+"
 Calories"+$localSettings.valueCol1CalorieDiet+""+$localSettings.valueCol2CalorieDiet+"
Total FatLess than"+$localSettings.valueCol1DietaryTotalFat+"g"+$localSettings.valueCol2DietaryTotalFat+"g
   Saturated FatLess than"+$localSettings.valueCol1DietarySatFat+"g"+$localSettings.valueCol2DietarySatFat+"g
CholesterolLess than"+$localSettings.valueCol1DietaryCholesterol+"mg"+$localSettings.valueCol2DietaryCholesterol+"mg
SodiumLess than"+$localSettings.valueCol1DietarySodium+"mg"+$localSettings.valueCol2DietarySodium+"mg
PotassiumLess than"+$localSettings.valueCol1DietaryPotassium+"mg"+$localSettings.valueCol2DietaryPotassium+"mg
Total Carbohydrate "+$localSettings.valueCol1DietaryTotalCarb+"g"+$localSettings.valueCol2DietaryTotalCarb+"g
   Dietary "+$localSettings.valueCol1Dietary+"g"+$localSettings.valueCol2Dietary+"g
\n"}function ingredientsHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtmlLegacy($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateAttributeWithoutPercentageHtmlLegacy($localSettings,valueIndex,unitIndex,naIndex,attributeText,localTabValue,lineClass,attributeDisplayType,itemPropValue,localExtraTab,roundFunctionName){var localNaValue='';var localNutritionLabel=localTabValue+'
';if(attributeDisplayType==1){localNutritionLabel+=""+$localSettings[attributeText]+' '}else{if(attributeDisplayType==2){localNutritionLabel+=$localSettings[attributeText]+" "}else{if(attributeDisplayType==3){localNutritionLabel+=localExtraTab+$localSettings[attributeText]+' '}else{if(attributeDisplayType==4){localNutritionLabel+=$localSettings[attributeText]+' '}else{if(attributeDisplayType==5){localNutritionLabel+=localExtraTab+'
\n'}}}}}localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];if(attributeDisplayType==1||attributeDisplayType==4){localNutritionLabel+="
\n"}else{if(attributeDisplayType==2){localNutritionLabel+="
\n"}else{if(attributeDisplayType==3){localNutritionLabel+="\n"+localTabValue+"\n"}else{if(attributeDisplayType==5){localNutritionLabel+="\n";localNutritionLabel+=localExtraTab+$localSettings[attributeText]+"\n";localNutritionLabel+=localTabValue+"\n"}}}}return localNutritionLabel}function generateAttributeWithPercentageHtmlLegacy($localSettings,valueIndex,dailyValueIndex,unitIndex,naIndex,attributeTexts,lineClass,itemPropValue,roundFunctionName,roundFunctionRuleName,boldName){for(x=1;x<3;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab2+'
';localNutritionLabel+=$localSettings[naIndex]?localNaValue:""+parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="
\n";if(boldName){localNutritionLabel+=localTab2+""+$localSettings[attributeTexts]+' '}else{localNutritionLabel+=localTab2+$localSettings[attributeTexts]+' '}localNutritionLabel+=($localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex])+"\n";return localNutritionLabel+=localTab1+"
\n"}function generateAttributeHtml2018Version($localSettings,valueIndex,unitIndex,naIndex,attributeText,itemPropValue,topDivClass,showPercentageCode,roundFunctionName,roundFunctionRuleName,labelClass,valueClass,dailyValueIndex){for(x=1;x<4;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';if(showPercentageCode){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="\n"}if(valueIndex!="valueAddedSugars"){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[attributeText];localNutritionLabel+="\n";localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n"}else{localNutritionLabel+=localTab2+'\n';localNutritionLabel+=$localSettings.textAddedSugars1+"\n";localNutritionLabel+=localTab3+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n";localNutritionLabel+=$localSettings.textAddedSugars2;localNutritionLabel+="\n"}return localNutritionLabel+=localTab1+"
\n"}function ingredientsHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtml2018Version($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateHtmlAndComputeValueGivenThePercentage($localSettings,valueIndex,dailyValueIndex,unitIndex_base,unitIndex_percent,naIndex,attributeTexts){var localNaValue='';var localNutritionLabel='
\n';localNutritionLabel+=$localSettings[attributeTexts]+" ";localNutritionLabel+=($localSettings[naIndex]?localNaValue:(parseFloat(($localSettings[valueIndex]/100)*$localSettings[dailyValueIndex]).toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_base]+' '+$localSettings[valueIndex].toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_percent]+""))+"\n";return localNutritionLabel+="
\n"}function itemNameHtml2018($localSettings){for(x=3;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var itemNameClass="";localNutritionLabel="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){var hideArrowsClass="";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden";hideArrowsClass="nf-fixed-serving "}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n\n';var itemNameClass=hideArrowsClass}else{if(!$localSettings.showServingUnitQuantity){itemNameClass+="no-indent"}}}else{itemNameClass+="no-indent"}localNutritionLabel+=localTab3+'
\n';if($localSettings.showServingUnitQuantity&&$localSettings.originalServingUnitQuantity>0&&$localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){localNutritionLabel+=localTab4+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+'('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)\n"}}localNutritionLabel+=localTab4+"
\n";localNutritionLabel+=localTab5+$localSettings.itemName+"\n";if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="\n"+localTab4+"
\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel}function sevingUnitQuantityHtml2018($localSettings){for(x=3;x<7;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab3+"
\n";localNutritionLabel+=localTab4+$localSettings.textServingSize;localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";var servingSizeDivAlreadyClosed=false;var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="nf-unitHasTextbox";gramsAddedClass="nf-gramsHasTextbox";servingSizeDivAlreadyClosed=true;localNutritionLabel+="\n"+localTab3+"
\n\n";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab5+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden"}localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n"}}if(!$localSettings.showItemName){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab6+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}localNutritionLabel+=localTab5+"
\n"}}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";if(($localSettings.valueServingSizeUnit==""||$localSettings.valueServingSizeUnit==null)&&$localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}}}if(!servingSizeDivAlreadyClosed){localNutritionLabel+=localTab3+"\n\n"}}else{localServingSizeIsHidden=true}}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}NutritionLabel.prototype={generateLegacy:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium=$this.settings.naPotassium?false:$this.settings.showPotassium;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminA=$this.settings.naVitaminA?false:$this.settings.showVitaminA;$this.settings.showVitaminC=$this.settings.naVitaminC?false:$this.settings.showVitaminC;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";if($this.settings.showItemName){nutritionLabel+=itemNameHtmlLegacy($this.settings)}var sevingUnitQuantityHtmlLegacyResult=sevingUnitQuantityHtmlLegacy($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtmlLegacyResult.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtmlLegacyResult.servingContainerIsHidden;nutritionLabel+=sevingUnitQuantityHtmlLegacyResult.nutritionLabel;if((!$this.settings.showItemName&&!$this.settings.showServingUnitQuantity)||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)){nutritionLabel+=tab1+'
\n'}nutritionLabel+=tab1+'
\n';if($this.settings.showAmountPerServing){nutritionLabel+=tab1+'
';nutritionLabel+=""+$this.settings.textAmountPerServing+"";nutritionLabel+="
\n"}nutritionLabel+=tab1+'
\n';if($this.settings.showFatCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueFatCalories","unitFatCalories","naFatCalories","textFatCalories",tab2,"fr",2,"","","roundCalories")}if($this.settings.showCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalories","unitCalories","naCalories","textCalories",tab2,"",1,"calories","","roundCalories")}else{if($this.settings.showFatCalories){nutritionLabel+=tab2+"
 
\n"}}nutritionLabel+=tab1+"
\n";nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
';nutritionLabel+="% "+$this.settings.textDailyValues+"*";nutritionLabel+="
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalFat","dailyValueTotalFat","unitTotalFat","naTotalFat","textTotalFat","line","fatContent","roundFat","roundFatRule",true)}if($this.settings.showSatFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSatFat","dailyValueSatFat","unitSatFat","naSatFat","textSatFat","line indent","saturatedFatContent","roundFat","roundFatRule",false)}if($this.settings.showTransFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat",tab1,"line indent",3,"transFatContent",tab2,"roundFat")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueCholesterol","dailyValueCholesterol","unitCholesterol","naCholesterol","textCholesterol","line","cholesterolContent","roundCholesterol","roundCholesterolRule",true)}if($this.settings.showSodium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSodium","dailyValueSodium","unitSodium","naSodium","textSodium","line","sodiumContent","roundSodium","roundSodiumRule",true)}if($this.settings.showPotassium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valuePotassium","dailyValuePotassium","unitPotassium","naPotassium","textPotassium","line","potassiumContent","roundPotassium","roundPotassiumRule",true)}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalCarb","dailyValueCarb","unitTotalCarb","naTotalCarb","textTotalCarb","line","carbohydrateContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",true)}if($this.settings.showFibers){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueFibers","dailyValueFiber","unitFibers","naFibers","textFibers","line indent","fiberContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",false)}if($this.settings.showSugars){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueSugars","unitSugars","naSugars","textSugars",tab1,"line indent",4,"sugarContent","","roundCarbFiberSugarProtein")}if($this.settings.showProteins){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueProteins","unitProteins","naProteins","textProteins",tab1,"line",1,"proteinContent","","roundCarbFiberSugarProtein")}nutritionLabel+=tab1+'
\n';if($this.settings.showVitaminA){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminA","unitVitaminA","naVitaminA","textVitaminA",tab1,"line vitaminA",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showVitaminC){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminC","unitVitaminC","naVitaminC","textVitaminC",tab1,"line vitaminC",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showCalcium){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalcium","unitCalcium","naCalcium","textCalcium",tab1,"line calcium",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showIron){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueIron","unitIron","naIron","textIron",tab1,"line iron",5,"",tab2,"roundVitaminsCalciumIron")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+'* '+$this.settings.textPercentDailyPart1+" "+$this.settings.calorieIntake+" "+$this.settings.textPercentDailyPart2+".\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtmlLegacy($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtmlLegacy($this.settings)}nutritionLabel+=tab2+'
\n\n';if($this.settings.showCalorieDiet){nutritionLabel+=calorieDietHtmlLegacy($this.settings)}nutritionLabel+=tab1+'
\n\n';if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtmlLegacy($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'},generate2018:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium_2018=$this.settings.naPotassium_2018?false:$this.settings.showPotassium_2018;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showAddedSugars=$this.settings.naAddedSugars?false:$this.settings.showAddedSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminD=$this.settings.naVitaminD?false:$this.settings.showVitaminD;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";var sevingUnitQuantityHtml2018Result=sevingUnitQuantityHtml2018($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtml2018Result.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtml2018Result.servingContainerIsHidden;var showLineDiv=$this.settings.showItemName||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)||(!$this.settings.showItemName&&$this.settings.originalServingUnitQuantity>0&&$this.settings.valueServingWeightGrams>0)||($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0);if(showLineDiv){nutritionLabel+=tab1+'
\n'}if($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0){nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+parseFloat($this.settings.valueServingPerContainer.toFixed($this.settings.decimalPlacesForNutrition));nutritionLabel+=" "+$this.settings.textServingsPerContainer+"\n";nutritionLabel+=tab2+"
\n\n"}nutritionLabel+=tab2+'
\n';nutritionLabel+=sevingUnitQuantityHtml2018Result.nutritionLabel;if($this.settings.showItemName){nutritionLabel+=itemNameHtml2018($this.settings)}nutritionLabel+=tab2+'
\n\n';if(showLineDiv){nutritionLabel+=tab1+'
\n\n'}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
Amount per serving
\n';if($this.settings.showCalories){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCalories","unitCalories","naCalories","textCalories","calories","nf-calories",false,"roundCalories","","","nf-pr","")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'% Daily Value*\n';nutritionLabel+=tab1+"
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalFat","unitTotalFat","naTotalFat","textTotalFat","fatContent","nf-line",true,"roundFat","roundFatRule","nf-highlight","","dailyValueTotalFat")}if($this.settings.showSatFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSatFat","unitSatFat","naSatFat","textSatFat","saturatedFatContent","nf-line nf-indent",true,"roundFat","roundFatRule","","","dailyValueSatFat")}if($this.settings.showTransFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat","transFatContent","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCholesterol","unitCholesterol","naCholesterol","textCholesterol","cholesterolContent","nf-line",true,"roundCholesterol","roundCholesterolRule","nf-highlight","","dailyValueCholesterol")}if($this.settings.showSodium){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSodium","unitSodium","naSodium","textSodium","cholesterolContent","nf-line",true,"roundSodium","roundSodiumRule","nf-highlight","","dailyValueSodium")}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalCarb","unitTotalCarb","naTotalCarb","textTotalCarb","carbohydrateContent","nf-line",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","nf-highlight","","dailyValueCarb")}if($this.settings.showFibers){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueFibers","unitFibers","naFibers","textFibers","fiberContent","nf-line nf-indent",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueFiber")}if($this.settings.showSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSugars","unitSugars","naSugars","textSugars","sugarContent","nf-line nf-indent",false,"roundCarbFiberSugarProtein","","","","")}if($this.settings.showAddedSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueAddedSugars","unitAddedSugars","naAddedSugars","textAddedSugars1","","nf-line nf-indent2",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueAddedSugar")}if($this.settings.showProteins){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueProteins","unitProteins","naProteins","textProteins","proteinContent","nf-line",false,"roundCarbFiberSugarProtein","","nf-highlight","","")}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n'}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab2+'
\n';if($this.settings.showVitaminD){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueVitaminD","dailyValueVitaminD","unitVitaminD_base","unitVitaminD_percent","naVitaminD","textVitaminD")}if($this.settings.showCalcium){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueCalcium","dailyValueCalcium","unitCalcium_base","unitCalcium_percent","naCalcium","textCalcium")}if($this.settings.showIron){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueIron","dailyValueIron","unitIron_base","unitIron_percent","naIron","textIron")}if($this.settings.showPotassium_2018){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valuePotassium_2018","dailyValuePotassium_2018","unitPotassium_base","unitPotassium_percent","naPotassium_2018","textPotassium_2018")}nutritionLabel+=tab2+"
\n"}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+"
\n"}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+$this.settings.textPercentDaily2018VersionPart1;nutritionLabel+=$this.settings.calorieIntake;nutritionLabel+=$this.settings.textPercentDaily2018VersionPart2+"\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtml2018Version($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtml2018Version($this.settings)}nutritionLabel+=tab1+"
\n";if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtml2018Version($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'}}})(jQuery); \ No newline at end of file diff --git a/dist/js/nutritionLabel.js b/dist/js/nutritionLabel.js index 1564ca6..7b24d84 100644 --- a/dist/js/nutritionLabel.js +++ b/dist/js/nutritionLabel.js @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | @@ -299,7 +299,7 @@ unitProteins : 'g', unitVitaminA : '%', unitVitaminC : '%', - unitVitaminD_base : 'mg', //this is for the 2018 version + unitVitaminD_base : 'mcg', //this is for the 2018 version unitVitaminD_percent : '%', //this is for the 2018 version unitCalcium : '%', unitCalcium_base : 'mg', //this is for the 2018 version diff --git a/index.html b/index.html index 44b0af3..9b51625 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | @@ -29,7 +29,7 @@
-

Nutrition Label version 7.0.9

+

Nutrition Label version 7.0.10

from Nutritionix

Homepage

diff --git a/nutritionLabel-min.css b/nutritionLabel-min.css index cebc381..8511bca 100644 --- a/nutritionLabel-min.css +++ b/nutritionLabel-min.css @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | diff --git a/nutritionLabel-min.js b/nutritionLabel-min.js index 94e49dc..4f0703c 100644 --- a/nutritionLabel-min.js +++ b/nutritionLabel-min.js @@ -9,11 +9,11 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | * | ***************************************************************************************************************************************************+ */ -;(function($){$.fn.nutritionLabel=function(option,settings){if(typeof option==="object"){settings=option;init(settings,$(this))}else{if(typeof option==="string"&&option!==""){if(option==="destroy"){new NutritionLabel().destroy($(this))}else{if(option==="hide"){new NutritionLabel().hide($(this))}else{if(option==="show"){new NutritionLabel().show($(this))}else{var values=[];var elements=this.each(function(){var data=$(this).data("_nutritionLabel");if(data){if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){data.settings[option]=settings;init(data.settings,$(this))}else{values.push(data.settings[option])}}}else{if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){$.fn.nutritionLabel.defaultSettings[option]=settings;init(null,$(this))}}}});if(values.length===1){return values[0]}return values.length>0?values:elements}}}}else{if(typeof option==="undefined"||option===""){init(settings,$(this))}}}};$.fn.nutritionLabel.defaultSettings={width:280,allowCustomWidth:false,widthCustom:"auto",allowNoBorder:false,allowFDARounding:false,allowGoogleAnalyticsEventLog:false,gooleAnalyticsFunctionName:"ga",userFunctionNameOnQuantityChange:null,userFunctionOnQuantityChange:null,hideNotApplicableValues:false,brandName:"Brand where this item belongs to",scrollLongIngredients:false,scrollHeightComparison:100,scrollHeightPixel:95,decimalPlacesForNutrition:1,decimalPlacesForDailyValues:0,decimalPlacesForQuantityTextbox:1,scrollLongItemName:true,scrollLongItemNamePixel:36,scrollLongItemNamePixel2018Override:32,showBottomLink:false,urlBottomLink:"http://www.nutritionix.com",nameBottomLink:"Nutritionix",valueServingUnitQuantity:1,valueServingSizeUnit:"",showServingUnitQuantityTextbox:true,itemName:"Item / Ingredient Name",showServingUnitQuantity:true,hideTextboxArrows:false,originalServingUnitQuantity:0,nutritionValueMultiplier:1,totalContainerQuantity:1,calorieIntake:2000,dailyValueTotalFat:65,dailyValueSatFat:20,dailyValueCholesterol:300,dailyValueSodium:2400,dailyValuePotassium:3500,dailyValuePotassium_2018:4700,dailyValueCarb:300,dailyValueFiber:25,dailyValueCalcium:1300,dailyValueIron:18,dailyValueVitaminD:20,dailyValueAddedSugar:50,showCalories:true,showFatCalories:true,showTotalFat:true,showSatFat:true,showTransFat:true,showPolyFat:false,showMonoFat:false,showCholesterol:true,showSodium:true,showPotassium:false,showPotassium_2018:true,showTotalCarb:true,showFibers:true,showSugars:true,showAddedSugars:true,showProteins:true,showVitaminA:true,showVitaminC:true,showVitaminD:true,showCalcium:true,showIron:true,showAmountPerServing:true,showServingsPerContainer:false,showItemName:true,showBrandName:false,showIngredients:true,showCalorieDiet:false,showCustomFooter:false,showDisclaimer:false,scrollDisclaimerHeightComparison:100,scrollDisclaimer:95,valueDisclaimer:"Please note that these nutrition values are estimated based on our standard serving portions. As food servings may have a slight variance each time you visit, please expect these values to be with in 10% +/- of your actual meal. If you have any questions about our nutrition calculator, please contact Nutritionix.",ingredientLabel:"INGREDIENTS:",valueCustomFooter:"",naCalories:false,naFatCalories:false,naTotalFat:false,naSatFat:false,naTransFat:false,naPolyFat:false,naMonoFat:false,naCholesterol:false,naSodium:false,naPotassium:false,naPotassium_2018:false,naTotalCarb:false,naFibers:false,naSugars:false,naAddedSugars:false,naProteins:false,naVitaminA:false,naVitaminC:false,naVitaminD:false,naCalcium:false,naIron:false,valueServingWeightGrams:0,valueServingPerContainer:1,valueCalories:0,valueFatCalories:0,valueTotalFat:0,valueSatFat:0,valueTransFat:0,valuePolyFat:0,valueMonoFat:0,valueCholesterol:0,valueSodium:0,valuePotassium:0,valuePotassium_2018:0,valueTotalCarb:0,valueFibers:0,valueSugars:0,valueAddedSugars:0,valueProteins:0,valueVitaminA:0,valueVitaminC:0,valueVitaminD:0,valueCalcium:0,valueIron:0,unitCalories:"",unitFatCalories:"",unitTotalFat:"g",unitSatFat:"g",unitTransFat:"g",unitPolyFat:"g",unitMonoFat:"g",unitCholesterol:"mg",unitSodium:"mg",unitPotassium:"mg",unitPotassium_base:"mg",unitPotassium_percent:"%",unitTotalCarb:"g",unitFibers:"g",unitSugars:"g",unitAddedSugars:"g",unitProteins:"g",unitVitaminA:"%",unitVitaminC:"%",unitVitaminD_base:"mg",unitVitaminD_percent:"%",unitCalcium:"%",unitCalcium_base:"mg",unitCalcium_percent:"%",unitIron:"%",unitIron_base:"mg",unitIron_percent:"%",valueCol1CalorieDiet:2000,valueCol2CalorieDiet:2500,valueCol1DietaryTotalFat:0,valueCol2DietaryTotalFat:0,valueCol1DietarySatFat:0,valueCol2DietarySatFat:0,valueCol1DietaryCholesterol:0,valueCol2DietaryCholesterol:0,valueCol1DietarySodium:0,valueCol2DietarySodium:0,valueCol1DietaryPotassium:0,valueCol2DietaryPotassium:0,valueCol1DietaryTotalCarb:0,valueCol2DietaryTotalCarb:0,valueCol1Dietary:0,valueCol2Dietary:0,textNutritionFacts:"Nutrition Facts",textDailyValues:"Daily Value",textServingSize:"Serving Size:",textServingsPerContainer:"Servings Per Container",textAmountPerServing:"Amount Per Serving",textCalories:"Calories",textFatCalories:"Calories from Fat",textTotalFat:"Total Fat",textSatFat:"Saturated Fat",textTransFat:"Trans Fat",textPolyFat:"Polyunsaturated Fat",textMonoFat:"Monounsaturated Fat",textCholesterol:"Cholesterol",textSodium:"Sodium",textPotassium:"Potassium",textPotassium_2018:"Potas.",textTotalCarb:"Total Carbohydrates",textFibers:"Dietary Fiber",textSugars:"Sugars",textAddedSugars1:"Includes ",textAddedSugars2:" Added Sugars",textProteins:"Protein",textVitaminA:"Vitamin A",textVitaminC:"Vitamin C",textVitaminD:"Vit. D",textCalcium:"Calcium",textIron:"Iron",ingredientList:"None",textPercentDailyPart1:"Percent Daily Values are based on a",textPercentDailyPart2:"calorie diet",textPercentDaily2018VersionPart1:"The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. ",textPercentDaily2018VersionPart2:" calories a day is used for general nutrition advice.",textGoogleAnalyticsEventCategory:"Nutrition Label",textGoogleAnalyticsEventActionUpArrow:"Quantity Up Arrow Clicked",textGoogleAnalyticsEventActionDownArrow:"Quantity Down Arrow Clicked",textGoogleAnalyticsEventActionTextbox:"Quantity Textbox Changed",showLegacyVersion:true};function NutritionLabel(settings,$elem){this.nutritionLabel=null;this.settings=settings;this.$elem=$elem;return this}function cleanSettings(settings){var numericIndex=["width","scrollHeightComparison","scrollHeightPixel","decimalPlacesForNutrition","decimalPlacesForDailyValues","calorieIntake","dailyValueTotalFat","dailyValueSatFat","dailyValueCholesterol","dailyValueSodium","dailyValuePotassium","dailyValueCarb","dailyValueFiber","valueServingSize","valueServingWeightGrams","valueServingPerContainer","valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueCol1CalorieDiet","valueCol2CalorieDiet","valueCol1DietaryTotalFat","valueCol2DietaryTotalFat","valueCol1DietarySatFat","valueCol2DietarySatFat","valueCol1DietaryCholesterol","valueCol2DietaryCholesterol","valueCol1DietarySodium","valueCol2DietarySodium","valueCol1DietaryPotassium","valueCol2DietaryPotassium","valueCol1DietaryTotalCarb","valueCol2DietaryTotalCarb","valueCol1Dietary","valueCol2Dietary","valueServingUnitQuantity","scrollLongItemNamePixel","scrollLongItemNamePixel2018Override","decimalPlacesForQuantityTextbox","valueAddedSugars","dailyValueVitaminD","dailyValueCalcium","dailyValueIron","valueVitaminD"];$.each(settings,function(index,value){if(jQuery.inArray(index,numericIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}}});if(settings.valueServingUnitQuantity<0){settings.valueServingUnitQuantity=0}return settings}function updateNutritionValueWithMultiplier(settings){var nutritionIndex=["valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueServingWeightGrams","valueAddedSugars","valueVitaminD","valuePotassium_2018"];$.each(settings,function(index,value){if(jQuery.inArray(index,nutritionIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}settings[index]=parseFloat(settings[index])*parseFloat(settings.valueServingUnitQuantity)*parseFloat(settings.nutritionValueMultiplier)}});if(parseFloat(settings.valueServingUnitQuantity)==0){settings.valueServingPerContainer=0}else{if(!isNaN(settings.valueServingPerContainer)&&settings.valueServingPerContainer!=undefined){settings.valueServingPerContainer=parseFloat(settings.totalContainerQuantity)/parseFloat(settings.valueServingUnitQuantity)}}return settings}function init(settings,$elem){var $settings=$.extend({},$.fn.nutritionLabel.defaultSettings,settings||{});$settings.totalContainerQuantity=parseFloat($settings.valueServingPerContainer)*parseFloat($settings.valueServingUnitQuantity);var $originalCleanSettings=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,settings||{}));$originalCleanSettings.totalContainerQuantity=parseFloat($originalCleanSettings.valueServingPerContainer)*parseFloat($originalCleanSettings.valueServingUnitQuantity);$settings=cleanSettings($settings);$originalCleanSettings=cleanSettings($originalCleanSettings);$settings.nutritionValueMultiplier=$settings.valueServingUnitQuantity<=0?1:1/$settings.valueServingUnitQuantity;var $updatedsettings=updateNutritionValueWithMultiplier($settings);$settings.originalServingUnitQuantity=$updatedsettings.valueServingUnitQuantity;if($updatedsettings.valueServingUnitQuantity<=0){$originalCleanSettings.valueServingUnitQuantity=1;$updatedsettings=updateNutritionValueWithMultiplier($originalCleanSettings);$updatedsettings.valueServingUnitQuantity=1}var nutritionLabel=new NutritionLabel($updatedsettings,$elem);if($updatedsettings.showLegacyVersion){updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,true,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate(".unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)}})}}else{updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,false,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)}})}}$elem.data("_nutritionLabel",nutritionLabel)}function updateTheSettingsAfterAnEvent($localSettings,localSettings){var $localSettingsHolder=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,localSettings||{}));$localSettingsHolder.originalServingUnitQuantity=$localSettings.originalServingUnitQuantity;$localSettingsHolder.totalContainerQuantity=$localSettings.totalContainerQuantity;$localSettingsHolder.nutritionValueMultiplier=$localSettingsHolder.valueServingUnitQuantity<=0?1:1/$localSettingsHolder.valueServingUnitQuantity;return $localSettingsHolder}function addScrollToItemDiv($elem,$settings,localNameClass,forLegacyLabel){var local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel);if(!forLegacyLabel){local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel2018Override)}if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").val()!=undefined){if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+".inline").css({"margin-left":"3.90em",height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if(forLegacyLabel){if($("#"+$elem.attr("id")+" ."+localNameClass).height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass).css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if($("#"+$elem.attr("id")+" ."+localNameClass+" div").height()>=local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+" div").css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}}}function notApplicableHover($elem){if($elem.attr("id")!==undefined&&$elem.attr("id")!==""){$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$("#"+$elem.attr("id")+" .naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$("#"+$elem.attr("id")+" .naTooltip").hide()})}else{$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$(".naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$(".naTooltip").hide()})}}function updateScrollingFeature($localElem,$localSettings,localIDToScroll,localScrollHeightComparison,localScrollHeight){if($localElem.attr("id")!==undefined&&$localElem.attr("id")!==""){$parentElement=$("#"+$localElem.attr("id")+" #"+localIDToScroll).parent()}else{$parentElement=$("#"+localIDToScroll).parent()}if($parentElement.innerHeight()>localScrollHeightComparison){$parentElement.addClass("scroll").css({height:localScrollHeight+"px"})}}function updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,forInitialization){var ingredientListID="ingredientList";var calcDisclaimerTextID="calcDisclaimerText";var nameElementClass="name";if(!forLegacyLabel){ingredientListID="nf-ingredientList";calcDisclaimerTextID="nf-calcDisclaimerText";nameElementClass="nf-item-name"}if(!forInitialization){$localSettings=updateNutritionValueWithMultiplier($localSettings);nutritionLabel=new NutritionLabel($localSettings,$elem)}if(forLegacyLabel){$elem.html(nutritionLabel.generateLegacy())}else{$elem.html(nutritionLabel.generate2018())}if($localSettings.showIngredients&&$localSettings.scrollLongIngredients){updateScrollingFeature($elem,$localSettings,ingredientListID,$localSettings.scrollHeightComparison,$localSettings.scrollHeightPixel)}if($localSettings.showDisclaimer){updateScrollingFeature($elem,$localSettings,calcDisclaimerTextID,$localSettings.scrollDisclaimerHeightComparison,$localSettings.scrollDisclaimer)}notApplicableHover($elem);if($localSettings.scrollLongItemName){addScrollToItemDiv($elem,$localSettings,nameElementClass,forLegacyLabel)}if(!forInitialization){return $localSettings}}function handleQuantityChange($localSettings,source,previousValue,newValue){var handler;if($localSettings.userFunctionOnQuantityChange){handler=$localSettings.userFunctionOnQuantityChange}else{if($localSettings.userFunctionNameOnQuantityChange){handler=window[$localSettings.userFunctionNameOnQuantityChange]}}if(typeof handler==="function"){handler(source,previousValue,newValue)}}function changeQuantityTextbox($thisTextbox,$localSettings,nutritionLabel,$elem,forLegacyLabel){var nixLabelBeforeQuantityID="nixLabelBeforeQuantity";if(!forLegacyLabel){nixLabelBeforeQuantityID="nf-nixLabelBeforeQuantity"}var previousValue=parseFloat($("#"+$elem.attr("id")+" #"+nixLabelBeforeQuantityID).val());textBoxValue=!regIsPosNumber($thisTextbox.val())?previousValue:parseFloat($thisTextbox.val());$thisTextbox.val(textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=textBoxValue;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionTextbox)}handleQuantityChange($localSettings,"textbox",previousValue.toFixed($localSettings.decimalPlacesForQuantityTextbox),textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox))}function changeQuantityByArrow($thisQuantity,changeValueBy,$localSettings,nutritionLabel,$elem,forLegacyLabel){var unitQuantityBoxClass="unitQuantityBox";if(!forLegacyLabel){unitQuantityBoxClass="nf-unitQuantityBox"}var currentQuantity=parseFloat($thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val());if(isNaN(currentQuantity)){currentQuantity=1}var beforeCurrentQuantityWasChanged=currentQuantity;if(currentQuantity<=1&&changeValueBy==-1){changeValueBy=-0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<1&&changeValueBy==1){changeValueBy=0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<=2&¤tQuantity>1&&changeValueBy==-1){currentQuantity=1}else{currentQuantity+=changeValueBy}}}if(currentQuantity<0){currentQuantity=0}$thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val(currentQuantity.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=currentQuantity;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){if(changeValueBy>0){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionUpArrow)}else{window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionDownArrow)}}handleQuantityChange($localSettings,changeValueBy>0?"up arrow":"down arrow",beforeCurrentQuantityWasChanged,currentQuantity)}function roundToNearestNum(input,nearest){if(nearest<0){return Math.round(input*nearest)/nearest}else{return Math.round(input/nearest)*nearest}}function roundCalories(toRound,decimalPlace){toRound=roundCaloriesRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundFat(toRound,decimalPlace){toRound=roundFatRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundSodium(toRound,decimalPlace){toRound=roundSodiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundPotassium(toRound,decimalPlace){toRound=roundPotassiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundCholesterol(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCholesterolRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 5"}return toRound}function roundCarbFiberSugarProtein(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCarbFiberSugarProteinRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 1"}return toRound}function roundCaloriesRule(toRound){if(toRound<5){return 0}else{if(toRound<=50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundFatRule(toRound){if(toRound<0.5){return 0}else{if(toRound<5){return roundToNearestNum(toRound,0.5)}else{return roundToNearestNum(toRound,1)}}}function roundSodiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundPotassiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundCholesterolRule(toRound){if(toRound<2){return 0}else{if(toRound<=5){return false}else{return roundToNearestNum(toRound,5)}}}function roundCarbFiberSugarProteinRule(toRound){if(toRound<0.5){return 0}else{if(toRound<1){return false}else{return roundToNearestNum(toRound,1)}}}function roundVitaminsCalciumIron(toRound){if(toRound>0){if(toRound<10){return roundToNearestNum(toRound,2)}else{if(toRound<50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}else{return 0}}function regIsPosNumber(fData){return new RegExp("(^[0-9]+[.]?[0-9]+$)|(^[0-9]+$)").test(fData)}function itemNameHtmlLegacy($localSettings){for(x=1;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var tabTemp=localTab1;var localNutritionLabel=itemNameClass="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'

\n';localNutritionLabel+=localTab2+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab2+'
\n\n';tabTemp=localTab2;var itemNameClass="inline"}}localNutritionLabel+=tabTemp+'
';localNutritionLabel+=$localSettings.itemName;if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="
\n";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'
\n\n'}}return localNutritionLabel}function sevingUnitQuantityHtmlLegacy($localSettings){for(x=1;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){localNutritionLabel+=localTab1+'
\n';if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab2+'
\n';localNutritionLabel+=localTab3+'
'+$localSettings.textServingSize+"
\n";localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n";var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="unitHasTextbox";gramsAddedClass="gramsHasTextbox";localNutritionLabel+=localTab3+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab4+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}localNutritionLabel+=localTab3+'
'+$localSettings.valueServingSizeUnit+"
\n"}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab3+'
('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)
\n"}localNutritionLabel+=localTab2+'
\n\n'}else{localServingSizeIsHidden=true}if($localSettings.showServingsPerContainer){if($localSettings.valueServingPerContainer>0){localNutritionLabel+=localTab2+"
"+$localSettings.textServingsPerContainer+" "+parseFloat($localSettings.valueServingPerContainer.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}else{localServingContainerIsHidden=true}}else{localServingContainerIsHidden=true}localNutritionLabel+=localTab1+'
\n\n'}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}function calorieDietHtmlLegacy($localSettings){for(x=2;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab2+'\n';localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";return localNutritionLabel+=localTab2+"
 Calories"+$localSettings.valueCol1CalorieDiet+""+$localSettings.valueCol2CalorieDiet+"
Total FatLess than"+$localSettings.valueCol1DietaryTotalFat+"g"+$localSettings.valueCol2DietaryTotalFat+"g
   Saturated FatLess than"+$localSettings.valueCol1DietarySatFat+"g"+$localSettings.valueCol2DietarySatFat+"g
CholesterolLess than"+$localSettings.valueCol1DietaryCholesterol+"mg"+$localSettings.valueCol2DietaryCholesterol+"mg
SodiumLess than"+$localSettings.valueCol1DietarySodium+"mg"+$localSettings.valueCol2DietarySodium+"mg
PotassiumLess than"+$localSettings.valueCol1DietaryPotassium+"mg"+$localSettings.valueCol2DietaryPotassium+"mg
Total Carbohydrate "+$localSettings.valueCol1DietaryTotalCarb+"g"+$localSettings.valueCol2DietaryTotalCarb+"g
   Dietary "+$localSettings.valueCol1Dietary+"g"+$localSettings.valueCol2Dietary+"g
\n"}function ingredientsHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtmlLegacy($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateAttributeWithoutPercentageHtmlLegacy($localSettings,valueIndex,unitIndex,naIndex,attributeText,localTabValue,lineClass,attributeDisplayType,itemPropValue,localExtraTab,roundFunctionName){var localNaValue='';var localNutritionLabel=localTabValue+'
';if(attributeDisplayType==1){localNutritionLabel+=""+$localSettings[attributeText]+' '}else{if(attributeDisplayType==2){localNutritionLabel+=$localSettings[attributeText]+" "}else{if(attributeDisplayType==3){localNutritionLabel+=localExtraTab+$localSettings[attributeText]+' '}else{if(attributeDisplayType==4){localNutritionLabel+=$localSettings[attributeText]+' '}else{if(attributeDisplayType==5){localNutritionLabel+=localExtraTab+'
\n'}}}}}localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];if(attributeDisplayType==1||attributeDisplayType==4){localNutritionLabel+="
\n"}else{if(attributeDisplayType==2){localNutritionLabel+="
\n"}else{if(attributeDisplayType==3){localNutritionLabel+="\n"+localTabValue+"
\n"}else{if(attributeDisplayType==5){localNutritionLabel+="
\n";localNutritionLabel+=localExtraTab+$localSettings[attributeText]+"\n";localNutritionLabel+=localTabValue+"\n"}}}}return localNutritionLabel}function generateAttributeWithPercentageHtmlLegacy($localSettings,valueIndex,dailyValueIndex,unitIndex,naIndex,attributeTexts,lineClass,itemPropValue,roundFunctionName,roundFunctionRuleName,boldName){for(x=1;x<3;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab2+'
';localNutritionLabel+=$localSettings[naIndex]?localNaValue:""+parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="
\n";if(boldName){localNutritionLabel+=localTab2+""+$localSettings[attributeTexts]+' '}else{localNutritionLabel+=localTab2+$localSettings[attributeTexts]+' '}localNutritionLabel+=($localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex])+"\n";return localNutritionLabel+=localTab1+"
\n"}function generateAttributeHtml2018Version($localSettings,valueIndex,unitIndex,naIndex,attributeText,itemPropValue,topDivClass,showPercentageCode,roundFunctionName,roundFunctionRuleName,labelClass,valueClass,dailyValueIndex){for(x=1;x<4;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';if(showPercentageCode){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="\n"}if(valueIndex!="valueAddedSugars"){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[attributeText];localNutritionLabel+="\n";localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n"}else{localNutritionLabel+=localTab2+'\n';localNutritionLabel+=$localSettings.textAddedSugars1+"\n";localNutritionLabel+=localTab3+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n";localNutritionLabel+=$localSettings.textAddedSugars2;localNutritionLabel+="\n"}return localNutritionLabel+=localTab1+"
\n"}function ingredientsHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtml2018Version($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateHtmlAndComputeValueGivenThePercentage($localSettings,valueIndex,dailyValueIndex,unitIndex_base,unitIndex_percent,naIndex,attributeTexts){var localNaValue='';var localNutritionLabel='
\n';localNutritionLabel+=$localSettings[attributeTexts]+" ";localNutritionLabel+=($localSettings[naIndex]?localNaValue:(parseFloat(($localSettings[valueIndex]/100)*$localSettings[dailyValueIndex]).toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_base]+' '+$localSettings[valueIndex].toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_percent]+""))+"\n";return localNutritionLabel+="
\n"}function itemNameHtml2018($localSettings){for(x=3;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var itemNameClass="";localNutritionLabel="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){var hideArrowsClass="";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden";hideArrowsClass="nf-fixed-serving "}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n\n';var itemNameClass=hideArrowsClass}else{if(!$localSettings.showServingUnitQuantity){itemNameClass+="no-indent"}}}else{itemNameClass+="no-indent"}localNutritionLabel+=localTab3+'
\n';if($localSettings.showServingUnitQuantity&&$localSettings.originalServingUnitQuantity>0&&$localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){localNutritionLabel+=localTab4+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+'('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)\n"}}localNutritionLabel+=localTab4+"
\n";localNutritionLabel+=localTab5+$localSettings.itemName+"\n";if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="\n"+localTab4+"
\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel}function sevingUnitQuantityHtml2018($localSettings){for(x=3;x<7;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab3+"
\n";localNutritionLabel+=localTab4+$localSettings.textServingSize;localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";var servingSizeDivAlreadyClosed=false;var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="nf-unitHasTextbox";gramsAddedClass="nf-gramsHasTextbox";servingSizeDivAlreadyClosed=true;localNutritionLabel+="\n"+localTab3+"
\n\n";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab5+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden"}localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n"}}if(!$localSettings.showItemName){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab6+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}localNutritionLabel+=localTab5+"
\n"}}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";if(($localSettings.valueServingSizeUnit==""||$localSettings.valueServingSizeUnit==null)&&$localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}}}if(!servingSizeDivAlreadyClosed){localNutritionLabel+=localTab3+"\n\n"}}else{localServingSizeIsHidden=true}}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}NutritionLabel.prototype={generateLegacy:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium=$this.settings.naPotassium?false:$this.settings.showPotassium;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminA=$this.settings.naVitaminA?false:$this.settings.showVitaminA;$this.settings.showVitaminC=$this.settings.naVitaminC?false:$this.settings.showVitaminC;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";if($this.settings.showItemName){nutritionLabel+=itemNameHtmlLegacy($this.settings)}var sevingUnitQuantityHtmlLegacyResult=sevingUnitQuantityHtmlLegacy($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtmlLegacyResult.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtmlLegacyResult.servingContainerIsHidden;nutritionLabel+=sevingUnitQuantityHtmlLegacyResult.nutritionLabel;if((!$this.settings.showItemName&&!$this.settings.showServingUnitQuantity)||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)){nutritionLabel+=tab1+'
\n'}nutritionLabel+=tab1+'
\n';if($this.settings.showAmountPerServing){nutritionLabel+=tab1+'
';nutritionLabel+=""+$this.settings.textAmountPerServing+"";nutritionLabel+="
\n"}nutritionLabel+=tab1+'
\n';if($this.settings.showFatCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueFatCalories","unitFatCalories","naFatCalories","textFatCalories",tab2,"fr",2,"","","roundCalories")}if($this.settings.showCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalories","unitCalories","naCalories","textCalories",tab2,"",1,"calories","","roundCalories")}else{if($this.settings.showFatCalories){nutritionLabel+=tab2+"
 
\n"}}nutritionLabel+=tab1+"
\n";nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
';nutritionLabel+="% "+$this.settings.textDailyValues+"*";nutritionLabel+="
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalFat","dailyValueTotalFat","unitTotalFat","naTotalFat","textTotalFat","line","fatContent","roundFat","roundFatRule",true)}if($this.settings.showSatFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSatFat","dailyValueSatFat","unitSatFat","naSatFat","textSatFat","line indent","saturatedFatContent","roundFat","roundFatRule",false)}if($this.settings.showTransFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat",tab1,"line indent",3,"transFatContent",tab2,"roundFat")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueCholesterol","dailyValueCholesterol","unitCholesterol","naCholesterol","textCholesterol","line","cholesterolContent","roundCholesterol","roundCholesterolRule",true)}if($this.settings.showSodium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSodium","dailyValueSodium","unitSodium","naSodium","textSodium","line","sodiumContent","roundSodium","roundSodiumRule",true)}if($this.settings.showPotassium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valuePotassium","dailyValuePotassium","unitPotassium","naPotassium","textPotassium","line","potassiumContent","roundPotassium","roundPotassiumRule",true)}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalCarb","dailyValueCarb","unitTotalCarb","naTotalCarb","textTotalCarb","line","carbohydrateContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",true)}if($this.settings.showFibers){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueFibers","dailyValueFiber","unitFibers","naFibers","textFibers","line indent","fiberContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",false)}if($this.settings.showSugars){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueSugars","unitSugars","naSugars","textSugars",tab1,"line indent",4,"sugarContent","","roundCarbFiberSugarProtein")}if($this.settings.showProteins){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueProteins","unitProteins","naProteins","textProteins",tab1,"line",1,"proteinContent","","roundCarbFiberSugarProtein")}nutritionLabel+=tab1+'
\n';if($this.settings.showVitaminA){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminA","unitVitaminA","naVitaminA","textVitaminA",tab1,"line vitaminA",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showVitaminC){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminC","unitVitaminC","naVitaminC","textVitaminC",tab1,"line vitaminC",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showCalcium){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalcium","unitCalcium","naCalcium","textCalcium",tab1,"line calcium",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showIron){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueIron","unitIron","naIron","textIron",tab1,"line iron",5,"",tab2,"roundVitaminsCalciumIron")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+'* '+$this.settings.textPercentDailyPart1+" "+$this.settings.calorieIntake+" "+$this.settings.textPercentDailyPart2+".\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtmlLegacy($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtmlLegacy($this.settings)}nutritionLabel+=tab2+'
\n\n';if($this.settings.showCalorieDiet){nutritionLabel+=calorieDietHtmlLegacy($this.settings)}nutritionLabel+=tab1+'
\n\n';if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtmlLegacy($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'},generate2018:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium_2018=$this.settings.naPotassium_2018?false:$this.settings.showPotassium_2018;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showAddedSugars=$this.settings.naAddedSugars?false:$this.settings.showAddedSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminD=$this.settings.naVitaminD?false:$this.settings.showVitaminD;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";var sevingUnitQuantityHtml2018Result=sevingUnitQuantityHtml2018($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtml2018Result.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtml2018Result.servingContainerIsHidden;var showLineDiv=$this.settings.showItemName||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)||(!$this.settings.showItemName&&$this.settings.originalServingUnitQuantity>0&&$this.settings.valueServingWeightGrams>0)||($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0);if(showLineDiv){nutritionLabel+=tab1+'
\n'}if($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0){nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+parseFloat($this.settings.valueServingPerContainer.toFixed($this.settings.decimalPlacesForNutrition));nutritionLabel+=" "+$this.settings.textServingsPerContainer+"\n";nutritionLabel+=tab2+"
\n\n"}nutritionLabel+=tab2+'
\n';nutritionLabel+=sevingUnitQuantityHtml2018Result.nutritionLabel;if($this.settings.showItemName){nutritionLabel+=itemNameHtml2018($this.settings)}nutritionLabel+=tab2+'
\n\n';if(showLineDiv){nutritionLabel+=tab1+'
\n\n'}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
Amount per serving
\n';if($this.settings.showCalories){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCalories","unitCalories","naCalories","textCalories","calories","nf-calories",false,"roundCalories","","","nf-pr","")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'% Daily Value*\n';nutritionLabel+=tab1+"
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalFat","unitTotalFat","naTotalFat","textTotalFat","fatContent","nf-line",true,"roundFat","roundFatRule","nf-highlight","","dailyValueTotalFat")}if($this.settings.showSatFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSatFat","unitSatFat","naSatFat","textSatFat","saturatedFatContent","nf-line nf-indent",true,"roundFat","roundFatRule","","","dailyValueSatFat")}if($this.settings.showTransFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat","transFatContent","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCholesterol","unitCholesterol","naCholesterol","textCholesterol","cholesterolContent","nf-line",true,"roundCholesterol","roundCholesterolRule","nf-highlight","","dailyValueCholesterol")}if($this.settings.showSodium){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSodium","unitSodium","naSodium","textSodium","cholesterolContent","nf-line",true,"roundSodium","roundSodiumRule","nf-highlight","","dailyValueSodium")}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalCarb","unitTotalCarb","naTotalCarb","textTotalCarb","carbohydrateContent","nf-line",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","nf-highlight","","dailyValueCarb")}if($this.settings.showFibers){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueFibers","unitFibers","naFibers","textFibers","fiberContent","nf-line nf-indent",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueFiber")}if($this.settings.showSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSugars","unitSugars","naSugars","textSugars","sugarContent","nf-line nf-indent",false,"roundCarbFiberSugarProtein","","","","")}if($this.settings.showAddedSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueAddedSugars","unitAddedSugars","naAddedSugars","textAddedSugars1","","nf-line nf-indent2",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueAddedSugar")}if($this.settings.showProteins){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueProteins","unitProteins","naProteins","textProteins","proteinContent","nf-line",false,"roundCarbFiberSugarProtein","","nf-highlight","","")}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n'}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab2+'
\n';if($this.settings.showVitaminD){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueVitaminD","dailyValueVitaminD","unitVitaminD_base","unitVitaminD_percent","naVitaminD","textVitaminD")}if($this.settings.showCalcium){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueCalcium","dailyValueCalcium","unitCalcium_base","unitCalcium_percent","naCalcium","textCalcium")}if($this.settings.showIron){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueIron","dailyValueIron","unitIron_base","unitIron_percent","naIron","textIron")}if($this.settings.showPotassium_2018){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valuePotassium_2018","dailyValuePotassium_2018","unitPotassium_base","unitPotassium_percent","naPotassium_2018","textPotassium_2018")}nutritionLabel+=tab2+"
\n"}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+"
\n"}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+$this.settings.textPercentDaily2018VersionPart1;nutritionLabel+=$this.settings.calorieIntake;nutritionLabel+=$this.settings.textPercentDaily2018VersionPart2+"\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtml2018Version($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtml2018Version($this.settings)}nutritionLabel+=tab1+"
\n";if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtml2018Version($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'}}})(jQuery); \ No newline at end of file +;(function($){$.fn.nutritionLabel=function(option,settings){if(typeof option==="object"){settings=option;init(settings,$(this))}else{if(typeof option==="string"&&option!==""){if(option==="destroy"){new NutritionLabel().destroy($(this))}else{if(option==="hide"){new NutritionLabel().hide($(this))}else{if(option==="show"){new NutritionLabel().show($(this))}else{var values=[];var elements=this.each(function(){var data=$(this).data("_nutritionLabel");if(data){if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){data.settings[option]=settings;init(data.settings,$(this))}else{values.push(data.settings[option])}}}else{if($.fn.nutritionLabel.defaultSettings[option]!==undefined){if(settings!==undefined){$.fn.nutritionLabel.defaultSettings[option]=settings;init(null,$(this))}}}});if(values.length===1){return values[0]}return values.length>0?values:elements}}}}else{if(typeof option==="undefined"||option===""){init(settings,$(this))}}}};$.fn.nutritionLabel.defaultSettings={width:280,allowCustomWidth:false,widthCustom:"auto",allowNoBorder:false,allowFDARounding:false,allowGoogleAnalyticsEventLog:false,gooleAnalyticsFunctionName:"ga",userFunctionNameOnQuantityChange:null,userFunctionOnQuantityChange:null,hideNotApplicableValues:false,brandName:"Brand where this item belongs to",scrollLongIngredients:false,scrollHeightComparison:100,scrollHeightPixel:95,decimalPlacesForNutrition:1,decimalPlacesForDailyValues:0,decimalPlacesForQuantityTextbox:1,scrollLongItemName:true,scrollLongItemNamePixel:36,scrollLongItemNamePixel2018Override:32,showBottomLink:false,urlBottomLink:"http://www.nutritionix.com",nameBottomLink:"Nutritionix",valueServingUnitQuantity:1,valueServingSizeUnit:"",showServingUnitQuantityTextbox:true,itemName:"Item / Ingredient Name",showServingUnitQuantity:true,hideTextboxArrows:false,originalServingUnitQuantity:0,nutritionValueMultiplier:1,totalContainerQuantity:1,calorieIntake:2000,dailyValueTotalFat:65,dailyValueSatFat:20,dailyValueCholesterol:300,dailyValueSodium:2400,dailyValuePotassium:3500,dailyValuePotassium_2018:4700,dailyValueCarb:300,dailyValueFiber:25,dailyValueCalcium:1300,dailyValueIron:18,dailyValueVitaminD:20,dailyValueAddedSugar:50,showCalories:true,showFatCalories:true,showTotalFat:true,showSatFat:true,showTransFat:true,showPolyFat:false,showMonoFat:false,showCholesterol:true,showSodium:true,showPotassium:false,showPotassium_2018:true,showTotalCarb:true,showFibers:true,showSugars:true,showAddedSugars:true,showProteins:true,showVitaminA:true,showVitaminC:true,showVitaminD:true,showCalcium:true,showIron:true,showAmountPerServing:true,showServingsPerContainer:false,showItemName:true,showBrandName:false,showIngredients:true,showCalorieDiet:false,showCustomFooter:false,showDisclaimer:false,scrollDisclaimerHeightComparison:100,scrollDisclaimer:95,valueDisclaimer:"Please note that these nutrition values are estimated based on our standard serving portions. As food servings may have a slight variance each time you visit, please expect these values to be with in 10% +/- of your actual meal. If you have any questions about our nutrition calculator, please contact Nutritionix.",ingredientLabel:"INGREDIENTS:",valueCustomFooter:"",naCalories:false,naFatCalories:false,naTotalFat:false,naSatFat:false,naTransFat:false,naPolyFat:false,naMonoFat:false,naCholesterol:false,naSodium:false,naPotassium:false,naPotassium_2018:false,naTotalCarb:false,naFibers:false,naSugars:false,naAddedSugars:false,naProteins:false,naVitaminA:false,naVitaminC:false,naVitaminD:false,naCalcium:false,naIron:false,valueServingWeightGrams:0,valueServingPerContainer:1,valueCalories:0,valueFatCalories:0,valueTotalFat:0,valueSatFat:0,valueTransFat:0,valuePolyFat:0,valueMonoFat:0,valueCholesterol:0,valueSodium:0,valuePotassium:0,valuePotassium_2018:0,valueTotalCarb:0,valueFibers:0,valueSugars:0,valueAddedSugars:0,valueProteins:0,valueVitaminA:0,valueVitaminC:0,valueVitaminD:0,valueCalcium:0,valueIron:0,unitCalories:"",unitFatCalories:"",unitTotalFat:"g",unitSatFat:"g",unitTransFat:"g",unitPolyFat:"g",unitMonoFat:"g",unitCholesterol:"mg",unitSodium:"mg",unitPotassium:"mg",unitPotassium_base:"mg",unitPotassium_percent:"%",unitTotalCarb:"g",unitFibers:"g",unitSugars:"g",unitAddedSugars:"g",unitProteins:"g",unitVitaminA:"%",unitVitaminC:"%",unitVitaminD_base:"mcg",unitVitaminD_percent:"%",unitCalcium:"%",unitCalcium_base:"mg",unitCalcium_percent:"%",unitIron:"%",unitIron_base:"mg",unitIron_percent:"%",valueCol1CalorieDiet:2000,valueCol2CalorieDiet:2500,valueCol1DietaryTotalFat:0,valueCol2DietaryTotalFat:0,valueCol1DietarySatFat:0,valueCol2DietarySatFat:0,valueCol1DietaryCholesterol:0,valueCol2DietaryCholesterol:0,valueCol1DietarySodium:0,valueCol2DietarySodium:0,valueCol1DietaryPotassium:0,valueCol2DietaryPotassium:0,valueCol1DietaryTotalCarb:0,valueCol2DietaryTotalCarb:0,valueCol1Dietary:0,valueCol2Dietary:0,textNutritionFacts:"Nutrition Facts",textDailyValues:"Daily Value",textServingSize:"Serving Size:",textServingsPerContainer:"Servings Per Container",textAmountPerServing:"Amount Per Serving",textCalories:"Calories",textFatCalories:"Calories from Fat",textTotalFat:"Total Fat",textSatFat:"Saturated Fat",textTransFat:"Trans Fat",textPolyFat:"Polyunsaturated Fat",textMonoFat:"Monounsaturated Fat",textCholesterol:"Cholesterol",textSodium:"Sodium",textPotassium:"Potassium",textPotassium_2018:"Potas.",textTotalCarb:"Total Carbohydrates",textFibers:"Dietary Fiber",textSugars:"Sugars",textAddedSugars1:"Includes ",textAddedSugars2:" Added Sugars",textProteins:"Protein",textVitaminA:"Vitamin A",textVitaminC:"Vitamin C",textVitaminD:"Vit. D",textCalcium:"Calcium",textIron:"Iron",ingredientList:"None",textPercentDailyPart1:"Percent Daily Values are based on a",textPercentDailyPart2:"calorie diet",textPercentDaily2018VersionPart1:"The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. ",textPercentDaily2018VersionPart2:" calories a day is used for general nutrition advice.",textGoogleAnalyticsEventCategory:"Nutrition Label",textGoogleAnalyticsEventActionUpArrow:"Quantity Up Arrow Clicked",textGoogleAnalyticsEventActionDownArrow:"Quantity Down Arrow Clicked",textGoogleAnalyticsEventActionTextbox:"Quantity Textbox Changed",showLegacyVersion:true};function NutritionLabel(settings,$elem){this.nutritionLabel=null;this.settings=settings;this.$elem=$elem;return this}function cleanSettings(settings){var numericIndex=["width","scrollHeightComparison","scrollHeightPixel","decimalPlacesForNutrition","decimalPlacesForDailyValues","calorieIntake","dailyValueTotalFat","dailyValueSatFat","dailyValueCholesterol","dailyValueSodium","dailyValuePotassium","dailyValueCarb","dailyValueFiber","valueServingSize","valueServingWeightGrams","valueServingPerContainer","valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueCol1CalorieDiet","valueCol2CalorieDiet","valueCol1DietaryTotalFat","valueCol2DietaryTotalFat","valueCol1DietarySatFat","valueCol2DietarySatFat","valueCol1DietaryCholesterol","valueCol2DietaryCholesterol","valueCol1DietarySodium","valueCol2DietarySodium","valueCol1DietaryPotassium","valueCol2DietaryPotassium","valueCol1DietaryTotalCarb","valueCol2DietaryTotalCarb","valueCol1Dietary","valueCol2Dietary","valueServingUnitQuantity","scrollLongItemNamePixel","scrollLongItemNamePixel2018Override","decimalPlacesForQuantityTextbox","valueAddedSugars","dailyValueVitaminD","dailyValueCalcium","dailyValueIron","valueVitaminD"];$.each(settings,function(index,value){if(jQuery.inArray(index,numericIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}}});if(settings.valueServingUnitQuantity<0){settings.valueServingUnitQuantity=0}return settings}function updateNutritionValueWithMultiplier(settings){var nutritionIndex=["valueCalories","valueFatCalories","valueTotalFat","valueSatFat","valueTransFat","valuePolyFat","valueMonoFat","valueCholesterol","valueSodium","valuePotassium","valueTotalCarb","valueFibers","valueSugars","valueProteins","valueVitaminA","valueVitaminC","valueCalcium","valueIron","valueServingWeightGrams","valueAddedSugars","valueVitaminD","valuePotassium_2018"];$.each(settings,function(index,value){if(jQuery.inArray(index,nutritionIndex)!==-1){settings[index]=parseFloat(settings[index]);if(isNaN(settings[index])||settings[index]===undefined){settings[index]=0}settings[index]=parseFloat(settings[index])*parseFloat(settings.valueServingUnitQuantity)*parseFloat(settings.nutritionValueMultiplier)}});if(parseFloat(settings.valueServingUnitQuantity)==0){settings.valueServingPerContainer=0}else{if(!isNaN(settings.valueServingPerContainer)&&settings.valueServingPerContainer!=undefined){settings.valueServingPerContainer=parseFloat(settings.totalContainerQuantity)/parseFloat(settings.valueServingUnitQuantity)}}return settings}function init(settings,$elem){var $settings=$.extend({},$.fn.nutritionLabel.defaultSettings,settings||{});$settings.totalContainerQuantity=parseFloat($settings.valueServingPerContainer)*parseFloat($settings.valueServingUnitQuantity);var $originalCleanSettings=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,settings||{}));$originalCleanSettings.totalContainerQuantity=parseFloat($originalCleanSettings.valueServingPerContainer)*parseFloat($originalCleanSettings.valueServingUnitQuantity);$settings=cleanSettings($settings);$originalCleanSettings=cleanSettings($originalCleanSettings);$settings.nutritionValueMultiplier=$settings.valueServingUnitQuantity<=0?1:1/$settings.valueServingUnitQuantity;var $updatedsettings=updateNutritionValueWithMultiplier($settings);$settings.originalServingUnitQuantity=$updatedsettings.valueServingUnitQuantity;if($updatedsettings.valueServingUnitQuantity<=0){$originalCleanSettings.valueServingUnitQuantity=1;$updatedsettings=updateNutritionValueWithMultiplier($originalCleanSettings);$updatedsettings.valueServingUnitQuantity=1}var nutritionLabel=new NutritionLabel($updatedsettings,$elem);if($updatedsettings.showLegacyVersion){updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,true,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate(".unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)});$("#"+$elem.attr("id")).delegate(".unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,true)}})}}else{updateValuesAfterAQuantityChanged($settings,nutritionLabel,$elem,false,true);if($settings.showServingUnitQuantityTextbox){$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityUp","click",function(e){e.preventDefault();changeQuantityByArrow($(this),1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate("div.nf-unitQuantityDown","click",function(e){e.preventDefault();changeQuantityByArrow($(this),-1,updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","change",function(e){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)});$("#"+$elem.attr("id")).delegate(".nf-unitQuantityBox","keydown",function(e){if(e.keyCode==13){e.preventDefault();changeQuantityTextbox($(this),updateTheSettingsAfterAnEvent($settings,settings),nutritionLabel,$elem,false)}})}}$elem.data("_nutritionLabel",nutritionLabel)}function updateTheSettingsAfterAnEvent($localSettings,localSettings){var $localSettingsHolder=cleanSettings($.extend({},$.fn.nutritionLabel.defaultSettings,localSettings||{}));$localSettingsHolder.originalServingUnitQuantity=$localSettings.originalServingUnitQuantity;$localSettingsHolder.totalContainerQuantity=$localSettings.totalContainerQuantity;$localSettingsHolder.nutritionValueMultiplier=$localSettingsHolder.valueServingUnitQuantity<=0?1:1/$localSettingsHolder.valueServingUnitQuantity;return $localSettingsHolder}function addScrollToItemDiv($elem,$settings,localNameClass,forLegacyLabel){var local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel);if(!forLegacyLabel){local_scrollLongItemNamePixel=parseInt($settings.scrollLongItemNamePixel2018Override)}if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").val()!=undefined){if($("#"+$elem.attr("id")+" ."+localNameClass+".inline").height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+".inline").css({"margin-left":"3.90em",height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if(forLegacyLabel){if($("#"+$elem.attr("id")+" ."+localNameClass).height()>local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass).css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}else{if($("#"+$elem.attr("id")+" ."+localNameClass+" div").height()>=local_scrollLongItemNamePixel+1){$("#"+$elem.attr("id")+" ."+localNameClass+" div").css({height:local_scrollLongItemNamePixel+"px","overflow-y":"auto"})}}}}function notApplicableHover($elem){if($elem.attr("id")!==undefined&&$elem.attr("id")!==""){$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$("#"+$elem.attr("id")+" .naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$("#"+$elem.attr("id")+" .naTooltip").hide()})}else{$("#"+$elem.attr("id")+" .notApplicable").hover(function(){$(".naTooltip").css({top:$(this).position().top+"px",left:$(this).position().left+10+"px"}).show()},function(){$(".naTooltip").hide()})}}function updateScrollingFeature($localElem,$localSettings,localIDToScroll,localScrollHeightComparison,localScrollHeight){if($localElem.attr("id")!==undefined&&$localElem.attr("id")!==""){$parentElement=$("#"+$localElem.attr("id")+" #"+localIDToScroll).parent()}else{$parentElement=$("#"+localIDToScroll).parent()}if($parentElement.innerHeight()>localScrollHeightComparison){$parentElement.addClass("scroll").css({height:localScrollHeight+"px"})}}function updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,forInitialization){var ingredientListID="ingredientList";var calcDisclaimerTextID="calcDisclaimerText";var nameElementClass="name";if(!forLegacyLabel){ingredientListID="nf-ingredientList";calcDisclaimerTextID="nf-calcDisclaimerText";nameElementClass="nf-item-name"}if(!forInitialization){$localSettings=updateNutritionValueWithMultiplier($localSettings);nutritionLabel=new NutritionLabel($localSettings,$elem)}if(forLegacyLabel){$elem.html(nutritionLabel.generateLegacy())}else{$elem.html(nutritionLabel.generate2018())}if($localSettings.showIngredients&&$localSettings.scrollLongIngredients){updateScrollingFeature($elem,$localSettings,ingredientListID,$localSettings.scrollHeightComparison,$localSettings.scrollHeightPixel)}if($localSettings.showDisclaimer){updateScrollingFeature($elem,$localSettings,calcDisclaimerTextID,$localSettings.scrollDisclaimerHeightComparison,$localSettings.scrollDisclaimer)}notApplicableHover($elem);if($localSettings.scrollLongItemName){addScrollToItemDiv($elem,$localSettings,nameElementClass,forLegacyLabel)}if(!forInitialization){return $localSettings}}function handleQuantityChange($localSettings,source,previousValue,newValue){var handler;if($localSettings.userFunctionOnQuantityChange){handler=$localSettings.userFunctionOnQuantityChange}else{if($localSettings.userFunctionNameOnQuantityChange){handler=window[$localSettings.userFunctionNameOnQuantityChange]}}if(typeof handler==="function"){handler(source,previousValue,newValue)}}function changeQuantityTextbox($thisTextbox,$localSettings,nutritionLabel,$elem,forLegacyLabel){var nixLabelBeforeQuantityID="nixLabelBeforeQuantity";if(!forLegacyLabel){nixLabelBeforeQuantityID="nf-nixLabelBeforeQuantity"}var previousValue=parseFloat($("#"+$elem.attr("id")+" #"+nixLabelBeforeQuantityID).val());textBoxValue=!regIsPosNumber($thisTextbox.val())?previousValue:parseFloat($thisTextbox.val());$thisTextbox.val(textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=textBoxValue;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionTextbox)}handleQuantityChange($localSettings,"textbox",previousValue.toFixed($localSettings.decimalPlacesForQuantityTextbox),textBoxValue.toFixed($localSettings.decimalPlacesForQuantityTextbox))}function changeQuantityByArrow($thisQuantity,changeValueBy,$localSettings,nutritionLabel,$elem,forLegacyLabel){var unitQuantityBoxClass="unitQuantityBox";if(!forLegacyLabel){unitQuantityBoxClass="nf-unitQuantityBox"}var currentQuantity=parseFloat($thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val());if(isNaN(currentQuantity)){currentQuantity=1}var beforeCurrentQuantityWasChanged=currentQuantity;if(currentQuantity<=1&&changeValueBy==-1){changeValueBy=-0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<1&&changeValueBy==1){changeValueBy=0.5;currentQuantity+=changeValueBy}else{if(currentQuantity<=2&¤tQuantity>1&&changeValueBy==-1){currentQuantity=1}else{currentQuantity+=changeValueBy}}}if(currentQuantity<0){currentQuantity=0}$thisQuantity.parent().parent().find("input."+unitQuantityBoxClass).val(currentQuantity.toFixed($localSettings.decimalPlacesForQuantityTextbox));$localSettings.valueServingUnitQuantity=currentQuantity;$localSettings=updateValuesAfterAQuantityChanged($localSettings,nutritionLabel,$elem,forLegacyLabel,false);if($localSettings.allowGoogleAnalyticsEventLog){if(changeValueBy>0){window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionUpArrow)}else{window[$localSettings.gooleAnalyticsFunctionName]("send","event",$localSettings.textGoogleAnalyticsEventCategory,$localSettings.textGoogleAnalyticsEventActionDownArrow)}}handleQuantityChange($localSettings,changeValueBy>0?"up arrow":"down arrow",beforeCurrentQuantityWasChanged,currentQuantity)}function roundToNearestNum(input,nearest){if(nearest<0){return Math.round(input*nearest)/nearest}else{return Math.round(input/nearest)*nearest}}function roundCalories(toRound,decimalPlace){toRound=roundCaloriesRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundFat(toRound,decimalPlace){toRound=roundFatRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundSodium(toRound,decimalPlace){toRound=roundSodiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundPotassium(toRound,decimalPlace){toRound=roundPotassiumRule(toRound);if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}return toRound}function roundCholesterol(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCholesterolRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 5"}return toRound}function roundCarbFiberSugarProtein(toRound,decimalPlace){var normalVersion=true;var roundResult=roundCarbFiberSugarProteinRule(toRound);if(roundResult===false){normalVersion=false}else{toRound=roundResult}if(normalVersion){if(toRound>0){toRound=parseFloat(toRound.toFixed(decimalPlace))}}else{toRound="< 1"}return toRound}function roundCaloriesRule(toRound){if(toRound<5){return 0}else{if(toRound<=50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundFatRule(toRound){if(toRound<0.5){return 0}else{if(toRound<5){return roundToNearestNum(toRound,0.5)}else{return roundToNearestNum(toRound,1)}}}function roundSodiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundPotassiumRule(toRound){if(toRound<5){return 0}else{if(toRound<=140){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}function roundCholesterolRule(toRound){if(toRound<2){return 0}else{if(toRound<=5){return false}else{return roundToNearestNum(toRound,5)}}}function roundCarbFiberSugarProteinRule(toRound){if(toRound<0.5){return 0}else{if(toRound<1){return false}else{return roundToNearestNum(toRound,1)}}}function roundVitaminsCalciumIron(toRound){if(toRound>0){if(toRound<10){return roundToNearestNum(toRound,2)}else{if(toRound<50){return roundToNearestNum(toRound,5)}else{return roundToNearestNum(toRound,10)}}}else{return 0}}function regIsPosNumber(fData){return new RegExp("(^[0-9]+[.]?[0-9]+$)|(^[0-9]+$)").test(fData)}function itemNameHtmlLegacy($localSettings){for(x=1;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var tabTemp=localTab1;var localNutritionLabel=itemNameClass="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'
\n';localNutritionLabel+=localTab2+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab2+'
\n\n';tabTemp=localTab2;var itemNameClass="inline"}}localNutritionLabel+=tabTemp+'
';localNutritionLabel+=$localSettings.itemName;if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="
\n";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){localNutritionLabel+=localTab1+'
\n\n'}}return localNutritionLabel}function sevingUnitQuantityHtmlLegacy($localSettings){for(x=1;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){localNutritionLabel+=localTab1+'
\n';if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab2+'
\n';localNutritionLabel+=localTab3+'
'+$localSettings.textServingSize+"
\n";localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n";var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="unitHasTextbox";gramsAddedClass="gramsHasTextbox";localNutritionLabel+=localTab3+'
\n';var textboxClass="unitQuantityBox";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab4+'
\n\n'}else{textboxClass="unitQuantityBox arrowsAreHidden"}localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab4+'\n';localNutritionLabel+=localTab3+'
\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}localNutritionLabel+=localTab3+'
'+$localSettings.valueServingSizeUnit+"
\n"}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=localTab3+'
'+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}}if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab3+'
('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)
\n"}localNutritionLabel+=localTab2+'
\n\n'}else{localServingSizeIsHidden=true}if($localSettings.showServingsPerContainer){if($localSettings.valueServingPerContainer>0){localNutritionLabel+=localTab2+"
"+$localSettings.textServingsPerContainer+" "+parseFloat($localSettings.valueServingPerContainer.toFixed($localSettings.decimalPlacesForNutrition))+"
\n"}else{localServingContainerIsHidden=true}}else{localServingContainerIsHidden=true}localNutritionLabel+=localTab1+'
\n\n'}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}function calorieDietHtmlLegacy($localSettings){for(x=2;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab2+'\n';localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab3+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab5+"\n";localNutritionLabel+=localTab4+"\n";localNutritionLabel+=localTab3+"\n";return localNutritionLabel+=localTab2+"
 Calories"+$localSettings.valueCol1CalorieDiet+""+$localSettings.valueCol2CalorieDiet+"
Total FatLess than"+$localSettings.valueCol1DietaryTotalFat+"g"+$localSettings.valueCol2DietaryTotalFat+"g
   Saturated FatLess than"+$localSettings.valueCol1DietarySatFat+"g"+$localSettings.valueCol2DietarySatFat+"g
CholesterolLess than"+$localSettings.valueCol1DietaryCholesterol+"mg"+$localSettings.valueCol2DietaryCholesterol+"mg
SodiumLess than"+$localSettings.valueCol1DietarySodium+"mg"+$localSettings.valueCol2DietarySodium+"mg
PotassiumLess than"+$localSettings.valueCol1DietaryPotassium+"mg"+$localSettings.valueCol2DietaryPotassium+"mg
Total Carbohydrate "+$localSettings.valueCol1DietaryTotalCarb+"g"+$localSettings.valueCol2DietaryTotalCarb+"g
   Dietary "+$localSettings.valueCol1Dietary+"g"+$localSettings.valueCol2Dietary+"g
\n"}function ingredientsHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtmlLegacy($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtmlLegacy($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateAttributeWithoutPercentageHtmlLegacy($localSettings,valueIndex,unitIndex,naIndex,attributeText,localTabValue,lineClass,attributeDisplayType,itemPropValue,localExtraTab,roundFunctionName){var localNaValue='';var localNutritionLabel=localTabValue+'
';if(attributeDisplayType==1){localNutritionLabel+=""+$localSettings[attributeText]+' '}else{if(attributeDisplayType==2){localNutritionLabel+=$localSettings[attributeText]+" "}else{if(attributeDisplayType==3){localNutritionLabel+=localExtraTab+$localSettings[attributeText]+' '}else{if(attributeDisplayType==4){localNutritionLabel+=$localSettings[attributeText]+' '}else{if(attributeDisplayType==5){localNutritionLabel+=localExtraTab+'
\n'}}}}}localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];if(attributeDisplayType==1||attributeDisplayType==4){localNutritionLabel+="
\n"}else{if(attributeDisplayType==2){localNutritionLabel+="
\n"}else{if(attributeDisplayType==3){localNutritionLabel+="\n"+localTabValue+"\n"}else{if(attributeDisplayType==5){localNutritionLabel+="\n";localNutritionLabel+=localExtraTab+$localSettings[attributeText]+"\n";localNutritionLabel+=localTabValue+"\n"}}}}return localNutritionLabel}function generateAttributeWithPercentageHtmlLegacy($localSettings,valueIndex,dailyValueIndex,unitIndex,naIndex,attributeTexts,lineClass,itemPropValue,roundFunctionName,roundFunctionRuleName,boldName){for(x=1;x<3;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab2+'
';localNutritionLabel+=$localSettings[naIndex]?localNaValue:""+parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="
\n";if(boldName){localNutritionLabel+=localTab2+""+$localSettings[attributeTexts]+' '}else{localNutritionLabel+=localTab2+$localSettings[attributeTexts]+' '}localNutritionLabel+=($localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex])+"\n";return localNutritionLabel+=localTab1+"
\n"}function generateAttributeHtml2018Version($localSettings,valueIndex,unitIndex,naIndex,attributeText,itemPropValue,topDivClass,showPercentageCode,roundFunctionName,roundFunctionRuleName,labelClass,valueClass,dailyValueIndex){for(x=1;x<4;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNaValue='';var localNutritionLabel=localTab1+'
\n';if(showPercentageCode){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:parseFloat(parseFloat((($localSettings.allowFDARounding?eval(roundFunctionRuleName)($localSettings[valueIndex]):$localSettings[valueIndex])/($localSettings[dailyValueIndex]==0?1:$localSettings[dailyValueIndex]*(parseFloat($localSettings.calorieIntake)/2000).toFixed(2)))*100).toFixed($localSettings.decimalPlacesForDailyValues))+"%";localNutritionLabel+="\n"}if(valueIndex!="valueAddedSugars"){localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[attributeText];localNutritionLabel+="\n";localNutritionLabel+=localTab2+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n"}else{localNutritionLabel+=localTab2+'\n';localNutritionLabel+=$localSettings.textAddedSugars1+"\n";localNutritionLabel+=localTab3+'';localNutritionLabel+=$localSettings[naIndex]?localNaValue:($localSettings.allowFDARounding?eval(roundFunctionName)($localSettings[valueIndex],$localSettings.decimalPlacesForNutrition):parseFloat($localSettings[valueIndex].toFixed($localSettings.decimalPlacesForNutrition)))+$localSettings[unitIndex];localNutritionLabel+="\n";localNutritionLabel+=$localSettings.textAddedSugars2;localNutritionLabel+="\n"}return localNutritionLabel+=localTab1+"
\n"}function ingredientsHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.ingredientLabel+"\n";localNutritionLabel+=localTab4+$localSettings.ingredientList+"\n";return localNutritionLabel+=localTab3+'
\n\n'}function disclaimerHtml2018Version($localSettings){for(x=3;x<5;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localNutritionLabel=localTab3+"
\n\n";localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+''+$localSettings.valueDisclaimer+"\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel+=localTab3+"
\n\n"}function bottomLinkHtml2018Version($localSettings,localTab1){var localNutritionLabel=localTab1+'
\n';localNutritionLabel+=localTab1+''+$localSettings.nameBottomLink+"\n";return localNutritionLabel+=localTab1+'
\n'}function generateHtmlAndComputeValueGivenThePercentage($localSettings,valueIndex,dailyValueIndex,unitIndex_base,unitIndex_percent,naIndex,attributeTexts){var localNaValue='';var localNutritionLabel='
\n';localNutritionLabel+=$localSettings[attributeTexts]+" ";localNutritionLabel+=($localSettings[naIndex]?localNaValue:(parseFloat(($localSettings[valueIndex]/100)*$localSettings[dailyValueIndex]).toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_base]+' '+$localSettings[valueIndex].toFixed($localSettings.decimalPlacesForDailyValues)+$localSettings[unitIndex_percent]+""))+"\n";return localNutritionLabel+="
\n"}function itemNameHtml2018($localSettings){for(x=3;x<6;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var itemNameClass="";localNutritionLabel="";if($localSettings.showServingUnitQuantityTextbox){if(($localSettings.valueServingSizeUnit==null||$localSettings.valueServingSizeUnit=="")||($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null&&$localSettings.originalServingUnitQuantity<=0)){var hideArrowsClass="";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab3+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab4+'
\n';localNutritionLabel+=localTab3+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden";hideArrowsClass="nf-fixed-serving "}localNutritionLabel+=localTab3+'\n';localNutritionLabel+=localTab3+'\n\n';var itemNameClass=hideArrowsClass}else{if(!$localSettings.showServingUnitQuantity){itemNameClass+="no-indent"}}}else{itemNameClass+="no-indent"}localNutritionLabel+=localTab3+'
\n';if($localSettings.showServingUnitQuantity&&$localSettings.originalServingUnitQuantity>0&&$localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){localNutritionLabel+=localTab4+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+'('+parseFloat($localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForNutrition))+"g)\n"}}localNutritionLabel+=localTab4+"
\n";localNutritionLabel+=localTab5+$localSettings.itemName+"\n";if($localSettings.showBrandName&&$localSettings.brandName!=null&&$localSettings.brandName!=""){localNutritionLabel+=" - "+$localSettings.brandName}localNutritionLabel+="\n"+localTab4+"
\n";localNutritionLabel+=localTab3+"
\n";return localNutritionLabel}function sevingUnitQuantityHtml2018($localSettings){for(x=3;x<7;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var localTab"+x+' = "'+tab+'";')}var localServingSizeIsHidden=localServingContainerIsHidden=false;var localNutritionLabel="";if($localSettings.showServingUnitQuantity){if($localSettings.originalServingUnitQuantity>0){localNutritionLabel+=localTab3+"
\n";localNutritionLabel+=localTab4+$localSettings.textServingSize;localNutritionLabel+=$localSettings.showServingUnitQuantityTextbox?"":' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";var servingSizeDivAlreadyClosed=false;var unitAddedClass="";var gramsAddedClass="";if($localSettings.valueServingSizeUnit!==""&&$localSettings.valueServingSizeUnit!==null){if($localSettings.showServingUnitQuantityTextbox&&$localSettings.valueServingSizeUnit!=null&&$localSettings.valueServingSizeUnit!=""){unitAddedClass="nf-unitHasTextbox";gramsAddedClass="nf-gramsHasTextbox";servingSizeDivAlreadyClosed=true;localNutritionLabel+="\n"+localTab3+"
\n\n";var textboxClass="nf-unitQuantityBox nf-modifier-field";if(!$localSettings.hideTextboxArrows){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab6+'
\n';localNutritionLabel+=localTab5+'
\n\n'}else{textboxClass="nf-unitQuantityBox nf-modifier-field nf-arrowsAreHidden"}localNutritionLabel+=localTab5+'\n';localNutritionLabel+=localTab5+'\n\n'}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n"}}if(!$localSettings.showItemName){localNutritionLabel+=localTab5+'
\n';localNutritionLabel+=localTab6+$localSettings.valueServingSizeUnit+"\n";if($localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab6+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}localNutritionLabel+=localTab5+"
\n"}}else{if($localSettings.originalServingUnitQuantity>0&&$localSettings.showServingUnitQuantityTextbox){localNutritionLabel+=' '+parseFloat($localSettings.originalServingUnitQuantity.toFixed($localSettings.decimalPlacesForNutrition))+"\n";if(($localSettings.valueServingSizeUnit==""||$localSettings.valueServingSizeUnit==null)&&$localSettings.valueServingWeightGrams>0){localNutritionLabel+=localTab4+"("+$localSettings.valueServingWeightGrams.toFixed($localSettings.decimalPlacesForQuantityTextbox)+"g)\n"}}}if(!servingSizeDivAlreadyClosed){localNutritionLabel+=localTab3+"\n\n"}}else{localServingSizeIsHidden=true}}return{servingSizeIsHidden:localServingSizeIsHidden,servingContainerIsHidden:localServingContainerIsHidden,nutritionLabel:localNutritionLabel}}NutritionLabel.prototype={generateLegacy:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium=$this.settings.naPotassium?false:$this.settings.showPotassium;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminA=$this.settings.naVitaminA?false:$this.settings.showVitaminA;$this.settings.showVitaminC=$this.settings.naVitaminC?false:$this.settings.showVitaminC;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";if($this.settings.showItemName){nutritionLabel+=itemNameHtmlLegacy($this.settings)}var sevingUnitQuantityHtmlLegacyResult=sevingUnitQuantityHtmlLegacy($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtmlLegacyResult.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtmlLegacyResult.servingContainerIsHidden;nutritionLabel+=sevingUnitQuantityHtmlLegacyResult.nutritionLabel;if((!$this.settings.showItemName&&!$this.settings.showServingUnitQuantity)||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)){nutritionLabel+=tab1+'
\n'}nutritionLabel+=tab1+'
\n';if($this.settings.showAmountPerServing){nutritionLabel+=tab1+'
';nutritionLabel+=""+$this.settings.textAmountPerServing+"";nutritionLabel+="
\n"}nutritionLabel+=tab1+'
\n';if($this.settings.showFatCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueFatCalories","unitFatCalories","naFatCalories","textFatCalories",tab2,"fr",2,"","","roundCalories")}if($this.settings.showCalories){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalories","unitCalories","naCalories","textCalories",tab2,"",1,"calories","","roundCalories")}else{if($this.settings.showFatCalories){nutritionLabel+=tab2+"
 
\n"}}nutritionLabel+=tab1+"
\n";nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
';nutritionLabel+="% "+$this.settings.textDailyValues+"*";nutritionLabel+="
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalFat","dailyValueTotalFat","unitTotalFat","naTotalFat","textTotalFat","line","fatContent","roundFat","roundFatRule",true)}if($this.settings.showSatFat){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSatFat","dailyValueSatFat","unitSatFat","naSatFat","textSatFat","line indent","saturatedFatContent","roundFat","roundFatRule",false)}if($this.settings.showTransFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat",tab1,"line indent",3,"transFatContent",tab2,"roundFat")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat",tab1,"line indent",2,"","","roundFat")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueCholesterol","dailyValueCholesterol","unitCholesterol","naCholesterol","textCholesterol","line","cholesterolContent","roundCholesterol","roundCholesterolRule",true)}if($this.settings.showSodium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueSodium","dailyValueSodium","unitSodium","naSodium","textSodium","line","sodiumContent","roundSodium","roundSodiumRule",true)}if($this.settings.showPotassium){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valuePotassium","dailyValuePotassium","unitPotassium","naPotassium","textPotassium","line","potassiumContent","roundPotassium","roundPotassiumRule",true)}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueTotalCarb","dailyValueCarb","unitTotalCarb","naTotalCarb","textTotalCarb","line","carbohydrateContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",true)}if($this.settings.showFibers){nutritionLabel+=generateAttributeWithPercentageHtmlLegacy($this.settings,"valueFibers","dailyValueFiber","unitFibers","naFibers","textFibers","line indent","fiberContent","roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule",false)}if($this.settings.showSugars){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueSugars","unitSugars","naSugars","textSugars",tab1,"line indent",4,"sugarContent","","roundCarbFiberSugarProtein")}if($this.settings.showProteins){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueProteins","unitProteins","naProteins","textProteins",tab1,"line",1,"proteinContent","","roundCarbFiberSugarProtein")}nutritionLabel+=tab1+'
\n';if($this.settings.showVitaminA){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminA","unitVitaminA","naVitaminA","textVitaminA",tab1,"line vitaminA",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showVitaminC){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueVitaminC","unitVitaminC","naVitaminC","textVitaminC",tab1,"line vitaminC",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showCalcium){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueCalcium","unitCalcium","naCalcium","textCalcium",tab1,"line calcium",5,"",tab2,"roundVitaminsCalciumIron")}if($this.settings.showIron){nutritionLabel+=generateAttributeWithoutPercentageHtmlLegacy($this.settings,"valueIron","unitIron","naIron","textIron",tab1,"line iron",5,"",tab2,"roundVitaminsCalciumIron")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+'* '+$this.settings.textPercentDailyPart1+" "+$this.settings.calorieIntake+" "+$this.settings.textPercentDailyPart2+".\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtmlLegacy($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtmlLegacy($this.settings)}nutritionLabel+=tab2+'
\n\n';if($this.settings.showCalorieDiet){nutritionLabel+=calorieDietHtmlLegacy($this.settings)}nutritionLabel+=tab1+'
\n\n';if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtmlLegacy($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'},generate2018:function(){var $this=this;if($this.nutritionLabel){return $this.nutritionLabel}if($this.settings.hideNotApplicableValues){$this.settings.showCalories=$this.settings.naCalories?false:$this.settings.showCalories;$this.settings.showFatCalories=$this.settings.naFatCalories?false:$this.settings.showFatCalories;$this.settings.showTotalFat=$this.settings.naTotalFat?false:$this.settings.showTotalFat;$this.settings.showSatFat=$this.settings.naSatFat?false:$this.settings.showSatFat;$this.settings.showTransFat=$this.settings.naTransFat?false:$this.settings.showTransFat;$this.settings.showPolyFat=$this.settings.naPolyFat?false:$this.settings.showPolyFat;$this.settings.showMonoFat=$this.settings.naMonoFat?false:$this.settings.showMonoFat;$this.settings.showCholesterol=$this.settings.naCholesterol?false:$this.settings.showCholesterol;$this.settings.showSodium=$this.settings.naSodium?false:$this.settings.showSodium;$this.settings.showPotassium_2018=$this.settings.naPotassium_2018?false:$this.settings.showPotassium_2018;$this.settings.showTotalCarb=$this.settings.naTotalCarb?false:$this.settings.showTotalCarb;$this.settings.showFibers=$this.settings.naFibers?false:$this.settings.showFibers;$this.settings.showSugars=$this.settings.naSugars?false:$this.settings.showSugars;$this.settings.showAddedSugars=$this.settings.naAddedSugars?false:$this.settings.showAddedSugars;$this.settings.showProteins=$this.settings.naProteins?false:$this.settings.showProteins;$this.settings.showVitaminD=$this.settings.naVitaminD?false:$this.settings.showVitaminD;$this.settings.showCalcium=$this.settings.naCalcium?false:$this.settings.showCalcium;$this.settings.showIron=$this.settings.naIron?false:$this.settings.showIron}for(x=1;x<9;x++){var tab="";for(y=1;y<=x;y++){tab+="\t"}eval("var tab"+x+' = "'+tab+'";')}var borderCSS="";if($this.settings.allowNoBorder){borderCSS="border: 0;"}var nutritionLabel='
\n'}else{nutritionLabel+=" width: "+$this.settings.widthCustom+';">\n'}nutritionLabel+=tab1+'
'+$this.settings.textNutritionFacts+"
\n";var sevingUnitQuantityHtml2018Result=sevingUnitQuantityHtml2018($this.settings);var servingSizeIsHidden=sevingUnitQuantityHtml2018Result.servingSizeIsHidden;var servingContainerIsHidden=sevingUnitQuantityHtml2018Result.servingContainerIsHidden;var showLineDiv=$this.settings.showItemName||(!$this.settings.showItemName&&servingSizeIsHidden&&servingContainerIsHidden)||(!$this.settings.showItemName&&$this.settings.originalServingUnitQuantity>0&&$this.settings.valueServingWeightGrams>0)||($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0);if(showLineDiv){nutritionLabel+=tab1+'
\n'}if($this.settings.showServingUnitQuantity&&$this.settings.originalServingUnitQuantity>0&&$this.settings.showServingsPerContainer&&$this.settings.valueServingPerContainer>0){nutritionLabel+=tab2+'
\n';nutritionLabel+=tab3+parseFloat($this.settings.valueServingPerContainer.toFixed($this.settings.decimalPlacesForNutrition));nutritionLabel+=" "+$this.settings.textServingsPerContainer+"\n";nutritionLabel+=tab2+"
\n\n"}nutritionLabel+=tab2+'
\n';nutritionLabel+=sevingUnitQuantityHtml2018Result.nutritionLabel;if($this.settings.showItemName){nutritionLabel+=itemNameHtml2018($this.settings)}nutritionLabel+=tab2+'
\n\n';if(showLineDiv){nutritionLabel+=tab1+'
\n\n'}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
Amount per serving
\n';if($this.settings.showCalories){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCalories","unitCalories","naCalories","textCalories","calories","nf-calories",false,"roundCalories","","","nf-pr","")}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+'% Daily Value*\n';nutritionLabel+=tab1+"
\n";if($this.settings.showTotalFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalFat","unitTotalFat","naTotalFat","textTotalFat","fatContent","nf-line",true,"roundFat","roundFatRule","nf-highlight","","dailyValueTotalFat")}if($this.settings.showSatFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSatFat","unitSatFat","naSatFat","textSatFat","saturatedFatContent","nf-line nf-indent",true,"roundFat","roundFatRule","","","dailyValueSatFat")}if($this.settings.showTransFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTransFat","unitTransFat","naTransFat","textTransFat","transFatContent","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showPolyFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valuePolyFat","unitPolyFat","naPolyFat","textPolyFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showMonoFat){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueMonoFat","unitMonoFat","naMonoFat","textMonoFat","","nf-line nf-indent",false,"roundFat","","","","")}if($this.settings.showCholesterol){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueCholesterol","unitCholesterol","naCholesterol","textCholesterol","cholesterolContent","nf-line",true,"roundCholesterol","roundCholesterolRule","nf-highlight","","dailyValueCholesterol")}if($this.settings.showSodium){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSodium","unitSodium","naSodium","textSodium","cholesterolContent","nf-line",true,"roundSodium","roundSodiumRule","nf-highlight","","dailyValueSodium")}if($this.settings.showTotalCarb){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueTotalCarb","unitTotalCarb","naTotalCarb","textTotalCarb","carbohydrateContent","nf-line",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","nf-highlight","","dailyValueCarb")}if($this.settings.showFibers){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueFibers","unitFibers","naFibers","textFibers","fiberContent","nf-line nf-indent",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueFiber")}if($this.settings.showSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueSugars","unitSugars","naSugars","textSugars","sugarContent","nf-line nf-indent",false,"roundCarbFiberSugarProtein","","","","")}if($this.settings.showAddedSugars){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueAddedSugars","unitAddedSugars","naAddedSugars","textAddedSugars1","","nf-line nf-indent2",true,"roundCarbFiberSugarProtein","roundCarbFiberSugarProteinRule","","","dailyValueAddedSugar")}if($this.settings.showProteins){nutritionLabel+=generateAttributeHtml2018Version($this.settings,"valueProteins","unitProteins","naProteins","textProteins","proteinContent","nf-line",false,"roundCarbFiberSugarProtein","","nf-highlight","","")}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n'}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab2+'
\n';if($this.settings.showVitaminD){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueVitaminD","dailyValueVitaminD","unitVitaminD_base","unitVitaminD_percent","naVitaminD","textVitaminD")}if($this.settings.showCalcium){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueCalcium","dailyValueCalcium","unitCalcium_base","unitCalcium_percent","naCalcium","textCalcium")}if($this.settings.showIron){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valueIron","dailyValueIron","unitIron_base","unitIron_percent","naIron","textIron")}if($this.settings.showPotassium_2018){nutritionLabel+=tab3+generateHtmlAndComputeValueGivenThePercentage($this.settings,"valuePotassium_2018","dailyValuePotassium_2018","unitPotassium_base","unitPotassium_percent","naPotassium_2018","textPotassium_2018")}nutritionLabel+=tab2+"
\n"}if($this.settings.showVitaminD||$this.settings.showCalcium||$this.settings.showIron||$this.settings.showPotassium_2018){nutritionLabel+=tab1+"
\n"}nutritionLabel+=tab1+'
\n';nutritionLabel+=tab1+'
\n';nutritionLabel+=tab2+$this.settings.textPercentDaily2018VersionPart1;nutritionLabel+=$this.settings.calorieIntake;nutritionLabel+=$this.settings.textPercentDaily2018VersionPart2+"\n";if($this.settings.showIngredients){nutritionLabel+=ingredientsHtml2018Version($this.settings)}if($this.settings.showDisclaimer){nutritionLabel+=disclaimerHtml2018Version($this.settings)}nutritionLabel+=tab1+"
\n";if($this.settings.showBottomLink){nutritionLabel+=bottomLinkHtml2018Version($this.settings,tab1)}if($this.settings.showCustomFooter){nutritionLabel+=tab1+'
'+$this.settings.valueCustomFooter+"
\n"}nutritionLabel+='
\n\n';return nutritionLabel+='
Data not available
\n'}}})(jQuery); \ No newline at end of file diff --git a/nutritionLabel-stable-ver-7.0.5.css b/nutritionLabel-stable-ver-7.0.5.css index 696be54..991b711 100644 --- a/nutritionLabel-stable-ver-7.0.5.css +++ b/nutritionLabel-stable-ver-7.0.5.css @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | diff --git a/nutritionLabel-stable-ver-7.0.5.js b/nutritionLabel-stable-ver-7.0.5.js index 50ca643..95b2865 100644 --- a/nutritionLabel-stable-ver-7.0.5.js +++ b/nutritionLabel-stable-ver-7.0.5.js @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | diff --git a/nutritionLabel.css b/nutritionLabel.css index 696be54..991b711 100644 --- a/nutritionLabel.css +++ b/nutritionLabel.css @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | diff --git a/nutritionLabel.js b/nutritionLabel.js index 1564ca6..7b24d84 100644 --- a/nutritionLabel.js +++ b/nutritionLabel.js @@ -9,7 +9,7 @@ * @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. | * @link http://www.nutritionix.com | * @github http://github.com/nutritionix/nutrition-label | - * @current version 7.0.9 | + * @current version 7.0.10 | * @stable version 7.0.5 | * @supported browser Firefox, Chrome, IE8+ | * @description To be able to create a FDA-style nutrition label with any nutrition data source | @@ -299,7 +299,7 @@ unitProteins : 'g', unitVitaminA : '%', unitVitaminC : '%', - unitVitaminD_base : 'mg', //this is for the 2018 version + unitVitaminD_base : 'mcg', //this is for the 2018 version unitVitaminD_percent : '%', //this is for the 2018 version unitCalcium : '%', unitCalcium_base : 'mg', //this is for the 2018 version diff --git a/package.json b/package.json index 7a3f5ac..0f14e8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nutrition-label-jquery-plugin", - "version": "7.0.9", + "version": "7.0.10", "description": "To be able to create a FDA-style nutrition label with any nutrition data source", "main": "nutritionLabel-min.js", "dependencies": {},