Did some moderate refactoring of share_with_friends

used very basic <script type="text/template"> strategy for js
templating. still dissatisfied with js and multiple injection points.
it seems improvements on the form output is necessary to avoid shooting
divs in an out of the markup.