/* Process Steps */
/* -------------------------------------------------------------------- */

function mk_process_steps() {
    if ($.exists('.mk-process-steps.horizontal')) {

        $('.mk-process-steps.horizontal').each(function() {

            var $this = $(this),
                $tabs = $this.find('.step-items'),
                $panes = $this.find('.step-panes'),
                $panes_responsive = $this.find('.step-panes-responsive');

            $tabs.find('li').first().addClass('active-step-item');

            $panes.css('height', $panes.find('.mk-step').first().outerHeight() + 30);
            $panes.find('.mk-step').first().addClass('active-step');


            $tabs.find('span').hoverIntent(function() {
                var $this_id = $(this).attr('data-id'),
                    $this_pane = $panes.find('div[id^="' + $this_id + '"]'),
                    $pane_height = $this_pane.outerHeight() + 30;

                $(this).parent().siblings('li').removeClass('active-step-item').end().addClass('active-step-item');

                $panes.css('height', $pane_height);
                $panes.find('.mk-step').removeClass('active-step'); 
                $this_pane.addClass('active-step');
            });

            

        });

    }
}
