text: (function($) {
      $.fn.formToWizard = function(options) {
          options = $.extend({
              submitButton: ""
          }, options);
  
          var element = this;
  
          var steps = $(element).find("> fieldset");
          var count = steps.length;
          var submmitButtonName = options.submitButton;
          $(submmitButtonName).hide();
  
          // 2
          $(element).before("<ul id='steps'></ul>");
  
          steps.each(function(i) {
              $(this).wrap("<div id='step" + i + "' class='stepbox'></div>");
              $(this).append("<div id='step" + i + "commands' class='stepbox--nav'></div>");
  
              // 2
              var name = $(this).find("legend").html();
              $("#steps").append('<li id="stepDesc' + i + '"><span class="number">' + (i + 1) + '</span><span class="info">' + name + '</span></li>');
  
              if (i == 0) {
                  createNextButton(i);
                  selectStep(i);
              }
              else if (i == count - 1) {
                  $("#step" + i).hide();
                  createPrevButton(i);
              }
              else {
                  $("#step" + i).hide();
                  createNextButton(i);
                  createPrevButton(i);
              }
          });
  
          
  
          function createNextButton(i) {
              var stepName = "step" + i;
              $("#" + stepName + "commands").append("<a href='#' id='" + stepName + "Next' class=' navbtn next'>Volgende stap <i class='fa fa-arrow-right'></i></a>");
  
              $("#" + stepName + "Next").bind("click", function(e) {
                  $("#" + stepName).hide();
                  $("#step" + (i + 1)).show();
                  if (i + 2 == count) {
                      $(submmitButtonName).show();
                  } 
                  selectStep(i + 1);
              });
  
              $("#" + stepName + "commands").prev().on("keydown", function (e) {
                  if (e.keyCode == 13) {
                      if (i + 1 == count) {
                          $("#submitbutton").trigger('click');
                      } else {
                          $("#step" + i + "Next").trigger('click');
                      }
                      return false;
                  }
              });
  
  
          }
  
          function createPrevButton(i) {
              var stepName = "step" + i;
              $("#" + stepName + "commands").append("<a href='#' id='" + stepName + "Prev' class='navbtn prev'><i class='fa fa-arrow-left'></i> Vorige stap</a>");
  
              $("#" + stepName + "Prev").bind("click", function(e) {
                  $("#" + stepName).hide();
                  $("#step" + (i - 1)).show();
                  $(submmitButtonName).hide();
                  selectStep(i - 1);
              });
          }
  
          function selectStep(i) {
              $("#steps li").removeClass("current");
              $("#stepDesc" + i).addClass("current");
              $('input,select').focus();
          }
  
      }
  })(jQuery);
  