old_contents: (function (window, $) {
      $.fn.progressiveDatePicker = function (value, options) {
          return this.each(function () {
              var el = $(this);
              if (!Modernizr.touch || !Modernizr.inputtypes || !Modernizr.inputtypes.date) {
                  el.attr('type', 'text');
                  el.val(value);
                  el.datepicker(options);
              }
          });
      };
  })(window, jQuery);
new_contents: (function (window, $) {
      $.fn.progressiveDatePicker = function (value, options) {
          return this.each(function () {
              var el = $(this);
              if (!Modernizr.touch || !Modernizr.inputtypes || !Modernizr.inputtypes.date) {
                  try {
                      el.attr('type', 'text');
                  } catch (e) {}
                  el.val(value);
                  el.datepicker(options);
              }
          });
      };
  })(window, jQuery);
  
subject: Fix IE8 complaining when trying to set type attribute