<section class="col-sm-9"><!-- [et_pb_line_break_holder] --> <div class="region region-content"><!-- [et_pb_line_break_holder] --> <section id="block-system-main" class="block block-system clearfix"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --><div id="node-2242" class="node node-page clearfix" about="/?q=content/healthy-vending-machine-calculator" typeof="foaf:Document"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> <span property="dc:title" content="Healthy Vending Machine Calculator" class="rdf-meta element-hidden"></span><span property="sioc:num_replies" content="0" datatype="xsd:integer" class="rdf-meta element-hidden"></span><!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> <div class="content"><!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> <script><!-- [et_pb_line_break_holder] --> jQuery(document).ready(function($){<!-- [et_pb_line_break_holder] --> var hvmcHealthyHtml = '<span style="color: green"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Healthy</span>';<!-- [et_pb_line_break_holder] --> var hvmcNotHealthyHtml = '<span style="color: red"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not Healthy</span>';<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> /////////////////////////////////////////////////////////////////////////<!-- [et_pb_line_break_holder] --> // Functions for Calories From Fat (cff)<!-- [et_pb_line_break_holder] --> $("#hvmc-cff").keyup(function(){ dphssCffUpdate(); });<!-- [et_pb_line_break_holder] --> $("#hvmc-cff-tc").keyup(function(){ dphssCffUpdate(); });<!-- [et_pb_line_break_holder] --> function dphssCffUpdate(){<!-- [et_pb_line_break_holder] --> var hvmcCff = $("#hvmc-cff").val();<!-- [et_pb_line_break_holder] --> var hvmcCffTc = $("#hvmc-cff-tc").val();<!-- [et_pb_line_break_holder] --> if(hvmcCff && hvmcCffTc){<!-- [et_pb_line_break_holder] --> var hvmcCffResult = ( hvmcCff / hvmcCffTc ) * 100;<!-- [et_pb_line_break_holder] --> $("#hvmc-cff-result").val(hvmcCffResult.toFixed(0) + '%');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if(hvmcCffResult > 35) {<!-- [et_pb_line_break_holder] --> // not healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-cff-span").html(hvmcNotHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> else {<!-- [et_pb_line_break_holder] --> // healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-cff-span").html(hvmcHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --> else{<!-- [et_pb_line_break_holder] --> $("#hvmc-cff-result").val(''); <!-- [et_pb_line_break_holder] --> $("#hvmc-cff-span").html('');<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> /////////////////////////////////////////////////////////////////////////<!-- [et_pb_line_break_holder] --> // Functions for Saturated Fat (sf)<!-- [et_pb_line_break_holder] --> $("#hvmc-sf").keyup(function(){ dphssSfUpdate(); });<!-- [et_pb_line_break_holder] --> $("#hvmc-sf-tc").keyup(function(){ dphssSfUpdate(); });<!-- [et_pb_line_break_holder] --> function dphssSfUpdate(){<!-- [et_pb_line_break_holder] --> var hvmcSf = $("#hvmc-sf").val();<!-- [et_pb_line_break_holder] --> var hvmcSfTc = $("#hvmc-sf-tc").val();<!-- [et_pb_line_break_holder] --> if(hvmcSf && hvmcSfTc){<!-- [et_pb_line_break_holder] --> var hvmcSfResult = ( hvmcSf / hvmcSfTc ) * 100;<!-- [et_pb_line_break_holder] --> $("#hvmc-sf-result").val(hvmcSfResult.toFixed(0) + '%');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if(hvmcSfResult > 10) {<!-- [et_pb_line_break_holder] --> // not healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-sf-span").html(hvmcNotHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> else {<!-- [et_pb_line_break_holder] --> // healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-sf-span").html(hvmcHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --> else{<!-- [et_pb_line_break_holder] --> $("#hvmc-sf-result").val(''); <!-- [et_pb_line_break_holder] --> $("#hvmc-sf-span").html('');<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> /////////////////////////////////////////////////////////////////////////<!-- [et_pb_line_break_holder] --> // Functions for Sugar in Snacks (ss)<!-- [et_pb_line_break_holder] --> $("#hvmc-ss").keyup(function(){ dphssSsUpdate(); });<!-- [et_pb_line_break_holder] --> $("#hvmc-ss-tc").keyup(function(){ dphssSsUpdate(); });<!-- [et_pb_line_break_holder] --> function dphssSsUpdate(){<!-- [et_pb_line_break_holder] --> var hvmcSs = $("#hvmc-ss").val();<!-- [et_pb_line_break_holder] --> var hvmcSsTc = $("#hvmc-ss-tc").val();<!-- [et_pb_line_break_holder] --> if(hvmcSs && hvmcSsTc){<!-- [et_pb_line_break_holder] --> var hvmcSsResult = ( hvmcSs / hvmcSsTc ) * 100;<!-- [et_pb_line_break_holder] --> $("#hvmc-ss-result").val(hvmcSsResult.toFixed(0) + '%');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if(hvmcSsResult > 35) {<!-- [et_pb_line_break_holder] --> // not healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-ss-span").html(hvmcNotHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> else {<!-- [et_pb_line_break_holder] --> // healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-ss-span").html(hvmcHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --> else{<!-- [et_pb_line_break_holder] --> $("#hvmc-ss-result").val(''); <!-- [et_pb_line_break_holder] --> $("#hvmc-ss-span").html('');<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> /////////////////////////////////////////////////////////////////////////<!-- [et_pb_line_break_holder] --> // Functions for Sugar in Drinks (sd)<!-- [et_pb_line_break_holder] --> $("#hvmc-sd").keyup(function(){ dphssSdUpdate(); });<!-- [et_pb_line_break_holder] --> $("#hvmc-sd-tc").keyup(function(){ dphssSdUpdate(); });<!-- [et_pb_line_break_holder] --> function dphssSdUpdate(){<!-- [et_pb_line_break_holder] --> var hvmcSd = $("#hvmc-sd").val();<!-- [et_pb_line_break_holder] --> var hvmcSdTc = $("#hvmc-sd-tc").val();<!-- [et_pb_line_break_holder] --> if(hvmcSd && hvmcSdTc){<!-- [et_pb_line_break_holder] --> var hvmcSdResult = ( hvmcSd / hvmcSdTc ) * 100;<!-- [et_pb_line_break_holder] --> $("#hvmc-sd-result").val(hvmcSdResult.toFixed(0) + '%');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> if(hvmcSdResult > 35) {<!-- [et_pb_line_break_holder] --> // not healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-sd-span").html(hvmcNotHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> else {<!-- [et_pb_line_break_holder] --> // healthy<!-- [et_pb_line_break_holder] --> $("#hvmc-sd-span").html(hvmcHealthyHtml);<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> } <!-- [et_pb_line_break_holder] --> else{<!-- [et_pb_line_break_holder] --> $("#hvmc-sd-result").val(''); <!-- [et_pb_line_break_holder] --> $("#hvmc-sd-span").html('');<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> // Allow numbers only on certain fields<!-- [et_pb_line_break_holder] --> $(".numbersonly").keydown(function (e) {<!-- [et_pb_line_break_holder] --> // Allow: backspace, delete, tab, escape, enter and .<!-- [et_pb_line_break_holder] --> if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||<!-- [et_pb_line_break_holder] --> // Allow: Ctrl+A, Command+A<!-- [et_pb_line_break_holder] --> (e.keyCode == 65 && ( e.ctrlKey === true || e.metaKey === true ) ) || <!-- [et_pb_line_break_holder] --> // Allow: home, end, left, right, down, up<!-- [et_pb_line_break_holder] --> (e.keyCode >= 35 && e.keyCode <= 40)) {<!-- [et_pb_line_break_holder] --> // let it happen, don't do anything<!-- [et_pb_line_break_holder] --> return;<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> // Ensure that it is a number and stop the keypress<!-- [et_pb_line_break_holder] --> if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {<!-- [et_pb_line_break_holder] --> e.preventDefault();<!-- [et_pb_line_break_holder] --> }<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> </script><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <style><!-- [et_pb_line_break_holder] --> #hvmc {}<!-- [et_pb_line_break_holder] --> #hvmc p label { width: 275px; }<!-- [et_pb_line_break_holder] --> #hvmc p input { width: 50px; margin-right: .5em; }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> #hvmc table, #hvmc th, #hvmc td { border: solid 2px #ccc; }<!-- [et_pb_line_break_holder] --> #hvmc table tr td { padding: 1em;}<!-- [et_pb_line_break_holder] --> </style><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <div id="hvmc"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <table style="margin: 0px auto;"><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td><!-- [et_pb_line_break_holder] --> <div style="text-align: center"><!-- [et_pb_line_break_holder] --> <h1>Healthy Vending Machine Calculator</h1><!-- [et_pb_line_break_holder] --> <h3>Determine if your food or drink falls under Healthy Vending Machine Guidelines</h3><!-- [et_pb_line_break_holder] --> </div><!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <p><label>Calories From Fat</label> <input type="text" id="hvmc-cff" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Total Calories</label> <input type="text" id="hvmc-cff-tc" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Percent of Calories From Fat</label> <input type="text" id="hvmc-cff-result" readonly /><span id="hvmc-cff-span"></span></p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <p><label>Grams (g) of Saturated Fat</label> <input type="text" id="hvmc-sf" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Total Calories</label> <input type="text" id="hvmc-sf-tc" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Percent of Calories From Saturated Fat</label> <input type="text" id="hvmc-sf-result" readonly /><span id="hvmc-sf-span"></span></p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> <tr><!-- [et_pb_line_break_holder] --> <td><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <h2>Snack</h2><!-- [et_pb_line_break_holder] --> <p><label>Grams (g) of Sugar</label> <input type="text" id="hvmc-ss" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Total weight (g) per serving</label> <input type="text" id="hvmc-ss-tc" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Percent of Sugar By Weight</label> <input type="text" id="hvmc-ss-result" readonly /><span id="hvmc-ss-span"></span></p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <h2>Drink</h2><!-- [et_pb_line_break_holder] --> <p><label>Grams (g) of Sugar</label> <input type="text" id="hvmc-sd" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Total weight (oz) per serving</label> <input type="text" id="hvmc-sd-tc" class="numbersonly" /></p><!-- [et_pb_line_break_holder] --> <p><label>Percent of Sugar By Weight</label> <input type="text" id="hvmc-sd-result" readonly /><span id="hvmc-sd-span"></span></p><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> </td><!-- [et_pb_line_break_holder] --> </tr><!-- [et_pb_line_break_holder] --> </table><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> </div><!-- /#hvmc --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] --></div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --></section> <!-- /.block --><!-- [et_pb_line_break_holder] --> </div><!-- [et_pb_line_break_holder] --> </section>