 $(document).ready(function() {
      //Only run the script on iPhone type units.
      if(typeof isTierIphone != 'undefined' && isTierIphone) {
        $("body").addClass("touchVersion");
        $(".tableFormatMatrix thead").find(".textQAnsweralternative").each(function(i) {
          var verticalText = TouchModifications.verticalText($(this).text(), 0.6);
          $(this).parents("td,th").first().css("vertical-align","bottom");
          $(this).empty().css("line-height","70%").prepend(verticalText);
        });
      }
 });
 var TouchModifications = {
   verticalText : function(text, k) {
      if(isNaN(k)) k = 0;
      var s = text.split("");
      var vtext = "";
      var length=s.length;
      for(var i=0; i<length; i++) {
        vtext += "<div style='position: relative; left: -" + ((length - i) * k - 1) + "em;'>" + s[i] + "</div>";
      }
      return  vtext;
   }
 };
