﻿jQuery(document).ready(function () {
    var maxHeight = 0;

    // Find tallest tab
    jQuery('.SlideTab').each(function (i) {
        if (jQuery(this).height() > maxHeight)
            maxHeight = jQuery(this).height();
    });

    maxHeight += 50;

    if (maxHeight < 500)
        maxHeight = 500;

    jQuery('.SlideTab').tabSwitch('create', { type: 'slide', width: 539, height: maxHeight });
});

function SwitchTab(i) {
    jQuery('.SlideTab').tabSwitch('moveTo', { index: i });
}

function PrevTab() {
    jQuery('.SlideTab').tabSwitch('moveStep', { step: -1 });
}

function NextTab() {
    jQuery('.SlideTab').tabSwitch('moveStep', { step: 1 });
}
