.width() gets "...the current computed width" of the element that is used on, per the jQuery width documentation: http://api.jquery.com/width/, so the return value from $('#heatMapBar').width() is in pixels, not percent. I would suggest using developers tool to check the width, it may be that in #heatMapBar's current context, its width is 100px.
If you look here: http://jsfiddle.net/NkQXa/1/ you will see that #test is set to width:50%;, but it alerts the actual pixel width.